ATLAS Offline Software
Loading...
Searching...
No Matches
LArPedestalValidationAlg.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5*/
6
7
14
15
16
17
18#ifndef LARPEDESTALVALIDATIONALG_H
19#define LARPEDESTALVALIDATIONALG_H
20
21#include <vector>
22#include <string>
23
27
28
30
31
39
41
42 public:
46 LArPedestalValidationAlg (const std::string& name, ISvcLocator* pSvcLocator);
47
48 private:
51 bool validateChannel(const LArCondObj& ref, const LArCondObj& val, const HWIdentifier chid, const int gain, const LArOnOffIdMapping *cabling,const LArBadChannelCont *bcCont) override final;
52
53 virtual LArCondObj getRefObj(const HWIdentifier chid, const int gain) const override final;
54
56 virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override;
57
59 virtual StatusCode preLoop() override;
60
61
63 //float m_pedTolerance;
65 //float m_rmsTolerance;
66
68 //Expectes three numbers (one per gain)
69 std::vector<std::string> m_pedToleranceInit;
71
72
74 //Expectes three numbers (one per gain)
75 std::vector<std::string> m_rmsToleranceInit;
77
78
80 //float m_pedToleranceFEB;
81 std::vector<std::string> m_pedToleranceFEBInit;
83
85 //float m_rmsToleranceFEB;
86 std::vector<std::string> m_rmsToleranceFEBInit;
88
89 //The following is for keeping track of entire FEBs
91 bool febSummary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont);
92
93
94 class DataPerFEB {
95 public:
96 DataPerFEB () : chid(0), febid(0), gain(0),
97 pedVal(0.),rmsVal(0.),pedRef(0.),rmsRef(0.), nEntries(0) {}
98 DataPerFEB (const HWIdentifier cid, const HWIdentifier fid, int g) : chid(cid), febid(fid), gain(g),
99 pedVal(0.),rmsVal(0.),pedRef(0.),rmsRef(0.),nEntries(0) {}
100 HWIdentifier chid; //We need to remember the first connected channel for the offline id conversion
102 int gain;
103 double pedVal;
104 double rmsVal;
105 double pedRef;
106 double rmsRef;
107 unsigned nEntries;
108 };
109
110 std::vector<DataPerFEB> m_vDataPerFEB;
111
112 //The following is for keeping track of the global average
116};
117
118
119#endif
120
const boost::regex ref(r_ef)
LArBadXCont< LArBadChannel > LArBadChannelCont
LArCalibValidationAlg< LArPedestalComplete, ILArPedestal > LArPedestalValidationBase
Algorithm to validate LAr Autocorr;.
DataPerFEB(const HWIdentifier cid, const HWIdentifier fid, int g)
std::vector< DataPerFEB > m_vDataPerFEB
std::vector< std::string > m_rmsToleranceInit
Pedestal RMS tolerances as CaloCellGroupList (job-Properties)
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override
Summary method executed after the loop over all channels.
virtual LArCondObj getRefObj(const HWIdentifier chid, const int gain) const override final
Method implmented in derived class to get the reference object from ref-container.
std::vector< std::string > m_rmsToleranceFEBInit
Tolerance fro the average pedestal RMS (noise) of one FEB (in ADC counts) (job-Property)
bool febSummary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
Method to compare FEB averages.
LArPedestalValidationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Regular algorithm constructor.
virtual StatusCode preLoop() override
Executed before the loop over all channels to reset global sums.
std::vector< std::string > m_pedToleranceFEBInit
Tolerance fro the average pedestal of one FEB (in ADC counts) (job-Property)
std::vector< std::string > m_pedToleranceInit
Pedestal tolerance (in ADC counts) (job-Property)
bool validateChannel(const LArCondObj &ref, const LArCondObj &val, const HWIdentifier chid, const int gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override final
Method to validate the pedestal single readout channels.