CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
EcalSelectiveReadoutValidation Class Reference

#include <EcalSelectiveReadoutValidation.h>

Inheritance diagram for EcalSelectiveReadoutValidation:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Classes

struct  energiesEb_t
 
struct  energiesEe_t
 

Public Member Functions

void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 EcalSelectiveReadoutValidation (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~EcalSelectiveReadoutValidation () override
 Destructor. More...
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 Analyzes the event. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 

Private Types

typedef EcalRecHit RecHit
 
typedef EcalRecHitCollection RecHitCollection
 
enum  subdet_t { EB, EE }
 distinguishes barral and endcap of ECAL. More...
 

Private Member Functions

template<class T , class U >
void anaDigi (const T &frame, const U &srFlagColl)
 
void anaDigiInit ()
 
void analyzeDataVolume (const edm::Event &e, const edm::EventSetup &es)
 
void analyzeEB (const edm::Event &event, const edm::EventSetup &es)
 
void analyzeEE (const edm::Event &event, const edm::EventSetup &es)
 
void analyzeTP (const edm::Event &event, const edm::EventSetup &es)
 
template<class T >
void checkSrApplication (const edm::Event &event, T &srfs)
 
int cIndex2iEta (int i) const
 
int cIndex2iPhi (int i) const
 
int cIndex2iTtEta (int i) const
 
int cIndex2iTtPhi (int i) const
 
int cIndex2iXY (int iX0) const
 
template<class T >
void compareSrfColl (const edm::Event &event, T &srfFromData, T &computedSrf)
 
void configFirWeights (const std::vector< double > &weightsForZsFIR)
 
std::pair< int, int > dccCh (const DetId &xtalId) const
 
double frame2Energy (const EcalDataFrame &frame) const
 
template<class T >
double frame2EnergyForTp (const T &frame, int offset=0) const
 
double getBytesPerCrystal () const
 
int getCrystalCount (int iDcc, int iDccCh)
 
double getDccEventSize (int iDcc0, double nReadXtals) const
 
double getDccOverhead (subdet_t subdet) const
 
double getDccSrDependentPayload (int iDcc0, double nReadRus, double nReadXtals) const
 
double getEbEventSize (double nReadXtals) const
 
double getEeEventSize (double nReadXtals) const
 
double getL1aRate () const
 
int getRuCount (int iDcc0) const
 
int iEta2cIndex (int iEta) const
 
void initAsciiFile ()
 
int iPhi2cIndex (int iPhi) const
 
int iTtEta2cIndex (int iEta) const
 
int iTtPhi2cIndex (int iPhi) const
 
int iXY2cIndex (int iX) const
 
void printAvailableHists ()
 
void readAllCollections (const edm::Event &e)
 
bool registerHist (const std::string &name, const std::string &title)
 
void selectFedsForLog ()
 
void setTtEtSums (const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
 
void updateL1aRate (const edm::Event &event)
 
EcalTrigTowerDetId readOutUnitOf (const EBDetId &xtalId) const
 
EcalScDetId readOutUnitOf (const EEDetId &xtalId) const
 
MonitorElementbookFloat (DQMStore::IBooker &, const std::string &name)
 
MonitorElementbook1D (DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
 
MonitorElementbook2D (DQMStore::IBooker &, const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax)
 
MonitorElementbookProfile (DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
 
MonitorElementbookProfile2D (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="")
 
void fill (MonitorElement *me, float x)
 
void fill (MonitorElement *me, float x, float yw)
 
void fill (MonitorElement *me, float x, float y, float zw)
 
void fill (MonitorElement *me, float x, float y, float z, float w)
 
int ruGraphX (const EcalScDetId &id) const
 
int ruGraphY (const EcalScDetId &id) const
 
int ruGraphX (const EcalTrigTowerDetId &id) const
 
int ruGraphY (const EcalTrigTowerDetId &id) const
 
int xtalGraphX (const EEDetId &id) const
 
int xtalGraphY (const EEDetId &id) const
 
int xtalGraphX (const EBDetId &id) const
 
int xtalGraphY (const EBDetId &id) const
 
int dccId (const EcalScDetId &detId) const
 
int dccId (const EcalTrigTowerDetId &detId) const
 

Static Private Member Functions

static int dccZsFIR (const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
 
static std::vector< int > getFIRWeights (const std::vector< double > &normalizedWeights)
 

Private Attributes

bool allHists_
 
std::map< std::string, std::string > availableHistList_
 
bool collNotFoundWarn_
 Switch for collection-not-found warning. More...
 
energiesEb_t ebEnergies [nEbEta][nEbPhi]
 
int ebZsThr_
 
energiesEe_t eeEnergies [nEndcaps][nEeX][nEeY]
 
int eeZsThr_
 
const EcalElectronicsMappingelecMap_
 
int firstFIRSample_
 
std::vector< int > firWeights_
 
std::string histDir_
 
std::set< std::string > histList_
 
int ievt_
 
bool isRuComplete_ [nDccs_][nDccChs_]
 
bool localReco_
 
std::vector< bool > logErrForDccs_
 
bool logSrApplicationErrors_
 
bool logSrpAlgoErrors_
 
MonitorElementmeL1aRate_
 
int nCompleteZS_
 Counter of ZS-flagged RU fully read out. More...
 
int nDroppedFRO_
 Counter of FRO-flagged RU dropped from data. More...
 
int nEb_
 
int nEbFROCnt_
 Counter of EB FRO-flagged RUs. More...
 
int nEbHI_
 
int nEbLI_
 
int nEbZsErrors_
 Counter of EB ZS errors (LI channel below ZS threshold) More...
 
int nEbZsErrorsType1_
 
int nEe_
 
int nEeFROCnt_
 Counter of EE FRO-flagged RUs. More...
 
int nEeHI_
 
int nEeLI_
 
int nEeZsErrors_
 Counter of EE ZS errors (LI channel below ZS threshold) More...
 
int nEeZsErrorsType1_
 
int nHiPerDcc_ [nDccs_]
 
int nHiRuPerDcc_ [nDccs_]
 
int nIncompleteFRO_
 Counter of FRO-flagged RU only partial data. More...
 
int nLiPerDcc_ [nDccs_]
 
int nLiRuPerDcc_ [nDccs_]
 
int nPerDcc_ [nDccs_]
 
int nPerRu_ [nDccs_][nDccChs_]
 
int nRuPerDcc_ [nDccs_]
 
std::string outputFile_
 Output file for histograms. More...
 
bool SkipInnerSC_
 
std::ofstream srApplicationErrorLog_
 Output ascii file for unconsistency between Xtals and RU Flags. More...
 
std::string srApplicationErrorLogFileName_
 
std::ofstream srpAlgoErrorLog_
 Output ascii file for unconsistency on SR flags. More...
 
std::string srpAlgoErrorLogFileName_
 
bool tpInGeV_
 
const EcalTrigTowerConstituentsMaptriggerTowerMap_
 
double ttEtSums [nTtEta][nTtPhi]
 
bool useEventRate_
 
bool verbose_
 Verbosity switch. More...
 
std::vector< double > weights_
 
bool withEbSimHit_
 
bool withEeSimHit_
 
std::ofstream zsErrorLog_
 File to log ZS and other errors. More...
 
CollHandle< EBDigiCollectionebDigis_
 
CollHandle< EEDigiCollectioneeDigis_
 
CollHandle< EBDigiCollectionebNoZsDigis_
 
CollHandle< EEDigiCollectioneeNoZsDigis_
 
CollHandle< EBSrFlagCollectionebSrFlags_
 
CollHandle< EESrFlagCollectioneeSrFlags_
 
CollHandle< EBSrFlagCollectionebComputedSrFlags_
 
CollHandle< EESrFlagCollectioneeComputedSrFlags_
 
CollHandle< std::vector< PCaloHit > > ebSimHits_
 
CollHandle< std::vector< PCaloHit > > eeSimHits_
 
CollHandle< EcalTrigPrimDigiCollectiontps_
 
CollHandle< RecHitCollectionebRecHits_
 
CollHandle< RecHitCollectioneeRecHits_
 
CollHandle< FEDRawDataCollectionfedRaw_
 
int64_t tmax
 
int64_t tmin
 
int64_t l1aOfTmin
 
int64_t l1aOfTmax
 
bool l1aRateErr
 
MonitorElementmeDccVol_
 
MonitorElementmeDccLiVol_
 
MonitorElementmeDccHiVol_
 
MonitorElementmeDccVolFromData_
 
MonitorElementmeVol_
 
MonitorElementmeVolB_
 
MonitorElementmeVolE_
 
MonitorElementmeVolBLI_
 
MonitorElementmeVolELI_
 
MonitorElementmeVolLI_
 
MonitorElementmeVolBHI_
 
MonitorElementmeVolEHI_
 
MonitorElementmeVolHI_
 
MonitorElementmeChOcc_
 
MonitorElementmeTp_
 
MonitorElementmeTtf_
 
MonitorElementmeTtfVsTp_
 
MonitorElementmeTtfVsEtSum_
 
MonitorElementmeTpVsEtSum_
 
MonitorElementmeEbRecE_
 
MonitorElementmeEbEMean_
 
MonitorElementmeEbNoise_
 
MonitorElementmeEbSimE_
 
MonitorElementmeEbRecEHitXtal_
 
MonitorElementmeEbRecVsSimE_
 
MonitorElementmeEbNoZsRecVsSimE_
 
MonitorElementmeEeRecE_
 
MonitorElementmeEeEMean_
 
MonitorElementmeEeNoise_
 
MonitorElementmeEeSimE_
 
MonitorElementmeEeRecEHitXtal_
 
MonitorElementmeEeRecVsSimE_
 
MonitorElementmeEeNoZsRecVsSimE_
 
MonitorElementmeFullRoRu_
 
MonitorElementmeZs1Ru_
 
MonitorElementmeForcedRu_
 
MonitorElementmeLiTtf_
 
MonitorElementmeMiTtf_
 
MonitorElementmeHiTtf_
 
MonitorElementmeForcedTtf_
 
MonitorElementmeTpMap_
 
MonitorElementmeFullRoCnt_
 
MonitorElementmeEbFullRoCnt_
 
MonitorElementmeEeFullRoCnt_
 
MonitorElementmeEbLiZsFir_
 
MonitorElementmeEbHiZsFir_
 
MonitorElementmeEbIncompleteRUZsFir_
 
MonitorElementmeEeLiZsFir_
 
MonitorElementmeEeHiZsFir_
 
MonitorElementmeSRFlagsFromData_
 
MonitorElementmeSRFlagsComputed_
 
MonitorElementmeSRFlagsConsistency_
 
MonitorElementmeIncompleteFRO_
 
MonitorElementmeDroppedFRO_
 
MonitorElementmeCompleteZS_
 
MonitorElementmeIncompleteFROMap_
 
MonitorElementmeDroppedFROMap_
 
MonitorElementmeCompleteZSMap_
 
MonitorElementmeIncompleteFRORateMap_
 
MonitorElementmeDroppedFRORateMap_
 
MonitorElementmeCompleteZSRateMap_
 
MonitorElementmeIncompleteFROCnt_
 
MonitorElementmeDroppedFROCnt_
 
MonitorElementmeCompleteZSCnt_
 
MonitorElementmeEbZsErrCnt_
 
MonitorElementmeEeZsErrCnt_
 
MonitorElementmeZsErrCnt_
 
MonitorElementmeEbZsErrType1Cnt_
 
MonitorElementmeEeZsErrType1Cnt_
 
MonitorElementmeZsErrType1Cnt_
 
MonitorElementmeEbFixedPayload_
 
MonitorElementmeEeFixedPayload_
 
MonitorElementmeFixedPayload_
 
bool ebRuActive_ [nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
 
bool eeRuActive_ [nEndcaps][nEeX/scEdge][nEeY/scEdge]
 

Static Private Attributes

static const int ebTtEdge = 5
 Number of crystals along an EB TT. More...
 
static const int kByte_ = 1024
 number of bytes in 1 kByte: More...
 
static const int maxDccId_ = minDccId_ + nDccs_ -1
 
static const int minDccId_ = 1
 
static const unsigned nDccChs_ = 68
 Number of input channels of a DCC. More...
 
static const int nDccRus_ [nDccs_]
 number of RUs for each DCC More...
 
static const unsigned nDccs_ = 54
 Total number of DCCs. More...
 
static const int nEbDccs = 36
 number of DCCs for EB More...
 
static const int nEbEta = 170
 number of crystals along Eta in EB More...
 
static const int nEbPhi = 360
 number of crystals along Phi in EB More...
 
static const int nEbRus = 36*68
 number of RUs for EB More...
 
static const int nEbTtEta = 34
 Number of Trigger Towers in barrel along Eta. More...
 
static const int nEeDccs = 18
 number of DCCs for EE More...
 
static const int nEeRus = 2*(34+32+33+33+32+34+33+34+33)
 number of RUs for EE More...
 
static const int nEeX = 100
 EE crystal grid size along X. More...
 
static const int nEeY = 100
 EE crystal grid size along Y. More...
 
static const int nEndcaps = 2
 number of endcaps More...
 
static const int nMaxXtalPerRu = 25
 Number of crystals per Readout Unit excepted partial SCs. More...
 
static const int nOneEeTtEta = 11
 Number of Trigger Towers in an endcap along Eta. More...
 
static const int nTtEta = 2*nOneEeTtEta + nEbTtEta
 Number of Trigger Towers along Eta. More...
 
static const int nTtPhi = 72
 Number of Trigger Towers along Phi. More...
 
static const double rad2deg = 45./atan(1.)
 Conversion factor from radian to degree. More...
 
static const int scEdge = 5
 Number of crystals along a supercrystal edge. More...
 

Detailed Description

Definition at line 34 of file EcalSelectiveReadoutValidation.h.

Member Typedef Documentation

Definition at line 37 of file EcalSelectiveReadoutValidation.h.

Definition at line 36 of file EcalSelectiveReadoutValidation.h.

Member Enumeration Documentation

distinguishes barral and endcap of ECAL.

Enumerator
EB 
EE 

Definition at line 58 of file EcalSelectiveReadoutValidation.h.

Constructor & Destructor Documentation

EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation ( const edm::ParameterSet ps)

Constructor.

Definition at line 56 of file EcalSelectiveReadoutValidation.cc.

References allHists_, configFirWeights(), ebComputedSrFlags_, ebDigis_, ebNoZsDigis_, ebRecHits_, ebSimHits_, ebSrFlags_, ebZsThr_, eeComputedSrFlags_, eeDigis_, eeNoZsDigis_, eeRecHits_, eeSimHits_, eeSrFlags_, eeZsThr_, fedRaw_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), histList_, compare::hists, logSrApplicationErrors_, logSrpAlgoErrors_, outputFile_, CollHandle< T >::setToken(), srApplicationErrorLogFileName_, srpAlgoErrorLogFileName_, tps_, and verbose_.

56  :
57  collNotFoundWarn_(ps.getUntrackedParameter<bool>("warnIfCollectionNotFound", true)),
58  ebDigis_(ps.getParameter<edm::InputTag>("EbDigiCollection"), false,
60  eeDigis_(ps.getParameter<edm::InputTag>("EeDigiCollection"), false,
62  ebNoZsDigis_(ps.getParameter<edm::InputTag>("EbUnsuppressedDigiCollection"),
63  false, false/*collNotFoundWarn_*/),
64  eeNoZsDigis_(ps.getParameter<edm::InputTag>("EeUnsuppressedDigiCollection"),
65  false, false/*collNotFoundWarn_*/),
66  ebSrFlags_(ps.getParameter<edm::InputTag>("EbSrFlagCollection"), false,
68  eeSrFlags_(ps.getParameter<edm::InputTag>("EeSrFlagCollection"), false,
70  ebComputedSrFlags_(ps.getParameter<edm::InputTag>("EbSrFlagFromTTCollection"), false,
71  false/*collNotFoundWarn_*/),
72  eeComputedSrFlags_(ps.getParameter<edm::InputTag>("EeSrFlagFromTTCollection"), false,
73  false/*collNotFoundWarn_*/),
74  ebSimHits_(ps.getParameter<edm::InputTag>("EbSimHitCollection"), false,
75  false/*collNotFoundWarn_*/),
76  eeSimHits_(ps.getParameter<edm::InputTag>("EeSimHitCollection"), false,
77  false/*collNotFoundWarn_*/),
78  tps_(ps.getParameter<edm::InputTag>("TrigPrimCollection"), false,
80  ebRecHits_(ps.getParameter<edm::InputTag>("EbRecHitCollection"), false,
81  false/*collNotFoundWarn_*/),
82  eeRecHits_(ps.getParameter<edm::InputTag>("EeRecHitCollection"), false,
83  false/*collNotFoundWarn_*/),
84  fedRaw_(ps.getParameter<edm::InputTag>("FEDRawCollection"), false,
85  false/*collNotFoundWarn_*/),
86  tmax(0),
88  l1aOfTmin(0),
89  l1aOfTmax(0),
90  triggerTowerMap_(nullptr),
91  localReco_(ps.getParameter<bool>("LocalReco")),
92  weights_(ps.getParameter<vector<double> >("weights")),
93  tpInGeV_(ps.getParameter<bool>("tpInGeV")),
94  firstFIRSample_(ps.getParameter<int>("ecalDccZs1stSample")),
95  useEventRate_(ps.getParameter<bool>("useEventRate")),
96  logErrForDccs_(nDccs_, false),
97  ievt_(0),
98  allHists_(false),
99  histDir_(ps.getParameter<string>("histDir")),
100  withEeSimHit_(false),
101  withEbSimHit_(false){
102 
103  edm::ConsumesCollector collector(consumesCollector());
104  ebDigis_.setToken(collector);
105  eeDigis_.setToken(collector);
106  ebNoZsDigis_.setToken(collector);
107  eeNoZsDigis_.setToken(collector);
108  ebSrFlags_.setToken(collector);
109  eeSrFlags_.setToken(collector);
110  ebComputedSrFlags_.setToken(collector);
111  eeComputedSrFlags_.setToken(collector);
112  ebSimHits_.setToken(collector);
113  eeSimHits_.setToken(collector);
114  tps_.setToken(collector);
115  ebRecHits_.setToken(collector);
116  eeRecHits_.setToken(collector);
117  fedRaw_.setToken(collector);
118 
119  double ebZsThr = ps.getParameter<double>("ebZsThrADCCount");
120  double eeZsThr = ps.getParameter<double>("eeZsThrADCCount");
121 
122  ebZsThr_ = lround(ebZsThr*4);
123  eeZsThr_ = lround(eeZsThr*4);
124 
125  //File to log SRP algorithem inconsistency
127  = ps.getUntrackedParameter<string>("srpAlgoErrorLogFile","");
129 
130  //File to log SRP decision application inconsistency
132  = ps.getUntrackedParameter<string>("srApplicationErrorLogFile","");
134 
135  //FIR ZS weights
136  configFirWeights(ps.getParameter<vector<double> >("dccWeights"));
137 
138  // DQM ROOT output
139  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
140 
141  if(!outputFile_.empty()){
142  LogInfo("OutputInfo") << " Ecal Digi Task histograms will be saved to '"
143  << outputFile_.c_str() << "'";
144  } else{
145  LogInfo("OutputInfo") << " Ecal Digi Task histograms will NOT be saved";
146  }
147 
148  // verbosity switch
149  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
150 
151  // get hold of back-end interface
152 
153  vector<string>
154  hists(ps.getUntrackedParameter<vector<string> >("histograms",
155  vector<string>(1, "all")));
156 
157  for(vector<string>::iterator it = hists.begin();
158  it!=hists.end(); ++it) histList_.insert(*it);
159  if(histList_.find("all") != histList_.end()) allHists_ = true;
160 
161 }
void configFirWeights(const std::vector< double > &weightsForZsFIR)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CollHandle< EBDigiCollection > ebNoZsDigis_
CollHandle< EcalTrigPrimDigiCollection > tps_
bool collNotFoundWarn_
Switch for collection-not-found warning.
CollHandle< FEDRawDataCollection > fedRaw_
CollHandle< EESrFlagCollection > eeComputedSrFlags_
CollHandle< EEDigiCollection > eeDigis_
std::string outputFile_
Output file for histograms.
CollHandle< RecHitCollection > eeRecHits_
CollHandle< EBSrFlagCollection > ebSrFlags_
CollHandle< std::vector< PCaloHit > > eeSimHits_
CollHandle< EESrFlagCollection > eeSrFlags_
CollHandle< std::vector< PCaloHit > > ebSimHits_
CollHandle< EEDigiCollection > eeNoZsDigis_
void setToken(edm::ConsumesCollector &collector)
Definition: CollHandle.h:49
CollHandle< EBDigiCollection > ebDigis_
static const unsigned nDccs_
Total number of DCCs.
const EcalTrigTowerConstituentsMap * triggerTowerMap_
CollHandle< RecHitCollection > ebRecHits_
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
EcalSelectiveReadoutValidation::~EcalSelectiveReadoutValidation ( )
override

Destructor.

Definition at line 830 of file EcalSelectiveReadoutValidation.cc.

830  {
831 }

Member Function Documentation

template<class T , class U >
void EcalSelectiveReadoutValidation::anaDigi ( const T frame,
const U &  srFlagColl 
)
private

Accumulates statitics for data volume analysis. To be called for each ECAL digi. See anaDigiInit().

Definition at line 1498 of file EcalSelectiveReadoutValidation.cc.

References Reference_intrackfit_cff::barrel, dccCh(), ebRuActive_, ebTtEdge, EcalBarrel, eeRuActive_, Exception, RemoveAddSevLevel::flag, iEta2cIndex(), iPhi2cIndex(), iXY2cIndex(), minDccId_, nEb_, nEbHI_, nEbLI_, nEe_, nEeHI_, nEeLI_, nHiPerDcc_, nHiRuPerDcc_, nLiPerDcc_, nLiRuPerDcc_, nPerDcc_, nPerRu_, nRuPerDcc_, DetId::rawId(), readOutUnitOf(), scEdge, EcalSrFlag::SRF_FULL, DetId::subdetId(), and ecaldqm::zside().

Referenced by analyzeDataVolume().

1499  {
1500  const DetId& xtalId = frame.id();
1501  typedef typename U::key_type RuDetId;
1502  const RuDetId& ruId = readOutUnitOf(frame.id());
1503  typename U::const_iterator srf = srFlagColl.find(ruId);
1504 
1505  bool highInterest = false;
1506  int flag = 0;
1507 
1508  if(srf != srFlagColl.end()){
1509  flag = srf->value() & ~EcalSrFlag::SRF_FORCED_MASK;
1510 
1511  highInterest = (flag == EcalSrFlag::SRF_FULL);
1512 
1513  }
1514 
1515  bool barrel = (xtalId.subdetId()==EcalBarrel);
1516 
1517  pair<int,int> ch = dccCh(xtalId);
1518 
1519  if(barrel){
1520  ++nEb_;
1521  if(highInterest){
1522  ++nEbHI_;
1523  } else{//low interest
1524  ++nEbLI_;
1525  }
1526  int iEta0 = iEta2cIndex(static_cast<const EBDetId&>(xtalId).ieta());
1527  int iPhi0 = iPhi2cIndex(static_cast<const EBDetId&>(xtalId).iphi());
1528  if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){
1529  ++nRuPerDcc_[ch.first-minDccId_];
1530  if(highInterest){
1531  ++nHiRuPerDcc_[ch.first-minDccId_];
1532  } else{
1533  ++nLiRuPerDcc_[ch.first-minDccId_];
1534  }
1535 
1536  ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true;
1537  }
1538  } else{//endcap
1539  ++nEe_;
1540  if(highInterest){
1541  ++nEeHI_;
1542  } else{//low interest
1543  ++nEeLI_;
1544  }
1545  int iX0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix());
1546  int iY0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy());
1547  int iZ0 = static_cast<const EEDetId&>(frame.id()).zside()>0?1:0;
1548 
1549  if(!eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge]){
1550  ++nRuPerDcc_[ch.first-minDccId_];
1551  if(highInterest){
1552  ++nHiRuPerDcc_[ch.first-minDccId_];
1553  } else{
1554  ++nLiRuPerDcc_[ch.first-minDccId_];
1555  }
1556 
1557  eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge] = true;
1558  }
1559  }
1560 
1561  if(ch.second < 1 || ch.second > 68){
1562  throw cms::Exception("EcalSelectiveReadoutValidation")
1563  << "Error in DCC channel retrieval for crystal with detId "
1564  << xtalId.rawId() << "DCC channel out of allowed range [1..68]\n";
1565  }
1566  ++nPerDcc_[ch.first-minDccId_];
1567  ++nPerRu_[ch.first-minDccId_][ch.second-1];
1568  if(highInterest){
1569  ++nHiPerDcc_[ch.first-minDccId_];
1570  } else{//low interest channel
1571  ++nLiPerDcc_[ch.first-minDccId_];
1572  }
1573 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
int zside(DetId const &)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
static const int SRF_FULL
Definition: EcalSrFlag.h:24
static const int scEdge
Number of crystals along a supercrystal edge.
Definition: DetId.h:18
static const int ebTtEdge
Number of crystals along an EB TT.
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
std::pair< int, int > dccCh(const DetId &xtalId) const
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
void EcalSelectiveReadoutValidation::anaDigiInit ( )
private

Initializes statistics accumalator for data volume analysis. To be call at start of each event analysis.

Definition at line 1575 of file EcalSelectiveReadoutValidation.cc.

References ebRuActive_, eeRuActive_, nEb_, nEbHI_, nEbLI_, nEe_, nEeHI_, nEeLI_, nHiPerDcc_, nHiRuPerDcc_, nLiPerDcc_, nLiRuPerDcc_, nPerDcc_, nPerRu_, and nRuPerDcc_.

Referenced by analyzeDataVolume().

1575  {
1576  nEb_ = 0;
1577  nEe_ = 0;
1578  nEeLI_ = 0;
1579  nEeHI_ = 0;
1580  nEbLI_ = 0;
1581  nEbHI_ = 0;
1582  bzero(nPerDcc_, sizeof(nPerDcc_));
1583  bzero(nLiPerDcc_, sizeof(nLiPerDcc_));
1584  bzero(nHiPerDcc_, sizeof(nHiPerDcc_));
1585  bzero(nRuPerDcc_, sizeof(nRuPerDcc_));
1586  bzero(ebRuActive_, sizeof(ebRuActive_));
1587  bzero(eeRuActive_, sizeof(eeRuActive_));
1588  bzero(nPerRu_, sizeof(nPerRu_));
1589  bzero(nLiRuPerDcc_, sizeof(nLiRuPerDcc_));
1590  bzero(nHiRuPerDcc_, sizeof(nHiRuPerDcc_));
1591 }
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
void EcalSelectiveReadoutValidation::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overrideprotected

Analyzes the event.

Definition at line 189 of file EcalSelectiveReadoutValidation.cc.

References analyzeDataVolume(), analyzeEB(), analyzeEE(), analyzeTP(), checkSrApplication(), compareSrfColl(), ebComputedSrFlags_, ebNoZsDigis_, ebSimHits_, ebSrFlags_, eeComputedSrFlags_, eeNoZsDigis_, eeSimHits_, eeSrFlags_, fill(), ievt_, meCompleteZSCnt_, meDroppedFROCnt_, meEbFullRoCnt_, meEbZsErrCnt_, meEbZsErrType1Cnt_, meEeFullRoCnt_, meEeZsErrCnt_, meEeZsErrType1Cnt_, meFullRoCnt_, meIncompleteFROCnt_, meZsErrCnt_, meZsErrType1Cnt_, nCompleteZS_, nDroppedFRO_, nEbFROCnt_, nEbZsErrors_, nEbZsErrorsType1_, nEeFROCnt_, nEeZsErrors_, nEeZsErrorsType1_, nIncompleteFRO_, readAllCollections(), selectFedsForLog(), setTtEtSums(), tps_, updateL1aRate(), withEbSimHit_, and withEeSimHit_.

190  {
191 
193 
194  //retrieves event products:
196 
197  withEeSimHit_ = (!eeSimHits_->empty());
198  withEbSimHit_ = (!ebSimHits_->empty());
199 
200  if(ievt_<10){
201  edm::LogInfo("EcalSrValid") << "Size of TP collection: " << tps_->size() << std::endl
202  << "Size of EB SRF collection read from data: "
203  << ebSrFlags_->size() << std::endl
204  << "Size of EB SRF collection computed from data TTFs: "
205  << ebComputedSrFlags_->size() << std::endl
206  << "Size of EE SRF collection read from data: "
207  << eeSrFlags_->size() << std::endl
208  << "Size of EE SRF collection computed from data TTFs: "
209  << eeComputedSrFlags_->size() << std::endl;
210  }
211 
212  if(ievt_==0){
213  selectFedsForLog(); //note: must be called after readAllCollection
214  }
215 
216  //computes Et sum trigger tower crystals:
218 
219  //Data Volume
221 
222  //EB digis
223  //must be called after analyzeDataVolume because it uses
224  //isRuComplete_ array that this method fills
225  analyzeEB(event, es);
226 
227  //EE digis
228  //must be called after analyzeDataVolume because it uses
229  //isRuComplete_ array that this method fills
230  analyzeEE(event, es);
231 
235 
239 
243 
244  //TP
245  analyzeTP(event, es);
246 
247  if(!ebComputedSrFlags_->empty()){
249  }
250  if(!eeComputedSrFlags_->empty()){
252  }
253  nDroppedFRO_ = 0;
254  nIncompleteFRO_ = 0;
255  nCompleteZS_ = 0;
261  ++ievt_;
262 }
CollHandle< EBDigiCollection > ebNoZsDigis_
int nIncompleteFRO_
Counter of FRO-flagged RU only partial data.
CollHandle< EcalTrigPrimDigiCollection > tps_
void analyzeEB(const edm::Event &event, const edm::EventSetup &es)
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
void analyzeEE(const edm::Event &event, const edm::EventSetup &es)
void setTtEtSums(const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
CollHandle< EESrFlagCollection > eeComputedSrFlags_
void checkSrApplication(const edm::Event &event, T &srfs)
void analyzeDataVolume(const edm::Event &e, const edm::EventSetup &es)
CollHandle< EBSrFlagCollection > ebSrFlags_
void updateL1aRate(const edm::Event &event)
int nCompleteZS_
Counter of ZS-flagged RU fully read out.
CollHandle< std::vector< PCaloHit > > eeSimHits_
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
CollHandle< EESrFlagCollection > eeSrFlags_
int nEbFROCnt_
Counter of EB FRO-flagged RUs.
CollHandle< std::vector< PCaloHit > > ebSimHits_
int nEbZsErrors_
Counter of EB ZS errors (LI channel below ZS threshold)
CollHandle< EEDigiCollection > eeNoZsDigis_
int nDroppedFRO_
Counter of FRO-flagged RU dropped from data.
void fill(MonitorElement *me, float x)
void compareSrfColl(const edm::Event &event, T &srfFromData, T &computedSrf)
void analyzeTP(const edm::Event &event, const edm::EventSetup &es)
Definition: event.py:1
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
void EcalSelectiveReadoutValidation::analyzeDataVolume ( const edm::Event e,
const edm::EventSetup es 
)
private

Data volume analysis. To be called for each event.

Parameters
eventEDM event
esevent setup

Definition at line 1432 of file EcalSelectiveReadoutValidation.cc.

References a, anaDigi(), anaDigiInit(), b, ebDigis_, ebSrFlags_, eeDigis_, eeSrFlags_, FEDRawDataCollection::FEDData(), fedRaw_, fill(), getBytesPerCrystal(), getCrystalCount(), getDccEventSize(), getDccSrDependentPayload(), getEbEventSize(), getEeEventSize(), isRuComplete_, kByte_, maxDccId_, meDccHiVol_, meDccLiVol_, meDccVol_, meDccVolFromData_, meVol_, meVolB_, meVolBHI_, meVolBLI_, meVolE_, meVolEHI_, meVolELI_, meVolHI_, meVolLI_, minDccId_, nDccRus_, nDccs_, nEb_, nEbHI_, nEbLI_, nEe_, nEeHI_, nEeLI_, nHiPerDcc_, nHiRuPerDcc_, nLiPerDcc_, nLiRuPerDcc_, nPerDcc_, nPerRu_, FEDRawData::size(), and edm::DataFrameContainer::size().

Referenced by analyze().

1433  {
1434 
1435  anaDigiInit();
1436 
1437 
1438  //Complete RU, i.e. RU actually fully readout
1439  for(int iDcc = minDccId_; iDcc <= maxDccId_; ++iDcc){
1440  for(int iCh = 1; iCh < nDccRus_[iDcc-minDccId_]; ++iCh){
1441  isRuComplete_[iDcc-minDccId_][iCh-1]
1442  = (nPerRu_[iDcc-minDccId_][iCh-1]==getCrystalCount(iDcc, iCh));
1443  }
1444  }
1445 
1446 
1447  //Barrel
1448  for (unsigned int digis=0; digis<ebDigis_->size(); ++digis){
1449  EBDataFrame ebdf = (*ebDigis_)[digis];
1450  anaDigi(ebdf, *ebSrFlags_);
1451  }
1452 
1453  // Endcap
1454  for (unsigned int digis=0; digis<eeDigis_->size(); ++digis){
1455  EEDataFrame eedf = (*eeDigis_)[digis];
1456  anaDigi(eedf, *eeSrFlags_);
1457  }
1458 
1459  //histos
1460  for(unsigned iDcc0 = 0; iDcc0 < nDccs_; ++iDcc0){
1461  fill(meDccVol_, iDcc0+1, getDccEventSize(iDcc0, nPerDcc_[iDcc0])/kByte_);
1462  fill(meDccLiVol_, iDcc0+1,
1463  getDccSrDependentPayload(iDcc0, nLiRuPerDcc_[iDcc0],
1464  nLiPerDcc_[iDcc0])/kByte_);
1465  fill(meDccHiVol_, iDcc0+1,
1466  getDccSrDependentPayload(iDcc0, nHiRuPerDcc_[iDcc0],
1467  nHiPerDcc_[iDcc0])/kByte_);
1468  const FEDRawDataCollection& raw = *fedRaw_;
1469  fill(meDccVolFromData_, iDcc0+1,
1470  ((double)raw.FEDData(601+iDcc0).size())/kByte_);
1471  }
1472 
1473 
1474  //low interesest channels:
1475  double a = nEbLI_*getBytesPerCrystal()/kByte_; //getEbEventSize(nEbLI_)/kByte_;
1476  fill(meVolBLI_, a);
1477  double b = nEeLI_*getBytesPerCrystal()/kByte_; //getEeEventSize(nEeLI_)/kByte_;
1478  fill(meVolELI_, b);
1479  fill(meVolLI_, a+b);
1480 
1481  //high interest chanels:
1482  a = nEbHI_*getBytesPerCrystal()/kByte_; //getEbEventSize(nEbHI_)/kByte_;
1483  fill(meVolBHI_, a);
1484  b = nEeHI_*getBytesPerCrystal()/kByte_; //getEeEventSize(nEeHI_)/kByte_;
1485  fill(meVolEHI_, b);
1486  fill(meVolHI_, a+b);
1487 
1488  //any-interest channels:
1489  a = getEbEventSize(nEb_)/kByte_;
1490  fill(meVolB_, a);
1491  b = getEeEventSize(nEe_)/kByte_;
1492  fill(meVolE_, b);
1493  fill(meVol_, a+b);
1494 }
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
double getDccEventSize(int iDcc0, double nReadXtals) const
CollHandle< FEDRawDataCollection > fedRaw_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
CollHandle< EEDigiCollection > eeDigis_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
CollHandle< EBSrFlagCollection > ebSrFlags_
void anaDigi(const T &frame, const U &srFlagColl)
CollHandle< EESrFlagCollection > eeSrFlags_
static const int nDccRus_[nDccs_]
number of RUs for each DCC
double getEeEventSize(double nReadXtals) const
static const int kByte_
number of bytes in 1 kByte:
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void fill(MonitorElement *me, float x)
CollHandle< EBDigiCollection > ebDigis_
double getEbEventSize(double nReadXtals) const
static const unsigned nDccs_
Total number of DCCs.
void EcalSelectiveReadoutValidation::analyzeEB ( const edm::Event event,
const edm::EventSetup es 
)
private

ECAL barrel data analysis. To be called for each event.

Parameters
eventEDM event
esevent setup

Definition at line 543 of file EcalSelectiveReadoutValidation.cc.

References edm::DataFrameContainer::begin(), gather_cfg::cout, dccCh(), dccZsFIR(), ebDigis_, ebEnergies, ebNoZsDigis_, ebRecHits_, ebSimHits_, ebSrFlags_, ebZsThr_, DetId::Ecal, EcalBarrel, edm::DataFrameContainer::end(), PCaloHit::energy(), EcalRecHit::energy(), PV3DBase< T, PVType, FrameType >::eta(), EcalSelectiveReadoutValidation::energiesEb_t::eta, Exception, fill(), plotBeamSpotDB::first, firstFIRSample_, firWeights_, RemoveAddSevLevel::flag, frame2Energy(), EcalSelectiveReadoutValidation::energiesEb_t::gain12, ecalMGPA::gainId(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), mps_fire::i, EBDataFrame::id(), EBSrFlag::id(), PCaloHit::id(), EcalRecHit::id(), EcalTrigTowerDetId::ieta(), EBDetId::ieta(), iEta2cIndex(), EcalTrigTowerDetId::ietaAbs(), ievt_, EcalTrigTowerDetId::iphi(), iPhi2cIndex(), isRuComplete_, localReco_, SiStripPI::max, meChOcc_, meEbEMean_, meEbHiZsFir_, meEbLiZsFir_, meEbNoise_, meEbNoZsRecVsSimE_, meEbRecE_, meEbRecEHitXtal_, meEbRecVsSimE_, meEbSimE_, meForcedRu_, meFullRoRu_, meZs1Ru_, nEbEta, nEbFROCnt_, nEbPhi, nEbZsErrors_, nEbZsErrorsType1_, EcalSelectiveReadoutValidation::energiesEb_t::noZsRecE, PV3DBase< T, PVType, FrameType >::phi(), EcalSelectiveReadoutValidation::energiesEb_t::phi, rad2deg, readOutUnitOf(), EcalSelectiveReadoutValidation::energiesEb_t::recE, alignCSCRings::s, edm::second(), EcalSelectiveReadoutValidation::energiesEb_t::simE, rpcPointValidation_cfi::simHit, EcalSelectiveReadoutValidation::energiesEb_t::simHit, EcalDataFrame::size(), srApplicationErrorLog_, EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, findQualityFiles::v, EcalSrFlag::value(), withEbSimHit_, x, xtalGraphX(), xtalGraphY(), y, and EcalTrigTowerDetId::zside().

Referenced by analyze().

544  {
545 
546  bool eventError = false;
547  nEbZsErrors_ = 0;
548  nEbZsErrorsType1_ = 0;
549  vector<pair<int,int> > xtalEtaPhi;
550 
551  xtalEtaPhi.reserve(nEbPhi*nEbEta);
552  for(int iEta0=0; iEta0<nEbEta; ++iEta0){
553  for(int iPhi0=0; iPhi0<nEbPhi; ++iPhi0){
555  ebEnergies[iEta0][iPhi0].recE = -numeric_limits<double>::max();
556  ebEnergies[iEta0][iPhi0].simE = 0; //must be zero.
557  ebEnergies[iEta0][iPhi0].simHit = 0;
558  ebEnergies[iEta0][iPhi0].gain12 = false;
559  xtalEtaPhi.push_back(pair<int,int>(iEta0, iPhi0));
560  }
561  }
562 
563  // get the barrel geometry:
564  edm::ESHandle<CaloGeometry> geoHandle;
565 
566  es.get<CaloGeometryRecord>().get(geoHandle);
567  const CaloSubdetectorGeometry *geometry_p
568  = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
569 //CaloSubdetectorGeometry const& geometry = *geometry_p;
570 
571  //EB unsuppressed digis:
573  it != ebNoZsDigis_->end(); ++it){
574  const EBDataFrame& frame = *it;
575  int iEta0 = iEta2cIndex(static_cast<const EBDetId&>(frame.id()).ieta());
576  int iPhi0 = iPhi2cIndex(static_cast<const EBDetId&>(frame.id()).iphi());
577  if(iEta0<0 || iEta0>=nEbEta){
578  stringstream s;
579  s << "EcalSelectiveReadoutValidation: "
580  << "iEta0 (= " << iEta0 << ") is out of range ("
581  << "[0," << nEbEta -1 << "]\n";
582  throw cms::Exception(s.str());
583  }
584  if(iPhi0<0 || iPhi0>=nEbPhi){
585  stringstream s;
586  s << "EcalSelectiveReadoutValidation: "
587  << "iPhi0 (= " << iPhi0 << ") is out of range ("
588  << "[0," << nEbPhi -1 << "]\n";
589  throw cms::Exception(s.str());
590  }
591 
592  ebEnergies[iEta0][iPhi0].noZsRecE = frame2Energy(frame);
593  ebEnergies[iEta0][iPhi0].gain12 = true;
594  for(int i = 0; i< frame.size(); ++i){
595  const int gain12Code = 0x1;
596  if(frame[i].gainId()!=gain12Code) ebEnergies[iEta0][iPhi0].gain12 = false;
597  }
598 
599  const GlobalPoint xtalPos
600  = geometry_p->getGeometry(frame.id())->getPosition();
601 
602  ebEnergies[iEta0][iPhi0].phi = rad2deg*((double)xtalPos.phi());
603  ebEnergies[iEta0][iPhi0].eta = xtalPos.eta();
604  } //next non-zs digi
605 
606  //EB sim hits
607  for(vector<PCaloHit>::const_iterator it = ebSimHits_->begin();
608  it != ebSimHits_->end(); ++it){
609  const PCaloHit& simHit = *it;
610  EBDetId detId(simHit.id());
611  int iEta = detId.ieta();
612  int iEta0 =iEta2cIndex(iEta);
613  int iPhi = detId.iphi();
614  int iPhi0 = iPhi2cIndex(iPhi);
615  ebEnergies[iEta0][iPhi0].simE += simHit.energy();
616  ++ebEnergies[iEta0][iPhi0].simHit;
617  }
618 
619  bool crystalShot[nEbEta][nEbPhi];
620  pair<int,int> EBxtalCoor[nEbEta][nEbPhi];
621 
622  for(int iEta0=0; iEta0<nEbEta; ++iEta0){
623  for(int iPhi0=0; iPhi0<nEbPhi; ++iPhi0){
624  crystalShot[iEta0][iPhi0] = false;
625  EBxtalCoor[iEta0][iPhi0] = make_pair(0,0);
626  }
627  }
628 
629  int nEbDigi = 0;
630 
632  it != ebDigis_->end(); ++it){
633  ++nEbDigi;
634  const EBDataFrame& frame = *it;
635  int iEta = static_cast<const EBDetId&>(frame.id()).ieta();
636  int iPhi = static_cast<const EBDetId&>(frame.id()).iphi();
637  int iEta0 = iEta2cIndex(iEta);
638  int iPhi0 = iPhi2cIndex(iPhi);
639  if(iEta0<0 || iEta0>=nEbEta){
640  throw (cms::Exception("EcalSelectiveReadoutValidation")
641  << "iEta0 (= " << iEta0 << ") is out of range ("
642  << "[0," << nEbEta -1 << "]");
643  }
644  if(iPhi0<0 || iPhi0>=nEbPhi){
645  throw (cms::Exception("EcalSelectiveReadoutValidation")
646  << "iPhi0 (= " << iPhi0 << ") is out of range ("
647  << "[0," << nEbPhi -1 << "]");
648  }
649  assert(iEta0>=0 && iEta0<nEbEta);
650  assert(iPhi0>=0 && iPhi0<nEbPhi);
651  if(!crystalShot[iEta0][iPhi0]){
652  crystalShot[iEta0][iPhi0] = true;
653  EBxtalCoor[iEta0][iPhi0] = make_pair(xtalGraphX(frame.id()), xtalGraphY(frame.id()));
654  } else{
655  cout << "Error: several digi for same crystal!";
656  abort();
657  }
658  if(localReco_){
659  ebEnergies[iEta0][iPhi0].recE = frame2Energy(frame);
660  }
661 
662  ebEnergies[iEta0][iPhi0].gain12 = true;
663  for(int i = 0; i< frame.size(); ++i){
664  const int gain12Code = 0x1;
665  if(frame[i].gainId()!=gain12Code){
666  ebEnergies[iEta0][iPhi0].gain12 = false;
667  }
668  }
669 
671  = ebSrFlags_->find(readOutUnitOf(frame.id()));
672 
673  bool highInterest = false;
674 
675  // if(srf == ebSrFlags_->end()){
676  // throw cms::Exception("EcalSelectiveReadoutValidation")
677  // << __FILE__ << ":" << __LINE__ << ": SR flag not found";
678  //}
679 
680  if(srf != ebSrFlags_->end()){
681  highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
683  }
684 
685 
686  if(highInterest){
688  } else{
689  int v = dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr);
690  fill(meEbLiZsFir_, v);
691  if(v < ebZsThr_){
692  eventError = true;
693  ++nEbZsErrors_;
694  pair<int,int> ru = dccCh(frame.id());
695  if(isRuComplete_[ru.first][ru.second-1]) ++nEbZsErrorsType1_;
696  if(nEbZsErrors_ < 3){
697  srApplicationErrorLog_ << event.id() << ", "
698  << "RU " << frame.id() << ", "
699  << "DCC " << ru.first
700  << " Ch : " << ru.second << ": "
701  << "LI channel under ZS threshold.\n";
702  }
703  if(nEbZsErrors_==3){
704  srApplicationErrorLog_ << event.id() << ": "
705  << "more ZS errors for this event...\n";
706  }
707  }
708  }
709  } //next EB digi
710 
711  for(int iEta0=0; iEta0<nEbEta; ++iEta0){
712  for(int iPhi0=0; iPhi0<nEbPhi; ++iPhi0)
713  fill(meChOcc_, EBxtalCoor[iEta0][iPhi0].first, EBxtalCoor[iEta0][iPhi0].second,crystalShot[iEta0][iPhi0] ? 1. : 0.);
714  }
715 
716  if(!localReco_){
718  = ebRecHits_->begin();
719  it != ebRecHits_->end(); ++it){
720  ++nEbDigi;
721  const RecHit& hit = *it;
722  int iEta = static_cast<const EBDetId&>(hit.id()).ieta();
723  int iPhi = static_cast<const EBDetId&>(hit.id()).iphi();
724  int iEta0 = iEta2cIndex(iEta);
725  int iPhi0 = iPhi2cIndex(iPhi);
726  if(iEta0<0 || iEta0>=nEbEta){
727  LogError("EcalSrValid") << "iEta0 (= " << iEta0 << ") is out of range ("
728  << "[0," << nEbEta -1 << "]\n";
729  }
730  if(iPhi0<0 || iPhi0>=nEbPhi){
731  LogError("EcalSrValid") << "iPhi0 (= " << iPhi0 << ") is out of range ("
732  << "[0," << nEbPhi -1 << "]\n";
733  }
734  ebEnergies[iEta0][iPhi0].recE = hit.energy();
735  }
736  }
737 
738  for(unsigned int i=0; i<xtalEtaPhi.size(); ++i){
739  int iEta0 = xtalEtaPhi[i].first;
740  int iPhi0= xtalEtaPhi[i].second;
741  energiesEb_t& energies = ebEnergies[iEta0][iPhi0];
742 
743  double recE = energies.recE;
744  if(recE!=-numeric_limits<double>::max()){//not zero suppressed
745  fill(meEbRecE_, ebEnergies[iEta0][iPhi0].recE);
746  fill(meEbEMean_, ievt_+1, recE);
747  } //not zero suppressed
748 
749  if(withEbSimHit_){
750  if(!energies.simHit){//noise only crystal channel
751  fill(meEbNoise_, energies.noZsRecE);
752  } else{
753  fill(meEbSimE_, energies.simE);
754  fill(meEbRecEHitXtal_, energies.recE);
755  }
756  fill(meEbRecVsSimE_, energies.simE, energies.recE);
757  fill(meEbNoZsRecVsSimE_, energies.simE, energies.noZsRecE);
758  }
759  }
760 
761  int EBZs1RuCount[2][17][72];
762  int EBFullRuCount[2][17][72];
763  int EBForcedRuCount[2][17][72];
764  std::pair<int, int> EBtowerCoor[2][17][72];
765  for(int iZ(0); iZ < 2; iZ++){
766  for(int iEta(0);iEta < 17; iEta++){
767  for(int iPhi(0);iPhi < 72; iPhi++){
768  EBZs1RuCount[iZ][iEta][iPhi] = 0;
769  EBFullRuCount[iZ][iEta][iPhi] = 0;
770  EBForcedRuCount[iZ][iEta][iPhi] = 0;
771  }
772  }
773  }
774 
775  //SRF
776  nEbFROCnt_ = 0;
777  char ebSrfMark[2][17][72];
778  bzero(ebSrfMark, sizeof(ebSrfMark));
779  // int idbg = 0;
781  it != ebSrFlags_->end(); ++it){
782  const EBSrFlag& srf = *it;
783  int iEtaAbs = srf.id().ietaAbs();
784  int iPhi = srf.id().iphi();
785  int iZ = srf.id().zside();
786 
787  // cout << "--> " << ++idbg << iEtaAbs << " " << iPhi << " " << iZ
788  // << " " << srf.id() << "\n";
789 
790  if(iEtaAbs < 1 || iEtaAbs > 17
791  || iPhi < 1 || iPhi > 72) throw cms::Exception("EcalSelectiveReadoutValidation")
792  << "Found a barrel SRF with an invalid det ID: " << srf.id() << ".\n";
793  ++ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1];
794  if(ebSrfMark[iZ>0?1:0][iEtaAbs-1][iPhi-1] > 1) throw cms::Exception("EcalSelectiveReadoutValidation")
795  << "Duplicate SRF for RU " << srf.id() << ".\n";
796 
797  EBtowerCoor[iZ > 0 ? 1 : 0][iEtaAbs - 1][iPhi - 1] = std::pair<int, int>(srf.id().ieta(), srf.id().iphi());
798 
799  int flag = srf.value() & ~EcalSrFlag::SRF_FORCED_MASK;
800  if(flag == EcalSrFlag::SRF_ZS1){
801  EBZs1RuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
802  }
803  if(flag == EcalSrFlag::SRF_FULL){
804  EBFullRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
805  ++nEbFROCnt_;
806  }
808  EBForcedRuCount[iZ>0?1:0][iEtaAbs-1][iPhi-1] +=1;
809  }
810  }
811  for(int iZ(0); iZ < 2; iZ++){
812  for(int iEta(0);iEta < 17; iEta++){
813  for(int iPhi(0);iPhi < 72; iPhi++){
814  float x(EBtowerCoor[iZ][iEta][iPhi].first);
815  float y(EBtowerCoor[iZ][iEta][iPhi].second);
816  fill(meZs1Ru_, x, y, EBZs1RuCount[iZ][iEta][iPhi]);
817  fill(meFullRoRu_, x, y, EBFullRuCount[iZ][iEta][iPhi]);
818  fill(meForcedRu_, x, y, EBForcedRuCount[iZ][iEta][iPhi]);
819  }
820  }
821  }
822 
823  if(eventError) srApplicationErrorLog_ << event.id()
824  << ": " << nEbZsErrors_
825  << " ZS-flagged EB channels under "
826  "the ZS threshold, whose " << nEbZsErrorsType1_
827  << " in a complete RU.\n";
828 }
CollHandle< EBDigiCollection > ebNoZsDigis_
int value() const
Definition: EcalSrFlag.h:44
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
key_type id() const
Definition: EBDataFrame.h:31
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int xtalGraphX(const EEDetId &id) const
static const int nEbPhi
number of crystals along Phi in EB
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:29
static const double rad2deg
Conversion factor from radian to degree.
double energy() const
Definition: PCaloHit.h:24
int simHit
energy reconstructed from zero-suppressed digi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::vector< T >::const_iterator const_iterator
const_iterator begin() const
int size() const
Definition: EcalDataFrame.h:26
int ieta() const
get the tower ieta
int zside() const
get the z-side of the tower (1/-1)
static const int nEbEta
number of crystals along Eta in EB
U second(std::pair< T, U > const &p)
int xtalGraphY(const EEDetId &id) const
int ietaAbs() const
get the absolute value of the tower ieta
CollHandle< EBSrFlagCollection > ebSrFlags_
static const int SRF_FULL
Definition: EcalSrFlag.h:24
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
unsigned int id() const
Definition: PCaloHit.h:37
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
int nEbFROCnt_
Counter of EB FRO-flagged RUs.
CollHandle< std::vector< PCaloHit > > ebSimHits_
int nEbZsErrors_
Counter of EB ZS errors (LI channel below ZS threshold)
const EcalTrigTowerDetId & id() const override
Definition: EBSrFlag.h:36
double recE
energy reconstructed from unsuppressed digi
int iphi() const
get the tower iphi
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
const_iterator end() const
T eta() const
Definition: PV3DBase.h:76
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
T get() const
Definition: EventSetup.h:71
void fill(MonitorElement *me, float x)
std::pair< int, int > dccCh(const DetId &xtalId) const
double frame2Energy(const EcalDataFrame &frame) const
CollHandle< EBDigiCollection > ebDigis_
CollHandle< RecHitCollection > ebRecHits_
void EcalSelectiveReadoutValidation::analyzeEE ( const edm::Event event,
const edm::EventSetup es 
)
private

