Performs histogram anaysis.
97 <<
"[PedestalsAlgorithm::" << __func__ <<
"]"
98 <<
" NULL pointer to base Analysis object!";
106 <<
"[PedestalsAlgorithm::" << __func__ <<
"]"
107 <<
" NULL pointer to derived Analysis object!";
121 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
122 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
129 if ( !noise_histo ) {
134 if ( peds_histo->GetNbinsX() != 256 ) {
139 if ( noise_histo->GetNbinsX() != 256 ) {
145 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
153 for ( uint16_t istr = 0; istr < 128; istr++ ) {
155 static uint16_t
strip;
156 strip = iapv*128 + istr;
160 if ( peds_histo->GetBinEntries(strip+1) ) {
162 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
163 p_sum += anal->
peds_[iapv][istr];
164 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
165 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
166 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
168 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
169 r_sum += anal->
raw_[iapv][istr];
170 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
171 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
172 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
179 if ( noise_histo->GetBinEntries(strip+1) ) {
180 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
181 n_sum += anal->
noise_[iapv][istr];
182 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
183 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
184 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
191 if ( !anal->
peds_[iapv].empty() ) {
192 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
193 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
199 if ( !anal->
noise_[iapv].empty() ) {
200 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
201 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
207 if ( !anal->
raw_[iapv].empty() ) {
208 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
209 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
223 for ( uint16_t istr = 0; istr < 128; istr++ ) {
227 anal->
dead_[iapv].push_back(istr);
230 anal->
noisy_[iapv].push_back(istr);
static const char numberOfBins_[]
static const char mlCommissioning_[]
Histogram-based analysis for pedestal run.
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const uint16_t invalid_
std::vector< std::vector< double > > tmp
Abstract base for derived classes that provide analysis of commissioning histograms.
CommissioningAnalysis *const anal() const
static const char nullPtr_[]