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
EESelectiveReadoutTask Class Reference

#include <EESelectiveReadoutTask.h>

Inheritance diagram for EESelectiveReadoutTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EESelectiveReadoutTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EESelectiveReadoutTask ()
 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 nCrySC [20][20][2]
 To store the readout crystals / SC. More...
 
int nCryTT [108][41]
 
int nEvtAnyInterest [100][100][2]
 To store the events with any interest. More...
 
int nEvtAnyReadout [20][20][2]
 To store the events with any readout. More...
 
int nEvtCompleteReadoutIfZS [20][20][2]
 To store the events with complete readout when ZS is requested. More...
 
int nEvtDroppedReadoutIfFR [20][20][2]
 To store the events with 0 channels readout when FR is requested. More...
 
int nEvtFullReadout [20][20][2]
 To store the events with full readout. More...
 
int nEvtHighInterest [100][100][2]
 To store the events with high interest TT. More...
 
int nEvtLowInterest [100][100][2]
 To store the events with low interest TT. More...
 
int nEvtMediumInterest [100][100][2]
 To store the events with medium interest TT. More...
 
int nEvtRUForced [20][20][2]
 To store the events with RU forced. More...
 
int nEvtZS1Readout [20][20][2]
 To store the events with ZS1 readout. More...
 
int nEvtZSReadout [20][20][2]
 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 kByte = 1024
 
static const int nDccChs = 68
 maximum number of RUs read by a DCC More...
 
static const int nEBDcc = 36
 
static const int nECALDcc = 54
 Constants. More...
 
static const int nEEDcc = 18
 
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 nTtEta = 56
 Number of Trigger Towers along Eta. More...
 
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 EEDataFrame &frame, const EESrFlagCollection &srFlagColl, uint16_t statusCode)
 
void anaDigiInit ()
 
int cIndex2iXY (int iX0) const
 
void configFirWeights (const std::vector< double > &weightsForZsFIR)
 
int dccIndex (int iDet, int i, int j) const
 
unsigned dccNum (const DetId &xtalId) const
 
unsigned dccNumOfRU (const EcalScDetId &scId) const
 
int dccPhiIndex (int i, int j) const
 
int dccPhiIndexOfRU (int i, int j) const
 
int getCrystalCount (int iDcc, int iDccCh)
 
double getDccEventSize (int iDcc0, double nReadXtals) const
 
double getDccOverhead (subdet_t subdet) const
 
double getEeEventSize (double nReadXtals) const
 
int iXY2cIndex (int iX) const
 
