19 headerLow_(nullptr,
""),
20 headerHigh_(nullptr,
""),
23 deadStripMax_(
pset.getParameter<double>(
"DeadStripMax")),
24 noisyStripMin_(
pset.getParameter<double>(
"NoisyStripMin")) {
33 <<
" NULL pointer to base Analysis object!";
43 std::vector<TH1*>::const_iterator ihis =
histos.begin();
44 for (; ihis !=
histos.end(); ihis++) {
61 hPeds_.second = (*ihis)->GetName();
64 hNoise_.second = (*ihis)->GetName();
67 hPeds_.second = (*ihis)->GetName();
70 hNoise_.second = (*ihis)->GetName();
75 histo_.second = (*ihis)->GetName();
91 <<
" NULL pointer to base Analysis object!";
99 <<
" NULL pointer to derived Analysis object!";
128 TProfile* peds_histo = dynamic_cast<TProfile*>(
hPeds_.first);
129 TProfile* noise_histo = dynamic_cast<TProfile*>(
hNoise_.first);
131 TProfile* scope_histo = dynamic_cast<TProfile*>(
histo_.first);
132 TH1F* headerLow_histo = dynamic_cast<TH1F*>(
headerLow_.first);
133 TH1F* headerHigh_histo = dynamic_cast<TH1F*>(
headerHigh_.first);
150 if (!headerLow_histo) {
155 if (!headerHigh_histo) {
160 if (peds_histo->GetNbinsX() != 256) {
165 if (noise_histo->GetNbinsX() != 256) {
170 if (scope_histo->GetNbinsX() != 298) {
177 for (uint16_t iapv = 0; iapv < 2; iapv++) {
184 for (uint16_t istr = 0; istr < 128; istr++) {
185 uint16_t
strip = iapv * 128 + istr;
189 if (peds_histo->GetBinEntries(
strip + 1)) {
190 anal->peds_[iapv][istr] = peds_histo->GetBinContent(
strip + 1);
191 p_sum +=
anal->peds_[iapv][istr];
192 p_sum2 += (
anal->peds_[iapv][istr] *
anal->peds_[iapv][istr]);
193 if (
anal->peds_[iapv][istr] > p_max) {
194 p_max =
anal->peds_[iapv][istr];
196 if (
anal->peds_[iapv][istr] < p_min) {
197 p_min =
anal->peds_[iapv][istr];
200 anal->raw_[iapv][istr] = peds_histo->GetBinError(
strip + 1);
201 r_sum +=
anal->raw_[iapv][istr];
202 r_sum2 += (
anal->raw_[iapv][istr] *
anal->raw_[iapv][istr]);
203 if (
anal->raw_[iapv][istr] > r_max) {
204 r_max =
anal->raw_[iapv][istr];
206 if (
anal->raw_[iapv][istr] < r_min) {
207 r_min =
anal->raw_[iapv][istr];
214 if (noise_histo->GetBinEntries(
strip + 1)) {
215 anal->noise_[iapv][istr] = noise_histo->GetBinContent(
strip + 1);
216 n_sum +=
anal->noise_[iapv][istr];
217 n_sum2 += (
anal->noise_[iapv][istr] *
anal->noise_[iapv][istr]);
218 if (
anal->noise_[iapv][istr] > n_max) {
219 n_max =
anal->noise_[iapv][istr];
221 if (
anal->noise_[iapv][istr] < n_min) {
222 n_min =
anal->noise_[iapv][istr];
229 if (!
anal->peds_[iapv].empty()) {
230 p_sum /= static_cast<float>(
anal->peds_[iapv].size());
231 p_sum2 /= static_cast<float>(
anal->peds_[iapv].size());
232 anal->pedsMean_[iapv] = p_sum;
233 anal->pedsSpread_[iapv] =
sqrt(fabs(p_sum2 - p_sum * p_sum));
237 if (!
anal->noise_[iapv].empty()) {
238 n_sum /= static_cast<float>(
anal->noise_[iapv].size());
239 n_sum2 /= static_cast<float>(
anal->noise_[iapv].size());
240 anal->noiseMean_[iapv] = n_sum;
241 anal->noiseSpread_[iapv] =
sqrt(fabs(n_sum2 - n_sum * n_sum));
245 if (!
anal->raw_[iapv].empty()) {
246 r_sum /= static_cast<float>(
anal->raw_[iapv].size());
247 r_sum2 /= static_cast<float>(
anal->raw_[iapv].size());
248 anal->rawMean_[iapv] = r_sum;
249 anal->rawSpread_[iapv] =
sqrt(fabs(r_sum2 - r_sum * r_sum));
254 anal->pedsMax_[iapv] = p_max;
257 anal->pedsMin_[iapv] = p_min;
260 anal->noiseMax_[iapv] = n_max;
263 anal->noiseMin_[iapv] = n_min;
266 anal->rawMax_[iapv] = r_max;
269 anal->rawMin_[iapv] = r_min;
273 for (uint16_t istr = 0; istr < 128; istr++) {
278 anal->dead_[iapv].push_back(istr);
280 anal->noisy_[iapv].push_back(istr);
288 anal->peak_ = headerHigh_histo->GetMean();
289 anal->base_ = headerLow_histo->GetMean();