CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
EBSelectiveReadoutTask Class Reference

#include <EBSelectiveReadoutTask.h>

Inheritance diagram for EBSelectiveReadoutTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EBSelectiveReadoutTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EBSelectiveReadoutTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Protected Attributes

int nCryTower [72][34]
 To store the readout crystals / tower. More...
 
int nEvtAnyInterest [72][34]
 To store the events with any interest. More...
 
int nEvtAnyReadout [72][34]
 To store the events with any readout. More...
 
int nEvtCompleteReadoutIfZS [72][34]
 To store the events with complete readout when ZS is requested. More...
 
int nEvtDroppedReadoutIfFR [72][34]
 To store the events with 0 channels readout when FR is requested. More...
 
int nEvtFullReadout [72][34]
 To store the events with full readout. More...
 
int nEvtHighInterest [72][34]
 To store the events with high interest TT. More...
 
int nEvtLowInterest [72][34]
 To store the events with low interest TT. More...
 
int nEvtMediumInterest [72][34]
 To store the events with medium interest TT. More...
 
int nEvtRUForced [72][34]
 To store the events with RU forced. More...
 
int nEvtZS1Readout [72][34]
 To store the events with ZS1 readout. More...
 
int nEvtZSReadout [72][34]
 To store the events with ZS1 or ZS2 readout. More...
 

Static Protected Attributes

static const int bytesPerCrystal = 24
 Number of bytes per crystal. More...
 
static const int ebTtEdge = 5
 Number of crystals along an EB TT. More...
 
static const int kByte = 1024
 
static const int nDccChs = 68
 maximum number of RUs read by a DCC More...
 
static const int nEBDcc = 36
 
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 nECALDcc = 54
 
static const int nTTEta = 34
 Constants. More...
 
static const int nTtEta = 56
 Number of Trigger Towers along Eta. More...
 
static const int nTTPhi = 72
 
static const int nTtPhi = 72
 Number of Trigger Towers along Phi. More...
 
static const int scEdge = 5
 Number of crystals along a supercrystal edge. More...
 

Private Types

enum  subdet_t { EB, EE }
 distinguishes barral and endcap of ECAL. More...
 

Private Member Functions

void anaDigi (const EBDataFrame &frame, const EBSrFlagCollection &srFlagColl, uint16_t statusCode)
 
void anaDigiInit ()
 
int cIndex2iEta (int i) const
 
int cIndex2iPhi (int i) const
 
int cIndex2iXY (int iX0) const
 
void configFirWeights (const std::vector< double > &weightsForZsFIR)
 
int dccIndex (int i, int j) const
 
unsigned dccNum (const DetId &xtalId) const
 
int dccPhiIndex (int i, int j) const
 
int dccPhiIndexOfRU (int i, int j) const
 
int getCrystalCount ()
 
double getDccEventSize (int iDcc0, double nReadXtals) const
 
double getDccOverhead (subdet_t subdet) const
 
double getEbEventSize (double nReadXtals) const
 
int iEta2cIndex (int iEta) const
 
int iPhi2cIndex (int iPhi) const
 
int iXY2cIndex (int iX) const
 
EcalTrigTowerDetId readOutUnitOf (const EBDetId &xtalId) 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

DQMStoredqmStore_
 
MonitorElementEBCompleteZSCount_
 
MonitorElementEBCompleteZSMap_
 
MonitorElementEBDccEventSize_
 
MonitorElementEBDccEventSizeMap_
 
edm::EDGetTokenT
< EBDigiCollection
EBDigiCollection_
 
MonitorElementEBDroppedFRCount_
 
MonitorElementEBDroppedFRMap_
 
MonitorElementEBEventSize_
 
MonitorElementEBFullReadoutSRFlagCount_
 
MonitorElementEBFullReadoutSRFlagMap_
 
MonitorElementEBHighInterestPayload_
 
MonitorElementEBHighInterestTriggerTowerFlagMap_
 
MonitorElementEBHighInterestZsFIR_
 
MonitorElementEBLowInterestPayload_
 
MonitorElementEBLowInterestTriggerTowerFlagMap_
 
MonitorElementEBLowInterestZsFIR_
 
MonitorElementEBMediumInterestTriggerTowerFlagMap_
 
MonitorElementEBReadoutUnitForcedBitMap_
 