const EcalScDetId readOutUnitOf (const EEDetId &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_
 
edm::EDGetTokenT
< EcalRecHitCollection
EcalRecHitCollection_
 
edm::EDGetTokenT
< EcalTrigPrimDigiCollection
EcalTrigPrimDigiCollection_
 
MonitorElementEECompleteZSCount_ [2]
 
MonitorElementEECompleteZSMap_ [2]
 
MonitorElementEEDccEventSize_
 
MonitorElementEEDccEventSizeMap_
 
edm::EDGetTokenT
< EEDigiCollection
EEDigiCollection_
 
MonitorElementEEDroppedFRCount_ [2]
 
MonitorElementEEDroppedFRMap_ [2]
 
MonitorElementEEEventSize_ [2]
 
MonitorElementEEFullReadoutSRFlagCount_ [2]
 
MonitorElementEEFullReadoutSRFlagMap_ [2]
 
MonitorElementEEHighInterestPayload_ [2]
 
MonitorElementEEHighInterestTriggerTowerFlagMap_ [2]
 
MonitorElementEEHighInterestZsFIR_ [2]
 
MonitorElementEELowInterestPayload_ [2]
 
MonitorElementEELowInterestTriggerTowerFlagMap_ [2]
 
MonitorElementEELowInterestZsFIR_ [2]
 
MonitorElementEEMediumInterestTriggerTowerFlagMap_ [2]
 
MonitorElementEEReadoutUnitForcedBitMap_ [2]
 
bool eeRuActive_ [nEndcaps][nEeX/scEdge][nEeY/scEdge]
 
edm::EDGetTokenT
< EESrFlagCollection
EESRFlagCollection_
 
MonitorElementEETowerSize_ [2]
 
MonitorElementEETTFlags_ [2]
 
MonitorElementEETTFMismatch_ [2]
 
MonitorElementEEZeroSuppression1SRFlagMap_ [2]
 
bool enableCleanup_
 
edm::EDGetTokenT
< FEDRawDataCollection
FEDRawDataCollection_
 
int firstFIRSample_
 
std::vector< int > firWeights_
 
int ievt_
 
bool init_
 
bool mergeRuns_
 
int nEe_ [2]
 
int nEeHI_ [2]
 
int nEeLI_ [2]
 
int nPerDcc_ [nECALDcc]
 
int nPerRu_ [nECALDcc][nDccChs]
 
int nRuPerDcc_ [nECALDcc]
 
std::string prefixME_
 
const EcalSRSettingssettings_
 
bool useCondDb_
 
float xbins [19]
 
float ybins [133]
 

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 48 of file EESelectiveReadoutTask.h.

Member Enumeration Documentation

distinguishes barral and endcap of ECAL.

Enumerator
EB 
EE 

Definition at line 161 of file EESelectiveReadoutTask.h.

Constructor & Destructor Documentation

EESelectiveReadoutTask::EESelectiveReadoutTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 39 of file EESelectiveReadoutTask.cc.

References configFirWeights(), dqmStore_, EcalTrigPrimDigiCollection_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDigiCollection_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EESRFlagCollection_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, enableCleanup_, FEDRawDataCollection_, firstFIRSample_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, mergeRuns_, cppFunctionSkipper::operator, prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, useCondDb_, xbins, and ybins.

39  {
40 
41  init_ = false;
42 
44 
45  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
46 
47  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
48 
49  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
50 
51  // parameters...
52  EEDigiCollection_ = consumes<EEDigiCollection>(ps.getParameter<edm::InputTag>("EEDigiCollection"));
53  EESRFlagCollection_ = consumes<EESrFlagCollection>(ps.getParameter<edm::InputTag>("EESRFlagCollection"));
54  EcalTrigPrimDigiCollection_ = consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection"));
55  FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("FEDRawDataCollection"));
56 
57  firstFIRSample_ = ps.getParameter<int>("ecalDccZs1stSample");
58 
59  useCondDb_ = ps.getParameter<bool>("configFromCondDB");
60  if(!useCondDb_) configFirWeights(ps.getParameter<std::vector<double> >("dccWeights"));
61 
62  // histograms...
63  EEDccEventSize_ = 0;
65 
66  for(int i=0; i<2; i++) {
67  EETowerSize_[i] = 0;
68  EETTFMismatch_[i] = 0;
76  EETTFlags_[i] = 0;
77  EECompleteZSMap_[i] = 0;
78  EECompleteZSCount_[i] = 0;
79  EEDroppedFRMap_[i] = 0;
80  EEDroppedFRCount_[i] = 0;
81  EEEventSize_[i] = 0;
86  }
87 
88  // initialize variable binning for DCC size...
89  float ZSthreshold = 0.608; // kBytes of 1 TT fully readout
90  float zeroBinSize = ZSthreshold / 20.;
91  for(int i=0; i<20; i++) ybins[i] = i*zeroBinSize;
92  for(int i=20; i<133; i++) ybins[i] = ZSthreshold * (i-19);
93  for(int i=0; i<=18; i++) xbins[i] = i+1;
94 
95 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * EEFullReadoutSRFlagCount_[2]
MonitorElement * EEReadoutUnitForcedBitMap_[2]
MonitorElement * EELowInterestZsFIR_[2]
MonitorElement * EEDroppedFRCount_[2]
void configFirWeights(const std::vector< double > &weightsForZsFIR)
MonitorElement * EETowerSize_[2]
edm::EDGetTokenT< EESrFlagCollection > EESRFlagCollection_
MonitorElement * EEZeroSuppression1SRFlagMap_[2]
MonitorElement * EEHighInterestZsFIR_[2]
MonitorElement * EECompleteZSMap_[2]
MonitorElement * EETTFMismatch_[2]
MonitorElement * EEEventSize_[2]
MonitorElement * EEHighInterestPayload_[2]
MonitorElement * EEHighInterestTriggerTowerFlagMap_[2]
MonitorElement * EEDccEventSizeMap_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcalTrigPrimDigiCollection_
edm::EDGetTokenT< FEDRawDataCollection > FEDRawDataCollection_
MonitorElement * EETTFlags_[2]
MonitorElement * EECompleteZSCount_[2]
MonitorElement * EEDroppedFRMap_[2]
MonitorElement * EELowInterestPayload_[2]
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
MonitorElement * EELowInterestTriggerTowerFlagMap_[2]
MonitorElement * EEMediumInterestTriggerTowerFlagMap_[2]
MonitorElement * EEFullReadoutSRFlagMap_[2]
EESelectiveReadoutTask::~EESelectiveReadoutTask ( )
virtual

Destructor.

Definition at line 97 of file EESelectiveReadoutTask.cc.

97  {
98 
99 }

Member Function Documentation

void EESelectiveReadoutTask::anaDigi ( const EEDataFrame frame,
const EESrFlagCollection srFlagColl,
uint16_t  statusCode 
)
private

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

Definition at line 972 of file EESelectiveReadoutTask.cc.

References dccNum(), dccZsFIR(), EcalEndcap, EEHighInterestZsFIR_, EELowInterestZsFIR_, eeRuActive_, edm::SortedCollection< T, SORT >::end(), Reference_intrackfit_cff::endcap, MonitorElement::Fill(), edm::SortedCollection< T, SORT >::find(), firstFIRSample_, firWeights_, EEDataFrame::id(), Numbers::iSC(), ecalpyutils::ism(), Numbers::iSM(), Numbers::iTCC(), Numbers::iTT(), iXY2cIndex(), nCrySC, nCryTT, nEe_, nEeHI_, nEeLI_, nPerDcc_, nPerRu_, nRuPerDcc_, readOutUnitOf(), scEdge, and EcalSrFlag::SRF_FULL.

Referenced by analyze().

972  {
973 
974  EEDetId id = frame.id();
975  int ism = Numbers::iSM( id );
976 
977  bool endcap = (id.subdetId()==EcalEndcap);
978 
979  if(endcap) {
980  if ( ism >= 1 && ism <= 9 ) {
981  ++nEe_[0];
982  } else {
983  ++nEe_[1];
984  }
985 
986  int ix = id.ix();
987  int iy = id.iy();
988 
989  int iX0 = iXY2cIndex(ix);
990  int iY0 = iXY2cIndex(iy);
991  int iZ0 = id.zside()>0?1:0;
992 
993  if(!eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge]){
994  ++nRuPerDcc_[dccNum(id)];
995  eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge] = true;
996  }
997 
999 
1000  if(srf == srFlagColl.end()){
1001  return;
1002  }
1003 
1004  int ttix = srf->id().ix();
1005  int ttiy = srf->id().iy();
1006 
1007  int zside = srf->id().zside();
1008 
1009  int ttiz = ( zside < 0 ) ? 0 : 1;
1010 
1011  nCrySC[ttix-1][ttiy-1][ttiz]++;
1012 
1013  int itcc = Numbers::iTCC( ism, EcalEndcap, ix, iy );
1014  int itt = Numbers::iTT( ism, EcalEndcap, ix, iy );
1015  nCryTT[itcc-1][itt-1]++;
1016 
1017  bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
1019 
1020  int dccZsFIRval = dccZsFIR(frame, firWeights_, firstFIRSample_, 0);
1021 
1022  if ( ism >= 1 && ism <= 9 ) {
1023  if(highInterest) {
1024  ++nEeHI_[0];
1025  // if(statusCode != 9) EEHighInterestZsFIR_[0]->Fill( dccZsFIRval );
1026  EEHighInterestZsFIR_[0]->Fill( dccZsFIRval );
1027  } else{ //low interest
1028  ++nEeLI_[0];
1029  // if(statusCode != 9) EELowInterestZsFIR_[0]->Fill( dccZsFIRval );
1030  EELowInterestZsFIR_[0]->Fill( dccZsFIRval );
1031  }
1032  } else {
1033  if(highInterest) {
1034  ++nEeHI_[1];
1035  EEHighInterestZsFIR_[1]->Fill( dccZsFIRval );
1036  } else{ //low interest
1037  ++nEeLI_[1];
1038  EELowInterestZsFIR_[1]->Fill( dccZsFIRval );
1039  }
1040  }
1041  int isc = Numbers::iSC( ism, EcalEndcap, ix, iy );
1042  ++nPerDcc_[dccNum(id)-1];
1043  ++nPerRu_[dccNum(id)-1][isc];
1044  }
1045 
1046 }
MonitorElement * EELowInterestZsFIR_[2]
std::vector< EESrFlag >::const_iterator const_iterator
MonitorElement * EEHighInterestZsFIR_[2]
int nPerRu_[nECALDcc][nDccChs]
void Fill(long long x)
static unsigned iTCC(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:531
static unsigned iSC(const EcalScDetId &id)
Definition: Numbers.cc:434
static const int SRF_FULL
Definition: EcalSrFlag.h:24
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
key_type id() const
Definition: EEDataFrame.h:28
const_iterator end() const
unsigned dccNum(const DetId &xtalId) const
int nCrySC[20][20][2]
To store the readout crystals / SC.
std::vector< int > firWeights_
iterator find(key_type k)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
const EcalScDetId readOutUnitOf(const EEDetId &xtalId) const
static const int scEdge
Number of crystals along a supercrystal edge.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:482
void EESelectiveReadoutTask::anaDigiInit ( )
private

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

Definition at line 1048 of file EESelectiveReadoutTask.cc.

References eeRuActive_, nCrySC, nCryTT, nDccChs, nECALDcc, nEe_, nEeHI_, nEeLI_, nPerDcc_, nPerRu_, and nRuPerDcc_.

Referenced by analyze().

1048  {
1049  nEe_[0] = 0;
1050  nEeLI_[0] = 0;
1051  nEeHI_[0] = 0;
1052  nEe_[1] = 0;
1053  nEeLI_[1] = 0;
1054  nEeHI_[1] = 0;
1055  bzero(nPerDcc_, sizeof(nPerDcc_));
1056  bzero(nRuPerDcc_, sizeof(nRuPerDcc_));
1057  bzero(eeRuActive_, sizeof(eeRuActive_));
1058 
1059  for(int idcc=0; idcc<nECALDcc; idcc++) {
1060  for(int isc=0; isc<nDccChs; isc++) {
1061  nPerRu_[idcc][isc] = 0;
1062  }
1063  }
1064 
1065  for(int iz = 0; iz<2; iz++) {
1066  for(int ix = 0; ix < 20; ix++ ) {
1067  for(int iy = 0; iy < 20; iy++ ) {
1068  nCrySC[ix][iy][iz] = 0;
1069  }
1070  }
1071  }
1072 
1073  for (int itcc = 0; itcc < 108; itcc++) {
1074  for (int itt = 0; itt < 41; itt++) nCryTT[itcc][itt] = 0;
1075  }
1076 
1077 }
static const int nECALDcc
Constants.
static const int nDccChs
maximum number of RUs read by a DCC
int nPerRu_[nECALDcc][nDccChs]
bool eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
int nCrySC[20][20][2]
To store the readout crystals / SC.
void EESelectiveReadoutTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 582 of file EESelectiveReadoutTask.cc.

References anaDigi(), anaDigiInit(), bytesPerCrystal, Numbers::crystals(), dccNumOfRU(), EcalEndcap, EcalTrigPrimDigiCollection_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDigiCollection_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EESRFlagCollection_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, EcalCondObjectContainer< T >::end(), relativeConstraints::error, FEDRawDataCollection_, MonitorElement::Fill(), HcalObjRepresent::Fill(), EcalCondObjectContainer< T >::find(), edm::EventSetup::get(), edm::Event::getByToken(), getCrystalCount(), getEeEventSize(), EcalCondObjectContainer< T >::getMap(), EcalChannelStatusCode::getStatusCode(), MonitorElement::getTH2F(), i, EEDataFrame::id(), ievt_, init_, Numbers::iSC(), ecalpyutils::ism(), Numbers::iSM(), Numbers::iTCC(), Numbers::iTT(), EcalScDetId::ix(), EEDetId::ix(), kByte, nCrySC, nCryTT, nEe_, nEeHI_, nEeLI_, 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.

582  {
583 
584  if ( ! init_ ) this->setup();
585 
586  ievt_++;
587 
589  if ( e.getByToken(FEDRawDataCollection_, raw) ) {
590 
591  int EEFirstFED[2];
592  EEFirstFED[0] = 601; // EE-
593  EEFirstFED[1] = 646; // EE+
594  for(int zside=0; zside<2; zside++) {
595 
596  int firstFedOnSide=EEFirstFED[zside];
597 
598  for ( int iDcc = 0; iDcc < 9; ++iDcc ) {
599 
600  int ism = 0;
601  if ( zside == 0 ) ism = iDcc+1;
602  else ism = 10+iDcc;
603 
604  EEDccEventSize_->Fill( ism, ((double)raw->FEDData(firstFedOnSide+iDcc).size())/kByte );
605  EEDccEventSizeMap_->Fill( ism, ((double)raw->FEDData(firstFedOnSide+iDcc).size())/kByte );
606 
607  }
608  }
609 
610  } else {
611  edm::LogWarning("EESelectiveReadoutTask") << "FEDRawDataCollection not available";
612  }
613 
614  // Selective Readout Flags
615  int nFRO[2], nCompleteZS[2], nDroppedFRO[2];
616  nFRO[0] = nFRO[1] = 0;
617  nCompleteZS[0] = nCompleteZS[1] = 0;
618  nDroppedFRO[0] = nDroppedFRO[1] = 0;
620  if ( e.getByToken(EESRFlagCollection_,eeSrFlags) ) {
621 
622  // Data Volume
623  double aLowInterest[2];
624  double aHighInterest[2];
625  double aAnyInterest[2];
626 
627  aLowInterest[0]=0;
628  aHighInterest[0]=0;
629  aAnyInterest[0]=0;
630  aLowInterest[1]=0;
631  aHighInterest[1]=0;
632  aAnyInterest[1]=0;
633 
635  if ( e.getByToken(EEDigiCollection_ , eeDigis) ) {
636 
637  anaDigiInit();
638 
639  // channel status
640  edm::ESHandle<EcalChannelStatus> pChannelStatus;
641  c.get<EcalChannelStatusRcd>().get(pChannelStatus);
642  const EcalChannelStatus* chStatus = pChannelStatus.product();
643 
644  for (unsigned int digis=0; digis<eeDigis->size(); ++digis) {
645  EEDataFrame eedf = (*eeDigis)[digis];
646  EEDetId id = eedf.id();
648  chit = chStatus->getMap().find(id.rawId());
649  uint16_t statusCode = 0;
650  if( chit != chStatus->getMap().end() ) {
651  EcalChannelStatusCode ch_code = (*chit);
652  statusCode = ch_code.getStatusCode();
653  }
654  anaDigi(eedf, *eeSrFlags, statusCode);
655  }
656 
657  //low interest channels:
658  aLowInterest[0] = nEeLI_[0]*bytesPerCrystal/kByte;
659  EELowInterestPayload_[0]->Fill(aLowInterest[0]);
660  aLowInterest[1] = nEeLI_[1]*bytesPerCrystal/kByte;
661  EELowInterestPayload_[1]->Fill(aLowInterest[1]);
662 
663  //low interest channels:
664  aHighInterest[0] = nEeHI_[0]*bytesPerCrystal/kByte;
665  EEHighInterestPayload_[0]->Fill(aHighInterest[0]);
666  aHighInterest[1] = nEeHI_[1]*bytesPerCrystal/kByte;
667  EEHighInterestPayload_[1]->Fill(aHighInterest[1]);
668 
669  //any-interest channels:
670  aAnyInterest[0] = getEeEventSize(nEe_[0])/kByte;
671  EEEventSize_[0]->Fill(aAnyInterest[0]);
672  aAnyInterest[1] = getEeEventSize(nEe_[1])/kByte;
673  EEEventSize_[1]->Fill(aAnyInterest[1]);
674 
675  //event size by tower:
676  for(int ix = 0; ix < 20; ix++ ) {
677  for(int iy = 0; iy < 20; iy++ ) {
678  for(int iz = 0; iz < 2; iz++) {
679 
680  double towerSize = nCrySC[ix][iy][iz] * bytesPerCrystal;
681 
682  float xix = ix;
683  if ( iz == 0 ) xix = 19 - xix;
684  xix += 0.5;
685 
686  float xiy = iy+0.5;
687 
688  EETowerSize_[iz]->Fill(xix, xiy, towerSize);
689 
690  }
691  }
692  }
693 
694  } else {
695  edm::LogWarning("EESelectiveReadoutTask") << "EEDigiCollection not available";
696  }
697 
698  // initialize dcchs_ to mask disabled towers
699  std::map< int, std::vector<short> > towersStatus;
701 
702  if( e.getByToken(FEDRawDataCollection_, dcchs) ) {
703  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
704  if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue;
705  int ism = Numbers::iSM( *dcchItr, EcalEndcap );
706  towersStatus.insert(std::make_pair(ism, dcchItr->getFEStatus()));
707  }
708  }
709 
710  for ( EESrFlagCollection::const_iterator it = eeSrFlags->begin(); it != eeSrFlags->end(); ++it ) {
711 
712  EcalScDetId id = it->id();
713 
714  if ( Numbers::subDet( id ) != EcalEndcap ) continue;
715 
716  int ix = id.ix();
717  int iy = id.iy();
718  int iDcc = dccNumOfRU(id);
719  int ism = Numbers::iSM( id );
720  int isc = Numbers::iSC( id );
721 
722  int zside = id.zside();
723 
724  int iz = ( zside < 0 ) ? 0 : 1;
725 
726  if ( zside < 0 ) ix = 21 - ix;
727 
728  nEvtAnyReadout[ix-1][iy-1][iz]++;
729 
730  int flag = it->value() & ~EcalSrFlag::SRF_FORCED_MASK;
731 
732  int status=0;
733  if( towersStatus[ism].size() > 0 ) status = (towersStatus[ism])[isc];
734 
735  if(flag == EcalSrFlag::SRF_FULL) {
736  nEvtFullReadout[ix-1][iy-1][iz]++;
737  nFRO[iz]++;
738  if(nPerRu_[iDcc-1][isc] == 0) {
739  if(status != 1) nEvtDroppedReadoutIfFR[ix-1][iy-1][iz]++;
740  nDroppedFRO[iz]++;
741  }
742  }
743 
744  if(flag == EcalSrFlag::SRF_ZS1) nEvtZS1Readout[ix-1][iy-1][iz]++;
745 
746  if(it->value() & EcalSrFlag::SRF_FORCED_MASK) nEvtRUForced[ix-1][iy-1][iz]++;
747 
748  if(flag == EcalSrFlag::SRF_ZS1 || flag == EcalSrFlag::SRF_ZS2) {
749  nEvtZSReadout[ix-1][iy-1][iz]++;
750  if(nPerRu_[iDcc-1][isc] == getCrystalCount(iDcc,isc)) {
751  if(status != 1) nEvtCompleteReadoutIfZS[ix-1][iy-1][iz]++;
752  nCompleteZS[iz]++;
753  }
754  }
755 
756  }
757  } else {
758  edm::LogWarning("EESelectiveReadoutTask") << "EESRFlagCollection not available";
759  }
760 
761  for(int ix = 0; ix < 20; ix++ ) {
762  for(int iy = 0; iy < 20; iy++ ) {
763  for(int iz = 0; iz < 2; iz++) {
764 
765  if( nEvtAnyReadout[ix][iy][iz] ) {
766 
767  float xix = ix;
768  if ( iz == 0 ) xix = 19 - xix;
769  xix += 0.5;
770 
771  float xiy = iy+0.5;
772 
773  float fraction = float(nEvtFullReadout[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]);
774  float error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz]));
775 
776  TH2F *h2d = EEFullReadoutSRFlagMap_[iz]->getTH2F();
777 
778  int binx=0, biny=0;
779 
780  if( h2d ) {
781  binx = h2d->GetXaxis()->FindBin(xix);
782  biny = h2d->GetYaxis()->FindBin(xiy);
783  }
784 
785  EEFullReadoutSRFlagMap_[iz]->setBinContent(binx, biny, fraction);
786  EEFullReadoutSRFlagMap_[iz]->setBinError(binx, biny, error);
787 
788 
789  fraction = float(nEvtZS1Readout[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]);
790  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz]));
791 
793 
794  if( h2d ) {
795  binx = h2d->GetXaxis()->FindBin(xix);
796  biny = h2d->GetYaxis()->FindBin(xiy);
797  }
798 
799  EEZeroSuppression1SRFlagMap_[iz]->setBinContent(binx, biny, fraction);
800  EEZeroSuppression1SRFlagMap_[iz]->setBinError(binx, biny, error);
801 
802 
803  fraction = float(nEvtRUForced[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]);
804  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz]));
805 
806  h2d = EEReadoutUnitForcedBitMap_[iz]->getTH2F();
807 
808  if( h2d ) {
809  binx = h2d->GetXaxis()->FindBin(xix);
810  biny = h2d->GetYaxis()->FindBin(xiy);
811  }
812 
813  EEReadoutUnitForcedBitMap_[iz]->setBinContent(binx, biny, fraction);
814  EEReadoutUnitForcedBitMap_[iz]->setBinError(binx, biny, error);
815 
816  if( nEvtZSReadout[ix][iy][iz] ) {
817  fraction = float(nEvtCompleteReadoutIfZS[ix][iy][iz]) / float(nEvtZSReadout[ix][iy][iz]);
818  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz]));
819 
820  h2d = EECompleteZSMap_[iz]->getTH2F();
821 
822  if( h2d ) {
823  binx = h2d->GetXaxis()->FindBin(xix);
824  biny = h2d->GetYaxis()->FindBin(xiy);
825  }
826 
827  EECompleteZSMap_[iz]->setBinContent(binx, biny, fraction);
828  EECompleteZSMap_[iz]->setBinError(binx, biny, error);
829  }
830 
831  if( nEvtFullReadout[ix][iy][iz] ) {
832  fraction = float(nEvtDroppedReadoutIfFR[ix][iy][iz]) / float(nEvtFullReadout[ix][iy][iz]);
833  error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz]));
834 
835  h2d = EEDroppedFRMap_[iz]->getTH2F();
836 
837  if( h2d ) {
838  binx = h2d->GetXaxis()->FindBin(xix);
839  biny = h2d->GetYaxis()->FindBin(xiy);
840  }
841 
842  EEDroppedFRMap_[iz]->setBinContent(binx, biny, fraction);
843  EEDroppedFRMap_[iz]->setBinError(binx, biny, error);
844  }
845 
846  }
847 
848  }
849  }
850  }
851 
852  for(int iz = 0; iz < 2; iz++) {
853  EEFullReadoutSRFlagCount_[iz]->Fill( nFRO[iz] );
854  EECompleteZSCount_[iz]->Fill( nCompleteZS[iz] );
855  EEDroppedFRCount_[iz]->Fill( nDroppedFRO[iz] );
856  }
857 
859  if ( e.getByToken(EcalTrigPrimDigiCollection_, TPCollection) ) {
860 
861  // Trigger Primitives
863  for ( TPdigi = TPCollection->begin(); TPdigi != TPCollection->end(); ++TPdigi ) {
864 
865  if ( Numbers::subDet( TPdigi->id() ) != EcalEndcap ) continue;
866 
867  int ismt = Numbers::iSM( TPdigi->id() );
868  int zside = TPdigi->id().zside();
869  int iz = ( zside < 0 ) ? 0 : 1;
870 
871  EETTFlags_[iz]->Fill( TPdigi->ttFlag() );
872 
873  std::vector<DetId>* crystals = Numbers::crystals( TPdigi->id() );
874 
875  for ( unsigned int i=0; i<crystals->size(); i++ ) {
876 
877  EEDetId id = (*crystals)[i];
878 
879  int ix = id.ix();
880  int iy = id.iy();
881  int ism = Numbers::iSM( id );
882  int itcc = Numbers::iTCC( ism, EcalEndcap, ix, iy );
883  int itt = Numbers::iTT( ism, EcalEndcap, ix, iy );
884 
885  if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix;
886 
887  nEvtAnyInterest[ix-1][iy-1][iz]++;
888 
889  if ( (TPdigi->ttFlag() & 0x3) == 0 ) nEvtLowInterest[ix-1][iy-1][iz]++;
890 
891  if ( (TPdigi->ttFlag() & 0x3) == 1 ) nEvtMediumInterest[ix-1][iy-1][iz]++;
892 
893  if ( (TPdigi->ttFlag() & 0x3) == 3 ) nEvtHighInterest[ix-1][iy-1][iz]++;
894 
895  float xix = ix-0.5;
896  if ( iz == 0 ) xix = 100 - xix;
897  float xiy = iy-0.5;
898 
899  if ( ((TPdigi->ttFlag() & 0x3) == 1 || (TPdigi->ttFlag() & 0x3) == 3)
900  && nCryTT[itcc-1][itt-1] != (int)crystals->size() ) EETTFMismatch_[iz]->Fill(xix, xiy);
901 
902  }
903 
904  }
905  } else {
906  edm::LogWarning("EESelectiveReadoutTask") << "EcalTrigPrimDigiCollection not available";
907  }
908 
909  for(int ix = 0; ix < 100; ix++ ) {
910  for(int iy = 0; iy < 100; iy++ ) {
911  for(int iz = 0; iz < 2; iz++) {
912 
913  if( nEvtAnyInterest[ix][iy][iz] ) {
914 
915  float xix = ix;
916  if ( iz == 0 ) xix = 99 - xix;
917  xix += 0.5;
918 
919  float xiy = iy+0.5;
920 
921  float fraction = float(nEvtHighInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]);
922  float error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz]));
923 
924  TH2F *h2d = EEHighInterestTriggerTowerFlagMap_[iz]->getTH2F();
925 
926  int binx=0, biny=0;
927 
928  if( h2d ) {
929  binx = h2d->GetXaxis()->FindBin(xix);
930  biny = h2d->GetYaxis()->FindBin(xiy);
931  }
932 
933  EEHighInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction);
934  EEHighInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error);
935 
936 
937  fraction = float(nEvtMediumInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]);
938  error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz]));
939 
941 
942  if( h2d ) {
943  binx = h2d->GetXaxis()->FindBin(xix);
944  biny = h2d->GetYaxis()->FindBin(xiy);
945  }
946 
947  EEMediumInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction);
948  EEMediumInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error);
949 
950 
951  fraction = float(nEvtLowInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]);
952  error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz]));
953 
955 
956  if( h2d ) {
957  binx = h2d->GetXaxis()->FindBin(xix);
958  biny = h2d->GetYaxis()->FindBin(xiy);
959  }
960 
961  EELowInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction);
962  EELowInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error);
963 
964  }
965 
966  }
967  }
968  }
969 
970 }
int nEvtFullReadout[20][20][2]
To store the events with full readout.
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
int ix() const
Definition: EEDetId.h:76
MonitorElement * EEFullReadoutSRFlagCount_[2]
MonitorElement * EEReadoutUnitForcedBitMap_[2]
MonitorElement * EEDroppedFRCount_[2]
MonitorElement * EETowerSize_[2]
edm::EDGetTokenT< EESrFlagCollection > EESRFlagCollection_
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
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:29
int nEvtZSReadout[20][20][2]
To store the events with ZS1 or ZS2 readout.
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
int getCrystalCount(int iDcc, int iDccCh)
MonitorElement * EEZeroSuppression1SRFlagMap_[2]
int nEvtAnyInterest[100][100][2]
To store the events with any interest.
int nEvtDroppedReadoutIfFR[20][20][2]
To store the events with 0 channels readout when FR is requested.
MonitorElement * EECompleteZSMap_[2]
int nEvtCompleteReadoutIfZS[20][20][2]
To store the events with complete readout when ZS is requested.
MonitorElement * EETTFMismatch_[2]
int nPerRu_[nECALDcc][nDccChs]
MonitorElement * EEEventSize_[2]
void Fill(long long x)
int nEvtLowInterest[100][100][2]
To store the events with low interest TT.
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:582
MonitorElement * EEHighInterestPayload_[2]
MonitorElement * EEHighInterestTriggerTowerFlagMap_[2]
uint16_t getStatusCode() const
double getEeEventSize(double nReadXtals) const
static unsigned iTCC(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:531
int ix() const
Definition: EcalScDetId.h:71
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static unsigned iSC(const EcalScDetId &id)
Definition: Numbers.cc:434
T sqrt(T t)
Definition: SSEVec.h:48
static const int SRF_FULL
Definition: EcalSrFlag.h:24
MonitorElement * EEDccEventSizeMap_
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcalTrigPrimDigiCollection_
void anaDigi(const EEDataFrame &frame, const EESrFlagCollection &srFlagColl, uint16_t statusCode)
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
key_type id() const
Definition: EEDataFrame.h:28
int nEvtRUForced[20][20][2]
To store the events with RU forced.
edm::EDGetTokenT< FEDRawDataCollection > FEDRawDataCollection_
MonitorElement * EETTFlags_[2]
const T & get() const
Definition: EventSetup.h:55
std::vector< Item >::const_iterator const_iterator
T const * product() const
Definition: ESHandle.h:62
int nEvtMediumInterest[100][100][2]
To store the events with medium interest TT.
int nEvtZS1Readout[20][20][2]
To store the events with ZS1 readout.
int nEvtHighInterest[100][100][2]
To store the events with high interest TT.
int nCrySC[20][20][2]
To store the readout crystals / SC.
unsigned dccNumOfRU(const EcalScDetId &scId) const
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
MonitorElement * EECompleteZSCount_[2]
const_iterator find(uint32_t rawId) const
MonitorElement * EEDroppedFRMap_[2]
const_iterator end() const
int nEvtAnyReadout[20][20][2]
To store the events with any readout.
MonitorElement * EELowInterestPayload_[2]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
tuple status
Definition: ntuplemaker.py:245
TH2F * getTH2F(void) const
MonitorElement * EELowInterestTriggerTowerFlagMap_[2]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
static const int bytesPerCrystal
Number of bytes per crystal.
MonitorElement * EEMediumInterestTriggerTowerFlagMap_[2]
tuple size
Write out results.
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:482
MonitorElement * EEFullReadoutSRFlagMap_[2]
void EESelectiveReadoutTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file EESelectiveReadoutTask.cc.

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

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 112 of file EESelectiveReadoutTask.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_.

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

converse of iXY2cIndex() method.

Definition at line 201 of file EESelectiveReadoutTask.h.

201  {
202  return iX0+1;
203 }
void EESelectiveReadoutTask::cleanup ( void  )
protected

Cleanup.

Definition at line 447 of file EESelectiveReadoutTask.cc.

References dqmStore_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, MonitorElement::getName(), init_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

447  {
448 
449  if ( ! init_ ) return;
450 
451  if ( dqmStore_ ) {
452  dqmStore_->setCurrentFolder(prefixME_ + "/EESelectiveReadoutTask");
453 
454  if ( EETowerSize_[0] ) dqmStore_->removeElement( EETowerSize_[0]->getName() );
455  EETowerSize_[0] = 0;
456 
457  if ( EETowerSize_[1] ) dqmStore_->removeElement( EETowerSize_[1]->getName() );
458  EETowerSize_[1] = 0;
459 
460  if ( EETTFMismatch_[0] ) dqmStore_->removeElement( EETTFMismatch_[0]->getName() );
461  EETTFMismatch_[0] = 0;
462 
463  if ( EETTFMismatch_[1] ) dqmStore_->removeElement( EETTFMismatch_[1]->getName() );
464  EETTFMismatch_[1] = 0;
465 
467  EEDccEventSize_ = 0;
468 
470  EEDccEventSizeMap_ = 0;
471 
474 
477 
480 
483 
486 
489 
492 
495 
498 
501 
504 
507 
508  if ( EETTFlags_[0] ) dqmStore_->removeElement( EETTFlags_[0]->getName() );
509  EETTFlags_[0] = 0;
510 
511  if ( EETTFlags_[1] ) dqmStore_->removeElement( EETTFlags_[1]->getName() );
512  EETTFlags_[1] = 0;
513 
514  if ( EECompleteZSMap_[0] ) dqmStore_->removeElement( EECompleteZSMap_[0]->getName() );
515  EECompleteZSMap_[0] = 0;
516 
517  if ( EECompleteZSMap_[1] ) dqmStore_->removeElement( EECompleteZSMap_[1]->getName() );
518  EECompleteZSMap_[1] = 0;
519 
520  if ( EECompleteZSCount_[0] ) dqmStore_->removeElement( EECompleteZSCount_[0]->getName() );
521  EECompleteZSCount_[0] = 0;
522 
523  if ( EECompleteZSCount_[1] ) dqmStore_->removeElement( EECompleteZSCount_[1]->getName() );
524  EECompleteZSCount_[1] = 0;
525 
526  if ( EEDroppedFRMap_[0] ) dqmStore_->removeElement( EEDroppedFRMap_[0]->getName() );
527  EEDroppedFRMap_[0] = 0;
528 
529  if ( EEDroppedFRMap_[1] ) dqmStore_->removeElement( EEDroppedFRMap_[1]->getName() );
530  EEDroppedFRMap_[1] = 0;
531 
532  if ( EEDroppedFRCount_[0] ) dqmStore_->removeElement( EEDroppedFRCount_[0]->getName() );
533  EEDroppedFRCount_[0] = 0;
534 
535  if ( EEDroppedFRCount_[1] ) dqmStore_->removeElement( EEDroppedFRCount_[1]->getName() );
536  EEDroppedFRCount_[1] = 0;
537 
538  if ( EEEventSize_[0] ) dqmStore_->removeElement( EEEventSize_[0]->getName() );
539  EEEventSize_[0] = 0;
540 
541  if ( EEEventSize_[1] ) dqmStore_->removeElement( EEEventSize_[1]->getName() );
542  EEEventSize_[1] = 0;
543 
545  EEHighInterestPayload_[0] = 0;
546 
548  EEHighInterestPayload_[1] = 0;
549 
551  EELowInterestPayload_[0] = 0;
552 
554  EELowInterestPayload_[1] = 0;
555 
557  EEHighInterestZsFIR_[0] = 0;
558 
560  EEHighInterestZsFIR_[1] = 0;
561 
563  EELowInterestZsFIR_[0] = 0;
564 
566  EELowInterestZsFIR_[1] = 0;
567 
568  }
569 
570  init_ = false;
571 
572 }
const std::string & getName(void) const
get name of ME
MonitorElement * EEFullReadoutSRFlagCount_[2]
MonitorElement * EEReadoutUnitForcedBitMap_[2]
MonitorElement * EELowInterestZsFIR_[2]
MonitorElement * EEDroppedFRCount_[2]
MonitorElement * EETowerSize_[2]
MonitorElement * EEZeroSuppression1SRFlagMap_[2]
MonitorElement * EEHighInterestZsFIR_[2]
MonitorElement * EECompleteZSMap_[2]
MonitorElement * EETTFMismatch_[2]
MonitorElement * EEEventSize_[2]
MonitorElement * EEHighInterestPayload_[2]
MonitorElement * EEHighInterestTriggerTowerFlagMap_[2]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2773
MonitorElement * EEDccEventSizeMap_
MonitorElement * EETTFlags_[2]
MonitorElement * EECompleteZSCount_[2]
MonitorElement * EEDroppedFRMap_[2]
MonitorElement * EELowInterestPayload_[2]
MonitorElement * EELowInterestTriggerTowerFlagMap_[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
MonitorElement * EEFullReadoutSRFlagMap_[2]
void EESelectiveReadoutTask::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 1234 of file EESelectiveReadoutTask.cc.

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

Referenced by beginRun(), and EESelectiveReadoutTask().

1234  {
1235  bool notNormalized = false;
1236  bool notInt = false;
1237  for(unsigned i=0; i < weightsForZsFIR.size(); ++i){
1238  if(weightsForZsFIR[i] > 1.) notNormalized = true;
1239  if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true;
1240  }
1241  if(notInt && notNormalized){
1242  throw cms::Exception("InvalidParameter")
1243  << "weigtsForZsFIR paramater values are not valid: they "
1244  << "must either be integer and uses the hardware representation "
1245  << "of the weights or less or equal than 1 and used the normalized "
1246  << "representation.";
1247  }
1248  edm::LogInfo log("DccFir");
1249  if(notNormalized){
1250  firWeights_ = std::vector<int>(weightsForZsFIR.size());
1251  for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){
1252  firWeights_[i] = (int)weightsForZsFIR[i];
1253  }
1254  } else{
1255  firWeights_ = getFIRWeights(weightsForZsFIR);
1256  }
1257 
1258  log << "Input weights for FIR: ";
1259  for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){
1260  log << weightsForZsFIR[i] << "\t";
1261  }
1262 
1263  double s2 = 0.;
1264  log << "\nActual FIR weights: ";
1265  for(unsigned i = 0; i < firWeights_.size(); ++i){
1266  log << firWeights_[i] << "\t";
1267  s2 += firWeights_[i]*firWeights_[i];
1268  }
1269 
1270  s2 = sqrt(s2);
1271  log << "\nNormalized FIR weights after hw representation rounding: ";
1272  for(unsigned i = 0; i < firWeights_.size(); ++i){
1273  log << firWeights_[i] / (double)(1<<10) << "\t";
1274  }
1275 
1276  log <<"\nFirst FIR sample: " << firstFIRSample_;
1277 }
int i
Definition: DBlmapReader.cc:9
tuple s2
Definition: indexGen.py:106
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< int > firWeights_
static std::vector< int > getFIRWeights(const std::vector< double > &normalizedWeights)
int EESelectiveReadoutTask::dccIndex ( int  iDet,
int  i,
int  j 
) const
private