ECAL endcap data analysis. To be called for each event.

Parameters
eventEDM event
esevent setup

Definition at line 265 of file EcalSelectiveReadoutValidation.cc.

References edm::DataFrameContainer::begin(), gather_cfg::cout, dccCh(), dccZsFIR(), DetId::Ecal, EcalEndcap, eeDigis_, eeEnergies, eeNoZsDigis_, eeRecHits_, eeSimHits_, eeSrFlags_, eeZsThr_, edm::DataFrameContainer::end(), PCaloHit::energy(), EcalRecHit::energy(), PV3DBase< T, PVType, FrameType >::eta(), EcalSelectiveReadoutValidation::energiesEe_t::eta, Exception, fill(), plotBeamSpotDB::first, firstFIRSample_, firWeights_, RemoveAddSevLevel::flag, frame2Energy(), EcalSelectiveReadoutValidation::energiesEe_t::gain12, ecalMGPA::gainId(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), mps_fire::i, EEDataFrame::id(), EESrFlag::id(), PCaloHit::id(), EcalRecHit::id(), ievt_, isRuComplete_, EcalScDetId::ix(), EEDetId::ix(), iXY2cIndex(), EcalScDetId::iy(), EEDetId::iy(), localReco_, SiStripPI::max, meChOcc_, meEeEMean_, meEeHiZsFir_, meEeLiZsFir_, meEeNoise_, meEeNoZsRecVsSimE_, meEeRecE_, meEeRecEHitXtal_, meEeRecVsSimE_, meEeSimE_, meForcedRu_, meFullRoRu_, meZs1Ru_, nEeFROCnt_, nEeX, nEeY, nEeZsErrors_, nEeZsErrorsType1_, nEndcaps, EcalSelectiveReadoutValidation::energiesEe_t::noZsRecE, PV3DBase< T, PVType, FrameType >::phi(), EcalSelectiveReadoutValidation::energiesEe_t::phi, rad2deg, readOutUnitOf(), EcalSelectiveReadoutValidation::energiesEe_t::recE, edm::second(), EcalSelectiveReadoutValidation::energiesEe_t::simE, rpcPointValidation_cfi::simHit, EcalSelectiveReadoutValidation::energiesEe_t::simHit, EcalDataFrame::size(), edm::DataFrameContainer::size(), srApplicationErrorLog_, EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, findQualityFiles::v, EcalSrFlag::value(), withEeSimHit_, phase1PixelTopology::xOffset, xtalGraphX(), xtalGraphY(), EcalScDetId::zside(), EEDetId::zside(), and ecaldqm::zside().

