28 <<
"[NoiseAlgorithm::" << __func__ <<
"]" 29 <<
" NULL pointer to Analysis object!";
34 if ( histos.size() != 2 ) {
42 std::vector<TH1*>::const_iterator ihis = histos.begin();
43 for ( ; ihis != histos.end(); ihis++ ) {
46 if ( !(*ihis) ) {
continue; }
58 hPeds_.second = (*ihis)->GetName();
63 hNoise_.second = (*ihis)->GetName();
68 hPeds_.second = (*ihis)->GetName();
71 hNoise_.second = (*ihis)->GetName();
88 <<
"[NoiseAlgorithm::" << __func__ <<
"]" 89 <<
" NULL pointer to base Analysis object!";
97 <<
"[NoiseAlgorithm::" << __func__ <<
"]" 98 <<
" NULL pointer to derived Analysis object!";
112 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
113 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
120 if ( !noise_histo ) {
125 if ( peds_histo->GetNbinsX() != 256 ) {
130 if ( noise_histo->GetNbinsX() != 256 ) {
136 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
144 for ( uint16_t istr = 0; istr < 128; istr++ ) {
146 uint16_t
strip = iapv*128 + istr;
150 if ( peds_histo->GetBinEntries(strip+1) ) {
152 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
153 p_sum += anal->
peds_[iapv][istr];
154 p_sum2 += ( anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr] );
155 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
156 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
158 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
159 r_sum += anal->
raw_[iapv][istr];
160 r_sum2 += ( anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr] );
161 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
162 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
169 if ( noise_histo->GetBinEntries(strip+1) ) {
170 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
171 n_sum += anal->
noise_[iapv][istr];
172 n_sum2 += ( anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr] );
173 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
174 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
181 if ( !anal->
peds_[iapv].empty() ) {
182 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
183 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
189 if ( !anal->
noise_[iapv].empty() ) {
190 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
191 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
197 if ( !anal->
raw_[iapv].empty() ) {
198 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
199 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
213 for ( uint16_t istr = 0; istr < 128; istr++ ) {
217 anal->
dead_[iapv].push_back(istr);
220 anal->
noisy_[iapv].push_back(istr);
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
static const char numberOfHistos_[]
static const char unexpectedExtraInfo_[]
static const char numberOfBins_[]
void extract(const std::vector< TH1 * > &)
static const char mlCommissioning_[]
uint32_t extractFedKey(const TH1 *const )
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const uint16_t invalid_
std::vector< std::vector< double > > tmp
Histogram-based analysis for pedestal run.
Abstract base for derived classes that provide analysis of commissioning histograms.
CommissioningAnalysis *const anal() const
static const char nullPtr_[]