bool ebRuActive_ [nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
 
edm::EDGetTokenT
< EBSrFlagCollection
EBSRFlagCollection_
 
MonitorElementEBTowerSize_
 
MonitorElementEBTTFlags_
 
MonitorElementEBTTFMismatch_
 
MonitorElementEBZeroSuppression1SRFlagMap_
 
edm::EDGetTokenT
< EcalRecHitCollection
EcalRecHitCollection_
 
edm::EDGetTokenT
< EcalTrigPrimDigiCollection
EcalTrigPrimDigiCollection_
 
bool enableCleanup_
 
edm::EDGetTokenT
< FEDRawDataCollection
FEDRawDataCollection_
 
int firstFIRSample_
 
std::vector< int > firWeights_
 
int ievt_
 
bool init_
 
bool mergeRuns_
 
int nEb_
 
int nEbHI_
 
int nEbLI_
 
int nPerDcc_ [nECALDcc]
 
int nPerRu_ [nECALDcc][nDccChs]
 
int nRuPerDcc_ [nECALDcc]
 
std::string prefixME_
 
const EcalSRSettingssettings_
 
bool useCondDb_
 
float xbins [37]
 
float ybins [89]
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 25 of file EBSelectiveReadoutTask.h.

Member Enumeration Documentation

distinguishes barral and endcap of ECAL.

Enumerator
EB 
EE 

Definition at line 134 of file EBSelectiveReadoutTask.h.

Constructor & Destructor Documentation

EBSelectiveReadoutTask::EBSelectiveReadoutTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 38 of file EBSelectiveReadoutTask.cc.

References configFirWeights(), dqmStore_, EBCompleteZSCount_, EBCompleteZSMap_, EBDccEventSize_, EBDccEventSizeMap_, EBDigiCollection_, EBDroppedFRCount_, EBDroppedFRMap_, EBEventSize_, EBFullReadoutSRFlagCount_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBHighInterestZsFIR_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBLowInterestZsFIR_, EBMediumInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBSRFlagCollection_, EBTowerSize_, EBTTFlags_, EBTTFMismatch_, EBZeroSuppression1SRFlagMap_, EcalTrigPrimDigiCollection_, enableCleanup_, FEDRawDataCollection_, firstFIRSample_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, mergeRuns_, cppFunctionSkipper::operator, prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, useCondDb_, xbins, and ybins.

38  {
39 
40  init_ = false;
41 
43 
44  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
45 
46  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
47 
48  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
49 
50  // parameters...
51  EBDigiCollection_ = consumes<EBDigiCollection>(ps.getParameter<edm::InputTag>("EBDigiCollection"));
52  EBSRFlagCollection_ = consumes<EBSrFlagCollection>(ps.getParameter<edm::InputTag>("EBSRFlagCollection"));
53  EcalTrigPrimDigiCollection_ = consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection"));
54  FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("FEDRawDataCollection"));
55 
56  firstFIRSample_ = ps.getParameter<int>("ecalDccZs1stSample");
57 
58  useCondDb_ = ps.getParameter<bool>("configFromCondDB");
59 
60  if(!useCondDb_) configFirWeights(ps.getParameter<std::vector<double> >("dccWeights"));
61 
62 
63  // histograms...
64  EBTowerSize_ = 0;
65  EBTTFMismatch_ = 0;
66  EBDccEventSize_ = 0;
75  EBTTFlags_ = 0;
76  EBCompleteZSMap_ = 0;
78  EBDroppedFRMap_ = 0;
80  EBEventSize_ = 0;
85 
86  // initialize variable binning for DCC size...
87  float ZSthreshold = 0.608; // kBytes of 1 TT fully readout
88  float zeroBinSize = ZSthreshold / 20.;
89  for(int i=0; i<20; i++) ybins[i] = i*zeroBinSize;
90  for(int i=20; i<89; i++) ybins[i] = ZSthreshold * (i-19);
91  for(int i=0; i<=36; i++) xbins[i] = i+1;
92 
93 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
MonitorElement * EBDccEventSizeMap_
MonitorElement * EBLowInterestZsFIR_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcalTrigPrimDigiCollection_
MonitorElement * EBFullReadoutSRFlagCount_
void configFirWeights(const std::vector< double > &weightsForZsFIR)
MonitorElement * EBFullReadoutSRFlagMap_
edm::EDGetTokenT< EBDigiCollection > EBDigiCollection_
MonitorElement * EBLowInterestPayload_
MonitorElement * EBCompleteZSCount_
MonitorElement * EBHighInterestPayload_
edm::EDGetTokenT< EBSrFlagCollection > EBSRFlagCollection_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBZeroSuppression1SRFlagMap_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
edm::EDGetTokenT< FEDRawDataCollection > FEDRawDataCollection_
EBSelectiveReadoutTask::~EBSelectiveReadoutTask ( )
virtual

Destructor.

Definition at line 95 of file EBSelectiveReadoutTask.cc.

95  {
96 
97 }

Member Function Documentation

void EBSelectiveReadoutTask::anaDigi ( const EBDataFrame frame,
const EBSrFlagCollection srFlagColl,
uint16_t  statusCode 
)
private

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

Definition at line 741 of file EBSelectiveReadoutTask.cc.

References funct::abs(), Reference_intrackfit_cff::barrel, dccNum(), dccZsFIR(), EBHighInterestZsFIR_, EBLowInterestZsFIR_, ebRuActive_, ebTtEdge, EcalBarrel, edm::SortedCollection< T, SORT >::end(), MonitorElement::Fill(), edm::SortedCollection< T, SORT >::find(), firstFIRSample_, firWeights_, EBDataFrame::id(), EcalTrigTowerDetId::ieta(), iEta2cIndex(), EcalTrigTowerDetId::iphi(), iPhi2cIndex(), ecalpyutils::ism(), Numbers::iSM(), Numbers::iTT(), nCryTower, nEb_, nEbHI_, nEbLI_, nPerDcc_, nPerRu_, nRuPerDcc_, readOutUnitOf(), and EcalSrFlag::SRF_FULL.

Referenced by analyze().

741  {
742 
743  EBDetId id = frame.id();
744 
745  bool barrel = (id.subdetId()==EcalBarrel);
746 
747  if(barrel){
748  ++nEb_;
749 
750  int ieta = id.ieta();
751  int iphi = id.iphi();
752 
753  int iEta0 = iEta2cIndex(ieta);
754  int iPhi0 = iPhi2cIndex(iphi);
755  if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){
756  ++nRuPerDcc_[dccNum(id)-1];
757  ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true;
758  }
759 
760  EcalTrigTowerDetId towid = id.tower();
761  int iet = towid.ieta();
762  int ietindex = (iet>0) ? iet - 1 : 16 + std::abs(iet);
763  // phi_tower: change the range from global to SM-local
764  // phi==0 is in the middle of a SM
765  int ipt = towid.iphi() + 2;
766  if ( ipt > 72 ) ipt = ipt - 72;
767  int iptindex = ipt - 1;
768 
769  int ism = Numbers::iSM( id );
770  int itt = Numbers::iTT( towid );
771 
772  nCryTower[iptindex][ietindex]++;
773 
775 
776  if(srf == srFlagColl.end()){
777  return;
778  }
779 
780  bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
782 
783 
784  int dccZsFIRval = dccZsFIR(frame, firWeights_, firstFIRSample_, 0);
785 
786  if(highInterest){
787  ++nEbHI_;
788  // if(statusCode != 9) EBHighInterestZsFIR_->Fill( dccZsFIRval );
789  EBHighInterestZsFIR_->Fill( dccZsFIRval );
790  } else{//low interest
791  ++nEbLI_;
792  // if(statusCode != 9) EBLowInterestZsFIR_->Fill( dccZsFIRval );
793  EBLowInterestZsFIR_->Fill( dccZsFIRval );
794  }
795  ++nPerDcc_[dccNum(id)-1];
796  ++nPerRu_[ism-1][itt-1];
797  }
798 
799 }
int nCryTower[72][34]
To store the readout crystals / tower.
key_type id() const
Definition: EBDataFrame.h:31
MonitorElement * EBLowInterestZsFIR_
static const int ebTtEdge
Number of crystals along an EB TT.
std::vector< EBSrFlag >::const_iterator const_iterator
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
int ieta() const
get the tower ieta
int iPhi2cIndex(int iPhi) const
void Fill(long long x)
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
std::vector< int > firWeights_
static const int SRF_FULL
Definition: EcalSrFlag.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const_iterator end() const
int iphi() const
get the tower iphi
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
int nPerRu_[nECALDcc][nDccChs]
MonitorElement * EBHighInterestZsFIR_
unsigned dccNum(const DetId &xtalId) const
iterator find(key_type k)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int iEta2cIndex(int iEta) const
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:482
void EBSelectiveReadoutTask::anaDigiInit ( )
private

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

Definition at line 801 of file EBSelectiveReadoutTask.cc.

References ebRuActive_, nCryTower, nDccChs, nEb_, nEbHI_, nEbLI_, nECALDcc, nPerDcc_, nPerRu_, and nRuPerDcc_.

Referenced by analyze().

801  {
802  nEb_ = 0;
803  nEbLI_ = 0;
804  nEbHI_ = 0;
805  bzero(nPerDcc_, sizeof(nPerDcc_));
806  bzero(nRuPerDcc_, sizeof(nRuPerDcc_));
807  bzero(ebRuActive_, sizeof(ebRuActive_));
808 
809  for(int idcc=0; idcc<nECALDcc; idcc++) {
810  for(int isc=0; isc<nDccChs; isc++) {
811  nPerRu_[idcc][isc] = 0;
812  }
813  }
814 
815  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
816  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
817  nCryTower[iptindex][ietindex] = 0;
818  }
819  }
820 
821 }
int nCryTower[72][34]
To store the readout crystals / tower.
static const int nDccChs
maximum number of RUs read by a DCC
bool ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
int nPerRu_[nECALDcc][nDccChs]
void EBSelectiveReadoutTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 410 of file EBSelectiveReadoutTask.cc.

References funct::abs(), anaDigi(), anaDigiInit(), bytesPerCrystal, EBCompleteZSCount_, EBCompleteZSMap_, EBDccEventSize_, EBDccEventSizeMap_, EBDigiCollection_, EBDroppedFRCount_, EBDroppedFRMap_, EBEventSize_, EBFullReadoutSRFlagCount_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBMediumInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBSRFlagCollection_, EBTowerSize_, EBTTFlags_, EBTTFMismatch_, EBZeroSuppression1SRFlagMap_, EcalBarrel, EcalTrigPrimDigiCollection_, EcalCondObjectContainer< T >::end(), relativeConstraints::error, FEDRawDataCollection_, MonitorElement::Fill(), EcalCondObjectContainer< T >::find(), edm::EventSetup::get(), edm::Event::getByToken(), getCrystalCount(), getEbEventSize(), EcalCondObjectContainer< T >::getMap(), EcalChannelStatusCode::getStatusCode(), MonitorElement::getTH2F(), EBDataFrame::id(), EcalTrigTowerDetId::ieta(), ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), Numbers::iTT(), kByte, nCryTower, nEb_, nEBDcc, nEbHI_, nEbLI_, nEvtAnyInterest, nEvtAnyReadout, nEvtCompleteReadoutIfZS, nEvtDroppedReadoutIfFR, nEvtFullReadout, nEvtHighInterest, nEvtLowInterest, nEvtMediumInterest, nEvtRUForced, nEvtZS1Readout, nEvtZSReadout, nPerRu_, edm::ESHandle< class >::product(), MonitorElement::setBinContent(), MonitorElement::setBinError(), setup(), findQualityFiles::size, mathSSE::sqrt(), EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, EcalSrFlag::SRF_ZS2, ntuplemaker::status, Numbers::subDet(), and ecalTPGAnalyzer_cfg::TPCollection.