Referenced by analyze().

266  {
267  bool eventError = false;
268  nEeZsErrors_ = 0;
269  nEeZsErrorsType1_ = 0;
270 
271  for(int iZ0=0; iZ0<nEndcaps; ++iZ0){
272  for(int iX0=0; iX0<nEeX; ++iX0){
273  for(int iY0=0; iY0<nEeY; ++iY0){
274  eeEnergies[iZ0][iX0][iY0].noZsRecE = -numeric_limits<double>::max();
275  eeEnergies[iZ0][iX0][iY0].recE = -numeric_limits<double>::max();
276  eeEnergies[iZ0][iX0][iY0].simE = 0; //must be set to zero.
277  eeEnergies[iZ0][iX0][iY0].simHit = 0;
278  eeEnergies[iZ0][iX0][iY0].gain12 = false;
279  }
280  }
281  }
282 
283  // gets the endcap geometry:
284  edm::ESHandle<CaloGeometry> geoHandle;
285  es.get<CaloGeometryRecord>().get(geoHandle);
286  const CaloSubdetectorGeometry *geometry_p
287  = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
288 //CaloSubdetectorGeometry const& geometry = *geometry_p;
289 
290  //EE unsupressed digis:
291  for (unsigned int digis=0; digis<eeNoZsDigis_->size(); ++digis){
292 
293  EEDataFrame frame = (*eeNoZsDigis_)[digis];
294  int iX0 = iXY2cIndex(frame.id().ix());
295  int iY0 = iXY2cIndex(frame.id().iy());
296  int iZ0 = frame.id().zside()>0?1:0;
297 
298  if(iX0<0 || iX0>=nEeX){
299  edm::LogError("EcalSrValid") << "iX0 (= " << iX0 << ") is out of range ("
300  << "[0," << nEeX -1 << "]\n";
301  }
302  if(iY0<0 || iY0>=nEeY){
303  edm::LogError("EcalSrValid") << "iY0 (= " << iY0 << ") is out of range ("
304  << "[0," << nEeY -1 << "]\n";
305  }
306  // cout << "EE no ZS energy computation..." ;
307  eeEnergies[iZ0][iX0][iY0].noZsRecE = frame2Energy(frame);
308 
309  eeEnergies[iZ0][iX0][iY0].gain12 = true;
310  for(int i = 0; i< frame.size(); ++i){
311  const int gain12Code = 0x1;
312  if(frame[i].gainId()!=gain12Code) eeEnergies[iZ0][iX0][iY0].gain12 = false;
313  }
314 
315  const GlobalPoint xtalPos
316  = geometry_p->getGeometry(frame.id())->getPosition();
317 
318  eeEnergies[iZ0][iX0][iY0].phi = rad2deg*((double)xtalPos.phi());
319  eeEnergies[iZ0][iX0][iY0].eta = xtalPos.eta();
320  }
321 
322  //EE rec hits:
323  if(!localReco_){
325  = eeRecHits_->begin();
326  it != eeRecHits_->end(); ++it){
327  const RecHit& hit = *it;
328  int iX0 = iXY2cIndex(static_cast<const EEDetId&>(hit.id()).ix());
329  int iY0 = iXY2cIndex(static_cast<const EEDetId&>(hit.id()).iy());
330  int iZ0 = static_cast<const EEDetId&>(hit.id()).zside()>0?1:0;
331 
332  if(iX0<0 || iX0>=nEeX){
333  LogError("EcalSrValid") << "iX0 (= " << iX0 << ") is out of range ("
334  << "[0," << nEeX -1 << "]\n";
335  }
336  if(iY0<0 || iY0>=nEeY){
337  LogError("EcalSrValid") << "iY0 (= " << iY0 << ") is out of range ("
338  << "[0," << nEeY -1 << "]\n";
339  }
340  // cout << "EE no ZS energy computation..." ;
341  eeEnergies[iZ0][iX0][iY0].recE = hit.energy();
342  }
343  }
344 
345  //EE sim hits:
346  for(vector<PCaloHit>::const_iterator it = eeSimHits_->begin();
347  it != eeSimHits_->end(); ++it){
348  const PCaloHit& simHit = *it;
349  EEDetId detId(simHit.id());
350  int iX = detId.ix();
351  int iX0 =iXY2cIndex(iX);
352  int iY = detId.iy();
353  int iY0 = iXY2cIndex(iY);
354  int iZ0 = detId.zside()>0?1:0;
355  eeEnergies[iZ0][iX0][iY0].simE += simHit.energy();
356  ++eeEnergies[iZ0][iX0][iY0].simHit;
357  }
358 
359  bool EEcrystalShot[nEeX][nEeY][2];
360  pair<int,int> EExtalCoor[nEeX][nEeY][2];
361 
362  for(int iEeZ=0; iEeZ<2; ++iEeZ){
363  for(int iEeX=0; iEeX<nEeX; ++iEeX){
364  for(int iEeY=0; iEeY<nEeY; ++iEeY){
365  EEcrystalShot[iEeX][iEeY][iEeZ] = false;
366  EExtalCoor[iEeX][iEeY][iEeZ] = make_pair(0,0);
367  }
368  }
369  }
370 
371  //EE suppressed digis
373  it != eeDigis_->end(); ++it){
374  const EEDataFrame& frame = *it;
375  int iX0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix());
376  int iY0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy());
377  int iZ0 = static_cast<const EEDetId&>(frame.id()).zside()>0?1:0;
378  if(iX0<0 || iX0>=nEeX){
379  LogError("EcalSrValid") << "iX0 (= " << iX0 << ") is out of range ("
380  << "[0," << nEeX -1 << "]\n";
381  }
382  if(iY0<0 || iY0>=nEeY){
383  LogError("EcalSrValid") << "iY0 (= " << iY0 << ") is out of range ("
384  << "[0," << nEeY -1 << "]\n";
385  }
386 
387  if(!EEcrystalShot[iX0][iY0][iZ0]){
388  EEcrystalShot[iX0][iY0][iZ0] = true;
389  EExtalCoor[iX0][iY0][iZ0] = make_pair(xtalGraphX(frame.id()), xtalGraphY(frame.id()));
390  } else{
391  cout << "Error: several digi for same crystal!";
392  abort();
393  }
394 
395  if(localReco_){
396  eeEnergies[iZ0][iX0][iY0].recE = frame2Energy(frame);
397  }
398 
399  eeEnergies[iZ0][iX0][iY0].gain12 = true;
400  for(int i = 0; i< frame.size(); ++i){
401  const int gain12Code = 0x1;
402  if(frame[i].gainId()!=gain12Code){
403  eeEnergies[iZ0][iX0][iY0].gain12 = false;
404  }
405  }
406 
408  = eeSrFlags_->find(readOutUnitOf(frame.id()));
409 
410  bool highInterest = false;
411 
412 
413  if(srf==eeSrFlags_->end()) continue;
414 
415  if(srf!=eeSrFlags_->end()){
416  highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
418  }
419 
420  if(highInterest){
422  } else{
423  int v = dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr);
424  fill(meEeLiZsFir_, v);
425  if(v < eeZsThr_){
426  eventError = true;
427  ++nEeZsErrors_;
428  pair<int,int> ru = dccCh(frame.id());
429  if(isRuComplete_[ru.first][ru.second-1]) ++nEeZsErrorsType1_;
430  if(nEeZsErrors_ < 3){
431  srApplicationErrorLog_ << event.id() << ", "
432  << "RU " << frame.id() << ", "
433  << "DCC " << ru.first
434  << " Ch : " << ru.second << ": "
435  << "LI channel under ZS threshold.\n";
436  }
437  if(nEeZsErrors_==3){
438  srApplicationErrorLog_ << event.id() << ": "
439  << "more ZS errors for this event...\n";
440  }
441  }
442  }
443  } //next ZS digi.
444 
445  for(int iEeZ=0; iEeZ<2; ++iEeZ){
446  for(int iEeX=0; iEeX<nEeX; ++iEeX){
447  for(int iEeY=0; iEeY<nEeY; ++iEeY){
448  fill(meChOcc_, EExtalCoor[iEeX][iEeY][iEeZ].first, EExtalCoor[iEeX][iEeY][iEeZ].second,EEcrystalShot[iEeX][iEeY][iEeZ] ? 1 : 0);
449  }
450  }
451  }
452 
453  for(int iZ0=0; iZ0<nEndcaps; ++iZ0){
454  for(int iX0=0; iX0<nEeX; ++iX0){
455  for(int iY0=0; iY0<nEeY; ++iY0){
456  double recE = eeEnergies[iZ0][iX0][iY0].recE;
457  if(recE==-numeric_limits<double>::max()) continue; //not a crystal or ZS
458  fill(meEeRecE_, eeEnergies[iZ0][iX0][iY0].recE);
459 
460  fill(meEeEMean_, ievt_+1,
461  eeEnergies[iZ0][iX0][iY0].recE);
462 
463  if(withEeSimHit_){
464  if(!eeEnergies[iZ0][iX0][iY0].simHit){//noise only crystal channel
465  fill(meEeNoise_, eeEnergies[iZ0][iX0][iY0].noZsRecE);
466  } else{
467  fill(meEeSimE_, eeEnergies[iZ0][iX0][iY0].simE);
468  fill(meEeRecEHitXtal_, eeEnergies[iZ0][iX0][iY0].recE);
469  }
470  fill(meEeRecVsSimE_, eeEnergies[iZ0][iX0][iY0].simE,
471  eeEnergies[iZ0][iX0][iY0].recE);
472  fill(meEeNoZsRecVsSimE_, eeEnergies[iZ0][iX0][iY0].simE,
473  eeEnergies[iZ0][iX0][iY0].noZsRecE);
474  }
475  }
476  }
477  }
478 
479  int EEZs1RuCount[2][20][20];
480  int EEFullRuCount[2][20][20];
481  int EEForcedRuCount[2][20][20];
482  for(int iZ(0); iZ < 2; iZ++){
483  for(int iX(0);iX < 20; iX++){
484  for(int iY(0);iY < 20; iY++){
485  EEZs1RuCount[iZ][iX][iY] = 0;
486  EEFullRuCount[iZ][iX][iY] = 0;
487  EEForcedRuCount[iZ][iX][iY] = 0;
488  }
489  }
490  }
491 
492  nEeFROCnt_ = 0;
493  char eeSrfMark[2][20][20];
494  bzero(eeSrfMark, sizeof(eeSrfMark));
495  //Filling RU histo
497  it != eeSrFlags_->end(); ++it){
498  const EESrFlag& srf = *it;
499  // srf.id() is EcalScDetId; 1 <= ix <= 20 1 <= iy <= 20
500  int iX = srf.id().ix();
501  int iY = srf.id().iy();
502  int zside = srf.id().zside(); //-1 for EE-, +1 for EE+
503  if(iX<1 || iY > 100) throw cms::Exception("EcalSelectiveReadoutValidation")
504  << "Found an endcap SRF with an invalid det ID: " << srf.id() << ".\n";
505  ++eeSrfMark[zside>0?1:0][iX-1][iY-1];
506  if(eeSrfMark[zside>0?1:0][iX-1][iY-1] > 1) throw cms::Exception("EcalSelectiveReadoutValidation")
507  << "Duplicate SRF for supercrystal " << srf.id() << ".\n";
508  int flag = srf.value() & ~EcalSrFlag::SRF_FORCED_MASK;
509  if(flag == EcalSrFlag::SRF_ZS1){
510  EEZs1RuCount[zside>0?1:0][iX-1][iY-1] += 1;
511  }
512 
513  if(flag == EcalSrFlag::SRF_FULL){
514  EEFullRuCount[zside>0?1:0][iX-1][iY-1] += 1;
515  ++nEeFROCnt_;
516  }
517 
519  EEForcedRuCount[zside>0?1:0][iX-1][iY-1] += 1;
520  }
521  }
522  for(int iZ(0); iZ < 2; iZ++){
523  int xOffset(iZ == 0 ? -40 : 20);
524  for(int iX(0);iX < 20; iX++){
525  for(int iY(0);iY < 20; iY++){
526  int GraphX = (iX + 1)+ xOffset;
527  int GraphY = (iY+1);
528  fill(meZs1Ru_, GraphX, GraphY, EEZs1RuCount[iZ][iX][iY]);
529  fill(meFullRoRu_, GraphX, GraphY, EEFullRuCount[iZ][iX][iY]);
530  fill(meForcedRu_, GraphX, GraphY, EEForcedRuCount[iZ][iX][iY]);
531  }
532  }
533  }
534 
535  if(eventError) srApplicationErrorLog_ << event.id()
536  << ": " << nEeZsErrors_
537  << " ZS-flagged EE channels under "
538  "the ZS threshold, whose " << nEeZsErrorsType1_
539  << " in a complete RU.\n";
540 } //end of analyzeEE
int value() const
Definition: EcalSrFlag.h:44
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
int ix() const
Definition: EEDetId.h:77
static const int nEeX
EE crystal grid size along X.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int xtalGraphX(const EEDetId &id) const
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:29
static const double rad2deg
Conversion factor from radian to degree.
energiesEe_t eeEnergies[nEndcaps][nEeX][nEeY]
double energy() const
Definition: PCaloHit.h:24
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::vector< EcalRecHit >::const_iterator const_iterator
int simHit
energy reconstructed from zero-suppressed digi
int nEeZsErrors_
Counter of EE ZS errors (LI channel below ZS threshold)
const_iterator begin() const
int zside(DetId const &)
int size() const
Definition: EcalDataFrame.h:26
U second(std::pair< T, U > const &p)
int xtalGraphY(const EEDetId &id) const
CollHandle< EEDigiCollection > eeDigis_
CollHandle< RecHitCollection > eeRecHits_
int ix() const
Definition: EcalScDetId.h:70
int zside() const
Definition: EEDetId.h:71
static const int SRF_FULL
Definition: EcalSrFlag.h:24
CollHandle< std::vector< PCaloHit > > eeSimHits_
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
int iy() const
Definition: EEDetId.h:83
int nEeFROCnt_
Counter of EE FRO-flagged RUs.
unsigned int id() const
Definition: PCaloHit.h:37
int iy() const
Definition: EcalScDetId.h:76
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
key_type id() const
Definition: EEDataFrame.h:28
CollHandle< EESrFlagCollection > eeSrFlags_
constexpr int16_t xOffset
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
int zside() const
Definition: EcalScDetId.h:64
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
CollHandle< EEDigiCollection > eeNoZsDigis_
double recE
energy reconstructed from unsuppressed digi
const_iterator end() const
T eta() const
Definition: PV3DBase.h:76
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
T get() const
Definition: EventSetup.h:71
void fill(MonitorElement *me, float x)
std::pair< int, int > dccCh(const DetId &xtalId) const
double frame2Energy(const EcalDataFrame &frame) const
const EcalScDetId & id() const override
Definition: EESrFlag.h:37
static const int nEeY
EE crystal grid size along Y.
static const int nEndcaps
number of endcaps
void EcalSelectiveReadoutValidation::analyzeTP ( const edm::Event event,
const edm::EventSetup es 
)
private

