/* * TrkSigmaDeflHistoAction.h * * Created on: 2009-06-17 * Author: S. Ricciarini */ /*! @file TrkSigmaDeflHistoAction.h The TrkSigmaDeflHistoAction class declaration file. */ #ifndef TrkSigmaDeflHISTOACTION_H_ #define TrkSigmaDeflHISTOACTION_H_ #include "../CollectionAction/CollectionAction.h" #include /*! @brief An action that, given the rigidity bins, fills the histogram with the number of events for which the deflection error (sigma_defl) is smaller than minimum bin deflection=1/(maximum bin rigidity). For each event, the content of ALL the rigidity bins, which satisfy the above condition, is increased by 1. */ class TrkSigmaDeflHistoAction: public CollectionAction { public: /*! @brief Constructor. * * @param actionName The action's name. * @param binning A vector containing the histogram binning in rigidity (with sign) */ TrkSigmaDeflHistoAction(const char *actionName, std::vector binning); /*! @brief Destructor */ ~TrkSigmaDeflHistoAction() { } /*! @brief Fills histogram with the selected event. * * @param event The selected event. */ void OnGood(PamLevel2 *event); void Finalize() { } /*! @brief Returns the histogram. * * @return A reference to a vector containing the values of the bins of the histogram. */ vector &GetHisto() { return _histogram; } private: std::vector _binning; vector _histogram; }; #endif /* TrkSigmaDeflHISTOACTION_H_ */