12 using namespace sistrip;
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 static uint16_t
strip;
147 strip = iapv*128 + istr;
151 if ( peds_histo->GetBinEntries(strip+1) ) {
153 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
154 p_sum += anal->
peds_[iapv][istr];
155 p_sum2 += ( anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr] );
156 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
157 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
159 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
160 r_sum += anal->
raw_[iapv][istr];
161 r_sum2 += ( anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr] );
162 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
163 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
170 if ( noise_histo->GetBinEntries(strip+1) ) {
171 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
172 n_sum += anal->
noise_[iapv][istr];
173 n_sum2 += ( anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr] );
174 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
175 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
182 if ( !anal->
peds_[iapv].empty() ) {
183 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
184 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
190 if ( !anal->
noise_[iapv].empty() ) {
191 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
192 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
198 if ( !anal->
raw_[iapv].empty() ) {
199 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
200 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
214 for ( uint16_t istr = 0; istr < 128; istr++ ) {
218 anal->
dead_[iapv].push_back(istr);
221 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_[]