Gets the index of the DCC reading a crystal

Parameters
iiX
jiY
Returns
DCC phi index between 0 and 8 for EE

Definition at line 1160 of file EESelectiveReadoutTask.cc.

References dccPhiIndex().

Referenced by dccNum().

1160  {
1161  int iPhi = dccPhiIndex(i, j);
1162  if(iPhi<0) return -1;
1163  //34 DCCs in barrel and 8 in EE-=>in EE+ DCC numbering starts at 45,
1164  //iDet/2 is 0 for EE- and 1 for EE+:
1165  return iPhi+iDet/2*45;
1166 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int dccPhiIndex(int i, int j) const
unsigned EESelectiveReadoutTask::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 1090 of file EESelectiveReadoutTask.cc.

References dccIndex(), DetId::det(), DetId::Ecal, EcalEndcap, edm::hlt::Exception, EEDetId::ix(), iXY2cIndex(), EEDetId::iy(), j, gen::k, nECALDcc, DetId::subdetId(), and EEDetId::zside().

Referenced by anaDigi().

1090  {
1091  int j;
1092  int k;
1093 
1094  if ( xtalId.det()!=DetId::Ecal ) {
1095  throw cms::Exception("EESelectiveReadoutTask") << "Crystal does not belong to ECAL";
1096  }
1097 
1098  int iDet = 0;
1099 
1100  if(xtalId.subdetId()==EcalEndcap){
1101  EEDetId eeDetId(xtalId);
1102  j = iXY2cIndex(eeDetId.ix());
1103  k = iXY2cIndex(eeDetId.iy());
1104  int zside = eeDetId.zside();
1105  if ( zside < 0 ) iDet = 0;
1106  else iDet = 2;
1107  } else {
1108  throw cms::Exception("EESelectiveReadoutTask") << "Not ECAL endcap.";
1109  }
1110  int iDcc0 = dccIndex(iDet,j,k);
1111  assert(iDcc0>=0 && iDcc0<nECALDcc);
1112  return iDcc0+1;
1113 }
static const int nECALDcc
Constants.
int dccIndex(int iDet, int i, int j) 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]
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
unsigned EESelectiveReadoutTask::dccNumOfRU ( const EcalScDetId scId) const
private

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

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

