| 22 |
* lie in that bin. Note that the meaning of this threshold coefficient is the same as in |
* lie in that bin. Note that the meaning of this threshold coefficient is the same as in |
| 23 |
* TrkRigGeoCut, so it must have the same value used for TrkRigGeoCut (consider |
* TrkRigGeoCut, so it must have the same value used for TrkRigGeoCut (consider |
| 24 |
* using TrkRigGeoCut::GetThresholdCoeff() to retrieve its value). |
* using TrkRigGeoCut::GetThresholdCoeff() to retrieve its value). |
| 25 |
|
* Events whose critical rigidity is below the lower limit of the axis are recorded in a vector of |
| 26 |
|
* "zero bins", which range from zero to the the lowest critical rigidity. |
| 27 |
* Events are discarded only if their rigidity modulus or cutoff rigidity lies |
* Events are discarded only if their rigidity modulus or cutoff rigidity lies |
| 28 |
* outside the histogram bounds. |
* outside the histogram bounds. |
| 29 |
* |
* |
| 36 |
/*! @brief Constructor. |
/*! @brief Constructor. |
| 37 |
* |
* |
| 38 |
* outFileBase is the base name for output file: #Finalize will add .txt for ASCII output |
* outFileBase is the base name for output file: #Finalize will add .txt for ASCII output |
| 39 |
* and .root for ROOT output. outFileBase has to contain the path (otherwise, files will be |
* and .root for ROOT output. "-report" will be also added for the report file (in which |
| 40 |
* saved in the current directory). |
* the content of the zero bins will be saved). outFileBase has to contain the path (otherwise, |
| 41 |
|
* files will be saved in the current directory). |
| 42 |
* The file containing the rigidity bins must be a text file. It must contain both the |
* The file containing the rigidity bins must be a text file. It must contain both the |
| 43 |
* lower and upper limits of the rigidity axis, so that if it contains N values it |
* lower and upper limits of the rigidity axis, so that if it contains N values it |
| 44 |
* defines a set of N-1 bins. |
* defines a set of N-1 bins. |
| 45 |
* |
* |
| 46 |
* @param actionName The action's name. |
* @param actionName The action's name. |
| 47 |
* @param outFileBase The output file base name. |
* @param outFileBase The output file base name. If "" is given as name, |
| 48 |
* @param rigBinsFile The file containing the rigidity bins. |
* no file output will be performed. |
| 49 |
|
* @param rigBinsFile The file containing the rigidity bins |
| 50 |
* @param thresholdCoeff The threshold coefficient for critical rigidity. |
* @param thresholdCoeff The threshold coefficient for critical rigidity. |
| 51 |
*/ |
*/ |
| 52 |
RigFillAction(const char *actionName, TString outFileBase, TString rigBinsFile, float thresholdCoeff); |
RigFillAction(const char *actionName, TString outFileBase, TString rigBinsFile, float thresholdCoeff); |
| 53 |
|
|
| 54 |
|
/*! @brief Constructor. |
| 55 |
|
* |
| 56 |
|
* outFileBase is the base name for output file: #Finalize will add .txt for ASCII output |
| 57 |
|
* and .root for ROOT output. "-report" will be also added for the report file (in which |
| 58 |
|
* the content of the zero bins will be saved). outFileBase has to contain the path (otherwise, |
| 59 |
|
* files will be saved in the current directory). |
| 60 |
|
* |
| 61 |
|
* @param actionName The action's name. |
| 62 |
|
* @param outFileBase The output file base name. If "" is given as name, |
| 63 |
|
* no file output will be performed. |
| 64 |
|
* @param bins A vector containing the bins limits. |
| 65 |
|
* @param thresholdCoeff The threshold coefficient for critical rigidity. |
| 66 |
|
*/ |
| 67 |
|
RigFillAction(const char *actionName, TString outFileBase, vector<float> &bins, float thresholdCoeff); |
| 68 |
|
|
| 69 |
/*! @brief Destructor */ |
/*! @brief Destructor */ |
| 70 |
~RigFillAction() { |
~RigFillAction() { |
| 71 |
} |
} |
| 95 |
* |
* |
| 96 |
* @return The rigidity modulus - threshold rigidity 2D histogram. |
* @return The rigidity modulus - threshold rigidity 2D histogram. |
| 97 |
*/ |
*/ |
| 98 |
SimpleMatrix<UInt_t> &GetHisto() { |
SimpleMatrix<UInt_t>& GetHisto() { |
| 99 |
return _textHisto; |
return _textHisto; |
| 100 |
} |
} |
| 101 |
|
|
| 102 |
|
/*! @brief Returns the vector of cutoff rigidity zero bins */ |
| 103 |
|
vector<UInt_t>& GetCutoffZeroBins() { |
| 104 |
|
return _zeroCutoffBins; |
| 105 |
|
} |
| 106 |
|
|
| 107 |
private: |
private: |
| 108 |
|
|
| 109 |
TString _outFileBase; |
TString _outFileBase; |
| 110 |
vector<float> _bins; |
vector<float> _bins; |
| 111 |
TH2I _rootHisto; |
TH2I _rootHisto; |
| 112 |
SimpleMatrix<UInt_t> _textHisto; |
SimpleMatrix<UInt_t> _textHisto; |
| 113 |
|
vector<UInt_t> _zeroCutoffBins; |
| 114 |
float _thresholdCoeff; |
float _thresholdCoeff; |
| 115 |
|
|
| 116 |
|
void _InitHistos(vector<float> &bins); |
| 117 |
|
|
| 118 |
}; |
}; |
| 119 |
#endif /* RIGFILLACTION_H_ */ |
#endif /* RIGFILLACTION_H_ */ |