23 deadStripMax_(pset.getParameter<double>(
"DeadStripMax")),
24 noisyStripMin_(pset.getParameter<double>(
"NoisyStripMin"))
33 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 34 <<
" NULL pointer to base Analysis object!";
43 std::vector<TH1*>::const_iterator ihis = histos.begin();
44 for ( ; ihis != histos.end(); ihis++ ) {
47 if ( !(*ihis) ) {
continue; }
60 hPeds_.second = (*ihis)->GetName();
64 hNoise_.second = (*ihis)->GetName();
67 hPeds_.second = (*ihis)->GetName();
70 hNoise_.second = (*ihis)->GetName();
76 histo_.second = (*ihis)->GetName();
95 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 96 <<
" NULL pointer to base Analysis object!";
104 <<
"[DaqScopeModeAlgorithm::" << __func__ <<
"]" 105 <<
" NULL pointer to derived Analysis object!";
134 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
135 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
137 TProfile* scope_histo =
dynamic_cast<TProfile*
>(
histo_.first);
138 TH1F* headerLow_histo =
dynamic_cast<TH1F*
>(
headerLow_.first);
139 TH1F* headerHigh_histo =
dynamic_cast<TH1F*
>(
headerHigh_.first);
146 if ( !noise_histo ) {
151 if ( !scope_histo ) {
156 if ( !headerLow_histo ) {
161 if ( !headerHigh_histo ) {
166 if ( peds_histo->GetNbinsX() != 256 ) {
171 if ( noise_histo->GetNbinsX() != 256 ) {
176 if ( scope_histo->GetNbinsX() != 298 ) {
183 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
191 for ( uint16_t istr = 0; istr < 128; istr++ ) {
192 uint16_t
strip = iapv*128 + istr;
196 if ( peds_histo->GetBinEntries(strip+1) ) {
197 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip+1);
198 p_sum += anal->
peds_[iapv][istr];
199 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
200 if ( anal->
peds_[iapv][istr] > p_max ) { p_max = anal->
peds_[iapv][istr]; }
201 if ( anal->
peds_[iapv][istr] < p_min ) { p_min = anal->
peds_[iapv][istr]; }
203 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip+1);
204 r_sum += anal->
raw_[iapv][istr];
205 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
206 if ( anal->
raw_[iapv][istr] > r_max ) { r_max = anal->
raw_[iapv][istr]; }
207 if ( anal->
raw_[iapv][istr] < r_min ) { r_min = anal->
raw_[iapv][istr]; }
213 if ( noise_histo->GetBinEntries(strip+1) ) {
214 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip+1);
215 n_sum += anal->
noise_[iapv][istr];
216 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
217 if ( anal->
noise_[iapv][istr] > n_max ) { n_max = anal->
noise_[iapv][istr]; }
218 if ( anal->
noise_[iapv][istr] < n_min ) { n_min = anal->
noise_[iapv][istr]; }
224 if (!anal->
peds_[iapv].empty()) {
225 p_sum /=
static_cast<float>( anal->
peds_[iapv].size() );
226 p_sum2 /=
static_cast<float>( anal->
peds_[iapv].size() );
232 if ( !anal->
noise_[iapv].empty() ) {
233 n_sum /=
static_cast<float>( anal->
noise_[iapv].size() );
234 n_sum2 /=
static_cast<float>( anal->
noise_[iapv].size() );
240 if ( !anal->
raw_[iapv].empty() ) {
241 r_sum /=
static_cast<float>( anal->
raw_[iapv].size() );
242 r_sum2 /=
static_cast<float>( anal->
raw_[iapv].size() );
256 for ( uint16_t istr = 0; istr < 128; istr++ ) {
260 anal->
dead_[iapv].push_back(istr);
263 anal->
noisy_[iapv].push_back(istr);
271 anal->
peak_ = headerHigh_histo->GetMean();
272 anal->
base_ = headerLow_histo->GetMean();
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
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.