1 #ifndef EcalSelectiveReadoutValidation_H
2 #define EcalSelectiveReadoutValidation_H
46 class EcalTPParameters;
82 template<
class T,
class U>
83 void anaDigi(
const T& frame,
const U& srFlagColl);
164 return (subdet==
EB?34:52)*8;
182 if(iDcc0<9 || iDcc0>=45){
201 double nReadXtals)
const{
242 std::pair<int,int>
dccCh(
const DetId& xtalId)
const;
249 return (iEta<0)?iEta+85:iEta+84;
257 int iPhi0 = iPhi - 11;
258 if(iPhi0<0) iPhi0 += 360;
278 return (i<85)?i-85:i-84;
294 return (iEta<0)?iEta+28:iEta+27;
312 return (i<27)?i-28:i-27;
349 const std::vector<int>& firWeights,
351 bool* saturated = 0);
358 static std::vector<int>
getFIRWeights(
const std::vector<double>&
373 int nxbins,
double xmin,
double xmax,
374 int nybins,
double ymin,
double ymax);
382 int nbinx,
double xmin,
double xmax,
383 int nbiny,
double ymin,
double ymax,
384 const char* option =
"");
394 if(me) me->
Fill(x, yw);
397 if(me) me->
Fill(x, y, zw);
400 if(me) me->
Fill(x, y, z, w);
470 static const int nEeRus = 2*(34+32+33+33+32+34+33+34+33);
929 return id.ix() + (
id.zside()>0?20:-40);
945 return id.ix() + (
id.zside()>0?100:-200);
1000 #endif //EcalSelectiveReadoutValidation_H not defined
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
MonitorElement * bookProfile(const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
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_
bool verbose_
Verbosity switch.
double phi
number of sim hits
static const int nEbPhi
number of crystals along Phi in EB
MonitorElement * meEeZsErrCnt_
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
auto zw(V v) -> Vec2< typenamestd::remove_reference< decltype(v[0])>::type >
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
void analyze(edm::Event const &e, edm::EventSetup const &c)
Analyzes the event.
MonitorElement * meEbHiZsFir_
MonitorElement * meDccVolFromData_
void endRun(const edm::Run &r, const edm::EventSetup &c)
Calls at end of run.
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
CollHandle< FEDRawDataCollection > fedRaw_
MonitorElement * meSRFlagsComputed_
MonitorElement * meTpVsEtSum_
MonitorElement * meDccLiVol_
void beginRun(const edm::Run &r, const edm::EventSetup &c)
Calls at begin of run.
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_
Sorter(EcalSelectiveReadoutValidation *v)
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 * book1D(const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
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
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_
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_
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)
DQMStore * dbe_
Histogramming interface.
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
MonitorElement * bookFloat(const std::string &name)
bool logSrApplicationErrors_
std::vector< double > weights_
MonitorElement * meCompleteZSCnt_
unsigned int offset(bool)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int iTtPhi2cIndex(int iPhi) const
int iEta2cIndex(int iEta) const
MonitorElement * book2D(const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
MonitorElement * meMiTtf_
MonitorElement * meVolEHI_
EcalSelectiveReadoutValidation * validation
EcalScDetId superCrystalOf(const EEDetId &xtalId) const
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_
void configFirWeights(std::vector< double > weightsForZsFIR)
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
const EcalTPParameters * tpParam_
double phi
number of sim hits
void fill(MonitorElement *me, float x, float yw)
subdet_t
distinguishes barral and endcap of ECAL.
void normalizeHists(double eventCount)
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_
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 * meZs1Ru_
MonitorElement * meFullRoRu_
std::string srpAlgoErrorLogFileName_
~EcalSelectiveReadoutValidation()
Destructor.
MonitorElement * meHiTtf_
std::vector< bool > logErrForDccs_
static const int nEndcaps
number of endcaps
bool operator()(std::pair< int, int >a, std::pair< int, int >b)
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_
void SRFlagValidation(const edm::Event &event, const edm::EventSetup &es)
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
MonitorElement * meEbEMean_
MonitorElement * bookProfile2D(const std::string &name, const std::string &title, int nbinx, double xmin, double xmax, int nbiny, double ymin, double ymax, const char *option="")