Performs histogram anaysis.
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());
198 anal->pedsMean_[iapv] = p_sum;
199 anal->pedsSpread_[iapv] =
sqrt(fabs(p_sum2 - p_sum * p_sum));
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());
206 anal->noiseMean_[iapv] = n_sum;
207 anal->noiseSpread_[iapv] =
sqrt(fabs(n_sum2 - n_sum * n_sum));
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());
214 anal->rawMean_[iapv] = r_sum;
215 anal->rawSpread_[iapv] =
sqrt(fabs(r_sum2 - r_sum * r_sum));
220 anal->pedsMax_[iapv] = p_max;
223 anal->pedsMin_[iapv] = p_min;
226 anal->noiseMax_[iapv] = n_max;
229 anal->noiseMin_[iapv] = n_min;
232 anal->rawMax_[iapv] = r_max;
235 anal->rawMin_[iapv] = r_min;
239 for (uint16_t istr = 0; istr < 128; istr++) {
244 anal->dead_[iapv].push_back(istr);
246 anal->noisy_[iapv].push_back(istr);