410  {
411 
412  if ( ! init_ ) this->setup();
413 
414  ievt_++;
415 
417  if ( e.getByToken(FEDRawDataCollection_, raw) ) {
418 
419  for ( int iDcc = 0; iDcc < nEBDcc; ++iDcc ) {
420 
421  EBDccEventSize_->Fill(iDcc+1, ((double)raw->FEDData(610+iDcc).size())/kByte );
422  EBDccEventSizeMap_->Fill(iDcc+1, ((double)raw->FEDData(610+iDcc).size())/kByte);
423 
424  }
425 
426  } else {
427  edm::LogWarning("EBSelectiveReadoutTask") << "FEDRawDataCollection not available";
428  }
429 
430  // Selective Readout Flags
431  int nFRO, nCompleteZS, nDroppedFRO;
432  nFRO = 0;
433  nCompleteZS = 0;
434  nDroppedFRO = 0;
436  if ( e.getByToken(EBSRFlagCollection_,ebSrFlags) ) {
437 
438  // Data Volume
439  double aLowInterest=0;
440  double aHighInterest=0;
441  double aAnyInterest=0;
442 
444  if ( e.getByToken(EBDigiCollection_ , ebDigis) ) {
445 
446  anaDigiInit();
447 
448  // channel status
449  edm::ESHandle<EcalChannelStatus> pChannelStatus;
450  c.get<EcalChannelStatusRcd>().get(pChannelStatus);
451  const EcalChannelStatus* chStatus = pChannelStatus.product();
452 
453  for (unsigned int digis=0; digis<ebDigis->size(); ++digis){
454  EBDataFrame ebdf = (*ebDigis)[digis];
455  EBDetId id = ebdf.id();
457  chit = chStatus->getMap().find(id.rawId());
458  uint16_t statusCode = 0;
459  if( chit != chStatus->getMap().end() ) {
460  EcalChannelStatusCode ch_code = (*chit);
461  statusCode = ch_code.getStatusCode();
462  }
463  anaDigi(ebdf, *ebSrFlags, statusCode);
464  }
465 
466  //low interest channels:
467  aLowInterest = nEbLI_*bytesPerCrystal/kByte;
468  EBLowInterestPayload_->Fill(aLowInterest);
469 
470  //low interest channels:
471  aHighInterest = nEbHI_*bytesPerCrystal/kByte;
472  EBHighInterestPayload_->Fill(aHighInterest);
473 
474  //any-interest channels:
475  aAnyInterest = getEbEventSize(nEb_)/kByte;
476  EBEventSize_->Fill(aAnyInterest);
477 
478  //event size by tower:
479  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
480  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
481 
482  float xiet = (ietindex < 17) ? ietindex + 0.5 : (16-ietindex) + 0.5;
483  float xipt = iptindex + 0.5;
484 
485  double towerSize = nCryTower[iptindex][ietindex] * bytesPerCrystal;
486  EBTowerSize_->Fill(xipt, xiet, towerSize);
487 
488  }
489  }
490  } else {
491  edm::LogWarning("EBSelectiveReadoutTask") << "EBDigiCollection not available";
492  }
493 
494  // initialize dcchs_ to mask disabled towers
495  std::map< int, std::vector<short> > towersStatus;
497 
498  if( e.getByToken(FEDRawDataCollection_, dcchs) ) {
499  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
500  if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
501  int ism = Numbers::iSM( *dcchItr, EcalBarrel );
502  towersStatus.insert(std::make_pair(ism, dcchItr->getFEStatus()));
503  }
504  }
505 
506  for ( EBSrFlagCollection::const_iterator it = ebSrFlags->begin(); it != ebSrFlags->end(); ++it ) {
507 
508  EcalTrigTowerDetId id = it->id();
509 
510  if ( Numbers::subDet( id ) != EcalBarrel ) continue;
511 
512  int iet = id.ieta();
513  int ietindex = (iet>0) ? iet - 1 : 16 + std::abs(iet);
514  // phi_tower: change the range from global to SM-local
515  // phi==0 is in the middle of a SM
516  int ipt = id.iphi() + 2;
517  if ( ipt > 72 ) ipt = ipt - 72;
518  int iptindex = ipt - 1;
519  int ism = Numbers::iSM( id );
520  int itt = Numbers::iTT( id );
521 
522  nEvtAnyReadout[iptindex][ietindex]++;
523 
524  int flag = it->value() & ~EcalSrFlag::SRF_FORCED_MASK;
525 
526  int status=0;
527  if( towersStatus[ism].size() > 0 ) status = (towersStatus[ism])[itt];
528 
529  if(flag == EcalSrFlag::SRF_FULL) {
530  nEvtFullReadout[iptindex][ietindex]++;
531  nFRO++;
532  if(nPerRu_[ism-1][itt-1] == 0) {
533  if(status != 1) nEvtDroppedReadoutIfFR[iptindex][ietindex]++;
534  nDroppedFRO++;
535  }
536  }
537 
538  if(flag == EcalSrFlag::SRF_ZS1) nEvtZS1Readout[iptindex][ietindex]++;
539 
540  if(it->value() & EcalSrFlag::SRF_FORCED_MASK) nEvtRUForced[iptindex][ietindex]++;
541 
542  if(flag == EcalSrFlag::SRF_ZS1 || flag == EcalSrFlag::SRF_ZS2) {
543  nEvtZSReadout[iptindex][ietindex]++;
544  if(nPerRu_[ism-1][itt-1] == getCrystalCount()) {
545  if(status != 1) nEvtCompleteReadoutIfZS[iptindex][ietindex]++;
546  nCompleteZS++;
547  }
548  }
549 
550  }
551  } else {
552  edm::LogWarning("EBSelectiveReadoutTask") << "EBSRFlagCollection not available";
553  }
554 
555  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
556  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
557 
558  if(nEvtAnyReadout[iptindex][ietindex]) {
559 
560  float xiet = (ietindex < 17) ? ietindex + 0.5 : (16-ietindex) + 0.5;
561  float xipt = iptindex + 0.5;
562 
563  float fraction = float(nEvtFullReadout[iptindex][ietindex]) / float(nEvtAnyReadout[iptindex][ietindex]);
564  float error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[iptindex][ietindex]));
565 
566  TH2F *h2d = EBFullReadoutSRFlagMap_->getTH2F();
567 
568  int binet=0, binpt=0;
569 
570  if ( h2d ) {
571  binpt = h2d->GetXaxis()->FindBin(xipt);
572  binet = h2d->GetYaxis()->FindBin(xiet);
573  }
574 
575  EBFullReadoutSRFlagMap_->setBinContent(binpt, binet, fraction);
576  EBFullReadoutSRFlagMap_->setBinError(binpt, binet, error);
577 
578 
579  fraction = float(nEvtZS1Readout[iptindex][ietindex]) / float(nEvtAnyReadout[iptindex][ietindex]);
580  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[iptindex][ietindex]));
581 
583 
584  if ( h2d ) {
585  binpt = h2d->GetXaxis()->FindBin(xipt);
586  binet = h2d->GetYaxis()->FindBin(xiet);
587  }
588 
589  EBZeroSuppression1SRFlagMap_->setBinContent(binpt, binet, fraction);
590  EBZeroSuppression1SRFlagMap_->setBinError(binpt, binet, error);
591 
592 
593  fraction = float(nEvtRUForced[iptindex][ietindex]) / float(nEvtAnyReadout[iptindex][ietindex]);
594  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[iptindex][ietindex]));
595 
597 
598  if ( h2d ) {
599  binpt = h2d->GetXaxis()->FindBin(xipt);
600  binet = h2d->GetYaxis()->FindBin(xiet);
601  }
602 
603  EBReadoutUnitForcedBitMap_->setBinContent(binpt, binet, fraction);
604  EBReadoutUnitForcedBitMap_->setBinError(binpt, binet, error);
605 
606  if( nEvtZSReadout[iptindex][ietindex] ) {
607  fraction = float(nEvtCompleteReadoutIfZS[iptindex][ietindex]) / float(nEvtZSReadout[iptindex][ietindex]);
608  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[iptindex][ietindex]));
609 
610  h2d = EBCompleteZSMap_->getTH2F();
611 
612  if ( h2d ) {
613  binpt = h2d->GetXaxis()->FindBin(xipt);
614  binet = h2d->GetYaxis()->FindBin(xiet);
615  }
616 
617  EBCompleteZSMap_->setBinContent(binpt, binet, fraction);
618  EBCompleteZSMap_->setBinError(binpt, binet, error);
619  }
620 
621  if( nEvtFullReadout[iptindex][ietindex] ) {
622  fraction = float(nEvtDroppedReadoutIfFR[iptindex][ietindex]) / float(nEvtFullReadout[iptindex][ietindex]);
623  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[iptindex][ietindex]));
624 
625  h2d = EBDroppedFRMap_->getTH2F();
626 
627  if ( h2d ) {
628  binpt = h2d->GetXaxis()->FindBin(xipt);
629  binet = h2d->GetYaxis()->FindBin(xiet);
630  }
631 
632  EBDroppedFRMap_->setBinContent(binpt, binet, fraction);
633  EBDroppedFRMap_->setBinError(binpt, binet, error);
634  }
635  }
636 
637  }
638  }
639 
641  EBCompleteZSCount_->Fill( nCompleteZS );
642  EBDroppedFRCount_->Fill( nDroppedFRO );
643 
645  if ( e.getByToken(EcalTrigPrimDigiCollection_, TPCollection) ) {
646 
647  // Trigger Primitives
649  for (TPdigi = TPCollection->begin(); TPdigi != TPCollection->end(); ++TPdigi ) {
650 
651  if ( Numbers::subDet( TPdigi->id() ) != EcalBarrel ) continue;
652 
653  int iet = TPdigi->id().ieta();
654  int ietindex = (iet>0) ? iet - 1 : 16 + std::abs(iet);
655  // phi_tower: change the range from global to SM-local
656  // phi==0 is in the middle of a SM
657  int ipt = TPdigi->id().iphi() + 2;
658  if ( ipt > 72 ) ipt = ipt - 72;
659  int iptindex = ipt - 1;
660 
661  nEvtAnyInterest[iptindex][ietindex]++;
662 
663  if ( (TPdigi->ttFlag() & 0x3) == 0 ) nEvtLowInterest[iptindex][ietindex]++;
664 
665  if ( (TPdigi->ttFlag() & 0x3) == 1 ) nEvtMediumInterest[iptindex][ietindex]++;
666 
667  if ( (TPdigi->ttFlag() & 0x3) == 3 ) nEvtHighInterest[iptindex][ietindex]++;
668 
669  EBTTFlags_->Fill( TPdigi->ttFlag() );
670 
671  float xiet = (ietindex < 17) ? ietindex + 0.5 : (16-ietindex) + 0.5;
672  float xipt = iptindex + 0.5;
673 
674  if ( ((TPdigi->ttFlag() & 0x3) == 1 || (TPdigi->ttFlag() & 0x3) == 3)
675  && nCryTower[iptindex][ietindex] != 25 ) EBTTFMismatch_->Fill(xipt, xiet);
676 
677  }
678  } else {
679  edm::LogWarning("EBSelectiveReadoutTask") << "EcalTrigPrimDigiCollection not available";
680  }
681 
682  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
683  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
684 
685  if(nEvtAnyInterest[iptindex][ietindex]) {
686 
687  float xiet = (ietindex < 17) ? ietindex + 0.5 : (16-ietindex) + 0.5;
688  float xipt = iptindex + 0.5;
689 
690  float fraction = float(nEvtHighInterest[iptindex][ietindex]) / float(nEvtAnyInterest[iptindex][ietindex]);
691  float error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[iptindex][ietindex]));
692 
694 
695  int binet=0, binpt=0;
696 
697  if ( h2d ) {
698  binpt = h2d->GetXaxis()->FindBin(xipt);
699  binet = h2d->GetYaxis()->FindBin(xiet);
700  }
701 
702  EBHighInterestTriggerTowerFlagMap_->setBinContent(binpt, binet, fraction);
703  EBHighInterestTriggerTowerFlagMap_->setBinError(binpt, binet, error);
704 
705 
706  fraction = float(nEvtMediumInterest[iptindex][ietindex]) / float(nEvtAnyInterest[iptindex][ietindex]);
707  error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[iptindex][ietindex]));
708 
710 
711  if ( h2d ) {
712  binpt = h2d->GetXaxis()->FindBin(xipt);
713  binet = h2d->GetYaxis()->FindBin(xiet);
714  }
715 
716  EBMediumInterestTriggerTowerFlagMap_->setBinContent(binpt, binet, fraction);
718 
719 
720  fraction = float(nEvtLowInterest[iptindex][ietindex]) / float(nEvtAnyInterest[iptindex][ietindex]);
721  error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[iptindex][ietindex]));
722 
724 
725  if ( h2d ) {
726  binpt = h2d->GetXaxis()->FindBin(xipt);
727  binet = h2d->GetYaxis()->FindBin(xiet);
728  }
729 
730  EBLowInterestTriggerTowerFlagMap_->setBinContent(binpt, binet, fraction);
731  EBLowInterestTriggerTowerFlagMap_->setBinError(binpt, binet, error);
732 
733  }
734 
735  }
736  }
737 
738 
739 }
int nEvtLowInterest[72][34]
To store the events with low interest TT.
int nCryTower[72][34]
To store the readout crystals / tower.
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
static const int bytesPerCrystal
Number of bytes per crystal.
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * EBDccEventSizeMap_
key_type id() const
Definition: EBDataFrame.h:31
static const int SRF_ZS2
Definition: EcalSrFlag.h:21
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
const self & getMap() const
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcalTrigPrimDigiCollection_
MonitorElement * EBFullReadoutSRFlagCount_
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:29
int nEvtHighInterest[72][34]
To store the events with high interest TT.
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
int nEvtZSReadout[72][34]
To store the events with ZS1 or ZS2 readout.
int ieta() const
get the tower ieta
MonitorElement * EBFullReadoutSRFlagMap_
void Fill(long long x)
int nEvtAnyInterest[72][34]
To store the events with any interest.
edm::EDGetTokenT< EBDigiCollection > EBDigiCollection_
MonitorElement * EBLowInterestPayload_
int nEvtFullReadout[72][34]
To store the events with full readout.
int nEvtZS1Readout[72][34]
To store the events with ZS1 readout.
int nEvtDroppedReadoutIfFR[72][34]
To store the events with 0 channels readout when FR is requested.
uint16_t getStatusCode() const
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * EBCompleteZSCount_
MonitorElement * EBHighInterestPayload_
static const int SRF_FULL
Definition: EcalSrFlag.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
double getEbEventSize(double nReadXtals) const
int nEvtCompleteReadoutIfZS[72][34]
To store the events with complete readout when ZS is requested.
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
edm::EDGetTokenT< EBSrFlagCollection > EBSRFlagCollection_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
int nEvtRUForced[72][34]
To store the events with RU forced.
int nEvtMediumInterest[72][34]
To store the events with medium interest TT.
const T & get() const
Definition: EventSetup.h:55
std::vector< Item >::const_iterator const_iterator
T const * product() const
Definition: ESHandle.h:62
int nPerRu_[nECALDcc][nDccChs]
MonitorElement * EBLowInterestTriggerTowerFlagMap_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
MonitorElement * EBZeroSuppression1SRFlagMap_
const_iterator find(uint32_t rawId) const
MonitorElement * EBDroppedFRCount_
int nEvtAnyReadout[72][34]
To store the events with any readout.
const_iterator end() const
MonitorElement * EBReadoutUnitForcedBitMap_
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
tuple status
Definition: ntuplemaker.py:245
TH2F * getTH2F(void) const
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
tuple size
Write out results.
edm::EDGetTokenT< FEDRawDataCollection > FEDRawDataCollection_
void anaDigi(const EBDataFrame &frame, const EBSrFlagCollection &srFlagColl, uint16_t statusCode)
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:482
void EBSelectiveReadoutTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 99 of file EBSelectiveReadoutTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

