1 #ifndef EcalSelectiveReadoutValidation_H 2 #define EcalSelectiveReadoutValidation_H 63 template<
class T,
class U>
64 void anaDigi(
const T& frame,
const U& srFlagColl);
138 return (subdet==
EB?34:52)*8;
156 if(iDcc0<9 || iDcc0>=45){
175 double nReadXtals)
const{
216 std::pair<int,int>
dccCh(
const DetId& xtalId)
const;
223 return (iEta<0)?iEta+85:iEta+84;
231 int iPhi0 = iPhi - 11;
232 if(iPhi0<0) iPhi0 += 360;
252 return (i<85)?i-85:i-84;
268 return (iEta<0)?iEta+28:iEta+27;
286 return (i<27)?i-28:i-27;
317 const std::vector<int>& firWeights,
319 bool* saturated =
nullptr);
326 static std::vector<int>
getFIRWeights(
const std::vector<double>&
341 int nxbins,
double xmin,
double xmax,
342 int nybins,
double ymin,
double ymax);
346 int nbins,
double xmin,
double xmax);
350 int nbinx,
double xmin,
double xmax,
351 int nbiny,
double ymin,
double ymax,
362 if(me) me->
Fill(x, yw);
365 if(me) me->
Fill(x, y, zw);
368 if(me) me->
Fill(x, y, z, w);
438 static const int nEeRus = 2*(34+32+33+33+32+34+33+34+33);
884 return id.ix() + (
id.zside()>0?20:-40);
900 return id.ix() + (
id.zside()>0?100:-200);
941 #endif //EcalSelectiveReadoutValidation_H not defined void configFirWeights(const std::vector< double > &weightsForZsFIR)
void endRun(const edm::Run &r, const edm::EventSetup &c) override
void printAvailableHists()
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
MonitorElement * meEbFullRoCnt_
int iPhi2cIndex(int iPhi) const
void fill(MonitorElement *me, float x, float y, float zw)
std::string srApplicationErrorLogFileName_
EcalRecHitCollection RecHitCollection
MonitorElement * meForcedRu_
MonitorElement * meEbRecVsSimE_
MonitorElement * meChOcc_
bool gain12
eta crystal position
int getCrystalCount(int iDcc, int iDccCh)
CollHandle< EBDigiCollection > ebNoZsDigis_
static const int nMaxXtalPerRu
Number of crystals per Readout Unit excepted partial SCs.
MonitorElement * meEeEMean_
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
MonitorElement * meZsErrType1Cnt_
MonitorElement * meTtfVsTp_
double getDccOverhead(subdet_t subdet) const
static const int nEeX
EE crystal grid size along X.
MonitorElement * meDroppedFROMap_
int xtalGraphX(const EEDetId &id) const
double getDccEventSize(int iDcc0, double nReadXtals) const
int nIncompleteFRO_
Counter of FRO-flagged RU only partial data.
MonitorElement * meCompleteZSRateMap_
MonitorElement * meEeFullRoCnt_
int cIndex2iPhi(int i) const
std::ofstream zsErrorLog_
File to log ZS and other errors.
MonitorElement * meDroppedFRO_
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
bool verbose_
Verbosity switch.
double phi
number of sim hits
static const int nEbPhi
number of crystals along Phi in EB
MonitorElement * meEeZsErrCnt_
MonitorElement * bookFloat(DQMStore::IBooker &, const std::string &name)
int xtalGraphY(const EBDetId &id) const
static const unsigned nDccChs_
Number of input channels of a DCC.
MonitorElement * meEeFixedPayload_
MonitorElement * meEbNoise_
int iXY2cIndex(int iX) const
static const double rad2deg
Conversion factor from radian to degree.
energiesEe_t eeEnergies[nEndcaps][nEeX][nEeY]
MonitorElement * meEeZsErrType1Cnt_
int cIndex2iTtPhi(int i) const
int simHit
energy reconstructed from zero-suppressed digi
CollHandle< EcalTrigPrimDigiCollection > tps_
MonitorElement * meVolBLI_
bool collNotFoundWarn_
Switch for collection-not-found warning.
void analyzeEB(const edm::Event &event, const edm::EventSetup &es)
int simHit
energy reconstructed from zero-suppressed digi
int ruGraphX(const EcalTrigTowerDetId &id) const
MonitorElement * meEbHiZsFir_
MonitorElement * meDccVolFromData_
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
CollHandle< FEDRawDataCollection > fedRaw_
MonitorElement * meSRFlagsComputed_
MonitorElement * meTpVsEtSum_
MonitorElement * meDccLiVol_
void analyzeEE(const edm::Event &event, const edm::EventSetup &es)
MonitorElement * meEeNoise_
MonitorElement * meVolELI_
static const int nEeDccs
number of DCCs for EE
double eta
phi crystal position in degrees
MonitorElement * meTtfVsEtSum_
double ttEtSums[nTtEta][nTtPhi]
MonitorElement * meEbZsErrCnt_
MonitorElement * meEeLiZsFir_
MonitorElement * meDroppedFROCnt_
MonitorElement * meTpMap_
MonitorElement * meDccHiVol_
MonitorElement * meEbLiZsFir_
MonitorElement * meLiTtf_
void fill(MonitorElement *me, float x, float y, float z, float w)
bool registerHist(const std::string &name, const std::string &title)
void setTtEtSums(const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
MonitorElement * meVolBHI_
static const int minDccId_
static const int nEbEta
number of crystals along Eta in EB
int cIndex2iTtEta(int i) const
MonitorElement * meIncompleteFROMap_
double frame2EnergyForTp(const T &frame, int offset=0) const
~EcalSelectiveReadoutValidation() override
Destructor.
CollHandle< EESrFlagCollection > eeComputedSrFlags_
static const int nTtPhi
Number of Trigger Towers along Phi.
int xtalGraphY(const EEDetId &id) const
CollHandle< EEDigiCollection > eeDigis_
MonitorElement * meCompleteZS_
std::vector< int > firWeights_
void checkSrApplication(const edm::Event &event, T &srfs)
std::string outputFile_
Output file for histograms.
CollHandle< RecHitCollection > eeRecHits_
static const int maxDccId_
MonitorElement * book2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
MonitorElement * book1D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
void analyzeDataVolume(const edm::Event &e, const edm::EventSetup &es)
double getL1aRate() const
int iTtEta2cIndex(int iEta) const
double eta
phi crystal position in degrees
MonitorElement * meEeHiZsFir_
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyzes the event.
CollHandle< EBSrFlagCollection > ebSrFlags_
void anaDigi(const T &frame, const U &srFlagColl)
MonitorElement * meEbNoZsRecVsSimE_
MonitorElement * meEeSimE_
void updateL1aRate(const edm::Event &event)
double noZsRecE
sim hit energy sum
int nCompleteZS_
Counter of ZS-flagged RU fully read out.
CollHandle< std::vector< PCaloHit > > eeSimHits_
MonitorElement * meDroppedFRORateMap_
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
bool logSrApplicationErrors_
std::vector< double > weights_
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meCompleteZSCnt_
int iTtPhi2cIndex(int iPhi) const
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
int iEta2cIndex(int iEta) const
MonitorElement * meMiTtf_
MonitorElement * meVolEHI_
int cIndex2iEta(int i) const
CollHandle< EESrFlagCollection > eeSrFlags_
static const int nDccRus_[nDccs_]
number of RUs for each DCC
MonitorElement * meEeRecVsSimE_
energiesEb_t ebEnergies[nEbEta][nEbPhi]
static const int nOneEeTtEta
Number of Trigger Towers in an endcap along Eta.
int cIndex2iXY(int iX0) const
int nEbFROCnt_
Counter of EB FRO-flagged RUs.
static const int nEbDccs
number of DCCs for EB
MonitorElement * meZsErrCnt_
CollHandle< std::vector< PCaloHit > > ebSimHits_
int nEbZsErrors_
Counter of EB ZS errors (LI channel below ZS threshold)
static const int scEdge
Number of crystals along a supercrystal edge.
MonitorElement * meFullRoCnt_
double recE
energy reconstructed from unsuppressed digi
void readAllCollections(const edm::Event &e)
static const int nEeRus
number of RUs for EE
static std::vector< int > getFIRWeights(const std::vector< double > &normalizedWeights)
static const int ebTtEdge
Number of crystals along an EB TT.
MonitorElement * meSRFlagsFromData_
EcalSelectiveReadoutValidation(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meEbIncompleteRUZsFir_
double getEeEventSize(double nReadXtals) const
MonitorElement * meForcedTtf_
MonitorElement * meDccVol_
static const int kByte_
number of bytes in 1 kByte:
MonitorElement * meEbFixedPayload_
MonitorElement * meVolLI_
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
double getBytesPerCrystal() const
int nPerRu_[nDccs_][nDccChs_]
int xtalGraphX(const EBDetId &id) const
int getRuCount(int iDcc0) const
MonitorElement * meCompleteZSMap_
MonitorElement * meIncompleteFRORateMap_
MonitorElement * meVolHI_
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
CollHandle< EEDigiCollection > eeNoZsDigis_
double recE
energy reconstructed from unsuppressed digi
int dccId(const EcalScDetId &detId) const
MonitorElement * meEeRecE_
std::map< std::string, std::string > availableHistList_
bool isRuComplete_[nDccs_][nDccChs_]
int ruGraphX(const EcalScDetId &id) const
double phi
number of sim hits
void fill(MonitorElement *me, float x, float yw)
subdet_t
distinguishes barral and endcap of ECAL.
static const int nTtEta
Number of Trigger Towers along Eta.
MonitorElement * meEeNoZsRecVsSimE_
MonitorElement * meEbZsErrType1Cnt_
static const int nEbTtEta
Number of Trigger Towers in barrel along Eta.
MonitorElement * meFixedPayload_
MonitorElement * meEbRecE_
MonitorElement * meEeRecEHitXtal_
MonitorElement * meIncompleteFRO_
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
int nDroppedFRO_
Counter of FRO-flagged RU dropped from data.
int ruGraphY(const EcalTrigTowerDetId &id) const
void fill(MonitorElement *me, float x)
MonitorElement * meL1aRate_
int ruGraphY(const EcalScDetId &id) const
void compareSrfColl(const edm::Event &event, T &srfFromData, T &computedSrf)
std::pair< int, int > dccCh(const DetId &xtalId) const
double frame2Energy(const EcalDataFrame &frame) const
double noZsRecE
sim hit energy sum
MonitorElement * meEbRecEHitXtal_
MonitorElement * meEbSimE_
std::ofstream srpAlgoErrorLog_
Output ascii file for unconsistency on SR flags.
static const int nEeY
EE crystal grid size along Y.
CollHandle< EBDigiCollection > ebDigis_
double getEbEventSize(double nReadXtals) const
MonitorElement * meSRFlagsConsistency_
static const int nEbRus
number of RUs for EB
static const unsigned nDccs_
Total number of DCCs.
MonitorElement * bookProfile2D(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbinx, double xmin, double xmax, int nbiny, double ymin, double ymax, const char *option="")
MonitorElement * meZs1Ru_
MonitorElement * meFullRoRu_
std::string srpAlgoErrorLogFileName_
MonitorElement * meHiTtf_
std::vector< bool > logErrForDccs_
static const int nEndcaps
number of endcaps
const EcalTrigTowerConstituentsMap * triggerTowerMap_
void analyzeTP(const edm::Event &event, const edm::EventSetup &es)
std::set< std::string > histList_
const EcalElectronicsMapping * elecMap_
CollHandle< RecHitCollection > ebRecHits_
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
bool gain12
eta crystal position
MonitorElement * meIncompleteFROCnt_
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
MonitorElement * meEbEMean_