Trigger primitive analysis. To be called for each event.

Parameters
eventEDM event
esevent setup

Definition at line 1307 of file EcalSelectiveReadoutValidation.cc.

References cIndex2iTtEta(), cIndex2iTtPhi(), DetId::Ecal, EcalBarrel, EcalEndcap, fill(), edm::EventSetup::get(), EcalTPGLutIdMap::getMap(), EcalTPGGroups::getMap(), EcalTPGPhysicsConst::getMap(), MonitorElement::getTProfile(), mps_fire::i, iTtEta2cIndex(), iTtPhi2cIndex(), lumiPlot::lut, meForcedTtf_, meHiTtf_, meLiTtf_, meMiTtf_, meTp_, meTpMap_, meTpVsEtSum_, meTtf_, meTtfVsEtSum_, meTtfVsTp_, nTtEta, nTtPhi, edm::ESHandle< T >::product(), l1t::HGCalTowerID::rawId(), DataFormats::L1THGCal::towerId, tpInGeV_, tps_, and ttEtSums.

Referenced by analyze().

1308  {
1309  int TTFlagCount[8];
1310  int LiTTFlagCount[nTtEta][nTtPhi];
1311  int MiTTFlagCount[nTtEta][nTtPhi];
1312  int HiTTFlagCount[nTtEta][nTtPhi];
1313  for(int iTTFlag(0);iTTFlag <8; iTTFlag++){
1314  TTFlagCount[iTTFlag]=0;
1315  }
1316  for(int iTtEta(0); iTtEta < nTtEta; iTtEta++){
1317  for(int iTtPhi(0); iTtPhi < nTtPhi; iTtPhi++){
1318  LiTTFlagCount[iTtEta][iTtPhi] = 0;
1319  MiTTFlagCount[iTtEta][iTtPhi] = 0;
1320  HiTTFlagCount[iTtEta][iTtPhi] = 0;
1321  }
1322  }
1323  int tpEtCount[100];
1324  for(int iEt(0);iEt < 100; iEt++){
1325  tpEtCount[iEt] = 0;
1326  }
1327 
1329  es.get<EcalTPGPhysicsConstRcd>().get( physHandle );
1330  const EcalTPGPhysicsConstMap & physMap = physHandle.product()->getMap() ;
1331 
1332  edm::ESHandle<EcalTPGLutGroup> lutGrpHandle;
1333  es.get<EcalTPGLutGroupRcd>().get( lutGrpHandle );
1334  const EcalTPGGroups::EcalTPGGroupsMap & lutGrpMap = lutGrpHandle.product()->getMap() ;
1335 
1336  edm::ESHandle<EcalTPGLutIdMap> lutMapHandle;
1337  es.get<EcalTPGLutIdMapRcd>().get( lutMapHandle );
1338  const EcalTPGLutIdMap::EcalTPGLutMap & lutMap = lutMapHandle.product()->getMap() ;
1339 
1340  EcalTPGPhysicsConstMapIterator ebItr(physMap.find(DetId(DetId::Ecal,EcalBarrel).rawId()));
1341  double lsb10bitsEB(ebItr == physMap.end() ? 0. : ebItr->second.EtSat / 1024.);
1342  EcalTPGPhysicsConstMapIterator eeItr(physMap.find(DetId(DetId::Ecal,EcalEndcap).rawId()));
1343  double lsb10bitsEE(eeItr == physMap.end() ? 0. : eeItr->second.EtSat / 1024.);
1344 
1345  for(EcalTrigPrimDigiCollection::const_iterator it = tps_->begin(); it != tps_->end(); ++it){
1346 
1347  double tpEt;
1348  if(tpInGeV_){
1349  EcalTrigTowerDetId const& towerId(it->id());
1350  unsigned int ADC = it->compressedEt();
1351 
1352  double lsb10bits(0.);
1353  if(towerId.subDet() == EcalBarrel) lsb10bits = lsb10bitsEB;
1354  else if(towerId.subDet() == EcalEndcap) lsb10bits = lsb10bitsEE;
1355 
1356  int tpg10bits = 0 ;
1357  EcalTPGGroups::EcalTPGGroupsMapItr itgrp = lutGrpMap.find(towerId.rawId()) ;
1358  uint32_t lutGrp = 999 ;
1359  if (itgrp != lutGrpMap.end()) lutGrp = itgrp->second ;
1360 
1361  EcalTPGLutIdMap::EcalTPGLutMapItr itLut = lutMap.find(lutGrp) ;
1362  if (itLut != lutMap.end()) {
1363  const unsigned int * lut = (itLut->second).getLut() ;
1364  for (unsigned int i=0 ; i<1024 ; i++)
1365  if (ADC == (0xff & lut[i])) {
1366  tpg10bits = i ;
1367  break ;
1368  }
1369  }
1370 
1371  tpEt = lsb10bits * tpg10bits;
1372  }
1373  else{
1374  tpEt = it->compressedEt();
1375  }
1376  int iEta = it->id().ieta();
1377  int iEta0 = iTtEta2cIndex(iEta);
1378  int iPhi = it->id().iphi();
1379  int iPhi0 = iTtPhi2cIndex(iPhi);
1380  double etSum = ttEtSums[iEta0][iPhi0];
1381 
1382  int iE = meTp_->getTProfile()->FindFixBin(tpEt);
1383  if ((iE >= 0) && (iE < 100)) {
1384  ++tpEtCount[iE];
1385  } else {
1386  // FindFixBin might return an overflow bin (outside tpEtCount range).
1387  // To prevent a memory overflow / segfault, these values are ignored.
1388  //std::cout << "EcalSelectiveReadoutValidation: Invalid iE value: " << iE << std::endl;
1389  }
1390 
1391  fill(meTpVsEtSum_, etSum, tpEt);
1392  ++TTFlagCount[it->ttFlag()];
1393  if((it->ttFlag() & 0x3) == 0){
1394  LiTTFlagCount[iEta0][iPhi0] += 1;
1395  }
1396  else if((it->ttFlag() & 0x3) == 1){
1397  MiTTFlagCount[iEta0][iPhi0] += 1;
1398  }
1399  else if((it->ttFlag() & 0x3) == 3){
1400  HiTTFlagCount[iEta0][iPhi0] += 1;
1401  }
1402  if((it->ttFlag() & 0x4)){
1403  fill(meForcedTtf_, iEta, iPhi);
1404  }
1405 
1406  fill(meTtfVsTp_, tpEt, it->ttFlag());
1407  fill(meTtfVsEtSum_, etSum, it->ttFlag());
1408  fill(meTpMap_, iEta, iPhi, tpEt, 1.);
1409  }
1410 
1411  for(int ittflag(0); ittflag < 8; ittflag++){
1412  fill(meTtf_, ittflag, TTFlagCount[ittflag]);
1413  }
1414  for(int iTtEta(0); iTtEta < nTtEta; iTtEta++){
1415  for(int iTtPhi(0); iTtPhi < nTtPhi; iTtPhi++){
1416  fill(meLiTtf_, cIndex2iTtEta(iTtEta), cIndex2iTtPhi(iTtPhi), LiTTFlagCount[iTtEta][iTtPhi]);
1417  fill(meMiTtf_, cIndex2iTtEta(iTtEta), cIndex2iTtPhi(iTtPhi), MiTTFlagCount[iTtEta][iTtPhi]);
1418  fill(meHiTtf_, cIndex2iTtEta(iTtEta), cIndex2iTtPhi(iTtPhi), HiTTFlagCount[iTtEta][iTtPhi]);
1419  }
1420  }
1421  if(tpInGeV_){
1422  for(int iE(0);iE<100; iE++){
1423  fill(meTp_, iE, tpEtCount[iE]);
1424  }
1425  } else{
1426  for(int iE(0); iE<40; iE++){
1427  fill(meTp_, iE, tpEtCount[iE]);
1428  }
1429  }
1430 }
TProfile * getTProfile() const
const EcalTPGGroupsMap & getMap() const
Definition: EcalTPGGroups.h:28
std::map< uint32_t, uint32_t >::const_iterator EcalTPGGroupsMapItr
Definition: EcalTPGGroups.h:23
CollHandle< EcalTrigPrimDigiCollection > tps_
std::vector< T >::const_iterator const_iterator
static const int nTtPhi
Number of Trigger Towers along Phi.
const EcalTPGLutMap & getMap() const
Definition: DetId.h:18
unsigned short rawId() const
Definition: HGCalTowerID.h:25
const std::map< uint32_t, Item > & getMap() const
l1t::HGCalTowerID towerId
Definition: classes.h:36
std::map< uint32_t, EcalTPGLut > EcalTPGLutMap
static const int nTtEta
Number of Trigger Towers along Eta.
T get() const
Definition: EventSetup.h:71
void fill(MonitorElement *me, float x)
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap
std::map< uint32_t, EcalTPGPhysicsConst::Item >::const_iterator EcalTPGPhysicsConstMapIterator
T const * product() const
Definition: ESHandle.h:86
std::map< uint32_t, uint32_t > EcalTPGGroupsMap
Definition: EcalTPGGroups.h:22
std::map< uint32_t, EcalTPGLut >::const_iterator EcalTPGLutMapItr
MonitorElement * EcalSelectiveReadoutValidation::book1D ( DQMStore::IBooker ibook,
const std::string &  name,
const std::string &  title,
int  nbins,
double  xmin,
double  xmax 
)
private

Definition at line 1841 of file EcalSelectiveReadoutValidation.cc.

References DQMStore::IBooker::book1D(), Exception, dataset::name, registerHist(), and mps_fire::result.

Referenced by bookHistograms(), and cIndex2iTtPhi().

1841  {
1842  if(!registerHist(name, title)) return nullptr; //this histo is disabled
1844  if(result==nullptr){
1845  throw cms::Exception("Histo")
1846  << "Failed to book histogram " << name;
1847  }
1848  return result;
1849 }
bool registerHist(const std::string &name, const std::string &title)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * EcalSelectiveReadoutValidation::book2D ( DQMStore::IBooker ibook,
const std::string &  name,
const std::string &  title,
int  nxbins,
double  xmin,
double  xmax,
int  nybins,
double  ymin,
double  ymax 
)
private

Definition at line 1851 of file EcalSelectiveReadoutValidation.cc.

References DQMStore::IBooker::book2D(), Exception, dataset::name, registerHist(), and mps_fire::result.

Referenced by bookHistograms(), and cIndex2iTtPhi().

1851  {
1852  if(!registerHist(name, title)) return nullptr; //this histo is disabled
1853  MonitorElement* result = ibook.book2D(name, title, nxbins, xmin, xmax,
1854  nybins, ymin, ymax);
1855  if(result==nullptr){
1856  throw cms::Exception("Histo")
1857  << "Failed to book histogram " << name;
1858  }
1859  return result;
1860 }
bool registerHist(const std::string &name, const std::string &title)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * EcalSelectiveReadoutValidation::bookFloat ( DQMStore::IBooker ibook,
const std::string &  name 
)
private

Wrappers to the book methods of the DQMStore DQM histogramming interface.

Definition at line 1830 of file EcalSelectiveReadoutValidation.cc.

References DQMStore::IBooker::bookFloat(), Exception, dataset::name, registerHist(), and mps_fire::result.

Referenced by bookHistograms(), and cIndex2iTtPhi().

1830  {
1831  if(!registerHist(name, "")) return nullptr; //this histo is disabled
1832  MonitorElement* result = ibook.bookFloat(name);
1833  if(result==nullptr){
1834  throw cms::Exception("DQM")
1835  << "Failed to book integer DQM monitor element" << name;
1836  }
1837  return result;
1838 }
bool registerHist(const std::string &name, const std::string &title)
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:105
void EcalSelectiveReadoutValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 851 of file EcalSelectiveReadoutValidation.cc.

References availableHistList_, book1D(), book2D(), bookFloat(), bookProfile(), bookProfile2D(), ebZsThr_, eeZsThr_, histList_, meChOcc_, meCompleteZSCnt_, meCompleteZSMap_, meCompleteZSRateMap_, meDccHiVol_, meDccLiVol_, meDccVol_, meDccVolFromData_, meDroppedFROCnt_, meDroppedFROMap_, meDroppedFRORateMap_, meEbEMean_, meEbFullRoCnt_, meEbHiZsFir_, meEbLiZsFir_, meEbNoise_, meEbNoZsRecVsSimE_, meEbRecE_, meEbRecEHitXtal_, meEbRecVsSimE_, meEbSimE_, meEbZsErrCnt_, meEbZsErrType1Cnt_, meEeEMean_, meEeFullRoCnt_, meEeHiZsFir_, meEeLiZsFir_, meEeNoise_, meEeNoZsRecVsSimE_, meEeRecE_, meEeRecEHitXtal_, meEeRecVsSimE_, meEeSimE_, meEeZsErrCnt_, meEeZsErrType1Cnt_, meForcedRu_, meForcedTtf_, meFullRoCnt_, meFullRoRu_, meHiTtf_, meIncompleteFROCnt_, meIncompleteFROMap_, meIncompleteFRORateMap_, meL1aRate_, meLiTtf_, meMiTtf_, meSRFlagsConsistency_, meTp_, meTpMap_, meTpVsEtSum_, meTtf_, meTtfVsEtSum_, meTtfVsTp_, meVol_, meVolB_, meVolBHI_, meVolBLI_, meVolE_, meVolEHI_, meVolELI_, meVolHI_, meVolLI_, meZs1Ru_, meZsErrCnt_, meZsErrType1Cnt_, nDccs_, printAvailableHists(), alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and tpInGeV_.