99  {
100 
101  ievt_ = 0;
102 
103  if ( dqmStore_ ) {
104  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
105  dqmStore_->rmdir(prefixME_ + "/EBSelectiveReadoutTask");
106  }
107 
108 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2731
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
void EBSelectiveReadoutTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 110 of file EBSelectiveReadoutTask.cc.

References begin, configFirWeights(), EcalSRSettings::dccNormalizedWeights_, edm::EventSetup::get(), Numbers::initGeometry(), mergeRuns_, nEvtAnyInterest, nEvtAnyReadout, nEvtCompleteReadoutIfZS, nEvtDroppedReadoutIfFR, nEvtFullReadout, nEvtHighInterest, nEvtLowInterest, nEvtMediumInterest, nEvtRUForced, nEvtZS1Readout, nEvtZSReadout, edm::ESHandle< class >::product(), reset(), settings_, and useCondDb_.

110  {
111 
112  Numbers::initGeometry(c, false);
113 
114  if ( ! mergeRuns_ ) this->reset();
115 
116  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
117  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
118  nEvtFullReadout[iptindex][ietindex] = 0;
119  nEvtZS1Readout[iptindex][ietindex] = 0;
120  nEvtZSReadout[iptindex][ietindex] = 0;
121  nEvtCompleteReadoutIfZS[iptindex][ietindex] = 0;
122  nEvtDroppedReadoutIfFR[iptindex][ietindex] = 0;
123  nEvtRUForced[iptindex][ietindex] = 0;
124  nEvtAnyReadout[iptindex][ietindex] = 0;
125  nEvtHighInterest[iptindex][ietindex] = 0;
126  nEvtMediumInterest[iptindex][ietindex] = 0;
127  nEvtLowInterest[iptindex][ietindex] = 0;
128  nEvtAnyInterest[iptindex][ietindex] = 0;
129  }
130  }
131 
132  //getting selective readout configuration
133  if(useCondDb_) {
135  c.get<EcalSRSettingsRcd>().get(hSr);
136  settings_ = hSr.product();
137  std::vector<double> wsFromDB;
138 
139  std::vector<std::vector<float> > dccs = settings_->dccNormalizedWeights_;
140  int nws = dccs.size();
141  if(nws == 1) {
142  for(std::vector<float>::const_iterator it = dccs[0].begin(); it != dccs[0].end(); it++) {
143  wsFromDB.push_back(*it);
144  }
145  }
146  else edm::LogWarning("EBSelectiveReadoutTask") << "DCC weight set is not exactly 1.";
147 
148  configFirWeights(wsFromDB);
149  }
150 
151 }
int nEvtLowInterest[72][34]
To store the events with low interest TT.
int nEvtHighInterest[72][34]
To store the events with high interest TT.
std::vector< std::vector< float > > dccNormalizedWeights_
void configFirWeights(const std::vector< double > &weightsForZsFIR)
int nEvtZSReadout[72][34]
To store the events with ZS1 or ZS2 readout.
int nEvtAnyInterest[72][34]
To store the events with any interest.
int nEvtFullReadout[72][34]
To store the events with full readout.
int nEvtZS1Readout[72][34]
To store the events with ZS1 readout.
int nEvtDroppedReadoutIfFR[72][34]
To store the events with 0 channels readout when FR is requested.
const EcalSRSettings * settings_
int nEvtCompleteReadoutIfZS[72][34]
To store the events with complete readout when ZS is requested.
int nEvtRUForced[72][34]
To store the events with RU forced.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:47
int nEvtMediumInterest[72][34]
To store the events with medium interest TT.
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
#define begin
Definition: vmac.h:30
int nEvtAnyReadout[72][34]
To store the events with any readout.
int EBSelectiveReadoutTask::cIndex2iEta ( int  i) const
inlineprivate

