20 deadStripMax_(pset.getParameter<double>(
"DeadStripMax")),
21 noisyStripMin_(pset.getParameter<double>(
"NoisyStripMin"))
24 <<
"[PedestalsAlgorithm::" << __func__ <<
"]" 25 <<
" Set maximum noise deviation for dead strip determination to: " <<
deadStripMax_;
27 <<
"[PedestalsAlgorithm::" << __func__ <<
"]" 28 <<
" Set minimal noise deviation for noisy strip determination to: " <<
noisyStripMin_;
37 <<
"[PedestalsAlgorithm::" << __func__ <<
"]" 38 <<
" NULL pointer to Analysis object!";
43 if ( histos.size() != 2 ) {
51 std::vector<TH1*>::const_iterator ihis = histos.begin();
52 for ( ; ihis != histos.end(); ihis++ ) {
55 if ( !(*ihis) ) {
continue; }
67 hPeds_.second = (*ihis)->GetName();
72 hNoise_.second = (*ihis)->GetName();
77 hPeds_.second = (*ihis)->GetName();
80 hNoise_.second = (*ihis)->GetName();
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 uint16_t
strip = iapv*128 + istr;
159 if ( peds_histo->GetBinEntries(strip+1) ) {
161 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
162 p_sum += anal->
peds_[iapv][istr];
163 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
164 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
165 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
167 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
168 r_sum += anal->
raw_[iapv][istr];
169 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
170 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
171 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
178 if ( noise_histo->GetBinEntries(strip+1) ) {
179 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
180 n_sum += anal->
noise_[iapv][istr];
181 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
182 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
183 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
190 if ( !anal->
peds_[iapv].empty() ) {
191 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
192 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
198 if ( !anal->
noise_[iapv].empty() ) {
199 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
200 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
206 if ( !anal->
raw_[iapv].empty() ) {
207 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
208 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
222 for ( uint16_t istr = 0; istr < 128; istr++ ) {
226 anal->
dead_[iapv].push_back(istr);
229 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_[]
static const char mlCommissioning_[]
void extract(const std::vector< TH1 * > &) override
uint32_t extractFedKey(const TH1 *const )
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_[]