851  {
852 
853  meL1aRate_ = bookFloat(ibooker, "l1aRate_");
854 
855  meDccVol_ = bookProfile(ibooker, "hDccVol", //"EcalDccEventSizeComputed",
856  "ECAL DCC event fragment size;Dcc id; "
857  "<Event size> (kB)", nDccs_, .5, .5+nDccs_);
858 
859  meDccLiVol_ = bookProfile(ibooker, "hDccLiVol",
860  "LI channel payload per DCC;Dcc id; "
861  "<Event size> (kB)", nDccs_, .5, .5+nDccs_);
862 
863  meDccHiVol_ = bookProfile(ibooker, "hDccHiVol",
864  "HI channel payload per DCC;Dcc id; "
865  "<Event size> (kB)", nDccs_, .5, .5+nDccs_);
866 
867  meDccVolFromData_ = bookProfile(ibooker, "hDccVolFromData", //"EcalDccEventSize",
868  "ECAL DCC event fragment size;Dcc id; "
869  "<Event size> (kB)", nDccs_, .5, .5+nDccs_);
870 
871  meVolBLI_ = book1D(ibooker, "hVolBLI",// "EBLowInterestPayload",
872  "ECAL Barrel low interest crystal data payload;"
873  "Event size (kB);Nevts",
874  100, 0., 200.);
875 
876  meVolELI_ = book1D(ibooker, "hVolELI", //"EELowInterestPayload",
877  "Endcap low interest crystal data payload;"
878  "Event size (kB);Nevts",
879  100, 0., 200.);
880 
881  meVolLI_ = book1D(ibooker, "hVolLI", //"EcalLowInterestPayload",
882  "ECAL low interest crystal data payload;"
883  "Event size (kB);Nevts",
884  100, 0., 200.);
885 
886  meVolBHI_ = book1D(ibooker, "hVolBHI", //"EBHighInterestPayload",
887  "Barrel high interest crystal data payload;"
888  "Event size (kB);Nevts",
889  100, 0., 200.);
890 
891  meVolEHI_ = book1D(ibooker, "hVolEHI", //"EEHighInterestPayload",
892  "Endcap high interest crystal data payload;"
893  "Event size (kB);Nevts",
894  100, 0., 200.);
895 
896  meVolHI_ = book1D(ibooker, "hVolHI", //"EcalHighInterestPayload",
897  "ECAL high interest crystal data payload;"
898  "Event size (kB);Nevts",
899  100, 0., 200.);
900 
901  meVolB_ = book1D(ibooker, "hVolB", //"EBEventSize",
902  "Barrel data volume;Event size (kB);Nevts",
903  100, 0., 200.);
904 
905  meVolE_ = book1D(ibooker, "hVolE", //"EEEventSize",
906  "Endcap data volume;Event size (kB);Nevts",
907  100, 0., 200.);
908 
909  meVol_ = book1D(ibooker, "hVol", //"EcalEventSize",
910  "ECAL data volume;Event size (kB);Nevts",
911  100, 0., 200.);
912 
913  meChOcc_ = bookProfile2D(ibooker, "h2ChOcc", //"EcalChannelOccupancy",
914  "ECAL crystal channel occupancy after zero suppression;"
915  "iX -200 / iEta / iX + 100;"
916  "iY / iPhi (starting from -10^{o}!);"
917  "Event count rate",
918  401, -200.5, 200.5,
919  360, .5, 360.5);
920 
921  //TP
922  string tpUnit;
923  if(tpInGeV_) tpUnit = string("GeV"); else tpUnit = string("TP hw unit");
924  string title;
925  title = string("Trigger primitive TT E_{T};E_{T} ")
926  + tpUnit + string(";Event Count");
927  meTp_ = bookProfile(ibooker, "hTp", //"EcalTriggerPrimitiveEt",
928  title,
929  (tpInGeV_?100:40), 0., (tpInGeV_?10.:40.));
930 
931  meTtf_ = bookProfile(ibooker, "hTtf", //"EcalTriggerTowerFlag",
932  "Trigger primitive TT flag;Flag number;Event count",
933  8, -.5, 7.5);
934 
935  title = string("Trigger tower flag vs TP;E_{T}(TT) (")
936  + tpUnit + string(");Flag number");
937  meTtfVsTp_ = book2D(ibooker, "h2TtfVsTp",
938  title,
939  100, 0., (tpInGeV_?10.:40.),
940  8, -.5, 7.5);
941 
942  meTtfVsEtSum_ = book2D(ibooker, "h2TtfVsEtSum",
943  "Trigger tower flag vs #sumE_{T};"
944  "E_{T}(TT) (GeV);"
945  "TTF",
946  100, 0., 10.,
947  8, -.5, 7.5);
948  title = string("Trigger primitive Et (TP) vs #sumE_{T};"
949  "E_{T} (sum) (GeV);"
950  "E_{T} (TP) (") + tpUnit + string (")");
951 
952  meTpVsEtSum_ = book2D(ibooker, "h2TpVsEtSum",
953  title,
954  100, 0., 10.,
955  100, 0., (tpInGeV_?10.:40.));
956 
957  title = string("Trigger primitive E_{T};"
958  "iEta;"
959  "iPhi;"
960  "E_{T} (TP) (") + tpUnit + string (")");
961  meTpMap_ = bookProfile2D(ibooker, "h2Tp",
962  title,
963  57, -28.5, 28.5,
964  72, .5, 72.5);
965 
966  //SRF
967  meFullRoRu_ = book2D(ibooker, "h2FRORu", //"EcalFullReadoutSRFlagMap",
968  "Full Read-out readout unit;"
969  "iX - 40 / iEta / iX + 20;"
970  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
971  "Event count",
972  80, -39.5, 40.5,
973  72, .5, 72.5);
974 
975  meFullRoCnt_ = book1D(ibooker, "hFROCnt",
976  "Number of Full-readout-flagged readout units;"
977  "FRO RU count;Event count",
978  300, -.5, 299.5);
979 
980  meEbFullRoCnt_ = book1D(ibooker, "hEbFROCnt",
981  "Number of EB Full-readout-flagged readout units;"
982  "FRO RU count;Event count",
983  200, -.5, 199.5);
984 
985  meEeFullRoCnt_ = book1D(ibooker, "hEeFROCnt",
986  "Number of EE Full-readout-flagged readout units;"
987  "FRO RU count;Event count",
988  200, -.5, 199.5);
989 
990  meZs1Ru_ = book2D(ibooker, "h2Zs1Ru", //"EbZeroSupp1SRFlagMap",
991  "Readout unit with ZS-thr-1 flag;"
992  "iX - 40 / iEta / iX + 20;"
993  "iY0 / iPhi0 (iPhi = 1 at phi = 0 rad);"
994  "Event count",
995  80, -39.5, 40.5,
996  72, .5, 72.5);
997 
998  meForcedRu_ = book2D(ibooker, "h2ForcedRu", //"EcalReadoutUnitForcedBitMap",
999  "ECAL readout unit with forced bit of SR flag on;"
1000  "iX - 40 / iEta / iX + 20;"
1001  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1002  "Event count",
1003  80, -39.5, 40.5,
1004  72, .5, 72.5);
1005 
1006  meLiTtf_ = bookProfile2D(ibooker, "h2LiTtf", //"EcalLowInterestTriggerTowerFlagMap",
1007  "Low interest trigger tower flags;"
1008  "iEta;"
1009  "iPhi;"
1010  "Event count",
1011  57, -28.5, 28.5,
1012  72, .5, 72.5);
1013 
1014  meMiTtf_ = bookProfile2D(ibooker, "h2MiTtf", //"EcalMidInterestTriggerTowerFlagMap",
1015  "Mid interest trigger tower flags;"
1016  "iEta;"
1017  "iPhi;"
1018  "Event count",
1019  57, -28.5, 28.5,
1020  72, .5, 72.5);
1021 
1022  meHiTtf_ = bookProfile2D(ibooker, "h2HiTtf", //"EcalHighInterestTriggerTowerFlagMap",
1023  "High interest trigger tower flags;"
1024  "iEta;"
1025  "iPhi;"
1026  "Event count",
1027  57, -28.5, 28.5,
1028  72, .5, 72.5);
1029 
1030  meForcedTtf_ = book2D(ibooker, "h2ForcedTtf", //"EcalTtfForcedBitMap",
1031  "Trigger tower flags with forced bit set;"
1032  "iEta;"
1033  "iPhi;"
1034  "Event count",
1035  57, -28.5, 28.5,
1036  72, .5, 72.5);
1037 
1038 
1039  const float ebMinNoise = -1.;
1040  const float ebMaxNoise = 1.;
1041 
1042  const float eeMinNoise = -1.;
1043  const float eeMaxNoise = 1.;
1044 
1045  const float ebMinE = ebMinNoise;
1046  const float ebMaxE = ebMaxNoise;
1047 
1048  const float eeMinE = eeMinNoise;
1049  const float eeMaxE = eeMaxNoise;
1050 
1051  const int evtMax = 500;
1052 
1053  meEbRecE_ = book1D(ibooker, "hEbRecE",
1054  "Crystal reconstructed energy;E (GeV);Event count",
1055  100, ebMinE, ebMaxE);
1056 
1057  meEbEMean_ = bookProfile(ibooker, "hEbEMean",
1058  "EE <E_hit>;event #;<E_hit> (GeV)",
1059  evtMax, .5, evtMax + .5);
1060 
1061  meEbNoise_ = book1D(ibooker, "hEbNoise",
1062  "Crystal noise "
1063  "(rec E of crystal without deposited energy)"
1064  ";Rec E (GeV);Event count",
1065  100, ebMinNoise, ebMaxNoise);
1066 
1067  meEbLiZsFir_ = book1D(ibooker, "zsEbLiFIRemu",
1068  "Emulated ouput of ZS FIR filter for EB "
1069  "low interest crystals;"
1070  "ADC count*4;"
1071  "Event count",
1072  60, -30, 30);
1073 
1074  meEbHiZsFir_ = book1D(ibooker, "zsEbHiFIRemu",
1075  "Emulated ouput of ZS FIR filter for EB "
1076  "high interest crystals;"
1077  "ADC count*4;"
1078  "Event count",
1079  60, -30, 30);
1080 
1081  //TODO: Fill this histogram...
1082 // meEbIncompleteRUZsFir_ = book1D(ibooker, "zsEbIncompleteRUFIRemu",
1083 // "Emulated ouput of ZS FIR filter for EB "
1084 // "incomplete FRO-flagged RU;"
1085 // "ADC count*4;"
1086 // "Event count",
1087 // 60, -30, 30);
1088 
1089  meEbSimE_ = book1D(ibooker, "hEbSimE", "EB hit crystal simulated energy",
1090  100, ebMinE, ebMaxE);
1091 
1092  meEbRecEHitXtal_ = book1D(ibooker, "hEbRecEHitXtal",
1093  "EB rec energy of hit crystals",
1094  100, ebMinE, ebMaxE);
1095 
1096  meEbRecVsSimE_ = book2D(ibooker, "hEbRecVsSimE",
1097  "Crystal simulated vs reconstructed energy;"
1098  "Esim (GeV);Erec GeV);Event count",
1099  100, ebMinE, ebMaxE,
1100  100, ebMinE, ebMaxE);
1101 
1102  meEbNoZsRecVsSimE_ = book2D(ibooker, "hEbNoZsRecVsSimE",
1103  "Crystal no-zs simulated vs reconstructed "
1104  "energy;"
1105  "Esim (GeV);Erec GeV);Event count",
1106  100, ebMinE, ebMaxE,
1107  100, ebMinE, ebMaxE);
1108 
1109  meEeRecE_ = book1D(ibooker, "hEeRecE",
1110  "EE crystal reconstructed energy;E (GeV);"
1111  "Event count",
1112  100, eeMinE, eeMaxE);
1113 
1114  meEeEMean_ = bookProfile(ibooker, "hEeEMean",
1115  "<E_{EE hit}>;event;<E_{hit}> (GeV)",
1116  evtMax, .5, evtMax + .5);
1117 
1118 
1119  meEeNoise_ = book1D(ibooker, "hEeNoise",
1120  "EE crystal noise "
1121  "(rec E of crystal without deposited energy);"
1122  "E (GeV);Event count",
1123  200, eeMinNoise, eeMaxNoise);
1124 
1125  meEeLiZsFir_ = book1D(ibooker, "zsEeLiFIRemu",
1126  "Emulated ouput of ZS FIR filter for EE "
1127  "low interest crystals;"
1128  "ADC count*4;"
1129  "Event count",
1130  60, -30, 30);
1131 
1132  meEeHiZsFir_ = book1D(ibooker, "zsEeHiFIRemu",
1133  "Emulated ouput of ZS FIR filter for EE "
1134  "high interest crystals;"
1135  "ADC count*4;"
1136  "Event count",
1137  60, -30, 30);
1138 
1139  //TODO: Fill this histogram...
1140 // meEeIncompleteRUZsFir_ = book1D(ibooker, "zsEeIncompleteRUFIRemu",
1141 // "Emulated ouput of ZS FIR filter for EE "
1142 // "incomplete FRO-flagged RU;"
1143 // "ADC count*4;"
1144 // "Event count",
1145 // 60, -30, 30);
1146 
1147 
1148  meEeSimE_ = book1D(ibooker, "hEeSimE", "EE hit crystal simulated energy",
1149  100, eeMinE, eeMaxE);
1150 
1151  meEeRecEHitXtal_ = book1D(ibooker, "hEeRecEHitXtal",
1152  "EE rec energy of hit crystals",
1153  100, eeMinE, eeMaxE);
1154 
1155  meEeRecVsSimE_ = book2D(ibooker, "hEeRecVsSimE",
1156  "EE crystal simulated vs reconstructed energy;"
1157  "Esim (GeV);Erec GeV);Event count",
1158  100, eeMinE, eeMaxE,
1159  100, eeMinE, eeMaxE);
1160 
1161  meEeNoZsRecVsSimE_ = book2D(ibooker, "hEeNoZsRecVsSimE",
1162  "EE crystal no-zs simulated vs "
1163  "reconstructed "
1164  "energy;Esim (GeV);Erec GeV);Event count",
1165  100, eeMinE, eeMaxE,
1166  100, eeMinE, eeMaxE);
1167 
1168  meSRFlagsConsistency_ = book2D(ibooker, "hSRAlgoErrorMap",
1169  "TTFlags and SR Flags mismatch;"
1170  "iX - 40 / iEta / iX + 20;"
1171  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1172  "Event count",
1173  80, -39.5, 40.5,
1174  72, .5, 72.5);
1175 
1176  //Readout Units histos (interest/Ncrystals)
1177  meIncompleteFROMap_ = book2D(ibooker, "hIncompleteFROMap",
1178  "Incomplete full-readout-flagged readout units;"
1179  "iX - 40 / iEta / iX + 20;"
1180  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1181  "Event count",
1182  80, -39.5, 40.5,
1183  72, .5, 72.5);
1184 
1185  meIncompleteFROCnt_ = book1D(ibooker, "hIncompleteFROCnt",
1186  "Number of incomplete full-readout-flagged "
1187  "readout units;"
1188  "Number of RUs;Event count;",
1189  200, -.5, 199.5);
1190 
1192  = bookProfile2D(ibooker, "hIncompleteFRORateMap",
1193  "Incomplete full-readout-flagged readout units;"
1194  "iX - 40 / iEta / iX + 20;"
1195  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1196  "Incomplete error rate",
1197  80, -39.5, 40.5,
1198  72, .5, 72.5);
1199 
1200 
1201  meDroppedFROMap_ = book2D(ibooker, "hDroppedFROMap",
1202  "Dropped full-readout-flagged readout units;"
1203  "iX - 40 / iEta / iX + 20;"
1204  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1205  "Event count",
1206  80, -39.5, 40.5,
1207  72, .5, 72.5);
1208 
1209  meDroppedFROCnt_ = book1D(ibooker, "hDroppedFROCnt",
1210  "Number of dropped full-readout-flagged "
1211  "RU count;RU count;Event count",
1212  200, -.5, 199.5);
1213 
1214  meCompleteZSCnt_ = book1D(ibooker, "hCompleteZsCnt",
1215  "Number of zero-suppressed-flagged RU fully "
1216  "readout;"
1217  "RU count;Event count",
1218  200, -.5, 199.5);
1219 
1220  stringstream buf;
1221  buf << "Number of LI EB channels below the " << ebZsThr_/4. << " ADC count ZS threshold;"
1222  "Channel count;Event count",
1223  meEbZsErrCnt_ = book1D(ibooker, "hEbZsErrCnt",
1224  buf.str(),
1225  200, -.5, 199.5);
1226 
1227  buf.str("");
1228  buf << "Number of LI EE channels below the " << eeZsThr_/4. << " ADC count ZS theshold;"
1229  "Channel count;Event count",
1230  meEeZsErrCnt_ = book1D(ibooker, "hEeZsErrCnt",
1231  buf.str(),
1232  200, -.5, 199.5);
1233 
1234  meZsErrCnt_ = book1D(ibooker, "hZsErrCnt",
1235  "Number of LI channels below the ZS threshold;"
1236  "Channel count;Event count",
1237  200, -.5, 199.5);
1238 
1239  meEbZsErrType1Cnt_ = book1D(ibooker, "hEbZsErrType1Cnt",
1240  "Number of EB channels below the ZS "
1241  "threshold in a LI but fully readout RU;"
1242  "Channel count;Event count;",
1243  200, -.5, 199.5);
1244 
1245  meEeZsErrType1Cnt_ = book1D(ibooker, "hEeZsErrType1Cnt",
1246  "Number EE channels below the ZS threshold"
1247  " in a LI but fully readout RU;"
1248  "Channel count;Event count",
1249  200, -.5, 199.5);
1250 
1251  meZsErrType1Cnt_ = book1D(ibooker, "hZsErrType1Cnt",
1252  "Number of LI channels below the ZS threshold "
1253  "in a LI but fully readout RU;"
1254  "Channel count;Event count",
1255  200, -.5, 199.5);
1256 
1257 
1259  = bookProfile2D(ibooker, "hDroppedFRORateMap",
1260  "Dropped full-readout-flagged readout units"
1261  "iX - 40 / iEta / iX + 20;"
1262  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1263  "Dropping rate",
1264  80, -39.5, 40.5,
1265  72, .5, 72.5);
1266 
1267  meCompleteZSMap_ = book2D(ibooker, "hCompleteZSMap",
1268  "Complete zero-suppressed-flagged readout units;"
1269  "iX - 40 / iEta / iX + 20;"
1270  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1271  "Event count",
1272  80, -39.5, 40.5,
1273  72, .5, 72.5);
1274 
1276  = bookProfile2D(ibooker, "hCompleteZSRate",
1277  "Complete zero-suppressed-flagged readout units;"
1278  "iX - 40 / iEta / iX + 20;"
1279  "iY / iPhi (iPhi = 1 at phi = 0 rad);"
1280  "Completeness rate",
1281  80, -39.5, 40.5,
1282  72, .5, 72.5);
1283 
1284  //print list of available histograms (must be called after
1285  //the bookXX methods):
1287 
1288  //check the histList parameter:
1289  stringstream s;
1290  for(set<string>::iterator it = histList_.begin();
1291  it!=histList_.end();
1292  ++it){
1293  if(*it!=string("all")
1294  && availableHistList_.find(*it)==availableHistList_.end()){
1295  s << (s.str().empty()?"":", ") << *it;
1296  }
1297  }
1298  if(!s.str().empty()){
1299  LogWarning("Configuration")
1300  << "Parameter 'histList' contains some unknown histogram(s). "
1301  "Check spelling. Following name were not found: "
1302  << s.str();
1303  }
1304 }
MonitorElement * bookFloat(DQMStore::IBooker &, const std::string &name)
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)
MonitorElement * bookProfile(DQMStore::IBooker &, const std::string &name, const std::string &title, int nbins, double xmin, double xmax)
std::map< std::string, std::string > availableHistList_
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="")
static const unsigned nDccs_
Total number of DCCs.
MonitorElement * EcalSelectiveReadoutValidation::bookProfile ( DQMStore::IBooker ibook,
const std::string &  name,
const std::string &  title,
int  nbins,
double  xmin,
double  xmax 
)
private

Definition at line 1862 of file EcalSelectiveReadoutValidation.cc.

References DQMStore::IBooker::bookProfile(), Exception, dataset::name, registerHist(), and mps_fire::result.

Referenced by bookHistograms(), and cIndex2iTtPhi().

1862  {
1863  if(!registerHist(name, title)) return nullptr; //this histo is disabled
1865  0, 0, 0);
1866  if(result==nullptr){
1867  throw cms::Exception("Histo")
1868  << "Failed to book histogram " << name;
1869  }
1870  return result;
1871 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
bool registerHist(const std::string &name, const std::string &title)
MonitorElement * EcalSelectiveReadoutValidation::bookProfile2D ( DQMStore::IBooker ibook,
const std::string &  name,
const std::string &  title,
int  nbinx,
double  xmin,
double  xmax,
int  nbiny,
double  ymin,
double  ymax,
const char *  option = "" 
)
private

Definition at line 1873 of file EcalSelectiveReadoutValidation.cc.

References DQMStore::IBooker::bookProfile2D(), Exception, dataset::name, registerHist(), and mps_fire::result.

Referenced by bookHistograms(), and cIndex2iTtPhi().

1873  {
1874  if(!registerHist(name, title)) return nullptr; //this histo is disabled
1876  = ibook.bookProfile2D(name,
1877  title,
1878  nbinx, xmin, xmax,
1879  nbiny, ymin, ymax,
1880  0, 0, 0,
1881  option);
1882  if(result==nullptr){
1883  throw cms::Exception("Histo")
1884  << "Failed to book histogram " << name;
1885  }
1886  return result;
1887 }
bool registerHist(const std::string &name, const std::string &title)
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:114
template<class T >
void EcalSelectiveReadoutValidation::checkSrApplication ( const edm::Event event,
T srfs 
)
private

Checks application of SR decision by the DCC.

Parameters
eventevent currently analyzed.
srfsSelective readou flags

Definition at line 2197 of file EcalSelectiveReadoutValidation.cc.

References dccCh(), fill(), RemoveAddSevLevel::flag, getCrystalCount(), meCompleteZSMap_, meCompleteZSRateMap_, meDroppedFROMap_, meDroppedFRORateMap_, meIncompleteFROMap_, meIncompleteFRORateMap_, minDccId_, nCompleteZS_, nDroppedFRO_, nIncompleteFRO_, nPerRu_, ruGraphX(), ruGraphY(), srApplicationErrorLog_, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, and EcalSrFlag::SRF_ZS2.

Referenced by analyze().

2198  {
2199  typedef typename T::const_iterator SrFlagCollectionConstIt;
2200  typedef typename T::key_type MyRuDetIdType;
2201 
2202  for(SrFlagCollectionConstIt itSrf = srfs.begin();
2203  itSrf != srfs.end(); ++itSrf){
2204  int flag = itSrf->value() & ~EcalSrFlag::SRF_FORCED_MASK;
2205  pair<int,int> ru = dccCh(itSrf->id());
2206 
2207  if(flag == EcalSrFlag::SRF_FULL){
2208  if(nPerRu_[ru.first-minDccId_][ru.second-1]==getCrystalCount(ru.first, ru.second)){ //no error
2209  fill(meIncompleteFRORateMap_, ruGraphX(itSrf->id()),
2210  ruGraphY(itSrf->id()), 0);
2212  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 0);
2213  } else if(nPerRu_[ru.first-minDccId_][ru.second-1]==0) {//tower dropped!
2215  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 0);
2217  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 1);
2218  fill(meDroppedFROMap_, ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 1);
2219  ++nDroppedFRO_;
2220  srApplicationErrorLog_ << event.id() << ": Flag of RU "
2221  << itSrf->id() << " (DCC " << ru.first
2222  << " ch " << ru.second << ") is 'Full readout' "
2223  << "while none of its channel was read out\n";
2224  } else{ //tower partially read out
2226  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 1);
2228  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 0);
2230  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 1);
2231  ++nIncompleteFRO_;
2232  srApplicationErrorLog_ << event.id() << ": Flag of RU"
2233  << itSrf->id() << " (DCC " << ru.first
2234  << " ch " << ru.second << ") is 'Full readout' "
2235  << "while only "
2236  << nPerRu_[ru.first-minDccId_][ru.second-1]
2237  << " / " << getCrystalCount(ru.first, ru.second)
2238  << " channels were read out.\n";
2239  }
2240  }
2241 
2242  if(flag == EcalSrFlag::SRF_ZS1 || flag == EcalSrFlag::SRF_ZS2){
2243  if(nPerRu_[ru.first-minDccId_][ru.second-1]
2244  ==getCrystalCount(ru.first, ru.second)){
2245  //ZS readout unit whose every channel was read
2246 
2247  fill(meCompleteZSMap_, ruGraphX(itSrf->id()), ruGraphY(itSrf->id()));
2249  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 1);
2250 
2251  ++nCompleteZS_;
2252  } else{
2254  ruGraphX(itSrf->id()), ruGraphY(itSrf->id()), 0);
2255  }
2256  }
2257  }
2258 }
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
int nIncompleteFRO_
Counter of FRO-flagged RU only partial data.
static const int SRF_ZS2
Definition: EcalSrFlag.h:21
static const int SRF_FULL
Definition: EcalSrFlag.h:24
int nCompleteZS_
Counter of ZS-flagged RU fully read out.
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
int ruGraphX(const EcalScDetId &id) const
int nDroppedFRO_
Counter of FRO-flagged RU dropped from data.
void fill(MonitorElement *me, float x)
int ruGraphY(const EcalScDetId &id) const
std::pair< int, int > dccCh(const DetId &xtalId) const
int EcalSelectiveReadoutValidation::cIndex2iEta ( int  i) const
inlineprivate

converse of iEta2cIndex() method.

Definition at line 251 of file EcalSelectiveReadoutValidation.h.

Referenced by dccCh().

251  {
252  return (i<85)?i-85:i-84;
253  }
int EcalSelectiveReadoutValidation::cIndex2iPhi ( int  i) const
inlineprivate

converse of iPhi2cIndex() method.

Definition at line 258 of file EcalSelectiveReadoutValidation.h.

Referenced by dccCh().

258  {
259  return (i+11) % 360;
260  }
int EcalSelectiveReadoutValidation::cIndex2iTtEta ( int  i) const
inlineprivate

converse of iTtEta2cIndex() method.

Definition at line 285 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP().

285  {
286  return (i<27)?i-28:i-27;
287  }
int EcalSelectiveReadoutValidation::cIndex2iTtPhi ( int  i) const
inlineprivate
int EcalSelectiveReadoutValidation::cIndex2iXY ( int  iX0) const
inlineprivate

converse of iXY2cIndex() method.

Definition at line 245 of file EcalSelectiveReadoutValidation.h.

245  {
246  return iX0+1;
247  }
template<class T >
void EcalSelectiveReadoutValidation::compareSrfColl ( const edm::Event event,
T srfFromData,
T computedSrf 
)
private

Compares two SR flag collection, flags read from data and computed flags. Descripencies are recorded in relevant histogram and log file.

Template Parameters
Tcollection type. Must be either an EESrFlagCollection or an EBSrFlagCollection.
Parameters
eventevent currently analyzed. Used in logs.
srfFromDataSR flag collection read from data
compareSrfSR flag collection computed from TTF by SRP emulation

Definition at line 2085 of file EcalSelectiveReadoutValidation.cc.

References dccCh(), fill(), logErrForDccs_, meSRFlagsConsistency_, minDccId_, ruGraphX(), ruGraphY(), and srpAlgoErrorLog_.

Referenced by analyze().

2085  {
2086  typedef typename T::const_iterator SrFlagCollectionConstIt;
2087  typedef typename T::key_type MyRuDetIdType;
2088  SrFlagCollectionConstIt itSrfFromData = srfFromData.begin();
2089  SrFlagCollectionConstIt itComputedSr = computedSrf.begin();
2090 
2091  while(itSrfFromData != srfFromData.end()
2092  || itComputedSr != computedSrf.end()){
2093  MyRuDetIdType inconsistentRu = 0;
2094  bool inconsistent = false;
2095  if(itComputedSr == computedSrf.end() ||
2096  (itSrfFromData != srfFromData.end()
2097  && itSrfFromData->id() < itComputedSr->id())){
2098  //computedSrf is missig a detid found in srfFromData
2099  pair<int, int> ch = dccCh(itSrfFromData->id());
2100  srpAlgoErrorLog_ << event.id() << ": " << itSrfFromData->id()
2101  << ", DCC " << ch.first << " ch " << ch.second
2102  << " found in data (SRF:" << itSrfFromData->flagName()
2103  << ") but not in the set of SRFs computed from the data TTF.\n";
2104  inconsistentRu = itSrfFromData->id();
2105  inconsistent = true;
2106  ++itSrfFromData;
2107  } else if(itSrfFromData==srfFromData.end() ||
2108  (itComputedSr != computedSrf.end()
2109  && itComputedSr->id() < itSrfFromData->id())){
2110  //ebSrFlags is missing a detid found in computedSrf
2111  pair<int, int> ch = dccCh(itComputedSr->id());
2112  if(logErrForDccs_[ch.first-minDccId_]){
2113  srpAlgoErrorLog_ << event.id() << ": " << itComputedSr->id()
2114  << ", DCC " << ch.first << " ch " << ch.second
2115  << " not found in data. Computed SRF: "
2116  << itComputedSr->flagName() << ".\n";
2117  inconsistentRu = itComputedSr->id();
2118  inconsistent = true;
2119  }
2120  ++itComputedSr;
2121  } else{
2122  //*itSrfFromData and *itComputedSr has same detid
2123  if(itComputedSr->value()!=itSrfFromData->value()){
2124  pair<int, int> ch = dccCh(itSrfFromData->id());
2125  srpAlgoErrorLog_ << event.id() << ", "
2126  << itSrfFromData->id()
2127  << ", DCC " << ch.first << " ch " << ch.second
2128  << ", SRF inconsistency: "
2129  << "from data: " << itSrfFromData->flagName()
2130  << ", computed from TTF: "
2131  << itComputedSr->flagName()
2132  << "\n";
2133  inconsistentRu = itComputedSr->id();
2134  inconsistent = true;
2135  }
2136  if(itComputedSr != computedSrf.end()) ++itComputedSr;
2137  if(itSrfFromData != srfFromData.end()) ++itSrfFromData;
2138  }
2139 
2140  if(inconsistent) fill(meSRFlagsConsistency_, ruGraphX(inconsistentRu),
2141  ruGraphY(inconsistentRu));
2142  }
2143 }
int ruGraphX(const EcalScDetId &id) const
void fill(MonitorElement *me, float x)
int ruGraphY(const EcalScDetId &id) const
std::pair< int, int > dccCh(const DetId &xtalId) const
std::ofstream srpAlgoErrorLog_
Output ascii file for unconsistency on SR flags.
void EcalSelectiveReadoutValidation::configFirWeights ( const std::vector< double > &  weightsForZsFIR)
private