converse of iEta2cIndex() method.

Definition at line 188 of file EBSelectiveReadoutTask.h.

188  {
189  return (i<85)?i-85:i-84;
190 }
int i
Definition: DBlmapReader.cc:9
int EBSelectiveReadoutTask::cIndex2iPhi ( int  i) const
inlineprivate

converse of iPhi2cIndex() method.

Definition at line 194 of file EBSelectiveReadoutTask.h.

194  {
195  return i+1;
196 }
int i
Definition: DBlmapReader.cc:9
int EBSelectiveReadoutTask::cIndex2iXY ( int  iX0) const
inlineprivate

converse of iXY2cIndex() method.

Definition at line 182 of file EBSelectiveReadoutTask.h.

182  {
183  return iX0+1;
184 }
void EBSelectiveReadoutTask::cleanup ( void  )
protected

Cleanup.

Definition at line 325 of file EBSelectiveReadoutTask.cc.

References dqmStore_, EBCompleteZSCount_, EBCompleteZSMap_, EBDccEventSize_, EBDccEventSizeMap_, EBDroppedFRCount_, EBDroppedFRMap_, EBEventSize_, EBFullReadoutSRFlagCount_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBHighInterestZsFIR_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBLowInterestZsFIR_, EBMediumInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBTowerSize_, EBTTFlags_, EBTTFMismatch_, MonitorElement::getName(), init_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

325  {
326 
327  if ( ! init_ ) return;
328 
329  if ( dqmStore_ ) {
330 
331  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
332 
334  EBTowerSize_ = 0;
335 
337  EBTTFMismatch_ = 0;
338 
340  EBDccEventSize_ = 0;
341 
343  EBDccEventSizeMap_ = 0;
344 
347 
350 
353 
356 
359 
362 
365 
367  EBTTFlags_ = 0;
368 
370  EBCompleteZSMap_ = 0;
371 
373  EBCompleteZSCount_ = 0;
374 
376  EBDroppedFRMap_ = 0;
377 
379  EBDroppedFRCount_ = 0;
380 
382  EBEventSize_ = 0;
383 
386 
389 
392 
395 
396  }
397 
398  init_ = false;
399 
400 }
const std::string & getName(void) const
get name of ME
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
MonitorElement * EBDccEventSizeMap_
MonitorElement * EBLowInterestZsFIR_
MonitorElement * EBFullReadoutSRFlagCount_
MonitorElement * EBFullReadoutSRFlagMap_
MonitorElement * EBLowInterestPayload_
MonitorElement * EBCompleteZSCount_
void removeElement(const std::string &name)
Definition: DQMStore.cc:2773
MonitorElement * EBHighInterestPayload_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
void EBSelectiveReadoutTask::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 941 of file EBSelectiveReadoutTask.cc.

References edm::hlt::Exception, firstFIRSample_, firWeights_, getFIRWeights(), i, create_public_lumi_plots::log, indexGen::s2, and mathSSE::sqrt().

Referenced by beginRun(), and EBSelectiveReadoutTask().

941  {
942  bool notNormalized = false;
943  bool notInt = false;
944  for(unsigned i=0; i < weightsForZsFIR.size(); ++i){
945  if(weightsForZsFIR[i] > 1.) notNormalized = true;
946  if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true;
947  }
948  if(notInt && notNormalized){
949  throw cms::Exception("InvalidParameter")
950  << "weigtsForZsFIR paramater values are not valid: they "
951  << "must either be integer and uses the hardware representation "
952  << "of the weights or less or equal than 1 and used the normalized "
953  << "representation.";
954  }
955  edm::LogInfo log("DccFir");
956  if(notNormalized){
957  firWeights_ = std::vector<int>(weightsForZsFIR.size());
958  for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){
959  firWeights_[i] = (int)weightsForZsFIR[i];
960  }
961  } else{
962  firWeights_ = getFIRWeights(weightsForZsFIR);
963  }
964 
965  log << "Input weights for FIR: ";
966  for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){
967  log << weightsForZsFIR[i] << "\t";
968  }
969 
970  double s2 = 0.;
971  log << "\nActual FIR weights: ";
972  for(unsigned i = 0; i < firWeights_.size(); ++i){
973  log << firWeights_[i] << "\t";
974  s2 += firWeights_[i]*firWeights_[i];
975  }
976 
977  s2 = sqrt(s2);
978  log << "\nNormalized FIR weights after hw representation rounding: ";
979  for(unsigned i = 0; i < firWeights_.size(); ++i){
980  log << firWeights_[i] / (double)(1<<10) << "\t";
981  }
982 
983  log <<"\nFirst FIR sample: " << firstFIRSample_;
984 }
int i
Definition: DBlmapReader.cc:9
static std::vector< int > getFIRWeights(const std::vector< double > &normalizedWeights)
tuple s2
Definition: indexGen.py:106
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< int > firWeights_
int EBSelectiveReadoutTask::dccIndex ( int  i,
int  j 
) const
private

