20 |
* The live time corresponding to each event will contribute to the bin corresponding to the cutoff rigidity |
* The live time corresponding to each event will contribute to the bin corresponding to the cutoff rigidity |
21 |
* of the event, eg., the lowest bin whose lower limit is greater than the cutoff rigidity of the event times |
* of the event, eg., the lowest bin whose lower limit is greater than the cutoff rigidity of the event times |
22 |
* a coefficient (threshold coefficient, see constructor). If threshold*cutoff is lower than the |
* a coefficient (threshold coefficient, see constructor). If threshold*cutoff is lower than the |
23 |
* lower limit of the rigidity axis, then the live time will be added to the "zero bin", eg., a special bin |
* lower limit of the rigidity axis, then the live time will be added to the "inferior bin", eg., a special bin |
24 |
* ranging from 0 to the lower limit. This special bin will be saved in a separate file. |
* ranging from 0 to the lower limit. This special bin will be saved in a separate file. |
25 |
* |
* |
26 |
*/ |
*/ |
31 |
* |
* |
32 |
* 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 |
33 |
* and .root for ROOT output. "-report" will be also added for the report file (in which |
* and .root for ROOT output. "-report" will be also added for the report file (in which |
34 |
* the content of the zero bin will be saved). outFileBase has to contain the path (otherwise, |
* the content of the inferior bin will be saved). outFileBase has to contain the path (otherwise, |
35 |
* files will be saved in the current directory). |
* files will be saved in the current directory). |
36 |
* 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 |
37 |
* 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 |
49 |
* |
* |
50 |
* 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 |
51 |
* and .root for ROOT output. "-report" will be also added for the report file (in which |
* and .root for ROOT output. "-report" will be also added for the report file (in which |
52 |
* the content of the zero bins will be saved). outFileBase has to contain the path (otherwise, |
* the content of the inferior bin will be saved). outFileBase has to contain the path (otherwise, |
53 |
* files will be saved in the current directory). |
* files will be saved in the current directory). |
54 |
* |
* |
55 |
* @param actionName The action's name. |
* @param actionName The action's name. |
68 |
* |
* |
69 |
* The live time of the current event will be added to the lowest bin whose lower limit is greater than |
* The live time of the current event will be added to the lowest bin whose lower limit is greater than |
70 |
* the cutoff rigidity multiplied by the threshold coefficient. If threshold*cutoff is lower than the |
* the cutoff rigidity multiplied by the threshold coefficient. If threshold*cutoff is lower than the |
71 |
* lower limit, the live time will be added to the "zero bin". |
* lower limit, the live time will be added to the "inferior bin". |
72 |
* |
* |
73 |
* @param event The selected event. |
* @param event The selected event. |
74 |
*/ |
*/ |
77 |
/*! @brief Writes the histogram to the output files (ASCII and ROOT). |
/*! @brief Writes the histogram to the output files (ASCII and ROOT). |
78 |
* |
* |
79 |
* The output consists of a text file and of a ROOT file where the 1-dimensional rigidity |
* The output consists of a text file and of a ROOT file where the 1-dimensional rigidity |
80 |
* histogram (TH1F) is saved. Additionally, another text file will store the content of the "zero bin" |
* histogram (TH1F) is saved. Additionally, another text file will store the content of the "inferior bin" |
81 |
* and the total live time. |
* and the total live time for all the "normal" bins. |
82 |
*/ |
*/ |
83 |
void Finalize(); |
void Finalize(); |
84 |
|
|
85 |
/*! @brief Returns the histogram. |
/*! @brief Returns the histogram for normal bins. |
86 |
* |
* |
87 |
* This method returns a vector filled with the LT (in seconds) corresponding to each |
* This method returns a vector filled with the LT (in seconds) corresponding to each |
88 |
* threshold rigidity bin (in GV) defined in the binning argument of the constructor. |
* threshold rigidity bin (in GV) defined in the binning argument of the constructor. |
91 |
* |
* |
92 |
* @return The LT histogram binned in threshold rigidity. |
* @return The LT histogram binned in threshold rigidity. |
93 |
*/ |
*/ |
94 |
std::vector<float> &GetHisto() { |
std::vector<double> &GetHisto() { |
95 |
return _textHisto; |
return _textHisto; |
96 |
} |
} |
97 |
|
|
98 |
/*! @brief Returns the live time spent at rigidities below the lower limit (the "zero bin"). */ |
/*! @brief Returns the total live time (s) spent at threshold rigidities within all "normal" bins (excluding the "inferior bin") */ |
99 |
float GetZeroBin() { |
double GetTotalLTHisto() { |
100 |
return _zeroBin; |
return _totalNorm; |
101 |
} |
} |
102 |
|
|
103 |
/*! @brief Returns the total live time. */ |
/*! @brief Returns the live time (s) spent at threshold rigidities within the "inferior bin". */ |
104 |
float GetTotalLT() { |
double GetLTInfBin() { |
105 |
return _total; |
return _infBin; |
106 |
|
} |
107 |
|
|
108 |
|
/*! @brief Returns the number of events at threshold rigidities within all "normal" bins (excluding the "inferior bin") */ |
109 |
|
UInt_t GetNGoodHisto() { |
110 |
|
return _nGoodHisto; |
111 |
|
} |
112 |
|
|
113 |
|
/*! @brief Returns the number of events within the "inferior bin" */ |
114 |
|
UInt_t GetNGoodInfBin() { |
115 |
|
return _nGoodInfBin; |
116 |
} |
} |
117 |
|
|
118 |
private: |
private: |
120 |
TString _outFileBase; |
TString _outFileBase; |
121 |
vector<float> _bins; |
vector<float> _bins; |
122 |
TH1F _rootHisto; |
TH1F _rootHisto; |
123 |
vector<float> _textHisto; |
vector<double> _textHisto; |
124 |
float _thresholdCoeff; |
float _thresholdCoeff; |
125 |
|
|
126 |
float _total; |
double _totalNorm; |
127 |
float _zeroBin; |
double _infBin; |
128 |
|
|
129 |
void _InitHistos(vector<float> &bins); |
void _InitHistos(vector<float> &bins); |
130 |
|
|
131 |
|
UInt_t _nGoodHisto; |
132 |
|
UInt_t _nGoodInfBin; |
133 |
|
|
134 |
#ifdef DEBUGPAMCUT |
#ifdef DEBUGPAMCUT |
135 |
int _outUp, _outDown; |
int _outUp, _outDown; |
136 |
#endif |
#endif |