Configure DCC ZS FIR weights. Heuristic is used to determine if input weights are normalized weights or integer weights in the hardware representation.

Parameters
weightsForZsFIRweights from configuration file

Definition at line 2014 of file EcalSelectiveReadoutValidation.cc.

References Exception, firstFIRSample_, firWeights_, getFIRWeights(), mps_fire::i, createfilelist::int, cmsBatch::log, indexGen::s2, and mathSSE::sqrt().

Referenced by EcalSelectiveReadoutValidation().

2014  {
2015  bool notNormalized = false;
2016  bool notInt = false;
2017  for(unsigned i=0; i < weightsForZsFIR.size(); ++i){
2018  if(weightsForZsFIR[i] > 1.) notNormalized = true;
2019  if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true;
2020  }
2021  if(notInt && notNormalized){
2022  throw cms::Exception("InvalidParameter")
2023  << "weigtsForZsFIR paramater values are not valid: they "
2024  << "must either be integer and uses the hardware representation "
2025  << "of the weights or less or equal than 1 and used the normalized "
2026  << "representation.";
2027  }
2028  LogInfo log("DccFir");
2029  if(notNormalized){
2030  firWeights_ = vector<int>(weightsForZsFIR.size());
2031  for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){
2032  firWeights_[i] = (int)weightsForZsFIR[i];
2033  }
2034  } else{
2035  firWeights_ = getFIRWeights(weightsForZsFIR);
2036  }
2037 
2038  log << "Input weights for FIR: ";
2039  for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){
2040  log << weightsForZsFIR[i] << "\t";
2041  }
2042 
2043  double s2 = 0.;
2044  log << "\nActual FIR weights: ";
2045  for(unsigned i = 0; i < firWeights_.size(); ++i){
2046  log << firWeights_[i] << "\t";
2047  s2 += firWeights_[i]*firWeights_[i];
2048  }
2049 
2050  s2 = sqrt(s2);
2051  log << "\nNormalized FIR weights after hw representation rounding: ";
2052  for(unsigned i = 0; i < firWeights_.size(); ++i){
2053  log << firWeights_[i] / (double)(1<<10) << "\t";
2054  }
2055 
2056  log <<"\nFirst FIR sample: " << firstFIRSample_;
2057 }
T sqrt(T t)
Definition: SSEVec.h:18
static std::vector< int > getFIRWeights(const std::vector< double > &normalizedWeights)
pair< int, int > EcalSelectiveReadoutValidation::dccCh ( const DetId xtalId) const
private

Retrieves the logical number of the DCC reading a given crystal channel.

Parameters
xtarIdcrystal channel identifier
Returns
the DCC logical number starting from 1. Retrieves the DCC channel reading out a crystal, the crystals of a barrel trigger tower or the crystals, of an endcap supercrystal.
Parameters
xtarIdcrystal channel, barrel trigger tower or endcap supercrystal identifier
Returns
pair of (DCC ID, DCC channel)

Definition at line 1631 of file EcalSelectiveReadoutValidation.cc.

References cIndex2iEta(), cIndex2iPhi(), EcalElectronicsId::dccId(), TauDecayModes::dec, DetId::det(), DetId::Ecal, EcalBarrel, EcalEndcap, EcalTriggerTower, elecMap_, Exception, EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getElectronicsId(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), iTtEta2cIndex(), iTtPhi2cIndex(), maxDccId_, minDccId_, nOneEeTtEta, DetId::rawId(), mps_fire::result, DetId::subdetId(), EcalElectronicsId::towerId(), and groupFilesInBlocks::tt.

Referenced by anaDigi(), analyzeEB(), analyzeEE(), checkSrApplication(), compareSrfColl(), dccId(), and getDccSrDependentPayload().

1631  {
1632  if(detId.det()!=DetId::Ecal){
1633  throw cms::Exception("InvalidParameter")
1634  << "Wrong type of DetId passed to the "
1635  "EcalSelectiveReadoutValidation::dccCh(const DetId&). "
1636  "An ECAL DetId was expected.\n";
1637  }
1638 
1639  DetId xtalId;
1640  switch(detId.subdetId()){
1641  case EcalTriggerTower: //Trigger tower
1642  {
1643  const EcalTrigTowerDetId tt = detId;
1644  //pick up one crystal of the trigger tower: they are however all readout by
1645  //the same DCC channel in the barrel.
1646  //Arithmetic is easier on the "c" indices:
1647  const int iTtPhi0 = iTtPhi2cIndex(tt.iphi());
1648  const int iTtEta0 = iTtEta2cIndex(tt.ieta());
1649  const int oneXtalPhi0 = iTtPhi0 * 5;
1650  const int oneXtalEta0 = (iTtEta0 - nOneEeTtEta) * 5;
1651 
1652  xtalId = EBDetId(cIndex2iEta(oneXtalEta0),
1653  cIndex2iPhi(oneXtalPhi0));
1654  }
1655  break;
1656  case EcalEndcap:
1657  if(detId.rawId() & 0x8000){ //Supercrystal
1658  return elecMap_->getDCCandSC(EcalScDetId(detId));
1659  } else { //EE crystal
1660  xtalId = detId;
1661  }
1662  break;
1663  case EcalBarrel: //EB crystal
1664  xtalId = detId;
1665  break;
1666  default:
1667  throw cms::Exception("InvalidParameter")
1668  << "Wrong type of DetId passed to the method "
1669  "EcalSelectiveReadoutValidation::dccCh(const DetId&). "
1670  "A valid EcalTriggerTower, EcalBarrel or EcalEndcap DetId was expected. "
1671  "detid = " << xtalId.rawId() << ".\n";
1672  }
1673 
1674  const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId);
1675 
1676  pair<int,int> result;
1677  result.first = EcalElecId.dccId();
1678 
1679  if(result.first < minDccId_ || result.second > maxDccId_){
1680  throw cms::Exception("OutOfRange")
1681  << "Got an invalid DCC ID, DCCID = " << result.first
1682  << " for DetId 0x" << hex << detId.rawId()
1683  << " and 0x" << xtalId.rawId() << dec << "\n";
1684  }
1685 
1686  result.second = EcalElecId.towerId();
1687 
1688  if(result.second < 1 || result.second > 68){
1689  throw cms::Exception("OutOfRange")
1690  << "Got an invalid DCC channel ID, DCC_CH = " << result.second
1691  << " for DetId 0x" << hex << detId.rawId()
1692  << " and 0x" << xtalId.rawId() << dec << "\n";
1693  }
1694 
1695  return result;
1696 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
int towerId() const
get the tower id
std::pair< int, int > getDCCandSC(EcalScDetId id) const
int ieta() const
get the tower ieta
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
static const int nOneEeTtEta
Number of Trigger Towers in an endcap along Eta.
Definition: DetId.h:18
int iphi() const
get the tower iphi
const EcalElectronicsMapping * elecMap_
int EcalSelectiveReadoutValidation::dccId ( const EcalScDetId detId) const
private

Retrieves the ID of the DCC reading a readout unit

Parameters
detIddetid of the readout unit

Definition at line 2146 of file EcalSelectiveReadoutValidation.cc.

References elecMap_, and EcalElectronicsMapping::getDCCandSC().

Referenced by selectFedsForLog(), and xtalGraphY().

2146  {
2147  return elecMap_->getDCCandSC(detId).first;
2148 }
std::pair< int, int > getDCCandSC(EcalScDetId id) const
const EcalElectronicsMapping * elecMap_
int EcalSelectiveReadoutValidation::dccId ( const EcalTrigTowerDetId detId) const
private

Definition at line 2150 of file EcalSelectiveReadoutValidation.cc.

References dccCh(), Exception, and EcalTrigTowerDetId::ietaAbs().

2150  {
2151  if(detId.ietaAbs()>17){
2152  throw cms::Exception("InvalidArgument")
2153  << "Argument of EcalSelectiveReadoutValidation::dccId(const EcalTrigTowerDetId&) "
2154  << "must be a barrel trigger tower Id\n";
2155  }
2156  return dccCh(detId).first;
2157 }
int ietaAbs() const
get the absolute value of the tower ieta
std::pair< int, int > dccCh(const DetId &xtalId) const
int EcalSelectiveReadoutValidation::dccZsFIR ( const EcalDataFrame frame,
const std::vector< int > &  firWeights,
int  firstFIRSample,
bool *  saturated = 0 
)
staticprivate

Emulates the DCC zero suppression FIR filter. If one of the time sample is not in gain 12, numeric_limits<int>::max() is returned.

Parameters
framedata frame
firWeightsTAP weights
firstFIRSampleindex (starting from 1) of the first time sample to be used in the filter
saturatedif not null, *saturated is set to true if all the time sample are not in gain 12 and set to false otherwise.
Returns
FIR output or numeric_limits<int>::max().

Definition at line 1950 of file EcalSelectiveReadoutValidation.cc.

References EcalMGPASample::adc(), EcalMGPASample::gainId(), LogTrace, SiStripPI::max, simplePhotonAnalyzer_cfi::sample, EcalDataFrame::size(), and w.

Referenced by analyzeEB(), analyzeEE(), and cIndex2iTtPhi().

1953  {
1954  const int nFIRTaps = 6;
1955  //FIR filter weights:
1956  const vector<int>& w = firWeights;
1957 
1958  //accumulator used to compute weighted sum of samples
1959  int acc = 0;
1960  bool gain12saturated = false;
1961  const int gain12 = 0x01;
1962  const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
1963  //LogDebug("DccFir") << "DCC FIR operation: ";
1964  int iWeight = 0;
1965  for(int iSample=firstFIRSample-1;
1966  iSample<lastFIRSample; ++iSample, ++iWeight){
1967  if(iSample>=0 && iSample < frame.size()){
1968  EcalMGPASample sample(frame[iSample]);
1969  if(sample.gainId()!=gain12) gain12saturated = true;
1970  LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc()
1971  << "*(" << w[iWeight] << ")";
1972  acc+=sample.adc()*w[iWeight];
1973  } else{
1974  edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__ <<
1975  ": Not enough samples in data frame or 'ecalDccZs1stSample' module "
1976  "parameter is not valid...";
1977  }
1978  }
1979  LogTrace("DccFir") << "\n";
1980  //discards the 8 LSBs
1981  //(shift operator cannot be used on negative numbers because
1982  // the result depends on compilator implementation)
1983  acc = (acc>=0)?(acc >> 8):-(-acc >> 8);
1984  //ZS passed if weighted sum acc above ZS threshold or if
1985  //one sample has a lower gain than gain 12 (that is gain 12 output
1986  //is saturated)
1987 
1988  LogTrace("DccFir") << "acc: " << acc << "\n"
1989  << "saturated: " << (gain12saturated?"yes":"no") << "\n";
1990 
1991  if(saturated){
1992  *saturated = gain12saturated;
1993  }
1994 
1995  return gain12saturated?numeric_limits<int>::max():acc;
1996 }
const double w
Definition: UKUtility.cc:23
int size() const
Definition: EcalDataFrame.h:26
#define LogTrace(id)
void EcalSelectiveReadoutValidation::dqmBeginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
override

Definition at line 833 of file EcalSelectiveReadoutValidation.cc.

References elecMap_, edm::EventSetup::get(), initAsciiFile(), edm::ESHandle< T >::product(), and triggerTowerMap_.

833  {
834  // endcap mapping
836  es.get<IdealGeometryRecord>().get(hTriggerTowerMap);
837  triggerTowerMap_ = hTriggerTowerMap.product();
838 
839  //electronics map
841  es.get< EcalMappingRcd >().get(ecalmapping);
842  elecMap_ = ecalmapping.product();
843 
844  initAsciiFile();
845 }
T const * product() const
Definition: ESHandle.h:86
const EcalTrigTowerConstituentsMap * triggerTowerMap_
const EcalElectronicsMapping * elecMap_
void EcalSelectiveReadoutValidation::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected
void EcalSelectiveReadoutValidation::fill ( MonitorElement me,
float  x 
)
inlineprivate

Wrapper to fill methods of DQM monitor elements.

Definition at line 358 of file EcalSelectiveReadoutValidation.h.

References MonitorElement::Fill().

Referenced by analyze(), analyzeDataVolume(), analyzeEB(), analyzeEE(), analyzeTP(), checkSrApplication(), and compareSrfColl().

358  {
359  if(me) me->Fill(x);
360  }
void Fill(long long x)
void EcalSelectiveReadoutValidation::fill ( MonitorElement me,
float  x,
float  yw 
)
inlineprivate

Definition at line 361 of file EcalSelectiveReadoutValidation.h.

References MonitorElement::Fill().

361  {
362  if(me) me->Fill(x, yw);
363  }
void Fill(long long x)
void EcalSelectiveReadoutValidation::fill ( MonitorElement me,
float  x,
float  y,
float  zw 
)
inlineprivate

Definition at line 364 of file EcalSelectiveReadoutValidation.h.

References MonitorElement::Fill().

364  {
365  if(me) me->Fill(x, y, zw);
366  }
void Fill(long long x)
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:75
void EcalSelectiveReadoutValidation::fill ( MonitorElement me,
float  x,
float  y,
float  z,
float  w 
)
inlineprivate

Definition at line 367 of file EcalSelectiveReadoutValidation.h.

References MonitorElement::Fill(), getL1aRate(), initAsciiFile(), and updateL1aRate().

367  {
368  if(me) me->Fill(x, y, z, w);
369  }
const double w
Definition: UKUtility.cc:23
void Fill(long long x)
double EcalSelectiveReadoutValidation::frame2Energy ( const EcalDataFrame frame) const
private

Selective Readout decisions Validation

Parameters
eventEDM event
esevent setup Energy reconstruction from ADC samples.
framethe ADC sample of an ECA channel

Definition at line 1593 of file EcalSelectiveReadoutValidation.cc.

References mps_fire::i, createfilelist::int, min(), gen::n, EcalDataFrame::size(), and weights_.

Referenced by analyzeEB(), and analyzeEE().

1593  {
1594  static std::atomic<bool> firstCall {true};
1595  bool expected = true;
1596  if( firstCall.compare_exchange_strong(expected, false) ) {
1597  stringstream buf;
1598  buf << "Weights:";
1599  for(unsigned i=0; i<weights_.size();++i){
1600  buf << "\t" << weights_[i];
1601  }
1602  edm::LogInfo("EcalSrValid") << buf.str() << "\n";
1603  firstCall = false;
1604  }
1605  double adc2GeV = 0.;
1606 
1607  if(typeid(EBDataFrame)==typeid(frame)){//barrel APD
1608  adc2GeV = .035;
1609  } else if(typeid(EEDataFrame)==typeid(frame)){//endcap VPT
1610  adc2GeV = 0.06;
1611  } else{
1612  assert(false);
1613  }
1614 
1615  double acc = 0;
1616 
1617  const int n = min(frame.size(), (int)weights_.size());
1618 
1619  double gainInv[] = {12., 1., 6., 12.};
1620 
1621  for(int i=0; i < n; ++i){
1622  acc += weights_[i]*frame[i].adc()*gainInv[frame[i].gainId()]*adc2GeV;
1623  }
1624  return acc;
1625 }
int size() const
Definition: EcalDataFrame.h:26
T min(T a, T b)
Definition: MathUtil.h:58
template<class T >
double EcalSelectiveReadoutValidation::frame2EnergyForTp ( const T frame,
int  offset = 0 
) const
private

Energy reconstruction from ADC samples to be used for trigger primitive estimate.

Parameters
framethe ADC sample of an ECA channel
offsettime offset. To be used to evaluate energy of the event previous (offset=-1) and next (offset=+1) to the triggered one.

Definition at line 1795 of file EcalSelectiveReadoutValidation.cc.

References Exception, mps_fire::i, gen::n, PFRecoTauDiscriminationByIsolation_cfi::offset, and HGCalRecHit_cfi::weights.

Referenced by setTtEtSums().

1796  {
1797  //we have to start by 0 in order to handle offset=-1
1798  //(however Fenix FIR has AFAK only 5 taps)
1799  double weights[] = {0., -1/3., -1/3., -1/3., 0., 1.};
1800 
1801  double adc2GeV = 0.;
1802  if(typeid(frame) == typeid(EBDataFrame)){
1803  adc2GeV = 0.035;
1804  } else if(typeid(frame) == typeid(EEDataFrame)){
1805  adc2GeV = 0.060;
1806  } else{ //T is an invalid type!
1807  //TODO: replace message by a cms exception
1808  throw cms::Exception("Severe Error")
1809  << __FILE__ << ":" << __LINE__ << ": "
1810  << "this is a bug. Please report it.\n";
1811  }
1812 
1813  double acc = 0;
1814 
1815  const int n = min<int>(frame.size(), sizeof(weights)/sizeof(weights[0]));
1816 
1817  double gainInv[] = {12., 1., 6., 12};
1818 
1819  for(int i=offset; i < n; ++i){
1820  int iframe = i + offset;
1821  if(iframe>=0 && iframe<frame.size()){
1822  acc += weights[i]*frame[iframe].adc()
1823  *gainInv[frame[iframe].gainId()]*adc2GeV;
1824  }
1825  }
1826  //cout << "\n";
1827  return acc;
1828 }
double EcalSelectiveReadoutValidation::getBytesPerCrystal ( ) const
inlineprivate

Gets the number of bytes per crystal channel of the event part depending on the number of read crystal channels.

Returns
the number of bytes.

Definition at line 145 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), getDccSrDependentPayload(), getEbEventSize(), and getEeEventSize().

145  {
146  return 3*8;
147  }
int EcalSelectiveReadoutValidation::getCrystalCount ( int  iDcc,
int  iDccCh 
)
private

Retrieves number of crystal channel read out by a DCC channel

Parameters
iDccDCC ID starting from 1
iDccChDCC channel starting from 1
Returns
crystal count

Definition at line 2260 of file EcalSelectiveReadoutValidation.cc.

References maxDccId_.

Referenced by analyzeDataVolume(), checkSrApplication(), and xtalGraphY().

2260  {
2261  if(iDcc < minDccId_ || iDcc > maxDccId_){ //invalid DCC
2262  return 0;
2263  } else if (10 <= iDcc && iDcc <= 45) {//EB
2264  return 25;
2265  } else { //EE
2266  int iDccPhi;
2267  if(iDcc < 10) iDccPhi = iDcc;
2268  else iDccPhi = iDcc - 45;
2269  switch(iDccPhi*100+iDccCh){
2270  case 110:
2271  case 232:
2272  case 312:
2273  case 412:
2274  case 532:
2275  case 610:
2276  case 830:
2277  case 806:
2278  //inner partials at 12, 3, and 9 o'clock
2279  return 20;
2280  case 134:
2281  case 634:
2282  case 827:
2283  case 803:
2284  return 10;
2285  case 330:
2286  case 430:
2287  return 20;
2288  case 203:
2289  case 503:
2290  case 721:
2291  case 921:
2292  return 21;
2293  default:
2294  return 25;
2295  }
2296  }
2297 }
double EcalSelectiveReadoutValidation::getDccEventSize ( int  iDcc0,
double  nReadXtals 
) const
inlineprivate

Gets the size of an DCC event fragment.

Parameters
iDcc0the DCC logical number starting from 0.
nReadXtalsnumber of read crystal channels.
Returns
the DCC event fragment size in bytes.

Definition at line 154 of file EcalSelectiveReadoutValidation.h.

References EB, EE, getDccOverhead(), getDccSrDependentPayload(), and getRuCount().

Referenced by analyzeDataVolume().

154  {
155  subdet_t subdet;
156  if(iDcc0<9 || iDcc0>=45){
157  subdet = EE;
158  } else{
159  subdet = EB;
160  }
161  // return getDccOverhead(subdet)+nReadXtals*getBytesPerCrystal()
162  // + getRuCount(iDcc0)*8;
163  return getDccOverhead(subdet)
164  + getDccSrDependentPayload(iDcc0, getRuCount(iDcc0), nReadXtals);
165  }
double getDccSrDependentPayload(int iDcc0, double nReadRus, double nReadXtals) const
double getDccOverhead(subdet_t subdet) const
subdet_t
distinguishes barral and endcap of ECAL.
double EcalSelectiveReadoutValidation::getDccOverhead ( subdet_t  subdet) const
inlineprivate

Gets the size in bytes fixed-size part of a DCC event fragment.

Returns
the fixed size in bytes.

Definition at line 136 of file EcalSelectiveReadoutValidation.h.

References EB.

Referenced by getDccEventSize(), getEbEventSize(), and getEeEventSize().

136  {
137  // return (subdet==EB?34:25)*8;
138  return (subdet==EB?34:52)*8;
139  }
double EcalSelectiveReadoutValidation::getDccSrDependentPayload ( int  iDcc0,
double  nReadRus,
double  nReadXtals 
) const
inlineprivate

Gets DCC event fragment payload depending on the channel selection made by the selective readout.

Parameters
iDcc0the DCC logical number starting from 0.
nReadRusnumber of read-out RUs
nReadXtalsnumber of read-out crystal channels.
Returns
the DCC event fragment payload in bytes.

Definition at line 174 of file EcalSelectiveReadoutValidation.h.

References dccCh(), getBytesPerCrystal(), getRuCount(), readAllCollections(), and setTtEtSums().