Gets the index of the DCC reading a crystal

Parameters
iiEta
jiPhi
Returns
DCC index between 0 and 17

Definition at line 866 of file EBSelectiveReadoutTask.cc.

Referenced by dccNum().

866  {
867  //a SM is 85 crystal long:
868  int iEtaSM = i/85;
869  //a SM is 20 crystal wide:
870  int iPhiSM = j/20;
871  //DCC numbers start at 9 in the barrel and there 18 DCC/SM
872  return 9+18*iEtaSM+iPhiSM;
873 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
unsigned EBSelectiveReadoutTask::dccNum ( const DetId xtalId) const
private

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

Parameters
xtarIdcrystal channel identifier
Returns
the DCC logical number starting from 1.

Definition at line 828 of file EBSelectiveReadoutTask.cc.

References dccIndex(), DetId::det(), DetId::Ecal, EcalBarrel, edm::hlt::Exception, EBDetId::ieta(), iEta2cIndex(), EBDetId::iphi(), iPhi2cIndex(), j, gen::k, nECALDcc, and DetId::subdetId().

Referenced by anaDigi().

828  {
829  int j;
830  int k;
831 
832  if ( xtalId.det()!=DetId::Ecal ) {
833  throw cms::Exception("EBSelectiveReadoutTask") << "Crystal does not belong to ECAL";
834  }
835 
836  if(xtalId.subdetId()==EcalBarrel){
837  EBDetId ebDetId(xtalId);
838  j = iEta2cIndex(ebDetId.ieta());
839  k = iPhi2cIndex(ebDetId.iphi());
840  } else {
841  throw cms::Exception("EBSelectiveReadoutTask") << "Not ECAL barrel.";
842  }
843  int iDcc0 = dccIndex(j,k);
844  assert(iDcc0>=0 && iDcc0<nECALDcc);
845  return iDcc0+1;
846 }
int iPhi2cIndex(int iPhi) const
int j
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int k[5][pyjets_maxn]
int dccIndex(int i, int j) const
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int iEta2cIndex(int iEta) const
int EBSelectiveReadoutTask::dccPhiIndex ( int  i,
int  j 
) const
inlineprivate

Gets the phi index of the DCC reading a crystal

Parameters
iiEta
jiPhi
Returns
DCC phi index between 0 and 17 for EB

Definition at line 239 of file EBSelectiveReadoutTask.h.

References dccPhiIndexOfRU().

239  {
240  return dccPhiIndexOfRU(i/5, j/5);
241 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int dccPhiIndexOfRU(int i, int j) const
int EBSelectiveReadoutTask::dccPhiIndexOfRU ( int  i,
int  j 
) const
private

Gets the phi index of the DCC reading a RU (SC or TT)

Parameters
iiEta
jiPhi
Returns
DCC phi index between 0 and 17 for EB

Definition at line 860 of file EBSelectiveReadoutTask.cc.

Referenced by dccPhiIndex().

860  {
861  //iEta=i, iPhi=j
862  //phi edge of a SM is 4 TT
863  return j/4;
864 }
int j
Definition: DBlmapReader.cc:9
int EBSelectiveReadoutTask::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 878 of file EBSelectiveReadoutTask.cc.

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

Referenced by anaDigi().

881  {
882  const int nFIRTaps = 6;
883  //FIR filter weights:
884  const std::vector<int>& w = firWeights;
885 
886  //accumulator used to compute weighted sum of samples
887  int acc = 0;
888  bool gain12saturated = false;
889  const int gain12 = 0x01;
890 
891  int iWeight = 0;
892  for(int i = -1; i < nFIRTaps - 1; ++i, ++iWeight){
893  int iSample(i + firstFIRSample);
894  if(iSample>=0 && iSample < frame.size()){
895  EcalMGPASample sample(frame[iSample]);
896  if(sample.gainId()!=gain12) gain12saturated = true;
897  LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc()
898  << "*(" << w[iWeight] << ")";
899  acc+=sample.adc()*w[iWeight];
900  } else{
901  edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__ <<
902  ": Not enough samples in data frame or 'ecalDccZs1stSample' module "
903  "parameter is not valid...";
904  }
905  }
906  LogTrace("DccFir") << "\n";
907  //discards the 8 LSBs
908  //(shift operator cannot be used on negative numbers because
909  // the result depends on compilator implementation)
910  acc = (acc>=0)?(acc >> 8):-(-acc >> 8);
911  //ZS passed if weighted sum acc above ZS threshold or if
912  //one sample has a lower gain than gain 12 (that is gain 12 output
913  //is saturated)
914 
915  LogTrace("DccFir") << "acc: " << acc << "\n"
916  << "saturated: " << (gain12saturated?"yes":"no") << "\n";
917 
918  if(saturated){
919  *saturated = gain12saturated;
920  }
921 
922  return gain12saturated?std::numeric_limits<int>::max():acc;
923 }
int i
Definition: DBlmapReader.cc:9
int size() const
Definition: EcalDataFrame.h:26
const T & max(const T &a, const T &b)
#define LogTrace(id)
T w() const
void EBSelectiveReadoutTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 402 of file EBSelectiveReadoutTask.cc.

References cleanup(), enableCleanup_, and ievt_.

402  {
403 
404  edm::LogInfo("EBSelectiveReadoutTask") << "analyzed " << ievt_ << " events";
405 
406  if ( enableCleanup_ ) this->cleanup();
407 
408 }
void EBSelectiveReadoutTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 153 of file EBSelectiveReadoutTask.cc.

153  {
154 
155 }
int EBSelectiveReadoutTask::getCrystalCount ( )
inlineprivate

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 285 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

285 { return 25; }
double EBSelectiveReadoutTask::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 217 of file EBSelectiveReadoutTask.h.

References bytesPerCrystal, EB, EE, getDccOverhead(), and nRuPerDcc_.

217  {
218  subdet_t subdet;
219  if(iDcc0<9 || iDcc0>=45){
220  subdet = EE;
221  } else{
222  subdet = EB;
223  }
224  return getDccOverhead(subdet)+nReadXtals*bytesPerCrystal+nRuPerDcc_[iDcc0]*8;
225 }
static const int bytesPerCrystal
Number of bytes per crystal.
double getDccOverhead(subdet_t subdet) const
subdet_t
distinguishes barral and endcap of ECAL.
double EBSelectiveReadoutTask::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 207 of file EBSelectiveReadoutTask.h.

References EB.

Referenced by getDccEventSize(), and getEbEventSize().

207  {
208  // return (subdet==EB?34:25)*8;
209  return (subdet==EB?34:52)*8;
210 }
double EBSelectiveReadoutTask::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 848 of file EBSelectiveReadoutTask.cc.

References bytesPerCrystal, EB, getDccOverhead(), nEBDcc, and nRuPerDcc_.

Referenced by analyze().

848  {
849  double ruHeaderPayload = 0.;
850  const int nEEDcc = 18;
851  const int firstEbDcc0 = nEEDcc/2;
852  for (int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEBDcc; ++iDcc0 ) {
853  ruHeaderPayload += nRuPerDcc_[iDcc0]*8.;
854  }
855  return getDccOverhead(EB)*nEBDcc +
856  nReadXtals*bytesPerCrystal +
857  ruHeaderPayload;
858 }
static const int bytesPerCrystal
Number of bytes per crystal.
double getDccOverhead(subdet_t subdet) const
std::vector< int > EBSelectiveReadoutTask::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 926 of file EBSelectiveReadoutTask.cc.

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

Referenced by configFirWeights().

927  {
928  const int nFIRTaps = 6;
929  std::vector<int> firWeights(nFIRTaps, 0); //default weight: 0;
930  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
931  for(unsigned i=0; i < std::min((size_t)nFIRTaps,normalizedWeights.size()); ++i){
932  firWeights[i] = lround(normalizedWeights[i] * (1<<10));
933  if(std::abs(firWeights[i])>maxWeight){//overflow
934  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
935  }
936  }
937  return firWeights;
938 }
int i
Definition: DBlmapReader.cc:9
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int EBSelectiveReadoutTask::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 155 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

155  {
156  return (iEta<0)?iEta+85:iEta+84;
157 }
int EBSelectiveReadoutTask::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 162 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

162  {
163  return iPhi-1;
164 }
int EBSelectiveReadoutTask::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 176 of file EBSelectiveReadoutTask.h.

176  {
177  return iX-1;
178 }
EcalTrigTowerDetId EBSelectiveReadoutTask::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 824 of file EBSelectiveReadoutTask.cc.

References EBDetId::tower().

Referenced by anaDigi().

824  {
825  return xtalId.tower();
826 }
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:59
void EBSelectiveReadoutTask::reset ( void  )
protected

Reset.

Definition at line 157 of file EBSelectiveReadoutTask.cc.

References EBCompleteZSCount_, EBCompleteZSMap_, EBDccEventSize_, EBDccEventSizeMap_, EBDroppedFRCount_, EBDroppedFRMap_, EBEventSize_, EBFullReadoutSRFlagCount_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBHighInterestZsFIR_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBLowInterestZsFIR_, EBMediumInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBTowerSize_, EBTTFlags_, EBTTFMismatch_, EBZeroSuppression1SRFlagMap_, and MonitorElement::Reset().

Referenced by beginRun().

157  {
158 
159  if ( EBTowerSize_ ) EBTowerSize_->Reset();
160 
162 
164 
166 
168 
170 
172 
174 
176 
178 
180 
181  if ( EBTTFlags_ ) EBTTFlags_->Reset();
182 
184 
186 
188 
190 
191  if ( EBEventSize_ ) EBEventSize_->Reset();
192 
194 
196 
198 
200 
201 }
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
MonitorElement * EBDccEventSizeMap_
MonitorElement * EBLowInterestZsFIR_
MonitorElement * EBFullReadoutSRFlagCount_
MonitorElement * EBFullReadoutSRFlagMap_
MonitorElement * EBLowInterestPayload_
MonitorElement * EBCompleteZSCount_
MonitorElement * EBHighInterestPayload_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBZeroSuppression1SRFlagMap_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBSelectiveReadoutTask::setup ( void  )
protected

Setup.

Definition at line 203 of file EBSelectiveReadoutTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, EBCompleteZSCount_, EBCompleteZSMap_, EBDccEventSize_, EBDccEventSizeMap_, EBDroppedFRCount_, EBDroppedFRMap_, EBEventSize_, EBFullReadoutSRFlagCount_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBHighInterestZsFIR_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBLowInterestZsFIR_, EBMediumInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBTowerSize_, EBTTFlags_, EBTTFMismatch_, EBZeroSuppression1SRFlagMap_, i, init_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, xbins, and ybins.

Referenced by analyze().

203  {
204 
205  init_ = true;
206 
208 
209  if ( dqmStore_ ) {
210 
211  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
212 
213  name = "EBSRT tower event size";
214  EBTowerSize_ = dqmStore_->bookProfile2D(name, name, 72, 0, 72, 34, -17, 17, 100, 0, 200, "s");
215  EBTowerSize_->setAxisTitle("jphi", 1);
216  EBTowerSize_->setAxisTitle("jeta", 2);
217 
218  name = "EBSRT TT flag mismatch";
219  EBTTFMismatch_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
220  EBTTFMismatch_->setAxisTitle("jphi", 1);
221  EBTTFMismatch_->setAxisTitle("jeta", 2);
222 
223  name = "EBSRT DCC event size";
224  EBDccEventSize_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 200., "s");
225  EBDccEventSize_->setAxisTitle("event size (kB)", 2);
226  for (int i = 0; i < 36; i++) {
228  }
229 
230  name = "EBSRT event size vs DCC";
231  EBDccEventSizeMap_ = dqmStore_->book2D(name, name, 36, xbins, 88, ybins);
232  EBDccEventSizeMap_->setAxisTitle("event size (kB)", 2);
233  for (int i = 0; i < 36; i++) {
235  }
236 
237  name = "EBSRT readout unit with SR forced";
238  EBReadoutUnitForcedBitMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
242 
243  name = "EBSRT full readout SR Flags";
244  EBFullReadoutSRFlagMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
248 
249  name = "EBSRT full readout SR Flags Number";
250  EBFullReadoutSRFlagCount_ = dqmStore_->book1D(name, name, 200, 0., 200.);
251  EBFullReadoutSRFlagCount_->setAxisTitle("Readout Units number", 1);
252 
253  name = "EBSRT zero suppression 1 SR Flags";
254  EBZeroSuppression1SRFlagMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
258 
259  name = "EBSRT high interest TT Flags";
260  EBHighInterestTriggerTowerFlagMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
264 
265  name = "EBSRT medium interest TT Flags";
266  EBMediumInterestTriggerTowerFlagMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
270 
271  name = "EBSRT low interest TT Flags";
272  EBLowInterestTriggerTowerFlagMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
276 
277  name = "EBSRT TT Flags";
278  EBTTFlags_ = dqmStore_->book1D(name, name, 8, 0., 8.);
279  EBTTFlags_->setAxisTitle("TT Flag value", 1);
280 
281  name = "EBSRT ZS Flagged Fully Readout";
282  EBCompleteZSMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
283  EBCompleteZSMap_->setAxisTitle("jphi", 1);
284  EBCompleteZSMap_->setAxisTitle("jeta", 2);
285  EBCompleteZSMap_->setAxisTitle("rate", 3);
286 
287  name = "EBSRT ZS Flagged Fully Readout Number";
288  EBCompleteZSCount_ = dqmStore_->book1D(name, name, 20, 0., 20.);
289  EBCompleteZSCount_->setAxisTitle("Readout Units number", 1);
290 
291  name = "EBSRT FR Flagged Dropped Readout";
292  EBDroppedFRMap_ = dqmStore_->book2D(name, name, 72, 0, 72, 34, -17, 17);
293  EBDroppedFRMap_->setAxisTitle("jphi", 1);
294  EBDroppedFRMap_->setAxisTitle("jeta", 2);
295  EBDroppedFRMap_->setAxisTitle("rate", 3);
296 
297  name = "EBSRT FR Flagged Dropped Readout Number";
298  EBDroppedFRCount_ = dqmStore_->book1D(name, name, 20, 0., 20.);
299  EBDroppedFRCount_->setAxisTitle("Readout Units number", 1);
300 
301  name = "EBSRT event size";
302  EBEventSize_ = dqmStore_->book1D(name, name, 100, 0, 200);
303  EBEventSize_->setAxisTitle("event size (kB)",1);
304 
305  name = "EBSRT high interest payload";
306  EBHighInterestPayload_ = dqmStore_->book1D(name, name, 100, 0, 200);
307  EBHighInterestPayload_->setAxisTitle("event size (kB)",1);
308 
309  name = "EBSRT low interest payload";
310  EBLowInterestPayload_ = dqmStore_->book1D(name, name, 100, 0, 200);
311  EBLowInterestPayload_->setAxisTitle("event size (kB)",1);
312 
313  name = "EBSRT high interest ZS filter output";
314  EBHighInterestZsFIR_ = dqmStore_->book1D(name, name, 60, -30, 30);
315  EBHighInterestZsFIR_->setAxisTitle("ADC counts*4",1);
316 
317  name = "EBSRT low interest ZS filter output";
318  EBLowInterestZsFIR_ = dqmStore_->book1D(name, name, 60, -30, 30);
319  EBLowInterestZsFIR_->setAxisTitle("ADC counts*4",1);
320 
321  }
322 
323 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
MonitorElement * EBDccEventSizeMap_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873
MonitorElement * EBLowInterestZsFIR_
MonitorElement * EBFullReadoutSRFlagCount_
static std::string sEB(const unsigned ism)
Definition: Numbers.cc:91
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * EBFullReadoutSRFlagMap_
MonitorElement * EBLowInterestPayload_
MonitorElement * EBCompleteZSCount_
MonitorElement * EBHighInterestPayload_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1187
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBZeroSuppression1SRFlagMap_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1001
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1331

Member Data Documentation

const int EBSelectiveReadoutTask::bytesPerCrystal = 24
staticprotected

Number of bytes per crystal.

Definition at line 93 of file EBSelectiveReadoutTask.h.

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

DQMStore* EBSelectiveReadoutTask::dqmStore_
private

Definition at line 327 of file EBSelectiveReadoutTask.h.

Referenced by beginJob(), cleanup(), EBSelectiveReadoutTask(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSCount_
private

Definition at line 357 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSMap_
private

Definition at line 356 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBDccEventSize_
private

Definition at line 344 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBDccEventSizeMap_
private

Definition at line 345 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

edm::EDGetTokenT<EBDigiCollection> EBSelectiveReadoutTask::EBDigiCollection_
private

Definition at line 335 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRCount_
private

Definition at line 359 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRMap_
private

Definition at line 358 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBEventSize_
private

Definition at line 360 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagCount_
private

Definition at line 350 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagMap_
private

Definition at line 349 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBHighInterestPayload_
private

Definition at line 361 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBHighInterestTriggerTowerFlagMap_
private

Definition at line 352 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBHighInterestZsFIR_
private

Definition at line 363 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBLowInterestPayload_
private

Definition at line 362 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBLowInterestTriggerTowerFlagMap_
private

Definition at line 354 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBLowInterestZsFIR_
private

Definition at line 364 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBMediumInterestTriggerTowerFlagMap_
private

Definition at line 353 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBReadoutUnitForcedBitMap_
private

Definition at line 348 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

bool EBSelectiveReadoutTask::ebRuActive_[nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
private

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

Definition at line 314 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and anaDigiInit().

edm::EDGetTokenT<EBSrFlagCollection> EBSelectiveReadoutTask::EBSRFlagCollection_
private

Definition at line 337 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBTowerSize_
private

Definition at line 346 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

const int EBSelectiveReadoutTask::ebTtEdge = 5
staticprotected

Number of crystals along an EB TT.

Definition at line 81 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi().

MonitorElement* EBSelectiveReadoutTask::EBTTFlags_
private

Definition at line 355 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBTTFMismatch_
private

Definition at line 347 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().

MonitorElement* EBSelectiveReadoutTask::EBZeroSuppression1SRFlagMap_
private

Definition at line 351 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), EBSelectiveReadoutTask(), reset(), and setup().

edm::EDGetTokenT<EcalRecHitCollection> EBSelectiveReadoutTask::EcalRecHitCollection_
private

Definition at line 336 of file EBSelectiveReadoutTask.h.

edm::EDGetTokenT<EcalTrigPrimDigiCollection> EBSelectiveReadoutTask::EcalTrigPrimDigiCollection_
private

Definition at line 338 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

bool EBSelectiveReadoutTask::enableCleanup_
private

Definition at line 331 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and endJob().

edm::EDGetTokenT<FEDRawDataCollection> EBSelectiveReadoutTask::FEDRawDataCollection_
private

Definition at line 339 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

int EBSelectiveReadoutTask::firstFIRSample_
private

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

Definition at line 323 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), configFirWeights(), and EBSelectiveReadoutTask().

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

Weights to be used for the ZS FIR filter

Definition at line 318 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and configFirWeights().

int EBSelectiveReadoutTask::ievt_
private

Definition at line 325 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EBSelectiveReadoutTask::init_
private

Definition at line 366 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), and setup().

const int EBSelectiveReadoutTask::kByte = 1024
staticprotected

Definition at line 66 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

bool EBSelectiveReadoutTask::mergeRuns_
private

Definition at line 333 of file EBSelectiveReadoutTask.h.

Referenced by beginRun(), and EBSelectiveReadoutTask().

int EBSelectiveReadoutTask::nCryTower[72][34]
protected

To store the readout crystals / tower.

Definition at line 96 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nDccChs = 68
staticprotected

maximum number of RUs read by a DCC

Definition at line 69 of file EBSelectiveReadoutTask.h.

Referenced by anaDigiInit().

int EBSelectiveReadoutTask::nEb_
private

ECAL barrel read channel count

Definition at line 290 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nEBDcc = 36
staticprotected

Definition at line 65 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and getEbEventSize().

const int EBSelectiveReadoutTask::nEbEta = 170
staticprotected

number of crystals along Eta in EB

Definition at line 75 of file EBSelectiveReadoutTask.h.

int EBSelectiveReadoutTask::nEbHI_
private

ECAL barrel high interest read channel count

Definition at line 298 of file EBSelectiveReadoutTask.h.

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

int EBSelectiveReadoutTask::nEbLI_
private

ECAL barrel low interest read channel count

Definition at line 294 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nEbPhi = 360
staticprotected

number of crystals along Phi in EB

Definition at line 78 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nEbRus = 36*68
staticprotected

number of RUs for EB

Definition at line 72 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nECALDcc = 54
staticprotected

Definition at line 64 of file EBSelectiveReadoutTask.h.

Referenced by anaDigiInit(), and dccNum().

int EBSelectiveReadoutTask::nEvtAnyInterest[72][34]
protected

To store the events with any interest.

Definition at line 129 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtAnyReadout[72][34]
protected

To store the events with any readout.

Definition at line 105 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtCompleteReadoutIfZS[72][34]
protected

To store the events with complete readout when ZS is requested.

Definition at line 114 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtDroppedReadoutIfFR[72][34]
protected

To store the events with 0 channels readout when FR is requested.

Definition at line 117 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtFullReadout[72][34]
protected

To store the events with full readout.

Definition at line 99 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtHighInterest[72][34]
protected

To store the events with high interest TT.

Definition at line 120 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtLowInterest[72][34]
protected

To store the events with low interest TT.

Definition at line 126 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtMediumInterest[72][34]
protected

To store the events with medium interest TT.

Definition at line 123 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtRUForced[72][34]
protected

To store the events with RU forced.

Definition at line 102 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtZS1Readout[72][34]
protected

To store the events with ZS1 readout.

Definition at line 108 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nEvtZSReadout[72][34]
protected

To store the events with ZS1 or ZS2 readout.

Definition at line 111 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nPerDcc_[nECALDcc]
private

ECAL read channel count for each DCC:

Definition at line 302 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and anaDigiInit().

int EBSelectiveReadoutTask::nPerRu_[nECALDcc][nDccChs]
private

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

Definition at line 306 of file EBSelectiveReadoutTask.h.

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

int EBSelectiveReadoutTask::nRuPerDcc_[nECALDcc]
private

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

Definition at line 310 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), anaDigiInit(), getDccEventSize(), and getEbEventSize().

