Performs histogram anaysis.
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());
191 anal->pedsMean_[iapv] = p_sum;
192 anal->pedsSpread_[iapv] =
sqrt(fabs(p_sum2 - p_sum * p_sum));
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());
199 anal->noiseMean_[iapv] = n_sum;
200 anal->noiseSpread_[iapv] =
sqrt(fabs(n_sum2 - n_sum * n_sum));
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());
207 anal->rawMean_[iapv] = r_sum;
208 anal->rawSpread_[iapv] =
sqrt(fabs(r_sum2 - r_sum * r_sum));
213 anal->pedsMax_[iapv] = p_max;
216 anal->pedsMin_[iapv] = p_min;
219 anal->noiseMax_[iapv] = n_max;
222 anal->noiseMin_[iapv] = n_min;
225 anal->rawMax_[iapv] = r_max;
228 anal->rawMin_[iapv] = r_min;
232 for (uint16_t istr = 0; istr < 128; istr++) {
236 if (
anal->noise_[iapv][istr] < (
anal->noiseMean_[iapv] - 5. *
anal->noiseSpread_[iapv])) {
237 anal->dead_[iapv].push_back(istr);
238 }
else if (
anal->noise_[iapv][istr] > (
anal->noiseMean_[iapv] + 5. *
anal->noiseSpread_[iapv])) {
239 anal->noisy_[iapv].push_back(istr);