Referenced by analyzeDataVolume(), and getDccEventSize().

175  {
176  return nReadXtals*getBytesPerCrystal() + nReadRus*8;
177  }
double EcalSelectiveReadoutValidation::getEbEventSize ( double  nReadXtals) const
private

Computes the size of an ECAL barrel event fragment.

Parameters
nReadXtalsnumber of read crystal channels
Returns
the event fragment size in bytes

Definition at line 1924 of file EcalSelectiveReadoutValidation.cc.

References EB, getBytesPerCrystal(), getDccOverhead(), getRuCount(), nEbDccs, and nEeDccs.

Referenced by analyzeDataVolume().

1924  {
1925  double ruHeaderPayload = 0.;
1926  const int firstEbDcc0 = nEeDccs/2;
1927  for(int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEbDccs; ++iDcc0){
1928  ruHeaderPayload += getRuCount(iDcc0)*8.;
1929  }
1930 
1931  return getDccOverhead(EB)*nEbDccs + nReadXtals*getBytesPerCrystal()
1932  + ruHeaderPayload;
1933 }
double getDccOverhead(subdet_t subdet) const
static const int nEeDccs
number of DCCs for EE
static const int nEbDccs
number of DCCs for EB
double EcalSelectiveReadoutValidation::getEeEventSize ( double  nReadXtals) const
private

Computes the size of an ECAL endcap event fragment.

Parameters
nReadXtalsnumber of read crystal channels
Returns
the event fragment size in bytes

Definition at line 1935 of file EcalSelectiveReadoutValidation.cc.

References EE, getBytesPerCrystal(), getDccOverhead(), getRuCount(), nDccs_, nEbDccs, and nEeDccs.

Referenced by analyzeDataVolume().

1935  {
1936  double ruHeaderPayload = 0.;
1937  const unsigned firstEbDcc0 = nEeDccs/2;
1938  for(unsigned iDcc0 = 0; iDcc0 < nDccs_; ++iDcc0){
1939  //skip barrel:
1940  if(iDcc0== firstEbDcc0) iDcc0 += nEbDccs;
1941  ruHeaderPayload += getRuCount(iDcc0)*8.;
1942  }
1943  return getDccOverhead(EE)*nEeDccs + nReadXtals*getBytesPerCrystal()
1944  + ruHeaderPayload;
1945 }
double getDccOverhead(subdet_t subdet) const
static const int nEeDccs
number of DCCs for EE
static const int nEbDccs
number of DCCs for EB
static const unsigned nDccs_
Total number of DCCs.
std::vector< int > EcalSelectiveReadoutValidation::getFIRWeights ( const std::vector< double > &  normalizedWeights)
staticprivate

Computes the ZS FIR filter weights from the normalized weights.

Parameters
normalizedWeightsthe normalized weights
Returns
the computed ZS filter weights.

Definition at line 1999 of file EcalSelectiveReadoutValidation.cc.

References funct::abs(), mps_fire::i, and min().

Referenced by cIndex2iTtPhi(), and configFirWeights().

2000  {
2001  const int nFIRTaps = 6;
2002  vector<int> firWeights(nFIRTaps, 0); //default weight: 0;
2003  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
2004  for(unsigned i=0; i < min((size_t)nFIRTaps,normalizedWeights.size()); ++i){
2005  firWeights[i] = lround(normalizedWeights[i] * (1<<10));
2006  if(abs(firWeights[i])>maxWeight){//overflow
2007  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
2008  }
2009  }
2010  return firWeights;
2011 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
double EcalSelectiveReadoutValidation::getL1aRate ( ) const
private

Gets L1A rate estimate.

See also
updateL1aRate(const edm::Event&)
Returns
L1A rate estimate

Definition at line 181 of file EcalSelectiveReadoutValidation.cc.

References MillePedeFileConverter_cfg::e, l1aOfTmax, l1aOfTmin, LogDebug, tmax, and tmin.

Referenced by endRun(), and fill().

181  {
182  LogDebug("EcalSrValid") << __FILE__ << ":" << __LINE__ << ": "
183  << "Tmax = " << tmax << " x 25ns; Tmin = " << tmin
184  << " x 25ns; L1A(Tmax) = " << l1aOfTmax << "; L1A(Tmin) = "
185  << l1aOfTmin << "\n";
186  return (double)(l1aOfTmax - l1aOfTmin) / ((tmax-tmin) * 25e-9);
187 }
#define LogDebug(id)
int EcalSelectiveReadoutValidation::getRuCount ( int  iDcc0) const
private

Gets the number of readout unit read by a DCC. A readout unit correspond to an active DCC input channel.

Parameters
iDcc0DCC logical number starting from 0.

Definition at line 1627 of file EcalSelectiveReadoutValidation.cc.

References nRuPerDcc_.

Referenced by getDccEventSize(), getDccSrDependentPayload(), getEbEventSize(), and getEeEventSize().

1627  {
1628  return nRuPerDcc_[iDcc0];
1629 }
int EcalSelectiveReadoutValidation::iEta2cIndex ( int  iEta) const
inlineprivate

Converts a std CMSSW crystal eta index to a c-array index (starting from zero and without hole).

Definition at line 222 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), and analyzeEB().

222  {
223  return (iEta<0)?iEta+85:iEta+84;
224  }
void EcalSelectiveReadoutValidation::initAsciiFile ( )
private

Definition at line 2059 of file EcalSelectiveReadoutValidation.cc.

References Exception, logSrApplicationErrors_, logSrpAlgoErrors_, MillePedeFileConverter_cfg::out, srApplicationErrorLog_, srApplicationErrorLogFileName_, srpAlgoErrorLog_, srpAlgoErrorLogFileName_, and estimatePileup_makeJSON::trunc.

Referenced by dqmBeginRun(), and fill().

2059  {
2060  if(logSrpAlgoErrors_){
2062  if(!srpAlgoErrorLog_.good()){
2063  throw cms::Exception("Output")
2064  << "Failed to open the log file '"
2066  << "' for SRP algorithm result check.\n";
2067  }
2068  }
2069 
2072  if(!srApplicationErrorLog_.good()){
2073  throw cms::Exception("Output")
2074  << "Failed to open the log file '"
2076  << "' for Selective Readout decision application check.\n";
2077  }
2078  }
2079 }
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
std::ofstream srpAlgoErrorLog_
Output ascii file for unconsistency on SR flags.
int EcalSelectiveReadoutValidation::iPhi2cIndex ( int  iPhi) const
inlineprivate

Converts a std CMSSW crystal phi index to a c-array index (starting from zero and without hole).

Definition at line 229 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), and analyzeEB().

229  {
230  // return iPhi-1;
231  int iPhi0 = iPhi - 11;
232  if(iPhi0<0) iPhi0 += 360;
233  return iPhi0;
234  }
int EcalSelectiveReadoutValidation::iTtEta2cIndex ( int  iEta) const
inlineprivate

Transforms CMSSW eta ECAL TT indices to indices starting at 0 to use for c-array or vector.

Parameters
iEtaCMSSW eta index (numbering -28...-1,28...56)
Returns
index in numbering from 0 to 55

Definition at line 267 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), dccCh(), and setTtEtSums().

267  {
268  return (iEta<0)?iEta+28:iEta+27;
269  }
int EcalSelectiveReadoutValidation::iTtPhi2cIndex ( int  iPhi) const
inlineprivate

Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.

Parameters
iPhiCMSSW phi index (numbering 1...72)
Returns
index in numbering 0...71

Definition at line 276 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), dccCh(), and setTtEtSums().

276  {
277  return iPhi-1;
278  //int iPhi0 = iPhi - 3;
279  //if(iPhi0<0) iPhi0 += 72;
280  //return iPhi0;
281  }
int EcalSelectiveReadoutValidation::iXY2cIndex ( int  iX) const
inlineprivate

Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole).

Definition at line 239 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), and analyzeEE().

239  {
240  return iX-1;
241  }
void EcalSelectiveReadoutValidation::printAvailableHists ( )
private

Prints the list of available histograms (registered by the registerHist method), including disabled one.

Definition at line 1912 of file EcalSelectiveReadoutValidation.cc.

References availableHistList_, and cmsBatch::log.

Referenced by bookHistograms().

1912  {
1913  LogInfo log("HistoList");
1914  log << "Avalailable histograms (DQM monitor elements): \n";
1915  for(map<string, string>::iterator it = availableHistList_.begin();
1916  it != availableHistList_.end();
1917  ++it){
1918  log << it->first << ": " << it->second << "\n";
1919  }
1920  log << "\nTo include an histogram add its name in the vstring parameter "
1921  "'histograms' of the EcalSelectiveReadoutValidation module\n";
1922 }
std::map< std::string, std::string > availableHistList_
void EcalSelectiveReadoutValidation::readAllCollections ( const edm::Event e)
private

Reads the data collections from the event. Called at start of each event analysis.

Parameters
eventthe EDM event.

Definition at line 1895 of file EcalSelectiveReadoutValidation.cc.

References ebComputedSrFlags_, ebDigis_, ebNoZsDigis_, ebRecHits_, ebSimHits_, ebSrFlags_, eeComputedSrFlags_, eeDigis_, eeNoZsDigis_, eeRecHits_, eeSimHits_, eeSrFlags_, fedRaw_, CollHandle< T >::read(), and tps_.

Referenced by analyze(), and getDccSrDependentPayload().

1895  {
1896  ebRecHits_.read(event);
1897  eeRecHits_.read(event);
1898  ebDigis_.read(event);
1899  eeDigis_.read(event);
1902  ebSrFlags_.read(event);
1903  eeSrFlags_.read(event);
1904  ebComputedSrFlags_.read(event);
1905  eeComputedSrFlags_.read(event);
1908  tps_.read(event);
1909  fedRaw_.read(event);
1910 }
CollHandle< EBDigiCollection > ebNoZsDigis_
CollHandle< EcalTrigPrimDigiCollection > tps_
CollHandle< FEDRawDataCollection > fedRaw_
CollHandle< EESrFlagCollection > eeComputedSrFlags_
CollHandle< EEDigiCollection > eeDigis_
CollHandle< RecHitCollection > eeRecHits_
CollHandle< EBSrFlagCollection > ebSrFlags_
CollHandle< std::vector< PCaloHit > > eeSimHits_
void read(const edm::Event &event)
Definition: CollHandle.h:62
CollHandle< EESrFlagCollection > eeSrFlags_
CollHandle< std::vector< PCaloHit > > ebSimHits_
CollHandle< EEDigiCollection > eeNoZsDigis_
CollHandle< EBDigiCollection > ebDigis_
CollHandle< RecHitCollection > ebRecHits_
Definition: event.py:1
CollHandle< EBSrFlagCollection > ebComputedSrFlags_
EcalTrigTowerDetId EcalSelectiveReadoutValidation::readOutUnitOf ( const EBDetId xtalId) const
private

Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to.

Parameters
xtalIdidentifier of the crystal
Returns
identifer of the supercrystal or of the trigger tower.

Definition at line 1699 of file EcalSelectiveReadoutValidation.cc.

References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.

Referenced by anaDigi(), analyzeEB(), analyzeEE(), and cIndex2iTtPhi().

1699  {
1700  return triggerTowerMap_->towerOf(xtalId);
1701 }
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
const EcalTrigTowerConstituentsMap * triggerTowerMap_
EcalScDetId EcalSelectiveReadoutValidation::readOutUnitOf ( const EEDetId xtalId) const
private

Definition at line 1704 of file EcalSelectiveReadoutValidation.cc.

References EcalElectronicsId::dccId(), elecMap_, EcalElectronicsMapping::getEcalScDetId(), EcalElectronicsMapping::getElectronicsId(), and EcalElectronicsId::towerId().

1704  {
1705  const EcalElectronicsId& EcalElecId = elecMap_->getElectronicsId(xtalId);
1706  int iDCC= EcalElecId.dccId();
1707  int iDccChan = EcalElecId.towerId();
1708  const bool ignoreSingle = true;
1709  const vector<EcalScDetId> id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle);
1710  return !id.empty()?id[0]:EcalScDetId();
1711 }
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int towerId() const
get the tower id
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
const EcalElectronicsMapping * elecMap_
bool EcalSelectiveReadoutValidation::registerHist ( const std::string &  name,
const std::string &  title 
)
private

Register a histogram in the available histogram list and check if the histogram is enabled. Called by the histogram booking methods.

Returns
true if the histogram is enable, false otherwise

Definition at line 1889 of file EcalSelectiveReadoutValidation.cc.

References allHists_, availableHistList_, and histList_.

Referenced by book1D(), book2D(), bookFloat(), bookProfile(), and bookProfile2D().

1890  {
1891  availableHistList_.insert(pair<string, string>(name, title));
1892  return allHists_ || histList_.find(name)!=histList_.end();
1893 }
std::map< std::string, std::string > availableHistList_
int EcalSelectiveReadoutValidation::ruGraphX ( const EcalScDetId id) const
inlineprivate

Functions to compute x and y coordinates of RU maps grouping endcap and barrel.

Definition at line 883 of file EcalSelectiveReadoutValidation.h.

Referenced by checkSrApplication(), and compareSrfColl().

883  {
884  return id.ix() + (id.zside()>0?20:-40);
885  }
int EcalSelectiveReadoutValidation::ruGraphX ( const EcalTrigTowerDetId id) const
inlineprivate

Definition at line 891 of file EcalSelectiveReadoutValidation.h.

891  {
892  return id.ieta();
893  }
int EcalSelectiveReadoutValidation::ruGraphY ( const EcalScDetId id) const
inlineprivate

Definition at line 887 of file EcalSelectiveReadoutValidation.h.

Referenced by checkSrApplication(), and compareSrfColl().

887  {
888  return id.iy();
889  }
int EcalSelectiveReadoutValidation::ruGraphY ( const EcalTrigTowerDetId id) const
inlineprivate

Definition at line 895 of file EcalSelectiveReadoutValidation.h.

895  {
896  return id.iphi();
897  }
void EcalSelectiveReadoutValidation::selectFedsForLog ( )
private

Look in events whose DCC has SR flags and enable error logging for them. To be called with the processed first event. List of monitored DCCs is reported in the log file.

Definition at line 2161 of file EcalSelectiveReadoutValidation.cc.

References dccId(), ebSrFlags_, eeSrFlags_, plotBeamSpotDB::first, logErrForDccs_, minDccId_, nDccs_, srApplicationErrorLog_, and srpAlgoErrorLog_.

Referenced by analyze(), and xtalGraphY().

2161  {
2162  logErrForDccs_ = vector<bool>(nDccs_, false);
2163 
2165  it != ebSrFlags_->end();
2166  ++it){
2167  int iDcc = dccId(it->id()) - minDccId_;
2168 
2169  logErrForDccs_.at(iDcc) = true;
2170  }
2171 
2173  it != eeSrFlags_->end();
2174  ++it){
2175  int iDcc = dccId(it->id()) - minDccId_;
2176 
2177  logErrForDccs_.at(iDcc) = true;
2178  }
2179 
2180  stringstream buf;
2181  buf << "List of DCCs found in the first processed event: ";
2182  bool first = true;
2183  for(unsigned iDcc = 0; iDcc < nDccs_; ++iDcc){
2184  if(logErrForDccs_[iDcc]){
2185  buf << (first?"":", ") << (iDcc + minDccId_);
2186  first = false;
2187  }
2188  }
2189  buf << "\nOnly DCCs from this list will be considered for error logging\n";
2190  srpAlgoErrorLog_ << buf.str();
2191  srApplicationErrorLog_<< buf.str();
2192  LogInfo("EcalSrValid") << buf.str();
2193 }
std::ofstream srApplicationErrorLog_
Output ascii file for unconsistency between Xtals and RU Flags.
std::vector< T >::const_iterator const_iterator
CollHandle< EBSrFlagCollection > ebSrFlags_
CollHandle< EESrFlagCollection > eeSrFlags_
int dccId(const EcalScDetId &detId) const
std::ofstream srpAlgoErrorLog_
Output ascii file for unconsistency on SR flags.
static const unsigned nDccs_
Total number of DCCs.
void EcalSelectiveReadoutValidation::setTtEtSums ( const edm::EventSetup es,
const EBDigiCollection ebDigis,
const EEDigiCollection eeDigis 
)
private

Computes trigger primitive estimates. A sum of crystal deposited transverse energy is performed.

Parameters
esevent setup
ebDigisthe ECAL barrel unsuppressed digi to use for the computation
ebDigisthe ECAL endcap unsuppressed digi to use for the computation

Definition at line 1714 of file EcalSelectiveReadoutValidation.cc.

References edm::DataFrameContainer::begin(), MillePedeFileConverter_cfg::e, ebDigis_, DetId::Ecal, EcalBarrel, EcalEndcap, edm::DataFrameContainer::end(), stringResolutionProvider_cfi::et, frame2EnergyForTp(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), EEDataFrame::id(), EBDataFrame::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), iTtEta2cIndex(), iTtPhi2cIndex(), nTtEta, nTtPhi, funct::sin(), theta(), EcalTrigTowerConstituentsMap::towerOf(), triggerTowerMap_, ttEtSums, and ecaldqm::ttId().

Referenced by analyze(), and getDccSrDependentPayload().

1716  {
1717  //ecal geometry:
1718  const CaloSubdetectorGeometry* eeGeometry = nullptr;
1719  const CaloSubdetectorGeometry* ebGeometry = nullptr;
1720  if(eeGeometry==nullptr || ebGeometry==nullptr){
1721  edm::ESHandle<CaloGeometry> geoHandle;
1722  es.get<CaloGeometryRecord>().get(geoHandle);
1723  eeGeometry = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
1724  ebGeometry = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
1725  }
1726 
1727  //init etSum array:
1728  for(int iEta0 = 0; iEta0 < nTtEta; ++iEta0){
1729  for(int iPhi0 = 0; iPhi0 < nTtPhi; ++iPhi0){
1730  ttEtSums[iEta0][iPhi0] = 0.;
1731  }
1732  }
1733 
1735  it != ebDigis_->end(); ++it){
1736  const EBDataFrame& frame = *it;
1737  const EcalTrigTowerDetId& ttId = triggerTowerMap_->towerOf(frame.id());
1738 
1739  const int iTtEta0 = iTtEta2cIndex(ttId.ieta());
1740  const int iTtPhi0 = iTtPhi2cIndex(ttId.iphi());
1741  double theta = ebGeometry->getGeometry(frame.id())->getPosition().theta();
1742  double e = frame2EnergyForTp(frame);
1743  if((frame2EnergyForTp(frame,-1) < e) && (frame2EnergyForTp(frame, 1) < e)){
1744  ttEtSums[iTtEta0][iTtPhi0] += e*sin(theta);
1745  }
1746  }
1747 
1748  for(EEDigiCollection::const_iterator it = eeDigis.begin();
1749  it != eeDigis.end(); ++it){
1750  const EEDataFrame& frame = *it;
1751  const EcalTrigTowerDetId& ttId = triggerTowerMap_->towerOf(frame.id());
1752  const int iTtEta0 = iTtEta2cIndex(ttId.ieta());
1753  const int iTtPhi0 = iTtPhi2cIndex(ttId.iphi());
1754 
1755  double theta = eeGeometry->getGeometry(frame.id())->getPosition().theta();
1756  double e = frame2EnergyForTp(frame);
1757  if((frame2EnergyForTp(frame,-1) < e) && (frame2EnergyForTp(frame, 1) < e)){
1758  ttEtSums[iTtEta0][iTtPhi0] += e*sin(theta);
1759  }
1760  }
1761 
1762  //dealing with pseudo-TT in two inner EE eta-ring:
1763  int innerTTEtas[] = {0, 1, 54, 55};
1764  for(unsigned iRing = 0; iRing < sizeof(innerTTEtas)/sizeof(innerTTEtas[0]);
1765  ++iRing){
1766  int iTtEta0 = innerTTEtas[iRing];
1767  //this detector eta-section is divided in only 36 phi bins
1768  //For this eta regions,
1769  //current tower eta numbering scheme is inconsistent. For geometry
1770  //version 133:
1771  //- TT are numbered from 0 to 72 for 36 bins
1772  //- some TT have an even index, some an odd index
1773  //For geometry version 125, there are 72 phi bins.
1774  //The code below should handle both geometry definition.
1775  //If there are 72 input trigger primitives for each inner eta-ring,
1776  //then the average of the trigger primitive of the two pseudo-TT of
1777  //a pair (nEta, nEta+1) is taken as Et of both pseudo TTs.
1778  //If there are only 36 input TTs for each inner eta ring, then half
1779  //of the present primitive of a pseudo TT pair is used as Et of both
1780  //pseudo TTs.
1781 
1782  for(unsigned iTtPhi0 = 0; iTtPhi0 < nTtPhi-1; iTtPhi0 += 2){
1783  double et = .5*(ttEtSums[iTtEta0][iTtPhi0]
1784  +ttEtSums[iTtEta0][iTtPhi0+1]);
1785  //divides the TT into 2 phi bins in order to match with 72 phi-bins SRP
1786  //scheme or average the Et on the two pseudo TTs if the TT is already
1787  //divided into two trigger primitives.
1788  ttEtSums[iTtEta0][iTtPhi0] = et;
1789  ttEtSums[iTtEta0][iTtPhi0+1] = et;
1790  }
1791  }
1792 }
key_type id() const
Definition: EBDataFrame.h:31
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
const_iterator begin() const
unsigned ttId(DetId const &)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
int ieta() const
get the tower ieta
double frame2EnergyForTp(const T &frame, int offset=0) const
static const int nTtPhi
Number of Trigger Towers along Phi.
key_type id() const
Definition: EEDataFrame.h:28
int iphi() const
get the tower iphi
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
et
define resolution functions of each parameter
const_iterator end() const
static const int nTtEta
Number of Trigger Towers along Eta.
T get() const
Definition: EventSetup.h:71
CollHandle< EBDigiCollection > ebDigis_
const EcalTrigTowerConstituentsMap * triggerTowerMap_
void EcalSelectiveReadoutValidation::updateL1aRate ( const edm::Event event)
private

Updates estimate of L1A rate

Parameters
eventEDM event

Definition at line 164 of file EcalSelectiveReadoutValidation.cc.

References l1aOfTmax, l1aOfTmin, protons_cff::t, tmax, and tmin.

Referenced by analyze(), and fill().

164  {
165  const int32_t bx = event.bunchCrossing();
166  if(bx<1 || bx > 3564) return;
167 
168  int64_t t = event.bunchCrossing() + (event.orbitNumber()-1)*3564;
169 
170  if(t<tmin){
171  tmin = t;
172  l1aOfTmin = event.id().event();
173  }
174 
175  if(t>tmax){
176  tmax = t;
177  l1aOfTmax = event.id().event();
178  }
179 }
int EcalSelectiveReadoutValidation::xtalGraphX ( const EEDetId id) const
inlineprivate

