Histogram-based analysis for pedestal run.
- Author
- M. Wingham, R.Bainbridge
Definition at line 16 of file NoiseAlgorithm.h.
void NoiseAlgorithm::analyse |
( |
| ) |
|
|
overrideprivatevirtual |
Performs histogram anaysis.
Implements CommissioningAlgorithm.
Definition at line 86 of file NoiseAlgorithm.cc.
References CommissioningAnalysis::addErrorCode(), CommissioningAlgorithm::anal(), NoiseAnalysis::dead_, hNoise_, hPeds_, sistrip::invalid_, sistrip::maximum_, sistrip::mlCommissioning_, NoiseAnalysis::noise_, NoiseAnalysis::noiseMax_, NoiseAnalysis::noiseMean_, NoiseAnalysis::noiseMin_, NoiseAnalysis::noiseSpread_, NoiseAnalysis::noisy_, sistrip::nullPtr_, sistrip::numberOfBins_, NoiseAnalysis::peds_, NoiseAnalysis::pedsMax_, NoiseAnalysis::pedsMean_, NoiseAnalysis::pedsMin_, NoiseAnalysis::pedsSpread_, NoiseAnalysis::raw_, NoiseAnalysis::rawMax_, NoiseAnalysis::rawMean_, NoiseAnalysis::rawMin_, NoiseAnalysis::rawSpread_, mathSSE::sqrt(), digitizers_cfi::strip, and createJobs::tmp.
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());
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());
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());
232 for (uint16_t istr = 0; istr < 128; istr++) {
237 anal->
dead_[iapv].push_back(istr);
239 anal->
noisy_[iapv].push_back(istr);
static const char numberOfBins_[]
static const char mlCommissioning_[]
static const uint16_t maximum_
virtual void addErrorCode(const std::string &error)
static const uint16_t invalid_
Histogram-based analysis for pedestal run.
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
CommissioningAnalysis *const anal() const
static const char nullPtr_[]
void NoiseAlgorithm::extract |
( |
const std::vector< TH1 * > & |
histos | ) |
|
|
overrideprivatevirtual |
Extracts and organises histograms.
Implements CommissioningAlgorithm.
Definition at line 23 of file NoiseAlgorithm.cc.
References a, CommissioningAnalysis::addErrorCode(), CommissioningAlgorithm::anal(), sistrip::extrainfo::commonMode_, CommissioningAlgorithm::extractFedKey(), CommissioningAnalysis::fedKey(), hNoise_, hPeds_, NoiseAnalysis::legacy_, sistrip::mlCommissioning_, sistrip::NOISE, sistrip::extrainfo::noise_, sistrip::numberOfHistos_, sistrip::extrainfo::pedestals_, sistrip::extrainfo::pedsAndCmSubNoise_, sistrip::extrainfo::pedsAndRawNoise_, runGCPTkAlMap::title, sistrip::unexpectedExtraInfo_, and sistrip::unexpectedTask_.
Referenced by BeautifulSoup.PageElement::_invert(), and BeautifulSoup.Tag::decompose().
26 <<
" NULL pointer to Analysis object!";
41 std::vector<TH1*>::const_iterator ihis =
histos.begin();
42 for (; ihis !=
histos.end(); ihis++) {
58 hPeds_.second = (*ihis)->GetName();
65 hNoise_.second = (*ihis)->GetName();
72 hPeds_.second = (*ihis)->GetName();
75 hNoise_.second = (*ihis)->GetName();
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
static const char numberOfHistos_[]
static const char unexpectedExtraInfo_[]
uint32_t extractFedKey(const TH1 *const)
static const char mlCommissioning_[]
virtual void addErrorCode(const std::string &error)
Histogram-based analysis for pedestal run.
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
CommissioningAnalysis *const anal() const