24 <<
" NULL pointer to Analysis object!";
39 std::vector<TH1*>::const_iterator ihis =
histos.begin();
40 for (; ihis !=
histos.end(); ihis++) {
56 hPeds_.second = (*ihis)->GetName();
58 hNoise_.second = (*ihis)->GetName();
65 hPeds_.second = (*ihis)->GetName();
68 hNoise_.second = (*ihis)->GetName();
80 <<
" NULL pointer to base Analysis object!";
88 <<
" NULL pointer to derived Analysis object!";
102 TProfile* peds_histo = dynamic_cast<TProfile*>(
hPeds_.first);
103 TProfile* raw_histo = dynamic_cast<TProfile*>(
hNoise_.first);
115 if (peds_histo->GetNbinsX() != 256) {
120 if (raw_histo->GetNbinsX() != 256) {
126 for (uint16_t iapv = 0; iapv < 2; iapv++) {
132 for (uint16_t istr = 0; istr < 128; istr++) {
133 uint16_t
strip = iapv * 128 + istr;
137 if (peds_histo->GetBinEntries(
strip + 1)) {
138 anal->peds_[iapv][istr] = peds_histo->GetBinContent(
strip + 1);
139 p_sum +=
anal->peds_[iapv][istr];
140 p_sum2 += (
anal->peds_[iapv][istr] *
anal->peds_[iapv][istr]);
141 if (
anal->peds_[iapv][istr] > p_max) {
142 p_max =
anal->peds_[iapv][istr];
144 if (
anal->peds_[iapv][istr] < p_min) {
145 p_min =
anal->peds_[iapv][istr];
151 if (!
anal->legacy_) {
153 if (raw_histo->GetBinEntries(
strip + 1)) {
154 anal->raw_[iapv][istr] = raw_histo->GetBinContent(
strip + 1);
155 r_sum +=
anal->raw_[iapv][istr];
156 r_sum2 += (
anal->raw_[iapv][istr] *
anal->raw_[iapv][istr]);
157 if (
anal->raw_[iapv][istr] > r_max) {
158 r_max =
anal->raw_[iapv][istr];
160 if (
anal->raw_[iapv][istr] < r_min) {
161 r_min =
anal->raw_[iapv][istr];
167 if (peds_histo->GetBinEntries(
strip + 1)) {
168 anal->raw_[iapv][istr] = raw_histo->GetBinError(
strip + 1);
169 r_sum +=
anal->raw_[iapv][istr];
170 r_sum2 += (
anal->raw_[iapv][istr] *
anal->raw_[iapv][istr]);
171 if (
anal->raw_[iapv][istr] > r_max) {
172 r_max =
anal->raw_[iapv][istr];
174 if (
anal->raw_[iapv][istr] < r_min) {
175 r_min =
anal->raw_[iapv][istr];
184 if (!
anal->peds_[iapv].empty()) {
185 p_sum /= static_cast<float>(
anal->peds_[iapv].size());
186 p_sum2 /= static_cast<float>(
anal->peds_[iapv].size());
187 anal->pedsMean_[iapv] = p_sum;
188 anal->pedsSpread_[iapv] =
sqrt(fabs(p_sum2 - p_sum * p_sum));
192 if (!
anal->raw_[iapv].empty()) {
193 r_sum /= static_cast<float>(
anal->raw_[iapv].size());
194 r_sum2 /= static_cast<float>(
anal->raw_[iapv].size());
195 anal->rawMean_[iapv] = r_sum;
196 anal->rawSpread_[iapv] =
sqrt(fabs(r_sum2 - r_sum * r_sum));
201 anal->pedsMax_[iapv] = p_max;
204 anal->pedsMin_[iapv] = p_min;
207 anal->rawMax_[iapv] = r_max;
210 anal->rawMin_[iapv] = r_min;