24 latencyCode_(latencyCode),
62 <<
"[SamplingAlgorithm::" << __func__ <<
"]" 63 <<
" NULL pointer to Analysis object!";
71 <<
"[SamplingAlgorithm::" << __func__ <<
"]" 72 <<
" NULL pointer to derived Analysis object!";
77 if ( histos.size() != 1 && histos.size() != 2 ) {
85 std::vector<TH1*>::const_iterator ihis = histos.begin();
86 for ( ; ihis != histos.end(); ihis++ ) {
109 histo_.second = (*ihis)->GetName();
122 <<
"[SamplingAlgorithm::" << __func__ <<
"]" 123 <<
" NULL pointer to derived Analysis object!";
127 TProfile* prof = (TProfile*)(
histo_.first);
130 <<
" NULL pointer to histogram!" ;
135 prof->SetErrorOption(
" ");
139 for(
int i=0;
i<prof->GetNbinsX();++
i) {
140 if(prof->GetBinEntries(
i)>0)
141 prof->SetBinError(
i,prof->GetBinError(
i)/
sqrt(prof->GetBinEntries(
i)));
157 float max = prof->GetBinCenter(prof->GetMaximumBin());
158 float ampl = prof->GetMaximum();
172 float max = prof->GetBinCenter(prof->GetMaximumBin());
173 float ampl = prof->GetMaximum();
201 uint32_t
nbins=profile->GetNbinsX();
203 for(uint32_t
bin=1;
bin<=
nbins;++
bin) max = max < profile->GetBinEntries(
bin) ? uint32_t(profile->GetBinEntries(
bin)) : max;
205 uint32_t
min = max/10;
207 if(profile->GetBinEntries(
bin)<
min) {
208 profile->SetBinContent(
bin,0.);
209 profile->SetBinError(
bin,0.);
217 prof->GetXaxis()->SetLimits(prof->GetXaxis()->GetXmin()-prof->GetBinWidth(1)/2.,
218 prof->GetXaxis()->GetXmax()-prof->GetBinWidth(1)/2.);
225 if ( !
samp_ ) {
return; }
226 uint32_t
nbins=profile->GetNbinsX();
229 if(profile->GetBinContent(
bin)<
min) {
230 profile->SetBinContent(
bin,0.);
231 profile->SetBinError(
bin,0.);
232 profile->SetBinEntries(
bin,0);
235 profile->SetBinContent(
bin,
236 profile->GetBinEntries(
bin)*
void correctBinning(TProfile *prof) const
static const char unexpectedTask_[]
Analysis for latency run.
double fdeconv_convoluted(double *x, double *par)
const uint32_t & fedKey() const
Utility class that holds histogram title.
sistrip::RunType runType_
static const char numberOfHistos_[]
float limit(float SoNcut) const
double fpeak_convoluted(double *x, double *par)
static const char mlCommissioning_[]
uint32_t extractFedKey(const TH1 *const )
void correctProfile(TProfile *profile, float SoNcut=3.) const
virtual void addErrorCode(const std::string &error)
bin
set the eta bin as selection string.
virtual void extract(const std::vector< TH1 * > &)
std::vector< std::vector< double > > tmp
float correctMeasurement(float mean, float SoNcut=3.) const
void pruneProfile(TProfile *profile) const
Abstract base for derived classes that provide analysis of commissioning histograms.
sistrip::Granularity granularity_
CommissioningAnalysis *const anal() const