Definition at line 1115 of file EESelectiveReadoutTask.cc.

References dccPhiIndexOfRU(), DetId::det(), DetId::Ecal, EcalEndcap, edm::hlt::Exception, EcalScDetId::ix(), EcalScDetId::iy(), j, gen::k, nECALDcc, DetId::subdetId(), and EcalScDetId::zside().

Referenced by analyze().

1115  {
1116  int j;
1117  int k;
1118 
1119  if ( scId.det()!=DetId::Ecal ) {
1120  throw cms::Exception("EESelectiveReadoutTask") << "SuperCrystal does not belong to ECAL";
1121  }
1122 
1123  int iDet = 0;
1124 
1125  if(scId.subdetId()==EcalEndcap){
1126  j = scId.ix()-1;
1127  k = scId.iy()-1;
1128  int zside = scId.zside();
1129  if ( zside < 0 ) iDet = 0;
1130  else iDet = 2;
1131  } else {
1132  throw cms::Exception("EESelectiveReadoutTask") << "Not ECAL endcap.";
1133  }
1134  int iDcc0 = 0;
1135  int iPhi = dccPhiIndexOfRU(j,k);
1136  if(iPhi<0) iDcc0 = -1;
1137  else iDcc0 = iPhi+iDet/2*45;
1138  assert(iDcc0>=0 && iDcc0<nECALDcc);
1139  return iDcc0+1;
1140 }
static const int nECALDcc
Constants.
int ix() const
Definition: EcalScDetId.h:71
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 iy() const
Definition: EcalScDetId.h:77
int k[5][pyjets_maxn]
int dccPhiIndexOfRU(int i, int j) const
int zside() const
Definition: EcalScDetId.h:65
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int EESelectiveReadoutTask::dccPhiIndex ( int  i,
int  j 
) const
inlineprivate

