12 using namespace sistrip;
20 deadStripMax_(pset.getParameter<double>(
"DeadStripMax")),
21 noisyStripMin_(pset.getParameter<double>(
"NoisyStripMin")) {
23 <<
" Set maximum noise deviation for dead strip determination to: " <<
deadStripMax_;
25 <<
" Set minimal noise deviation for noisy strip determination to: " <<
noisyStripMin_;
33 <<
" NULL pointer to Analysis object!";
38 if (histos.size() != 2) {
43 if (!histos.empty()) {
48 std::vector<TH1*>::const_iterator ihis = histos.begin();
49 for (; ihis != histos.end(); ihis++) {
65 hPeds_.second = (*ihis)->GetName();
72 hNoise_.second = (*ihis)->GetName();
79 hPeds_.second = (*ihis)->GetName();
82 hNoise_.second = (*ihis)->GetName();
96 <<
" NULL pointer to base Analysis object!";
104 <<
" NULL pointer to derived Analysis object!";
118 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
119 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
131 if (peds_histo->GetNbinsX() != 256) {
136 if (noise_histo->GetNbinsX() != 256) {
142 for (uint16_t iapv = 0; iapv < 2; iapv++) {
149 for (uint16_t istr = 0; istr < 128; istr++) {
150 uint16_t
strip = iapv * 128 + istr;
154 if (peds_histo->GetBinEntries(strip + 1)) {
155 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip + 1);
156 p_sum += anal->
peds_[iapv][istr];
157 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
158 if (anal->
peds_[iapv][istr] > p_max) {
159 p_max = anal->
peds_[iapv][istr];
161 if (anal->
peds_[iapv][istr] < p_min) {
162 p_min = anal->
peds_[iapv][istr];
165 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip + 1);
166 r_sum += anal->
raw_[iapv][istr];
167 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
168 if (anal->
raw_[iapv][istr] > r_max) {
169 r_max = anal->
raw_[iapv][istr];
171 if (anal->
raw_[iapv][istr] < r_min) {
172 r_min = anal->
raw_[iapv][istr];
179 if (noise_histo->GetBinEntries(strip + 1)) {
180 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip + 1);
181 n_sum += anal->
noise_[iapv][istr];
182 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
183 if (anal->
noise_[iapv][istr] > n_max) {
184 n_max = anal->
noise_[iapv][istr];
186 if (anal->
noise_[iapv][istr] < n_min) {
187 n_min = anal->
noise_[iapv][istr];
195 if (!anal->
peds_[iapv].empty()) {
196 p_sum /=
static_cast<float>(anal->
peds_[iapv].size());
197 p_sum2 /=
static_cast<float>(anal->
peds_[iapv].size());
203 if (!anal->
noise_[iapv].empty()) {
204 n_sum /=
static_cast<float>(anal->
noise_[iapv].size());
205 n_sum2 /=
static_cast<float>(anal->
noise_[iapv].size());
211 if (!anal->
raw_[iapv].empty()) {
212 r_sum /=
static_cast<float>(anal->
raw_[iapv].size());
213 r_sum2 /=
static_cast<float>(anal->
raw_[iapv].size());
239 for (uint16_t istr = 0; istr < 128; istr++) {
244 anal->
dead_[iapv].push_back(istr);
246 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_[]
uint32_t extractFedKey(const TH1 *const)
static const char mlCommissioning_[]
void extract(const std::vector< TH1 * > &) override
Histogram-based analysis for pedestal run.
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const uint16_t invalid_
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
CommissioningAnalysis *const anal() const
static const char nullPtr_[]