const int EBSelectiveReadoutTask::nTTEta = 34
staticprotected

Constants.

Definition at line 62 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtEta = 56
staticprotected

Number of Trigger Towers along Eta.

Definition at line 87 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTTPhi = 72
staticprotected

Definition at line 63 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtPhi = 72
staticprotected

Number of Trigger Towers along Phi.

Definition at line 90 of file EBSelectiveReadoutTask.h.

std::string EBSelectiveReadoutTask::prefixME_
private

Definition at line 329 of file EBSelectiveReadoutTask.h.

Referenced by beginJob(), cleanup(), EBSelectiveReadoutTask(), and setup().

const int EBSelectiveReadoutTask::scEdge = 5
staticprotected

Number of crystals along a supercrystal edge.

Definition at line 84 of file EBSelectiveReadoutTask.h.

const EcalSRSettings* EBSelectiveReadoutTask::settings_
private

Definition at line 369 of file EBSelectiveReadoutTask.h.

Referenced by beginRun().

bool EBSelectiveReadoutTask::useCondDb_
private

Definition at line 368 of file EBSelectiveReadoutTask.h.

Referenced by beginRun(), and EBSelectiveReadoutTask().

float EBSelectiveReadoutTask::xbins[37]
private

Definition at line 341 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().

float EBSelectiveReadoutTask::ybins[89]
private

Definition at line 342 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().