21 deadStripMax_(pset.getParameter<double>(
"DeadStripMax")),
22 noisyStripMin_(pset.getParameter<double>(
"NoisyStripMin"))
31 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 32 <<
" NULL pointer to base Analysis object!";
37 if ( histos.size() != 3 ) {
45 std::vector<TH1*>::const_iterator ihis = histos.begin();
46 for ( ; ihis != histos.end(); ihis++ ) {
49 if ( !(*ihis) ) {
continue; }
62 hPeds_.second = (*ihis)->GetName();
66 hNoise_.second = (*ihis)->GetName();
69 hPeds_.second = (*ihis)->GetName();
72 hNoise_.second = (*ihis)->GetName();
78 histo_.second = (*ihis)->GetName();
89 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 90 <<
" NULL pointer to base Analysis object!";
98 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 99 <<
" NULL pointer to derived Analysis object!";
120 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
121 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
123 TProfile* scope_histo =
dynamic_cast<TProfile*
>(
histo_.first);
130 if ( !noise_histo ) {
135 if ( !scope_histo ) {
140 if ( peds_histo->GetNbinsX() != 256 ) {
145 if ( noise_histo->GetNbinsX() != 256 ) {
150 if ( scope_histo->GetNbinsX() != 298 ) {
157 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
165 for ( uint16_t istr = 0; istr < 128; istr++ ) {
166 uint16_t
strip = iapv*128 + istr;
170 if ( peds_histo->GetBinEntries(strip+1) ) {
171 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
172 p_sum += anal->
peds_[iapv][istr];
173 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
174 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
175 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
177 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
178 r_sum += anal->
raw_[iapv][istr];
179 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
180 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
181 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
187 if ( noise_histo->GetBinEntries(strip+1) ) {
188 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
189 n_sum += anal->
noise_[iapv][istr];
190 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
191 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
192 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
198 if (!anal->
peds_[iapv].empty()) {
199 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
200 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
206 if ( !anal->
noise_[iapv].empty() ) {
207 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
208 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
214 if ( !anal->
raw_[iapv].empty() ) {
215 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
216 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
230 for ( uint16_t istr = 0; istr < 128; istr++ ) {
234 anal->
dead_[iapv].push_back(istr);
237 anal->
noisy_[iapv].push_back(istr);
243 anal->
peak_ = (scope_histo->GetBinContent(287)+scope_histo->GetBinContent(288))/2.;
244 anal->
base_ = (scope_histo->GetBinContent(1)+scope_histo->GetBinContent(2)+scope_histo->GetBinContent(3)+scope_histo->GetBinContent(4)+scope_histo->GetBinContent(5))/5.;
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
static const char numberOfHistos_[]
static const char numberOfBins_[]
static const float tickMarkHeightThreshold_
static const char mlCommissioning_[]
uint32_t extractFedKey(const TH1 *const )
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const char smallTickMarkHeight_[]
void extract(const std::vector< TH1 * > &) override
static const uint16_t invalid_
std::vector< std::vector< double > > tmp
Abstract base for derived classes that provide analysis of commissioning histograms.
void addErrorCode(const std::string &error) override
CommissioningAnalysis *const anal() const
static const char nullPtr_[]
Analysis for scope mode data.