12 using namespace sistrip;
26 <<
" NULL pointer to Analysis object!";
31 if (histos.size() != 2) {
36 if (!histos.empty()) {
41 std::vector<TH1*>::const_iterator ihis = histos.begin();
42 for (; ihis != histos.end(); ihis++) {
58 hPeds_.second = (*ihis)->GetName();
65 hNoise_.second = (*ihis)->GetName();
72 hPeds_.second = (*ihis)->GetName();
75 hNoise_.second = (*ihis)->GetName();
89 <<
" NULL pointer to base Analysis object!";
97 <<
" NULL pointer to derived Analysis object!";
111 TProfile* peds_histo =
dynamic_cast<TProfile*
>(
hPeds_.first);
112 TProfile* noise_histo =
dynamic_cast<TProfile*
>(
hNoise_.first);
124 if (peds_histo->GetNbinsX() != 256) {
129 if (noise_histo->GetNbinsX() != 256) {
135 for (uint16_t iapv = 0; iapv < 2; iapv++) {
142 for (uint16_t istr = 0; istr < 128; istr++) {
143 uint16_t
strip = iapv * 128 + istr;
147 if (peds_histo->GetBinEntries(strip + 1)) {
148 anal->
peds_[iapv][istr] = peds_histo->GetBinContent(strip + 1);
149 p_sum += anal->
peds_[iapv][istr];
150 p_sum2 += (anal->
peds_[iapv][istr] * anal->
peds_[iapv][istr]);
151 if (anal->
peds_[iapv][istr] > p_max) {
152 p_max = anal->
peds_[iapv][istr];
154 if (anal->
peds_[iapv][istr] < p_min) {
155 p_min = anal->
peds_[iapv][istr];
158 anal->
raw_[iapv][istr] = peds_histo->GetBinError(strip + 1);
159 r_sum += anal->
raw_[iapv][istr];
160 r_sum2 += (anal->
raw_[iapv][istr] * anal->
raw_[iapv][istr]);
161 if (anal->
raw_[iapv][istr] > r_max) {
162 r_max = anal->
raw_[iapv][istr];
164 if (anal->
raw_[iapv][istr] < r_min) {
165 r_min = anal->
raw_[iapv][istr];
172 if (noise_histo->GetBinEntries(strip + 1)) {
173 anal->
noise_[iapv][istr] = noise_histo->GetBinContent(strip + 1);
174 n_sum += anal->
noise_[iapv][istr];
175 n_sum2 += (anal->
noise_[iapv][istr] * anal->
noise_[iapv][istr]);
176 if (anal->
noise_[iapv][istr] > n_max) {
177 n_max = anal->
noise_[iapv][istr];
179 if (anal->
noise_[iapv][istr] < n_min) {
180 n_min = anal->
noise_[iapv][istr];
188 if (!anal->
peds_[iapv].empty()) {
189 p_sum /=
static_cast<float>(anal->
peds_[iapv].size());
190 p_sum2 /=
static_cast<float>(anal->
peds_[iapv].size());
196 if (!anal->
noise_[iapv].empty()) {
197 n_sum /=
static_cast<float>(anal->
noise_[iapv].size());
198 n_sum2 /=
static_cast<float>(anal->
noise_[iapv].size());
204 if (!anal->
raw_[iapv].empty()) {
205 r_sum /=
static_cast<float>(anal->
raw_[iapv].size());
206 r_sum2 /=
static_cast<float>(anal->
raw_[iapv].size());
232 for (uint16_t istr = 0; istr < 128; istr++) {
237 anal->
dead_[iapv].push_back(istr);
239 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)
void extract(const std::vector< TH1 * > &) override
static const char mlCommissioning_[]
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const uint16_t invalid_
Histogram-based analysis for pedestal run.
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
CommissioningAnalysis *const anal() const
static const char nullPtr_[]