12 using namespace sistrip;
28 <<
"[PedsOnlyAlgorithm::" << __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();
60 hNoise_.second = (*ihis)->GetName();
65 hPeds_.second = (*ihis)->GetName();
68 hNoise_.second = (*ihis)->GetName();
83 <<
"[PedsOnlyAlgorithm::" << __func__ <<
"]"
84 <<
" NULL pointer to base Analysis object!";
92 <<
"[PedsOnlyAlgorithm::" << __func__ <<
"]"
93 <<
" NULL pointer to derived Analysis object!";
107 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
108 TProfile* raw_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
120 if ( peds_histo->GetNbinsX() != 256 ) {
125 if ( raw_histo->GetNbinsX() != 256 ) {
131 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
138 for ( uint16_t istr = 0; istr < 128; istr++ ) {
140 static uint16_t strip;
141 strip = iapv*128 + istr;
145 if ( peds_histo->GetBinEntries(strip+1) ) {
146 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
147 p_sum += anal->
peds_[iapv][istr];
148 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
149 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
150 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
157 if ( raw_histo->GetBinEntries(strip+1) ) {
158 anal->
raw_[iapv][istr] = raw_histo->GetBinContent(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]; }
167 if ( peds_histo->GetBinEntries(strip+1) ) {
168 anal->
raw_[iapv][istr] = raw_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]; }
180 if ( !anal->
peds_[iapv].empty() ) {
181 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
182 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
188 if ( !anal->
raw_[iapv].empty() ) {
189 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
190 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
static const char unexpectedTask_[]
Histogram-based analysis for pedestal run.
const uint32_t & fedKey() const
Utility class that holds histogram title.
static const char numberOfHistos_[]
static const char unexpectedExtraInfo_[]
static const char numberOfBins_[]
static const char mlCommissioning_[]
uint32_t extractFedKey(const TH1 *const )
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
void extract(const std::vector< TH1 * > &)
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_[]