--- PamCut/CollectionActions/RigFillAction/RigFillAction.h 2009/07/17 08:22:48 1.1 +++ PamCut/CollectionActions/RigFillAction/RigFillAction.h 2009/08/05 17:05:01 1.2 @@ -22,6 +22,8 @@ * lie in that bin. Note that the meaning of this threshold coefficient is the same as in * TrkRigGeoCut, so it must have the same value used for TrkRigGeoCut (consider * using TrkRigGeoCut::GetThresholdCoeff() to retrieve its value). + * Events whose critical rigidity is below the lower limit of the axis are recorded in a vector of + * "zero bins", which range from zero to the the lowest critical rigidity. * Events are discarded only if their rigidity modulus or cutoff rigidity lies * outside the histogram bounds. * @@ -34,19 +36,36 @@ /*! @brief Constructor. * * outFileBase is the base name for output file: #Finalize will add .txt for ASCII output - * and .root for ROOT output. outFileBase has to contain the path (otherwise, files will be - * saved in the current directory). + * and .root for ROOT output. "-report" will be also added for the report file (in which + * the content of the zero bins will be saved). outFileBase has to contain the path (otherwise, + * files will be saved in the current directory). * The file containing the rigidity bins must be a text file. It must contain both the * lower and upper limits of the rigidity axis, so that if it contains N values it * defines a set of N-1 bins. * * @param actionName The action's name. - * @param outFileBase The output file base name. - * @param rigBinsFile The file containing the rigidity bins. + * @param outFileBase The output file base name. If "" is given as name, + * no file output will be performed. + * @param rigBinsFile The file containing the rigidity bins * @param thresholdCoeff The threshold coefficient for critical rigidity. */ RigFillAction(const char *actionName, TString outFileBase, TString rigBinsFile, float thresholdCoeff); + /*! @brief Constructor. + * + * outFileBase is the base name for output file: #Finalize will add .txt for ASCII output + * and .root for ROOT output. "-report" will be also added for the report file (in which + * the content of the zero bins will be saved). outFileBase has to contain the path (otherwise, + * files will be saved in the current directory). + * + * @param actionName The action's name. + * @param outFileBase The output file base name. If "" is given as name, + * no file output will be performed. + * @param bins A vector containing the bins limits. + * @param thresholdCoeff The threshold coefficient for critical rigidity. + */ + RigFillAction(const char *actionName, TString outFileBase, vector &bins, float thresholdCoeff); + /*! @brief Destructor */ ~RigFillAction() { } @@ -76,17 +95,25 @@ * * @return The rigidity modulus - threshold rigidity 2D histogram. */ - SimpleMatrix &GetHisto() { + SimpleMatrix& GetHisto() { return _textHisto; } + /*! @brief Returns the vector of cutoff rigidity zero bins */ + vector& GetCutoffZeroBins() { + return _zeroCutoffBins; + } + private: TString _outFileBase; vector _bins; TH2I _rootHisto; SimpleMatrix _textHisto; + vector _zeroCutoffBins; float _thresholdCoeff; + void _InitHistos(vector &bins); + }; #endif /* RIGFILLACTION_H_ */