Performs histogram anaylsis.
pedestal
scope-mode profile
Implements CommissioningAlgorithm.
Definition at line 88 of file DaqScopeModeAlgorithm.cc.
References DaqScopeModeAnalysis::addErrorCode(), CommissioningAlgorithm::anal(), DaqScopeModeAnalysis::base_, DaqScopeModeAnalysis::dead_, deadStripMax_, headerHigh_, headerLow_, DaqScopeModeAnalysis::height_, histo_, hNoise_, hPeds_, sistrip::invalid_, sistrip::maximum_, sistrip::mlCommissioning_, DaqScopeModeAnalysis::noise_, DaqScopeModeAnalysis::noiseMax_, DaqScopeModeAnalysis::noiseMean_, DaqScopeModeAnalysis::noiseMin_, DaqScopeModeAnalysis::noiseSpread_, DaqScopeModeAnalysis::noisy_, noisyStripMin_, sistrip::nullPtr_, sistrip::numberOfBins_, DaqScopeModeAnalysis::peak_, DaqScopeModeAnalysis::peds_, DaqScopeModeAnalysis::pedsMax_, DaqScopeModeAnalysis::pedsMean_, DaqScopeModeAnalysis::pedsMin_, DaqScopeModeAnalysis::pedsSpread_, DaqScopeModeAnalysis::raw_, DaqScopeModeAnalysis::rawMax_, DaqScopeModeAnalysis::rawMean_, DaqScopeModeAnalysis::rawMin_, DaqScopeModeAnalysis::rawSpread_, sistrip::smallTickMarkHeight_, mathSSE::sqrt(), digitizers_cfi::strip, DaqScopeModeAnalysis::tickMarkHeightThreshold_, and createJobs::tmp.
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());
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());
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());
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();
static const char numberOfBins_[]
static const float tickMarkHeightThreshold_
static const char mlCommissioning_[]
static const uint16_t maximum_
static const char smallTickMarkHeight_[]
static const uint16_t invalid_
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
void addErrorCode(const std::string &error) override
CommissioningAnalysis *const anal() const
static const char nullPtr_[]
Analysis for scope mode data.