Gets the phi index of the DCC reading a crystal

Parameters
iiX
jiY
Returns
DCC phi index between 0 and 8 for EE

Definition at line 246 of file EESelectiveReadoutTask.h.

References dccPhiIndexOfRU().

Referenced by dccIndex().

246  {
247  return dccPhiIndexOfRU(i/5, j/5);
248 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int dccPhiIndexOfRU(int i, int j) const
int EESelectiveReadoutTask::dccPhiIndexOfRU ( int  i,
int  j 
) const
private

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

Parameters
iiX
jiY
Returns
DCC phi index between 0 and 8 for EE

Definition at line 1155 of file EESelectiveReadoutTask.cc.

References endcapDccMap.

Referenced by dccNumOfRU(), and dccPhiIndex().

1155  {
1156  char flag=endcapDccMap[i+j*20];
1157  return (flag==' ')?-1:(flag-'0');
1158 }
int i
Definition: DBlmapReader.cc:9
static const char endcapDccMap[401]
int j
Definition: DBlmapReader.cc:9
int EESelectiveReadoutTask::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 1171 of file EESelectiveReadoutTask.cc.

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

Referenced by anaDigi().

1174  {
1175  const int nFIRTaps = 6;
1176  //FIR filter weights:
1177  const std::vector<int>& w = firWeights;
1178 
1179  //accumulator used to compute weighted sum of samples
1180  int acc = 0;
1181  bool gain12saturated = false;
1182  const int gain12 = 0x01;
1183 
1184  int iWeight = 0;
1185  for(int i = -1; i < nFIRTaps - 1; ++i, ++iWeight){
1186  int iSample(firstFIRSample + i);
1187  if(iSample>=0 && iSample < frame.size()){
1188  EcalMGPASample sample(frame[iSample]);
1189  if(sample.gainId()!=gain12) gain12saturated = true;
1190  LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc()
1191  << "*(" << w[iWeight] << ")";
1192  acc+=sample.adc()*w[iWeight];
1193  } else{
1194  edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__ <<
1195  ": Not enough samples in data frame or 'ecalDccZs1stSample' module "
1196  "parameter is not valid...";
1197  }
1198  }
1199  LogTrace("DccFir") << "\n";
1200  //discards the 8 LSBs
1201  //(shift operator cannot be used on negative numbers because
1202  // the result depends on compilator implementation)
1203  acc = (acc>=0)?(acc >> 8):-(-acc >> 8);
1204  //ZS passed if weighted sum acc above ZS threshold or if
1205  //one sample has a lower gain than gain 12 (that is gain 12 output
1206  //is saturated)
1207 
1208  LogTrace("DccFir") << "acc: " << acc << "\n"
1209  << "saturated: " << (gain12saturated?"yes":"no") << "\n";
1210 
1211  if(saturated){
1212  *saturated = gain12saturated;
1213  }
1214 
1215  return gain12saturated?std::numeric_limits<int>::max():acc;
1216 }
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 EESelectiveReadoutTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 574 of file EESelectiveReadoutTask.cc.

References cleanup(), enableCleanup_, and ievt_.

574  {
575 
576  edm::LogInfo("EESelectiveReadoutTask") << "analyzed " << ievt_ << " events";
577 
578  if ( enableCleanup_ ) this->cleanup();
579 
580 }
void EESelectiveReadoutTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 163 of file EESelectiveReadoutTask.cc.

163  {
164 
165 }
int EESelectiveReadoutTask::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 1279 of file EESelectiveReadoutTask.cc.

Referenced by analyze().

1279  {
1280  if(iDcc<1 || iDcc>54) {
1281  // invalid DCC
1282  return 0;
1283  } else if (10 <= iDcc && iDcc <= 45) {
1284  // EB
1285  return 25;
1286  } else {
1287  // EE
1288  int iDccPhi;
1289  if(iDcc < 10) {
1290  iDccPhi = iDcc;
1291  } else {
1292  iDccPhi = iDcc - 45;
1293  }
1294  switch(iDccPhi*100+iDccCh){
1295  case 110:
1296  case 232:
1297  case 312:
1298  case 412:
1299  case 532:
1300  case 610:
1301  case 830:
1302  case 806:
1303  //inner partials at 12, 3, and 9 o'clock
1304  return 20;
1305  case 134:
1306  case 634:
1307  case 827:
1308  case 803:
1309  return 10;
1310  case 330:
1311  case 430:
1312  return 20;
1313  case 203:
1314  case 503:
1315  case 721:
1316  case 921:
1317  return 21;
1318  default:
1319  return 25;
1320  }
1321  }
1322 }
double EESelectiveReadoutTask::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 224 of file EESelectiveReadoutTask.h.

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

224  {
225  subdet_t subdet;
226  if(iDcc0<9 || iDcc0>=45){
227  subdet = EE;
228  } else{
229  subdet = EB;
230  }
231  return getDccOverhead(subdet)+nReadXtals*bytesPerCrystal+nRuPerDcc_[iDcc0]*8;
232 }
double getDccOverhead(subdet_t subdet) const
subdet_t
distinguishes barral and endcap of ECAL.
static const int bytesPerCrystal
Number of bytes per crystal.
double EESelectiveReadoutTask::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 214 of file EESelectiveReadoutTask.h.

References EB.

Referenced by getDccEventSize(), and getEeEventSize().

214  {
215  // return (subdet==EB?34:25)*8;
216  return (subdet==EB?34:52)*8;
217 }
double EESelectiveReadoutTask::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 1142 of file EESelectiveReadoutTask.cc.

References bytesPerCrystal, EE, getDccOverhead(), nEBDcc, nECALDcc, nEEDcc, and nRuPerDcc_.

Referenced by analyze().

1142  {
1143  double ruHeaderPayload = 0.;
1144  const int firstEbDcc0 = nEEDcc/2;
1145  for ( int iDcc0 = 0; iDcc0 < nECALDcc; ++iDcc0 ) {
1146  //skip barrel:
1147  if(iDcc0 == firstEbDcc0) iDcc0 += nEBDcc;
1148  ruHeaderPayload += nRuPerDcc_[iDcc0]*8.;
1149  }
1150  return getDccOverhead(EE)*nEEDcc +
1151  nReadXtals*bytesPerCrystal +
1152  ruHeaderPayload;
1153 }
double getDccOverhead(subdet_t subdet) const
static const int nECALDcc
Constants.
static const int bytesPerCrystal
Number of bytes per crystal.
std::vector< int > EESelectiveReadoutTask::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 1219 of file EESelectiveReadoutTask.cc.

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

Referenced by configFirWeights().

1220  {
1221  const int nFIRTaps = 6;
1222  std::vector<int> firWeights(nFIRTaps, 0); //default weight: 0;
1223  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
1224  for(unsigned i=0; i < std::min((size_t)nFIRTaps,normalizedWeights.size()); ++i){
1225  firWeights[i] = lround(normalizedWeights[i] * (1<<10));
1226  if(std::abs(firWeights[i])>maxWeight){//overflow
1227  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
1228  }
1229  }
1230  return firWeights;
1231 }
int i
Definition: DBlmapReader.cc:9
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int EESelectiveReadoutTask::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 195 of file EESelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

195  {
196  return iX-1;
197 }
const EcalScDetId EESelectiveReadoutTask::readOutUnitOf ( const EEDetId 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 1080 of file EESelectiveReadoutTask.cc.

References Numbers::getEcalScDetId(), EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().

Referenced by anaDigi().

1080  {
1081  if (xtalId.ix() > 40 && xtalId.ix() < 61 &&
1082  xtalId.iy() > 40 && xtalId.iy() < 61) {
1083  // crystal belongs to an inner partial supercrystal
1084  return Numbers::getEcalScDetId(xtalId);
1085  } else {
1086  return EcalScDetId((xtalId.ix()-1)/5+1, (xtalId.iy()-1)/5+1, xtalId.zside());
1087  }
1088 }
int ix() const
Definition: EEDetId.h:76
int zside() const
Definition: EEDetId.h:70
int iy() const
Definition: EEDetId.h:82
static const EcalScDetId getEcalScDetId(const EEDetId &id)
Definition: Numbers.cc:676
void EESelectiveReadoutTask::reset ( void  )
protected

Reset.

Definition at line 167 of file EESelectiveReadoutTask.cc.

References EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, and MonitorElement::Reset().

Referenced by beginRun().

167  {
168 
169  if ( EETowerSize_[0] ) EETowerSize_[0]->Reset();
170  if ( EETowerSize_[1] ) EETowerSize_[1]->Reset();
171 
172  if ( EETTFMismatch_[0] ) EETTFMismatch_[0]->Reset();
173  if ( EETTFMismatch_[1] ) EETTFMismatch_[1]->Reset();
174 
176 
178 
181 
184 
187 
190 
193 
196 
199 
200  if ( EETTFlags_[0] ) EETTFlags_[0]->Reset();
201  if ( EETTFlags_[1] ) EETTFlags_[1]->Reset();
202 
203  if ( EECompleteZSMap_[0] ) EECompleteZSMap_[0]->Reset();
204  if ( EECompleteZSMap_[1] ) EECompleteZSMap_[1]->Reset();
205 
208 
209  if ( EEDroppedFRMap_[0] ) EEDroppedFRMap_[0]->Reset();
210  if ( EEDroppedFRMap_[1] ) EEDroppedFRMap_[1]->Reset();
211 
212  if ( EEDroppedFRCount_[0] ) EEDroppedFRCount_[0]->Reset();
213  if ( EEDroppedFRCount_[1] ) EEDroppedFRCount_[1]->Reset();
214 
215  if ( EEEventSize_[0] ) EEEventSize_[0]->Reset();
216  if ( EEEventSize_[1] ) EEEventSize_[1]->Reset();
217 
220 
223 
226 
229 
230 }
MonitorElement * EEFullReadoutSRFlagCount_[2]
MonitorElement * EEReadoutUnitForcedBitMap_[2]
MonitorElement * EELowInterestZsFIR_[2]
MonitorElement * EEDroppedFRCount_[2]
MonitorElement * EETowerSize_[2]
MonitorElement * EEZeroSuppression1SRFlagMap_[2]
MonitorElement * EEHighInterestZsFIR_[2]
MonitorElement * EECompleteZSMap_[2]
MonitorElement * EETTFMismatch_[2]
MonitorElement * EEEventSize_[2]
MonitorElement * EEHighInterestPayload_[2]
MonitorElement * EEHighInterestTriggerTowerFlagMap_[2]
MonitorElement * EEDccEventSizeMap_
MonitorElement * EETTFlags_[2]
MonitorElement * EECompleteZSCount_[2]
MonitorElement * EEDroppedFRMap_[2]
MonitorElement * EELowInterestPayload_[2]
MonitorElement * EELowInterestTriggerTowerFlagMap_[2]
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * EEMediumInterestTriggerTowerFlagMap_[2]
MonitorElement * EEFullReadoutSRFlagMap_[2]
void EESelectiveReadoutTask::setup ( void  )
protected

Setup.

Definition at line 232 of file EESelectiveReadoutTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, i, init_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, xbins, and ybins.

Referenced by analyze().

232  {
233 
234  init_ = true;
235 
237 
238  if ( dqmStore_ ) {
239  dqmStore_->setCurrentFolder(prefixME_ + "/EESelectiveReadoutTask");
240 
241  name = "EESRT tower event size EE -";
242  EETowerSize_[0] = dqmStore_->bookProfile2D(name, name, 20, 0., 20., 20, 0., 20., 100, 0., 200., "s");
243  EETowerSize_[0]->setAxisTitle("jx", 1);
244  EETowerSize_[0]->setAxisTitle("jy", 2);
245 
246  name = "EESRT tower event size EE +";
247  EETowerSize_[1] = dqmStore_->bookProfile2D(name, name, 20, 0., 20., 20, 0., 20., 100, 0., 200., "s");
248  EETowerSize_[1]->setAxisTitle("jx", 1);
249  EETowerSize_[1]->setAxisTitle("jy", 2);
250 
251  name = "EESRT TT flag mismatch EE -";
252  EETTFMismatch_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
253  EETTFMismatch_[0]->setAxisTitle("jx", 1);
254  EETTFMismatch_[0]->setAxisTitle("jy", 2);
255 
256  name = "EESRT TT flag mismatch EE +";
257  EETTFMismatch_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
258  EETTFMismatch_[1]->setAxisTitle("jx", 1);
259  EETTFMismatch_[1]->setAxisTitle("jy", 2);
260 
261  name = "EESRT DCC event size";
262  EEDccEventSize_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 200., "s");
263  EEDccEventSize_->setAxisTitle("event size (kB)", 2);
264  for (int i = 0; i < 18; i++) {
265  EEDccEventSize_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
266  }
267 
268  name = "EESRT event size vs DCC";
269  EEDccEventSizeMap_ = dqmStore_->book2D(name, name, 18, xbins, 132, ybins);
270  EEDccEventSizeMap_->setAxisTitle("event size (kB)", 2);
271  for (int i = 0; i < 18; i++) {
272  EEDccEventSizeMap_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
273  }
274 
275  name = "EESRT readout unit with SR forced EE -";
276  EEReadoutUnitForcedBitMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
280 
281  name = "EESRT readout unit with SR forced EE +";
282  EEReadoutUnitForcedBitMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
286 
287  name = "EESRT full readout SR Flags EE -";
288  EEFullReadoutSRFlagMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
291  EEFullReadoutSRFlagMap_[0]->setAxisTitle("rate", 3);
292 
293  name = "EESRT full readout SR Flags EE +";
294  EEFullReadoutSRFlagMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
297  EEFullReadoutSRFlagMap_[1]->setAxisTitle("rate", 3);
298 
299  name = "EESRT full readout SR Flags Number EE -";
300  EEFullReadoutSRFlagCount_[0] = dqmStore_->book1D(name, name, 200, 0., 200.);
301  EEFullReadoutSRFlagCount_[0]->setAxisTitle("Readout Units number", 1);
302 
303  name = "EESRT full readout SR Flags Number EE +";
304  EEFullReadoutSRFlagCount_[1] = dqmStore_->book1D(name, name, 200, 0., 200.);
305  EEFullReadoutSRFlagCount_[1]->setAxisTitle("Fully readout RU number", 1);
306 
307  name = "EESRT zero suppression 1 SR Flags EE -";
308  EEZeroSuppression1SRFlagMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
312 
313  name = "EESRT zero suppression 1 SR Flags EE +";
314  EEZeroSuppression1SRFlagMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
318 
319  name = "EESRT high interest TT Flags EE -";
320  EEHighInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
324 
325  name = "EESRT high interest TT Flags EE +";
326  EEHighInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
330 
331  name = "EESRT medium interest TT Flags EE -";
332  EEMediumInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
336 
337  name = "EESRT medium interest TT Flags EE +";
338  EEMediumInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
342 
343  name = "EESRT low interest TT Flags EE -";
344  EELowInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
348 
349  name = "EESRT low interest TT Flags EE +";
350  EELowInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
354 
355  name = "EESRT TT Flags EE -";
356  EETTFlags_[0] = dqmStore_->book1D(name, name, 8, 0., 8.);
357  EETTFlags_[0]->setAxisTitle("TT Flag value", 1);
358 
359  name = "EESRT TT Flags EE +";
360  EETTFlags_[1] = dqmStore_->book1D(name, name, 8, 0., 8.);
361  EETTFlags_[1]->setAxisTitle("TT Flag value", 1);
362 
363  name = "EESRT ZS Flagged Fully Readout EE -";
364  EECompleteZSMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
365  EECompleteZSMap_[0]->setAxisTitle("jphi", 1);
366  EECompleteZSMap_[0]->setAxisTitle("jeta", 2);
367  EECompleteZSMap_[0]->setAxisTitle("rate", 3);
368 
369  name = "EESRT ZS Flagged Fully Readout EE +";
370  EECompleteZSMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
371  EECompleteZSMap_[1]->setAxisTitle("jphi", 1);
372  EECompleteZSMap_[1]->setAxisTitle("jeta", 2);
373  EECompleteZSMap_[1]->setAxisTitle("rate", 3);
374 
375  name = "EESRT ZS Flagged Fully Readout Number EE -";
376  EECompleteZSCount_[0] = dqmStore_->book1D(name, name, 20, 0., 20.);
377  EECompleteZSCount_[0]->setAxisTitle("Readout Units number", 1);
378 
379  name = "EESRT ZS Flagged Fully Readout Number EE +";
380  EECompleteZSCount_[1] = dqmStore_->book1D(name, name, 20, 0., 20.);
381  EECompleteZSCount_[1]->setAxisTitle("Readout Units number", 1);
382 
383  name = "EESRT FR Flagged Dropped Readout EE -";
384  EEDroppedFRMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
385  EEDroppedFRMap_[0]->setAxisTitle("jphi", 1);
386  EEDroppedFRMap_[0]->setAxisTitle("jeta", 2);
387  EEDroppedFRMap_[0]->setAxisTitle("rate", 3);
388 
389  name = "EESRT FR Flagged Dropped Readout EE +";
390  EEDroppedFRMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.);
391  EEDroppedFRMap_[1]->setAxisTitle("jphi", 1);
392  EEDroppedFRMap_[1]->setAxisTitle("jeta", 2);
393  EEDroppedFRMap_[1]->setAxisTitle("rate", 3);
394 
395  name = "EESRT FR Flagged Dropped Readout Number EE -";
396  EEDroppedFRCount_[0] = dqmStore_->book1D(name, name, 20, 0., 20.);
397  EEDroppedFRCount_[0]->setAxisTitle("Readout Units number", 1);
398 
399  name = "EESRT FR Flagged Dropped Readout Number EE +";
400  EEDroppedFRCount_[1] = dqmStore_->book1D(name, name, 20, 0., 20.);
401  EEDroppedFRCount_[1]->setAxisTitle("Readout Units number", 1);
402 
403  name = "EESRT event size EE -";
404  EEEventSize_[0] = dqmStore_->book1D(name, name, 100, 0, 200);
405  EEEventSize_[0]->setAxisTitle("event size (kB)",1);
406 
407  name = "EESRT event size EE +";
408  EEEventSize_[1] = dqmStore_->book1D(name, name, 100, 0, 200);
409  EEEventSize_[1]->setAxisTitle("event size (kB)",1);
410 
411  name = "EESRT high interest payload EE -";
412  EEHighInterestPayload_[0] = dqmStore_->book1D(name, name, 100, 0, 200);
413  EEHighInterestPayload_[0]->setAxisTitle("event size (kB)",1);
414 
415  name = "EESRT high interest payload EE +";
416  EEHighInterestPayload_[1] = dqmStore_->book1D(name, name, 100, 0, 200);
417  EEHighInterestPayload_[1]->setAxisTitle("event size (kB)",1);
418 
419  name = "EESRT low interest payload EE -";
420  EELowInterestPayload_[0] = dqmStore_->book1D(name, name, 100, 0, 200);
421  EELowInterestPayload_[0]->setAxisTitle("event size (kB)",1);
422 
423  name = "EESRT low interest payload EE +";
424  EELowInterestPayload_[1] = dqmStore_->book1D(name, name, 100, 0, 200);
425  EELowInterestPayload_[1]->setAxisTitle("event size (kB)",1);
426 
427  name = "EESRT high interest ZS filter output EE -";
428  EEHighInterestZsFIR_[0] = dqmStore_->book1D(name, name, 60, -30, 30);
429  EEHighInterestZsFIR_[0]->setAxisTitle("ADC counts*4",1);
430 
431  name = "EESRT high interest ZS filter output EE +";
432  EEHighInterestZsFIR_[1] = dqmStore_->book1D(name, name, 60, -30, 30);
433  EEHighInterestZsFIR_[1]->setAxisTitle("ADC counts*4",1);
434 
435  name = "EESRT low interest ZS filter output EE -";
436  EELowInterestZsFIR_[0] = dqmStore_->book1D(name, name, 60, -30, 30);
437  EELowInterestZsFIR_[0]->setAxisTitle("ADC counts*4",1);
438 
439  name = "EESRT low interest ZS filter output EE +";
440  EELowInterestZsFIR_[1] = dqmStore_->book1D(name, name, 60, -30, 30);
441  EELowInterestZsFIR_[1]->setAxisTitle("ADC counts*4",1);
442 
443  }
444 
445 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
MonitorElement * EEFullReadoutSRFlagCount_[2]
MonitorElement * EEReadoutUnitForcedBitMap_[2]
MonitorElement * EELowInterestZsFIR_[2]
MonitorElement * EEDroppedFRCount_[2]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873
MonitorElement * EETowerSize_[2]
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 * EEZeroSuppression1SRFlagMap_[2]
MonitorElement * EEHighInterestZsFIR_[2]
MonitorElement * EECompleteZSMap_[2]
MonitorElement * EETTFMismatch_[2]
MonitorElement * EEEventSize_[2]
MonitorElement * EEHighInterestPayload_[2]
MonitorElement * EEHighInterestTriggerTowerFlagMap_[2]
MonitorElement * EEDccEventSizeMap_
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 * EETTFlags_[2]
MonitorElement * EECompleteZSCount_[2]
MonitorElement * EEDroppedFRMap_[2]
MonitorElement * EELowInterestPayload_[2]
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
MonitorElement * EELowInterestTriggerTowerFlagMap_[2]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * EEMediumInterestTriggerTowerFlagMap_[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
MonitorElement * EEFullReadoutSRFlagMap_[2]
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 EESelectiveReadoutTask::bytesPerCrystal = 24
staticprotected

Number of bytes per crystal.

Definition at line 115 of file EESelectiveReadoutTask.h.

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

DQMStore* EESelectiveReadoutTask::dqmStore_
private

Definition at line 334 of file EESelectiveReadoutTask.h.

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

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

Definition at line 343 of file EESelectiveReadoutTask.h.

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

Definition at line 345 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and EESelectiveReadoutTask().

MonitorElement* EESelectiveReadoutTask::EECompleteZSCount_[2]
private

Definition at line 364 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EECompleteZSMap_[2]
private

Definition at line 363 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEDccEventSize_
private

Definition at line 351 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEDccEventSizeMap_
private

Definition at line 352 of file EESelectiveReadoutTask.h.

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

edm::EDGetTokenT<EEDigiCollection> EESelectiveReadoutTask::EEDigiCollection_
private

Definition at line 342 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and EESelectiveReadoutTask().

MonitorElement* EESelectiveReadoutTask::EEDroppedFRCount_[2]
private

Definition at line 366 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEDroppedFRMap_[2]
private

Definition at line 365 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEEventSize_[2]
private

Definition at line 367 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEFullReadoutSRFlagCount_[2]
private

Definition at line 357 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEFullReadoutSRFlagMap_[2]
private

Definition at line 356 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEHighInterestPayload_[2]
private

Definition at line 368 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEHighInterestTriggerTowerFlagMap_[2]
private

Definition at line 359 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEHighInterestZsFIR_[2]
private

Definition at line 370 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EELowInterestPayload_[2]
private

Definition at line 369 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EELowInterestTriggerTowerFlagMap_[2]
private

Definition at line 361 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EELowInterestZsFIR_[2]
private

Definition at line 371 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEMediumInterestTriggerTowerFlagMap_[2]
private

Definition at line 360 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEReadoutUnitForcedBitMap_[2]
private

Definition at line 355 of file EESelectiveReadoutTask.h.

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

bool EESelectiveReadoutTask::eeRuActive_[nEndcaps][nEeX/scEdge][nEeY/scEdge]
private

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

Definition at line 321 of file EESelectiveReadoutTask.h.

Referenced by anaDigi(), and anaDigiInit().

edm::EDGetTokenT<EESrFlagCollection> EESelectiveReadoutTask::EESRFlagCollection_
private

Definition at line 344 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and EESelectiveReadoutTask().

MonitorElement* EESelectiveReadoutTask::EETowerSize_[2]
private

Definition at line 353 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EETTFlags_[2]
private

Definition at line 362 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EETTFMismatch_[2]
private

Definition at line 354 of file EESelectiveReadoutTask.h.

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

MonitorElement* EESelectiveReadoutTask::EEZeroSuppression1SRFlagMap_[2]
private

Definition at line 358 of file EESelectiveReadoutTask.h.

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

bool EESelectiveReadoutTask::enableCleanup_
private

Definition at line 338 of file EESelectiveReadoutTask.h.

Referenced by EESelectiveReadoutTask(), and endJob().

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

Definition at line 346 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and EESelectiveReadoutTask().

int EESelectiveReadoutTask::firstFIRSample_
private

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

Definition at line 330 of file EESelectiveReadoutTask.h.

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

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

Weights to be used for the ZS FIR filter

Definition at line 325 of file EESelectiveReadoutTask.h.

Referenced by anaDigi(), and configFirWeights().

int EESelectiveReadoutTask::ievt_
private

Definition at line 332 of file EESelectiveReadoutTask.h.

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

bool EESelectiveReadoutTask::init_
private

Definition at line 373 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::kByte = 1024
staticprotected

Definition at line 88 of file EESelectiveReadoutTask.h.

Referenced by analyze().

bool EESelectiveReadoutTask::mergeRuns_
private

Definition at line 340 of file EESelectiveReadoutTask.h.

Referenced by beginRun(), and EESelectiveReadoutTask().

int EESelectiveReadoutTask::nCrySC[20][20][2]
protected

To store the readout crystals / SC.

Definition at line 118 of file EESelectiveReadoutTask.h.

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

int EESelectiveReadoutTask::nCryTT[108][41]
protected

To store the readout crystals / iTT indexes are [iTTC][iTT]

Definition at line 122 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::nDccChs = 68
staticprotected

maximum number of RUs read by a DCC

Definition at line 91 of file EESelectiveReadoutTask.h.

Referenced by anaDigiInit().

const int EESelectiveReadoutTask::nEBDcc = 36
staticprotected

Definition at line 87 of file EESelectiveReadoutTask.h.

Referenced by getEeEventSize().

const int EESelectiveReadoutTask::nECALDcc = 54
staticprotected

Constants.

Definition at line 85 of file EESelectiveReadoutTask.h.

Referenced by anaDigiInit(), dccNum(), dccNumOfRU(), and getEeEventSize().

int EESelectiveReadoutTask::nEe_[2]
private

ECAL endcap read channel count

Definition at line 297 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::nEEDcc = 18
staticprotected

Definition at line 86 of file EESelectiveReadoutTask.h.

Referenced by getEeEventSize().

int EESelectiveReadoutTask::nEeHI_[2]
private

ECAL endcap high interest read channel count

Definition at line 305 of file EESelectiveReadoutTask.h.

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

int EESelectiveReadoutTask::nEeLI_[2]
private

ECAL endcap low interest read channel count

Definition at line 301 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::nEeRus = 2*(34+32+33+33+32+34+33+34+33)
staticprotected

number of RUs for EE

Definition at line 94 of file EESelectiveReadoutTask.h.

const int EESelectiveReadoutTask::nEeX = 100
staticprotected

EE crystal grid size along X.

Definition at line 100 of file EESelectiveReadoutTask.h.

const int EESelectiveReadoutTask::nEeY = 100
staticprotected

EE crystal grid size along Y.

Definition at line 103 of file EESelectiveReadoutTask.h.

const int EESelectiveReadoutTask::nEndcaps = 2
staticprotected

number of endcaps

Definition at line 97 of file EESelectiveReadoutTask.h.

int EESelectiveReadoutTask::nEvtAnyInterest[100][100][2]
protected

To store the events with any interest.

Definition at line 155 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtAnyReadout[20][20][2]
protected

To store the events with any readout.

Definition at line 143 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtCompleteReadoutIfZS[20][20][2]
protected

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

Definition at line 137 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtDroppedReadoutIfFR[20][20][2]
protected

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

Definition at line 140 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtFullReadout[20][20][2]
protected

To store the events with full readout.

Definition at line 125 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtHighInterest[100][100][2]
protected

To store the events with high interest TT.

Definition at line 146 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtLowInterest[100][100][2]
protected

To store the events with low interest TT.

Definition at line 152 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtMediumInterest[100][100][2]
protected

To store the events with medium interest TT.

Definition at line 149 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtRUForced[20][20][2]
protected

To store the events with RU forced.

Definition at line 128 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtZS1Readout[20][20][2]
protected

To store the events with ZS1 readout.

Definition at line 131 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nEvtZSReadout[20][20][2]
protected

To store the events with ZS1 or ZS2 readout.

Definition at line 134 of file EESelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EESelectiveReadoutTask::nPerDcc_[nECALDcc]
private

ECAL read channel count for each DCC:

Definition at line 309 of file EESelectiveReadoutTask.h.

Referenced by anaDigi(), and anaDigiInit().

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

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

Definition at line 313 of file EESelectiveReadoutTask.h.

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

int EESelectiveReadoutTask::nRuPerDcc_[nECALDcc]
private

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

Definition at line 317 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::nTtEta = 56
staticprotected

Number of Trigger Towers along Eta.

Definition at line 109 of file EESelectiveReadoutTask.h.

const int EESelectiveReadoutTask::nTtPhi = 72
staticprotected

Number of Trigger Towers along Phi.

Definition at line 112 of file EESelectiveReadoutTask.h.

std::string EESelectiveReadoutTask::prefixME_
private

Definition at line 336 of file EESelectiveReadoutTask.h.

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

const int EESelectiveReadoutTask::scEdge = 5
staticprotected

Number of crystals along a supercrystal edge.

Definition at line 106 of file EESelectiveReadoutTask.h.

Referenced by anaDigi().

const EcalSRSettings* EESelectiveReadoutTask::settings_
private

Definition at line 376 of file EESelectiveReadoutTask.h.

Referenced by beginRun().

bool EESelectiveReadoutTask::useCondDb_
private

Definition at line 375 of file EESelectiveReadoutTask.h.

Referenced by beginRun(), and EESelectiveReadoutTask().

float EESelectiveReadoutTask::xbins[19]
private

Definition at line 348 of file EESelectiveReadoutTask.h.

Referenced by EESelectiveReadoutTask(), and setup().

float EESelectiveReadoutTask::ybins[133]
private

Definition at line 349 of file EESelectiveReadoutTask.h.

Referenced by EESelectiveReadoutTask(), and setup().