Definition at line 899 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and analyzeEE().

899  {
900  return id.ix() + (id.zside()>0?100:-200);
901  }
int EcalSelectiveReadoutValidation::xtalGraphX ( const EBDetId id) const
inlineprivate

Definition at line 907 of file EcalSelectiveReadoutValidation.h.

907  {
908  return id.ieta();
909  }
int EcalSelectiveReadoutValidation::xtalGraphY ( const EEDetId id) const
inlineprivate

Definition at line 903 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and analyzeEE().

903  {
904  return id.iy();
905  }
int EcalSelectiveReadoutValidation::xtalGraphY ( const EBDetId id) const
inlineprivate

Definition at line 911 of file EcalSelectiveReadoutValidation.h.

References dccId(), getCrystalCount(), and selectFedsForLog().

911  {
912  return id.iphi();
913  }

Member Data Documentation

bool EcalSelectiveReadoutValidation::allHists_
private

When true, every histogram is enabled.

Definition at line 811 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation(), and registerHist().

std::map<std::string, std::string> EcalSelectiveReadoutValidation::availableHistList_
private

List of available histograms. Filled by the booking methods. key: name, value: title.

Definition at line 820 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), printAvailableHists(), and registerHist().

bool EcalSelectiveReadoutValidation::collNotFoundWarn_
private

Switch for collection-not-found warning.

Definition at line 488 of file EcalSelectiveReadoutValidation.h.

CollHandle<EBSrFlagCollection> EcalSelectiveReadoutValidation::ebComputedSrFlags_
private
CollHandle<EBDigiCollection> EcalSelectiveReadoutValidation::ebDigis_
private

The event product collections.

Definition at line 510 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), analyzeEB(), EcalSelectiveReadoutValidation(), readAllCollections(), and setTtEtSums().

energiesEb_t EcalSelectiveReadoutValidation::ebEnergies[nEbEta][nEbPhi]
private

Energy deposited in ECAL barrel crystals. Eta index starts from 0 at eta minimum and phi index starts at phi=0+ in CMS std coordinate system.

Definition at line 792 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB().

CollHandle<EBDigiCollection> EcalSelectiveReadoutValidation::ebNoZsDigis_
private
CollHandle<RecHitCollection> EcalSelectiveReadoutValidation::ebRecHits_
private
bool EcalSelectiveReadoutValidation::ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
private

For book keeping of RU actually read out (not fully zero suppressed)

Definition at line 769 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), and anaDigiInit().

CollHandle<std::vector<PCaloHit> > EcalSelectiveReadoutValidation::ebSimHits_
private
CollHandle<EBSrFlagCollection> EcalSelectiveReadoutValidation::ebSrFlags_
private
const int EcalSelectiveReadoutValidation::ebTtEdge = 5
staticprivate

Number of crystals along an EB TT.

Definition at line 459 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi().

int EcalSelectiveReadoutValidation::ebZsThr_
private

ZS threshold in 1/4th ADC count for EB

Definition at line 690 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), bookHistograms(), and EcalSelectiveReadoutValidation().

CollHandle<EESrFlagCollection> EcalSelectiveReadoutValidation::eeComputedSrFlags_
private
CollHandle<EEDigiCollection> EcalSelectiveReadoutValidation::eeDigis_
private
energiesEe_t EcalSelectiveReadoutValidation::eeEnergies[nEndcaps][nEeX][nEeY]
private

Energy deposited in ECAL endcap crystals. Endcap index is 0 for EE- and 1 for EE+. X and Y index starts at x and y minimum in std CMS coordinate system.

Definition at line 798 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE().

CollHandle<EEDigiCollection> EcalSelectiveReadoutValidation::eeNoZsDigis_
private
CollHandle<RecHitCollection> EcalSelectiveReadoutValidation::eeRecHits_
private
bool EcalSelectiveReadoutValidation::eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
private

Definition at line 770 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), and anaDigiInit().

CollHandle<std::vector<PCaloHit> > EcalSelectiveReadoutValidation::eeSimHits_
private
CollHandle<EESrFlagCollection> EcalSelectiveReadoutValidation::eeSrFlags_
private
int EcalSelectiveReadoutValidation::eeZsThr_
private

ZS threshold in 1/4th ADC count for EE

Definition at line 694 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), bookHistograms(), and EcalSelectiveReadoutValidation().

const EcalElectronicsMapping* EcalSelectiveReadoutValidation::elecMap_
private

Ecal electronics/geometrical mapping.

Definition at line 673 of file EcalSelectiveReadoutValidation.h.

Referenced by dccCh(), dccId(), dqmBeginRun(), and readOutUnitOf().

CollHandle<FEDRawDataCollection> EcalSelectiveReadoutValidation::fedRaw_
private
int EcalSelectiveReadoutValidation::firstFIRSample_
private

Time position of the first sample to use in zero suppession FIR filter. Numbering starts at 0.

Definition at line 703 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and configFirWeights().

std::vector<int> EcalSelectiveReadoutValidation::firWeights_
private

Weights to be used for the ZS FIR filter

Definition at line 686 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and configFirWeights().

std::string EcalSelectiveReadoutValidation::histDir_
private

Histogram directory PATH in DQM or within the output ROOT file

Definition at line 815 of file EcalSelectiveReadoutValidation.h.

std::set<std::string> EcalSelectiveReadoutValidation::histList_
private

List of enabled histograms. Special name "all" is used to indicate all available histograms.

Definition at line 807 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), EcalSelectiveReadoutValidation(), and registerHist().

int EcalSelectiveReadoutValidation::ievt_
private

Event sequence number

Definition at line 781 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), analyzeEB(), and analyzeEE().

bool EcalSelectiveReadoutValidation::isRuComplete_[nDccs_][nDccChs_]
private

Definition at line 773 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), analyzeEB(), and analyzeEE().

const int EcalSelectiveReadoutValidation::kByte_ = 1024
staticprivate

number of bytes in 1 kByte:

Definition at line 413 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume().

int64_t EcalSelectiveReadoutValidation::l1aOfTmax
private

Definition at line 532 of file EcalSelectiveReadoutValidation.h.

Referenced by getL1aRate(), and updateL1aRate().

int64_t EcalSelectiveReadoutValidation::l1aOfTmin
private

Definition at line 531 of file EcalSelectiveReadoutValidation.h.

Referenced by getL1aRate(), and updateL1aRate().

bool EcalSelectiveReadoutValidation::l1aRateErr
private

Definition at line 533 of file EcalSelectiveReadoutValidation.h.

bool EcalSelectiveReadoutValidation::localReco_
private

Local reconstruction switch: true to reconstruct locally the amplitude insted of using the Rec Hits.

Definition at line 678 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and analyzeEE().

std::vector<bool> EcalSelectiveReadoutValidation::logErrForDccs_
private

List of TCC masks for validation If tccMasks[iTcc-1] is false then TCC is considered to have been out of the run and related validations are skipped.

Definition at line 714 of file EcalSelectiveReadoutValidation.h.

Referenced by compareSrfColl(), and selectFedsForLog().

bool EcalSelectiveReadoutValidation::logSrApplicationErrors_
private

Switch to log SR decision that fails to be applied on data: inconstitencies between SRF and number of read out crystals.

Definition at line 858 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation(), and initAsciiFile().

bool EcalSelectiveReadoutValidation::logSrpAlgoErrors_
private

Switch to log in an ascii file inconsistencies found between SRFs read from data and SRFs obtained by rerunning SRP algorithm on TTFs.

Definition at line 853 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation(), and initAsciiFile().

const int EcalSelectiveReadoutValidation::maxDccId_ = minDccId_ + nDccs_ -1
staticprivate

Definition at line 426 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), dccCh(), and getCrystalCount().

MonitorElement* EcalSelectiveReadoutValidation::meChOcc_
private

Definition at line 552 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meCompleteZS_
private

Definition at line 603 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meCompleteZSCnt_
private

Definition at line 615 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meCompleteZSMap_
private

Definition at line 607 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meCompleteZSRateMap_
private

Definition at line 611 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meDccHiVol_
private

Definition at line 541 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meDccLiVol_
private

Definition at line 540 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meDccVol_
private

The histograms

Definition at line 539 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meDccVolFromData_
private

Definition at line 542 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meDroppedFRO_
private

Definition at line 602 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meDroppedFROCnt_
private

Definition at line 614 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meDroppedFROMap_
private

Definition at line 606 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meDroppedFRORateMap_
private

Definition at line 610 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meEbEMean_
private

Definition at line 561 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbFixedPayload_
private

Event payload that do not depend on the number of crystals passing the SR

Definition at line 628 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meEbFullRoCnt_
private

Definition at line 588 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbHiZsFir_
private

Definition at line 592 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbIncompleteRUZsFir_
private

Definition at line 593 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meEbLiZsFir_
private

Definition at line 591 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbNoise_
private

Definition at line 562 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbNoZsRecVsSimE_
private

Definition at line 566 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbRecE_
private

Definition at line 560 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbRecEHitXtal_
private

Definition at line 564 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbRecVsSimE_
private

Definition at line 565 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbSimE_
private

Definition at line 563 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbZsErrCnt_
private

Definition at line 616 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEbZsErrType1Cnt_
private

Definition at line 619 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeEMean_
private

Definition at line 569 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeFixedPayload_
private

Definition at line 629 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meEeFullRoCnt_
private

Definition at line 589 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeHiZsFir_
private

Definition at line 596 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeLiZsFir_
private

Definition at line 595 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeNoise_
private

Definition at line 570 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeNoZsRecVsSimE_
private

Definition at line 574 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeRecE_
private

Definition at line 568 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeRecEHitXtal_
private

Definition at line 572 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeRecVsSimE_
private

Definition at line 573 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeSimE_
private

Definition at line 571 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeZsErrCnt_
private

Definition at line 617 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meEeZsErrType1Cnt_
private

Definition at line 620 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meFixedPayload_
private

Definition at line 630 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meForcedRu_
private

Definition at line 578 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meForcedTtf_
private

Definition at line 583 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meFullRoCnt_
private

Definition at line 587 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meFullRoRu_
private

Definition at line 576 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meHiTtf_
private

Definition at line 582 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meIncompleteFRO_
private

Definition at line 601 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meIncompleteFROCnt_
private

Definition at line 613 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meIncompleteFROMap_
private

Definition at line 605 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meIncompleteFRORateMap_
private

Definition at line 609 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and checkSrApplication().

MonitorElement* EcalSelectiveReadoutValidation::meL1aRate_
private

Estimate of L1A rate

Definition at line 635 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and endRun().

MonitorElement* EcalSelectiveReadoutValidation::meLiTtf_
private

Definition at line 580 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meMiTtf_
private

Definition at line 581 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meSRFlagsComputed_
private

Definition at line 598 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meSRFlagsConsistency_
private

Definition at line 599 of file EcalSelectiveReadoutValidation.h.

Referenced by bookHistograms(), and compareSrfColl().

MonitorElement* EcalSelectiveReadoutValidation::meSRFlagsFromData_
private

Definition at line 597 of file EcalSelectiveReadoutValidation.h.

MonitorElement* EcalSelectiveReadoutValidation::meTp_
private

Definition at line 554 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meTpMap_
private

Definition at line 585 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meTpVsEtSum_
private

Definition at line 558 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meTtf_
private

Definition at line 555 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meTtfVsEtSum_
private

Definition at line 557 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meTtfVsTp_
private

Definition at line 556 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVol_
private

Definition at line 543 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolB_
private

Definition at line 544 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolBHI_
private

Definition at line 549 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolBLI_
private

Definition at line 546 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolE_
private

Definition at line 545 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolEHI_
private

Definition at line 550 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolELI_
private

Definition at line 547 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolHI_
private

Definition at line 551 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meVolLI_
private

Definition at line 548 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meZs1Ru_
private

Definition at line 577 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meZsErrCnt_
private

Definition at line 618 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EcalSelectiveReadoutValidation::meZsErrType1Cnt_
private

Definition at line 621 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and bookHistograms().

const int EcalSelectiveReadoutValidation::minDccId_ = 1
staticprivate
int EcalSelectiveReadoutValidation::nCompleteZS_
private

Counter of ZS-flagged RU fully read out.

Definition at line 644 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and checkSrApplication().

const unsigned EcalSelectiveReadoutValidation::nDccChs_ = 68
staticprivate

Number of input channels of a DCC.

Definition at line 420 of file EcalSelectiveReadoutValidation.h.

const int EcalSelectiveReadoutValidation::nDccRus_
staticprivate
Initial value:
={
34, 32, 33, 33, 32, 34, 33, 34, 33,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
32, 33, 33, 32, 34, 33, 34, 33, 34
}

number of RUs for each DCC

Definition at line 441 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume().

const unsigned EcalSelectiveReadoutValidation::nDccs_ = 54
staticprivate

Total number of DCCs.

Definition at line 416 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeDataVolume(), bookHistograms(), getEeEventSize(), and selectFedsForLog().

int EcalSelectiveReadoutValidation::nDroppedFRO_
private

Counter of FRO-flagged RU dropped from data.

Definition at line 638 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and checkSrApplication().

int EcalSelectiveReadoutValidation::nEb_
private

ECAL barrel read channel count

Definition at line 718 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

const int EcalSelectiveReadoutValidation::nEbDccs = 36
staticprivate

number of DCCs for EB

Definition at line 429 of file EcalSelectiveReadoutValidation.h.

Referenced by getEbEventSize(), and getEeEventSize().

const int EcalSelectiveReadoutValidation::nEbEta = 170
staticprivate

number of crystals along Eta in EB

Definition at line 447 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB().

int EcalSelectiveReadoutValidation::nEbFROCnt_
private

Counter of EB FRO-flagged RUs.

Definition at line 647 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEB().

int EcalSelectiveReadoutValidation::nEbHI_
private

ECAL barrel high interest read channel count

Definition at line 738 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nEbLI_
private

ECAL barrel low interest read channel count

Definition at line 734 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

const int EcalSelectiveReadoutValidation::nEbPhi = 360
staticprivate

number of crystals along Phi in EB

Definition at line 450 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB().

const int EcalSelectiveReadoutValidation::nEbRus = 36*68
staticprivate

number of RUs for EB

Definition at line 435 of file EcalSelectiveReadoutValidation.h.

const int EcalSelectiveReadoutValidation::nEbTtEta = 34
staticprivate

Number of Trigger Towers in barrel along Eta.

Definition at line 468 of file EcalSelectiveReadoutValidation.h.

int EcalSelectiveReadoutValidation::nEbZsErrors_
private

Counter of EB ZS errors (LI channel below ZS threshold)

Definition at line 653 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEB().

int EcalSelectiveReadoutValidation::nEbZsErrorsType1_
private

Counter of EB ZS errors of type 1: LI channel below ZS threshold and in a RU which was fully readout

Definition at line 660 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEB().

int EcalSelectiveReadoutValidation::nEe_
private

ECAL endcap read channel count

Definition at line 722 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

const int EcalSelectiveReadoutValidation::nEeDccs = 18
staticprivate

number of DCCs for EE

Definition at line 432 of file EcalSelectiveReadoutValidation.h.

Referenced by getEbEventSize(), and getEeEventSize().

int EcalSelectiveReadoutValidation::nEeFROCnt_
private

Counter of EE FRO-flagged RUs.

Definition at line 650 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEE().

int EcalSelectiveReadoutValidation::nEeHI_
private

ECAL endcap high interest read channel count

Definition at line 730 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nEeLI_
private

ECAL endcap low interest read channel count

Definition at line 726 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

const int EcalSelectiveReadoutValidation::nEeRus = 2*(34+32+33+33+32+34+33+34+33)
staticprivate

number of RUs for EE

Definition at line 438 of file EcalSelectiveReadoutValidation.h.

const int EcalSelectiveReadoutValidation::nEeX = 100
staticprivate

EE crystal grid size along X.

Definition at line 453 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE().

const int EcalSelectiveReadoutValidation::nEeY = 100
staticprivate

EE crystal grid size along Y.

Definition at line 456 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE().

int EcalSelectiveReadoutValidation::nEeZsErrors_
private

Counter of EE ZS errors (LI channel below ZS threshold)

Definition at line 656 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEE().

int EcalSelectiveReadoutValidation::nEeZsErrorsType1_
private

Counter of EE ZS errors of tyoe 1: LI channel below ZS threshold and in a RU which was fully readout

Definition at line 664 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEE().

const int EcalSelectiveReadoutValidation::nEndcaps = 2
staticprivate

number of endcaps

Definition at line 444 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEE().

int EcalSelectiveReadoutValidation::nHiPerDcc_[nDccs_]
private

read-out ECAL Hiugh interest channel count for each DCC:

Definition at line 750 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nHiRuPerDcc_[nDccs_]
private

Count for each DCC of HI RUs with at leat one channel read out:

Definition at line 763 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nIncompleteFRO_
private

Counter of FRO-flagged RU only partial data.

Definition at line 641 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and checkSrApplication().

int EcalSelectiveReadoutValidation::nLiPerDcc_[nDccs_]
private

read-out ECAL Low interest channel count for each DCC:

Definition at line 746 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nLiRuPerDcc_[nDccs_]
private

Count for each DCC of LI RUs with at leat one channel read out:

Definition at line 759 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

const int EcalSelectiveReadoutValidation::nMaxXtalPerRu = 25
staticprivate

Number of crystals per Readout Unit excepted partial SCs.

Definition at line 477 of file EcalSelectiveReadoutValidation.h.

const int EcalSelectiveReadoutValidation::nOneEeTtEta = 11
staticprivate

Number of Trigger Towers in an endcap along Eta.

Definition at line 465 of file EcalSelectiveReadoutValidation.h.

Referenced by dccCh().

int EcalSelectiveReadoutValidation::nPerDcc_[nDccs_]
private

read-out ECAL channel count for each DCC:

Definition at line 742 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and analyzeDataVolume().

int EcalSelectiveReadoutValidation::nPerRu_[nDccs_][nDccChs_]
private

Number of crystal read for each DCC channel (aka readout unit).

Definition at line 777 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), analyzeDataVolume(), and checkSrApplication().

int EcalSelectiveReadoutValidation::nRuPerDcc_[nDccs_]
private

Count for each DCC of RUs with at leat one channel read out:

Definition at line 755 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi(), anaDigiInit(), and getRuCount().

const int EcalSelectiveReadoutValidation::nTtEta = 2*nOneEeTtEta + nEbTtEta
staticprivate

Number of Trigger Towers along Eta.

Definition at line 471 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and setTtEtSums().

const int EcalSelectiveReadoutValidation::nTtPhi = 72
staticprivate

Number of Trigger Towers along Phi.

Definition at line 474 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and setTtEtSums().

std::string EcalSelectiveReadoutValidation::outputFile_
private

Output file for histograms.

Definition at line 485 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation().

const double EcalSelectiveReadoutValidation::rad2deg = 45./atan(1.)
staticprivate

Conversion factor from radian to degree.

Definition at line 479 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), and analyzeEE().

const int EcalSelectiveReadoutValidation::scEdge = 5
staticprivate

Number of crystals along a supercrystal edge.

Definition at line 462 of file EcalSelectiveReadoutValidation.h.

Referenced by anaDigi().

bool EcalSelectiveReadoutValidation::SkipInnerSC_
private

Permits to skip inner SC

Definition at line 802 of file EcalSelectiveReadoutValidation.h.

std::ofstream EcalSelectiveReadoutValidation::srApplicationErrorLog_
private

Output ascii file for unconsistency between Xtals and RU Flags.

Definition at line 502 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeEB(), analyzeEE(), checkSrApplication(), initAsciiFile(), and selectFedsForLog().

std::string EcalSelectiveReadoutValidation::srApplicationErrorLogFileName_
private

Output ascii file name for unconsistency between SRFs and actual number of read-out crystals.

Definition at line 496 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation(), and initAsciiFile().

std::ofstream EcalSelectiveReadoutValidation::srpAlgoErrorLog_
private

Output ascii file for unconsistency on SR flags.

Definition at line 499 of file EcalSelectiveReadoutValidation.h.

Referenced by compareSrfColl(), initAsciiFile(), and selectFedsForLog().

std::string EcalSelectiveReadoutValidation::srpAlgoErrorLogFileName_
private

Output ascii file name for unconsistency between SRFs read from data and SRF obtained by rerunning SRP algorithm on TTFs.

Definition at line 492 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation(), and initAsciiFile().

int64_t EcalSelectiveReadoutValidation::tmax
private

For L1A rate estimate

Definition at line 529 of file EcalSelectiveReadoutValidation.h.

Referenced by getL1aRate(), and updateL1aRate().

int64_t EcalSelectiveReadoutValidation::tmin
private

Definition at line 530 of file EcalSelectiveReadoutValidation.h.

Referenced by getL1aRate(), and updateL1aRate().

bool EcalSelectiveReadoutValidation::tpInGeV_
private

Switch for uncompressing TP value

Definition at line 698 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and bookHistograms().

CollHandle<EcalTrigPrimDigiCollection> EcalSelectiveReadoutValidation::tps_
private
const EcalTrigTowerConstituentsMap* EcalSelectiveReadoutValidation::triggerTowerMap_
private

ECAL trigger tower mapping

Definition at line 669 of file EcalSelectiveReadoutValidation.h.

Referenced by dqmBeginRun(), readOutUnitOf(), and setTtEtSums().

double EcalSelectiveReadoutValidation::ttEtSums[nTtEta][nTtPhi]
private

Trigger tower Et computed as sum the crystal Et. Indices stands for the eta and phi TT index starting from 0 at eta minimum and at phi=0+ in std CMS coordinate system.

Definition at line 787 of file EcalSelectiveReadoutValidation.h.

Referenced by analyzeTP(), and setTtEtSums().

bool EcalSelectiveReadoutValidation::useEventRate_
private

Switch to fill histograms with event rate instead of event count. Applies only to some histograms.

Definition at line 708 of file EcalSelectiveReadoutValidation.h.

bool EcalSelectiveReadoutValidation::verbose_
private

Verbosity switch.

Definition at line 482 of file EcalSelectiveReadoutValidation.h.

Referenced by EcalSelectiveReadoutValidation().

std::vector<double> EcalSelectiveReadoutValidation::weights_
private

Weights for amplitude local reconstruction

Definition at line 682 of file EcalSelectiveReadoutValidation.h.

Referenced by frame2Energy().

bool EcalSelectiveReadoutValidation::withEbSimHit_
private

Indicates if EB sim hits are available

Definition at line 829 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEB().

bool EcalSelectiveReadoutValidation::withEeSimHit_
private

Indicates if EE sim hits are available

Definition at line 825 of file EcalSelectiveReadoutValidation.h.

Referenced by analyze(), and analyzeEE().

std::ofstream EcalSelectiveReadoutValidation::zsErrorLog_
private

File to log ZS and other errors.

Definition at line 505 of file EcalSelectiveReadoutValidation.h.