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

Public Member Functions

 EBSelectiveReadoutTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EBSelectiveReadoutTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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 (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::InputTag EBDigiCollection_
 
MonitorElementEBDroppedFRCount_
 
MonitorElementEBDroppedFRMap_
 
MonitorElementEBEventSize_
 
MonitorElementEBFullReadoutSRFlagCount_
 
MonitorElementEBFullReadoutSRFlagMap_
 
MonitorElementEBHighInterestPayload_
 
MonitorElementEBHighInterestTriggerTowerFlagMap_
 
MonitorElementEBHighInterestZsFIR_
 
MonitorElementEBLowInterestPayload_
 
MonitorElementEBLowInterestTriggerTowerFlagMap_
 
MonitorElementEBLowInterestZsFIR_
 
MonitorElementEBMediumInterestTriggerTowerFlagMap_
 
MonitorElementEBReadoutUnitForcedBitMap_
 
bool ebRuActive_ [nEbEta/ebTtEdge][nEbPhi/ebTtEdge]
 
edm::InputTag EBSRFlagCollection_
 
MonitorElementEBTowerSize_
 
MonitorElementEBTTFlags_
 
MonitorElementEBTTFMismatch_
 
edm::InputTag EBUnsuppressedDigiCollection_
 
MonitorElementEBZeroSuppression1SRFlagMap_
 
edm::InputTag EcalRecHitCollection_
 
edm::InputTag EcalTrigPrimDigiCollection_
 
bool enableCleanup_
 
edm::InputTag 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_
 
float xbins [37]
 
float ybins [89]
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file EBSelectiveReadoutTask.h.

Member Enumeration Documentation

distinguishes barral and endcap of ECAL.

Enumerator
EB 
EE 

Definition at line 130 of file EBSelectiveReadoutTask.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 39 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_, EBUnsuppressedDigiCollection_, EBZeroSuppression1SRFlagMap_, EcalTrigPrimDigiCollection_, enableCleanup_, FEDRawDataCollection_, firstFIRSample_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, mergeRuns_, cmsCodeRules.cppFunctionSkipper::operator, prefixME_, 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  EBDigiCollection_ = ps.getParameter<edm::InputTag>("EBDigiCollection");
53  EBUnsuppressedDigiCollection_ = ps.getParameter<edm::InputTag>("EBUsuppressedDigiCollection");
54  EBSRFlagCollection_ = ps.getParameter<edm::InputTag>("EBSRFlagCollection");
55  EcalTrigPrimDigiCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection");
56  FEDRawDataCollection_ = ps.getParameter<edm::InputTag>("FEDRawDataCollection");
57  firstFIRSample_ = ps.getParameter<int>("ecalDccZs1stSample");
58 
59  configFirWeights(ps.getParameter<std::vector<double> >("dccWeights"));
60 
61  // histograms...
62  EBTowerSize_ = 0;
63  EBTTFMismatch_ = 0;
64  EBDccEventSize_ = 0;
73  EBTTFlags_ = 0;
74  EBCompleteZSMap_ = 0;
76  EBDroppedFRMap_ = 0;
78  EBEventSize_ = 0;
83 
84  // initialize variable binning for DCC size...
85  float ZSthreshold = 0.608; // kBytes of 1 TT fully readout
86  float zeroBinSize = ZSthreshold / 20.;
87  for(int i=0; i<20; i++) ybins[i] = i*zeroBinSize;
88  for(int i=20; i<89; i++) ybins[i] = ZSthreshold * (i-19);
89  for(int i=0; i<=36; i++) xbins[i] = i+1;
90 
91 }
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_
MonitorElement * EBFullReadoutSRFlagCount_
edm::InputTag EcalTrigPrimDigiCollection_
MonitorElement * EBFullReadoutSRFlagMap_
MonitorElement * EBLowInterestPayload_
edm::InputTag EBUnsuppressedDigiCollection_
MonitorElement * EBCompleteZSCount_
MonitorElement * EBHighInterestPayload_
void configFirWeights(std::vector< double > weightsForZsFIR)
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBZeroSuppression1SRFlagMap_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
EBSelectiveReadoutTask::~EBSelectiveReadoutTask ( )
virtual

Destructor.

Definition at line 93 of file EBSelectiveReadoutTask.cc.

93  {
94 
95 }

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 720 of file EBSelectiveReadoutTask.cc.

References 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().

720  {
721 
722  EBDetId id = frame.id();
723 
724  bool barrel = (id.subdetId()==EcalBarrel);
725 
726  if(barrel){
727  ++nEb_;
728 
729  int ieta = id.ieta();
730  int iphi = id.iphi();
731 
732  int iEta0 = iEta2cIndex(ieta);
733  int iPhi0 = iPhi2cIndex(iphi);
734  if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){
735  ++nRuPerDcc_[dccNum(id)-1];
736  ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true;
737  }
738 
739  EcalTrigTowerDetId towid = id.tower();
740  int iet = towid.ieta();
741  int ietindex = (iet>0) ? iet - 1 : 16 + std::abs(iet);
742  // phi_tower: change the range from global to SM-local
743  // phi==0 is in the middle of a SM
744  int ipt = towid.iphi() + 2;
745  if ( ipt > 72 ) ipt = ipt - 72;
746  int iptindex = ipt - 1;
747 
748  int ism = Numbers::iSM( id );
749  int itt = Numbers::iTT( towid );
750 
751  nCryTower[iptindex][ietindex]++;
752 
754 
755  if(srf == srFlagColl.end()){
756  return;
757  }
758 
759  bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
761 
762 
763  int dccZsFIRval = dccZsFIR(frame, firWeights_, firstFIRSample_, 0);
764 
765  if(highInterest){
766  ++nEbHI_;
767  // if(statusCode != 9) EBHighInterestZsFIR_->Fill( dccZsFIRval );
768  EBHighInterestZsFIR_->Fill( dccZsFIRval );
769  } else{//low interest
770  ++nEbLI_;
771  // if(statusCode != 9) EBLowInterestZsFIR_->Fill( dccZsFIRval );
772  EBLowInterestZsFIR_->Fill( dccZsFIRval );
773  }
774  ++nPerDcc_[dccNum(id)-1];
775  ++nPerRu_[ism-1][itt-1];
776  }
777 
778 }
int nCryTower[72][34]
To store the readout crystals / tower.
key_type id() const
Definition: EBDataFrame.h:32
MonitorElement * EBLowInterestZsFIR_
static const int ebTtEdge
Number of crystals along an EB TT.
std::vector< T >::const_iterator const_iterator
#define abs(x)
Definition: mlp_lapack.h:159
EcalTrigTowerDetId readOutUnitOf(const EBDetId &xtalId) const
int ieta() const
get the tower ieta
int iPhi2cIndex(int iPhi) const
static int iTT(const int ism, const EcalSubdetector subdet, const int i1, const int i2)
Definition: Numbers.cc:520
void Fill(long long x)
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:216
std::vector< int > firWeights_
static const int SRF_FULL
Definition: EcalSrFlag.h:25
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)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
int iEta2cIndex(int iEta) const
void EBSelectiveReadoutTask::anaDigiInit ( )
private

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

Definition at line 780 of file EBSelectiveReadoutTask.cc.

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

Referenced by analyze().

780  {
781  nEb_ = 0;
782  nEbLI_ = 0;
783  nEbHI_ = 0;
784  bzero(nPerDcc_, sizeof(nPerDcc_));
785  bzero(nRuPerDcc_, sizeof(nRuPerDcc_));
786  bzero(ebRuActive_, sizeof(ebRuActive_));
787 
788  for(int idcc=0; idcc<nECALDcc; idcc++) {
789  for(int isc=0; isc<nDccChs; isc++) {
790  nPerRu_[idcc][isc] = 0;
791  }
792  }
793 
794  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
795  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
796  nCryTower[iptindex][ietindex] = 0;
797  }
798  }
799 
800 }
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 389 of file EBSelectiveReadoutTask.cc.

References 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(), error, FEDRawDataCollection_, MonitorElement::Fill(), EcalCondObjectContainer< T >::find(), edm::EventSetup::get(), edm::Event::getByLabel(), 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.

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file EBSelectiveReadoutTask.cc.

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

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 108 of file EBSelectiveReadoutTask.cc.

References Numbers::initGeometry(), mergeRuns_, nEvtAnyInterest, nEvtAnyReadout, nEvtCompleteReadoutIfZS, nEvtDroppedReadoutIfFR, nEvtFullReadout, nEvtHighInterest, nEvtLowInterest, nEvtMediumInterest, nEvtRUForced, nEvtZS1Readout, nEvtZSReadout, and reset().

108  {
109 
110  Numbers::initGeometry(c, false);
111 
112  if ( ! mergeRuns_ ) this->reset();
113 
114  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
115  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
116  nEvtFullReadout[iptindex][ietindex] = 0;
117  nEvtZS1Readout[iptindex][ietindex] = 0;
118  nEvtZSReadout[iptindex][ietindex] = 0;
119  nEvtCompleteReadoutIfZS[iptindex][ietindex] = 0;
120  nEvtDroppedReadoutIfFR[iptindex][ietindex] = 0;
121  nEvtRUForced[iptindex][ietindex] = 0;
122  nEvtAnyReadout[iptindex][ietindex] = 0;
123  nEvtHighInterest[iptindex][ietindex] = 0;
124  nEvtMediumInterest[iptindex][ietindex] = 0;
125  nEvtLowInterest[iptindex][ietindex] = 0;
126  nEvtAnyInterest[iptindex][ietindex] = 0;
127  }
128  }
129 
130 }
int nEvtLowInterest[72][34]
To store the events with low interest TT.
int nEvtHighInterest[72][34]
To store the events with high interest TT.
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.
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:43
int nEvtMediumInterest[72][34]
To store the events with medium interest TT.
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 184 of file EBSelectiveReadoutTask.h.

184  {
185  return (i<85)?i-85:i-84;
186 }
int i
Definition: DBlmapReader.cc:9
int EBSelectiveReadoutTask::cIndex2iPhi ( int  i) const
inlineprivate

converse of iPhi2cIndex() method.

Definition at line 190 of file EBSelectiveReadoutTask.h.

190  {
191  return i+1;
192 }
int i
Definition: DBlmapReader.cc:9
int EBSelectiveReadoutTask::cIndex2iXY ( int  iX0) const
inlineprivate

converse of iXY2cIndex() method.

Definition at line 178 of file EBSelectiveReadoutTask.h.

178  {
179  return iX0+1;
180 }
void EBSelectiveReadoutTask::cleanup ( void  )
protected

Cleanup.

Definition at line 304 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().

304  {
305 
306  if ( ! init_ ) return;
307 
308  if ( dqmStore_ ) {
309 
310  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
311 
313  EBTowerSize_ = 0;
314 
316  EBTTFMismatch_ = 0;
317 
319  EBDccEventSize_ = 0;
320 
322  EBDccEventSizeMap_ = 0;
323 
326 
329 
332 
335 
338 
341 
344 
346  EBTTFlags_ = 0;
347 
349  EBCompleteZSMap_ = 0;
350 
352  EBCompleteZSCount_ = 0;
353 
355  EBDroppedFRMap_ = 0;
356 
358  EBDroppedFRCount_ = 0;
359 
361  EBEventSize_ = 0;
362 
365 
368 
371 
374 
375  }
376 
377  init_ = false;
378 
379 }
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:2338
MonitorElement * EBHighInterestPayload_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void EBSelectiveReadoutTask::configFirWeights ( 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 921 of file EBSelectiveReadoutTask.cc.

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

Referenced by EBSelectiveReadoutTask().

921  {
922  bool notNormalized = false;
923  bool notInt = false;
924  for(unsigned i=0; i < weightsForZsFIR.size(); ++i){
925  if(weightsForZsFIR[i] > 1.) notNormalized = true;
926  if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true;
927  }
928  if(notInt && notNormalized){
929  throw cms::Exception("InvalidParameter")
930  << "weigtsForZsFIR paramater values are not valid: they "
931  << "must either be integer and uses the hardware representation "
932  << "of the weights or less or equal than 1 and used the normalized "
933  << "representation.";
934  }
935  edm::LogInfo log("DccFir");
936  if(notNormalized){
937  firWeights_ = std::vector<int>(weightsForZsFIR.size());
938  for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){
939  firWeights_[i] = (int)weightsForZsFIR[i];
940  }
941  } else{
942  firWeights_ = getFIRWeights(weightsForZsFIR);
943  }
944 
945  log << "Input weights for FIR: ";
946  for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){
947  log << weightsForZsFIR[i] << "\t";
948  }
949 
950  double s2 = 0.;
951  log << "\nActual FIR weights: ";
952  for(unsigned i = 0; i < firWeights_.size(); ++i){
953  log << firWeights_[i] << "\t";
954  s2 += firWeights_[i]*firWeights_[i];
955  }
956 
957  s2 = sqrt(s2);
958  log << "\nNormalized FIR weights after hw representation rounding: ";
959  for(unsigned i = 0; i < firWeights_.size(); ++i){
960  log << firWeights_[i] / (double)(1<<10) << "\t";
961  }
962 
963  log <<"\nFirst FIR sample: " << firstFIRSample_;
964 }
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:28
std::vector< int > firWeights_
Log< T >::type log(const T &t)
Definition: Log.h:22
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 845 of file EBSelectiveReadoutTask.cc.

Referenced by dccNum().

845  {
846  //a SM is 85 crystal long:
847  int iEtaSM = i/85;
848  //a SM is 20 crystal wide:
849  int iPhiSM = j/20;
850  //DCC numbers start at 9 in the barrel and there 18 DCC/SM
851  return 9+18*iEtaSM+iPhiSM;
852 }
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 807 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().

807  {
808  int j;
809  int k;
810 
811  if ( xtalId.det()!=DetId::Ecal ) {
812  throw cms::Exception("EBSelectiveReadoutTask") << "Crystal does not belong to ECAL";
813  }
814 
815  if(xtalId.subdetId()==EcalBarrel){
816  EBDetId ebDetId(xtalId);
817  j = iEta2cIndex(ebDetId.ieta());
818  k = iPhi2cIndex(ebDetId.iphi());
819  } else {
820  throw cms::Exception("EBSelectiveReadoutTask") << "Not ECAL barrel.";
821  }
822  int iDcc0 = dccIndex(j,k);
823  assert(iDcc0>=0 && iDcc0<nECALDcc);
824  return iDcc0+1;
825 }
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:39
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:37
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 235 of file EBSelectiveReadoutTask.h.

References dccPhiIndexOfRU().

235  {
236  return dccPhiIndexOfRU(i/5, j/5);
237 }
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 839 of file EBSelectiveReadoutTask.cc.

Referenced by dccPhiIndex().

839  {
840  //iEta=i, iPhi=j
841  //phi edge of a SM is 4 TT
842  return j/4;
843 }
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 857 of file EBSelectiveReadoutTask.cc.

References EcalMGPASample::adc(), EcalMGPASample::gainId(), LogTrace, max(), and EcalDataFrame::size().

Referenced by anaDigi().

860  {
861  const int nFIRTaps = 6;
862  //FIR filter weights:
863  const std::vector<int>& w = firWeights;
864 
865  //accumulator used to compute weighted sum of samples
866  int acc = 0;
867  bool gain12saturated = false;
868  const int gain12 = 0x01;
869  const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
870  //LogDebug("DccFir") << "DCC FIR operation: ";
871  int iWeight = 0;
872  for(int iSample=firstFIRSample-1;
873  iSample<lastFIRSample; ++iSample, ++iWeight){
874  if(iSample>=0 && iSample < frame.size()){
875  EcalMGPASample sample(frame[iSample]);
876  if(sample.gainId()!=gain12) gain12saturated = true;
877  LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc()
878  << "*(" << w[iWeight] << ")";
879  acc+=sample.adc()*w[iWeight];
880  } else{
881  edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__ <<
882  ": Not enough samples in data frame or 'ecalDccZs1stSample' module "
883  "parameter is not valid...";
884  }
885  }
886  LogTrace("DccFir") << "\n";
887  //discards the 8 LSBs
888  //(shift operator cannot be used on negative numbers because
889  // the result depends on compilator implementation)
890  acc = (acc>=0)?(acc >> 8):-(-acc >> 8);
891  //ZS passed if weighted sum acc above ZS threshold or if
892  //one sample has a lower gain than gain 12 (that is gain 12 output
893  //is saturated)
894 
895  LogTrace("DccFir") << "acc: " << acc << "\n"
896  << "saturated: " << (gain12saturated?"yes":"no") << "\n";
897 
898  if(saturated){
899  *saturated = gain12saturated;
900  }
901 
902  return gain12saturated?std::numeric_limits<int>::max():acc;
903 }
int size() const
Definition: EcalDataFrame.h:25
const T & max(const T &a, const T &b)
#define LogTrace(id)
void EBSelectiveReadoutTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 381 of file EBSelectiveReadoutTask.cc.

References cleanup(), enableCleanup_, and ievt_.

381  {
382 
383  edm::LogInfo("EBSelectiveReadoutTask") << "analyzed " << ievt_ << " events";
384 
385  if ( enableCleanup_ ) this->cleanup();
386 
387 }
void EBSelectiveReadoutTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 132 of file EBSelectiveReadoutTask.cc.

132  {
133 
134 }
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 281 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

281 { 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 213 of file EBSelectiveReadoutTask.h.

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

213  {
214  subdet_t subdet;
215  if(iDcc0<9 || iDcc0>=45){
216  subdet = EE;
217  } else{
218  subdet = EB;
219  }
220  return getDccOverhead(subdet)+nReadXtals*bytesPerCrystal+nRuPerDcc_[iDcc0]*8;
221 }
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 203 of file EBSelectiveReadoutTask.h.

References EB.

Referenced by getDccEventSize(), and getEbEventSize().

203  {
204  // return (subdet==EB?34:25)*8;
205  return (subdet==EB?34:52)*8;
206 }
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 827 of file EBSelectiveReadoutTask.cc.

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

Referenced by analyze().

827  {
828  double ruHeaderPayload = 0.;
829  const int nEEDcc = 18;
830  const int firstEbDcc0 = nEEDcc/2;
831  for (int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEBDcc; ++iDcc0 ) {
832  ruHeaderPayload += nRuPerDcc_[iDcc0]*8.;
833  }
834  return getDccOverhead(EB)*nEBDcc +
835  nReadXtals*bytesPerCrystal +
836  ruHeaderPayload;
837 }
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 906 of file EBSelectiveReadoutTask.cc.

References abs, i, and min.

Referenced by configFirWeights().

907  {
908  const int nFIRTaps = 6;
909  std::vector<int> firWeights(nFIRTaps, 0); //default weight: 0;
910  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
911  for(unsigned i=0; i < std::min((size_t)nFIRTaps,normalizedWeights.size()); ++i){
912  firWeights[i] = lround(normalizedWeights[i] * (1<<10));
913  if(std::abs(firWeights[i])>maxWeight){//overflow
914  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
915  }
916  }
917  return firWeights;
918 }
int i
Definition: DBlmapReader.cc:9
#define abs(x)
Definition: mlp_lapack.h:159
#define min(a, b)
Definition: mlp_lapack.h:161
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 151 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

151  {
152  return (iEta<0)?iEta+85:iEta+84;
153 }
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 158 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

158  {
159  return iPhi-1;
160 }
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 172 of file EBSelectiveReadoutTask.h.

172  {
173  return iX-1;
174 }
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 803 of file EBSelectiveReadoutTask.cc.

References EBDetId::tower().

Referenced by anaDigi().

803  {
804  return xtalId.tower();
805 }
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:52
void EBSelectiveReadoutTask::reset ( void  )
protected

Reset.

Definition at line 136 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().

136  {
137 
138  if ( EBTowerSize_ ) EBTowerSize_->Reset();
139 
141 
143 
145 
147 
149 
151 
153 
155 
157 
159 
160  if ( EBTTFlags_ ) EBTTFlags_->Reset();
161 
163 
165 
167 
169 
170  if ( EBEventSize_ ) EBEventSize_->Reset();
171 
173 
175 
177 
179 
180 }
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 182 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_, trackerHits::histo, i, init_, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), xbins, and ybins.

Referenced by analyze().

182  {
183 
184  init_ = true;
185 
186  char histo[200];
187 
188  if ( dqmStore_ ) {
189 
190  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
191 
192  sprintf(histo, "EBSRT tower event size");
193  EBTowerSize_ = dqmStore_->bookProfile2D(histo, histo, 72, 0, 72, 34, -17, 17, 100, 0, 200, "s");
194  EBTowerSize_->setAxisTitle("jphi", 1);
195  EBTowerSize_->setAxisTitle("jeta", 2);
196 
197  sprintf(histo, "EBSRT TT flag mismatch");
198  EBTTFMismatch_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
199  EBTTFMismatch_->setAxisTitle("jphi", 1);
200  EBTTFMismatch_->setAxisTitle("jeta", 2);
201 
202  sprintf(histo, "EBSRT DCC event size");
203  EBDccEventSize_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 200., "s");
204  EBDccEventSize_->setAxisTitle("event size (kB)", 2);
205  for (int i = 0; i < 36; i++) {
206  EBDccEventSize_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
207  }
208 
209  sprintf(histo, "EBSRT event size vs DCC");
210  EBDccEventSizeMap_ = dqmStore_->book2D(histo, histo, 36, xbins, 88, ybins);
211  EBDccEventSizeMap_->setAxisTitle("event size (kB)", 2);
212  for (int i = 0; i < 36; i++) {
213  EBDccEventSizeMap_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
214  }
215 
216  sprintf(histo, "EBSRT readout unit with SR forced");
217  EBReadoutUnitForcedBitMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
221 
222  sprintf(histo, "EBSRT full readout SR Flags");
223  EBFullReadoutSRFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
227 
228  sprintf(histo, "EBSRT full readout SR Flags Number");
229  EBFullReadoutSRFlagCount_ = dqmStore_->book1D(histo, histo, 200, 0., 200.);
230  EBFullReadoutSRFlagCount_->setAxisTitle("Readout Units number", 1);
231 
232  sprintf(histo, "EBSRT zero suppression 1 SR Flags");
233  EBZeroSuppression1SRFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
237 
238  sprintf(histo, "EBSRT high interest TT Flags");
239  EBHighInterestTriggerTowerFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
243 
244  sprintf(histo, "EBSRT medium interest TT Flags");
245  EBMediumInterestTriggerTowerFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
249 
250  sprintf(histo, "EBSRT low interest TT Flags");
251  EBLowInterestTriggerTowerFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
255 
256  sprintf(histo, "EBSRT TT Flags");
257  EBTTFlags_ = dqmStore_->book1D(histo, histo, 8, 0., 8.);
258  EBTTFlags_->setAxisTitle("TT Flag value", 1);
259 
260  sprintf(histo, "EBSRT ZS Flagged Fully Readout");
261  EBCompleteZSMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
262  EBCompleteZSMap_->setAxisTitle("jphi", 1);
263  EBCompleteZSMap_->setAxisTitle("jeta", 2);
264  EBCompleteZSMap_->setAxisTitle("rate", 3);
265 
266  sprintf(histo, "EBSRT ZS Flagged Fully Readout Number");
267  EBCompleteZSCount_ = dqmStore_->book1D(histo, histo, 20, 0., 20.);
268  EBCompleteZSCount_->setAxisTitle("Readout Units number", 1);
269 
270  sprintf(histo, "EBSRT FR Flagged Dropped Readout");
271  EBDroppedFRMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17);
272  EBDroppedFRMap_->setAxisTitle("jphi", 1);
273  EBDroppedFRMap_->setAxisTitle("jeta", 2);
274  EBDroppedFRMap_->setAxisTitle("rate", 3);
275 
276  sprintf(histo, "EBSRT FR Flagged Dropped Readout Number");
277  EBDroppedFRCount_ = dqmStore_->book1D(histo, histo, 20, 0., 20.);
278  EBDroppedFRCount_->setAxisTitle("Readout Units number", 1);
279 
280  sprintf(histo, "EBSRT event size");
281  EBEventSize_ = dqmStore_->book1D(histo, histo, 100, 0, 200);
282  EBEventSize_->setAxisTitle("event size (kB)",1);
283 
284  sprintf(histo, "EBSRT high interest payload");
285  EBHighInterestPayload_ = dqmStore_->book1D(histo, histo, 100, 0, 200);
286  EBHighInterestPayload_->setAxisTitle("event size (kB)",1);
287 
288  sprintf(histo, "EBSRT low interest payload");
289  EBLowInterestPayload_ = dqmStore_->book1D(histo, histo, 100, 0, 200);
290  EBLowInterestPayload_->setAxisTitle("event size (kB)",1);
291 
292  sprintf(histo, "EBSRT high interest ZS filter output");
293  EBHighInterestZsFIR_ = dqmStore_->book1D(histo, histo, 60, -30, 30);
294  EBHighInterestZsFIR_->setAxisTitle("ADC counts*4",1);
295 
296  sprintf(histo, "EBSRT low interest ZS filter output");
297  EBLowInterestZsFIR_ = dqmStore_->book1D(histo, histo, 60, -30, 30);
298  EBLowInterestZsFIR_->setAxisTitle("ADC counts*4",1);
299 
300  }
301 
302 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * EBMediumInterestTriggerTowerFlagMap_
static std::string sEB(const int ism)
Definition: Numbers.cc:81
MonitorElement * EBDccEventSizeMap_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
MonitorElement * EBLowInterestZsFIR_
MonitorElement * EBFullReadoutSRFlagCount_
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)
tuple histo
Definition: trackerHits.py:12
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:833
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:647
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:237
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:977

Member Data Documentation

const int EBSelectiveReadoutTask::bytesPerCrystal = 24
staticprotected

Number of bytes per crystal.

Definition at line 89 of file EBSelectiveReadoutTask.h.

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

DQMStore* EBSelectiveReadoutTask::dqmStore_
private

Definition at line 323 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSCount_
private

Definition at line 354 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSMap_
private

Definition at line 353 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDccEventSize_
private

Definition at line 341 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDccEventSizeMap_
private

Definition at line 342 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EBDigiCollection_
private

Definition at line 331 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRCount_
private

Definition at line 356 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRMap_
private

Definition at line 355 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBEventSize_
private

Definition at line 357 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagCount_
private

Definition at line 347 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagMap_
private

Definition at line 346 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestPayload_
private

Definition at line 358 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestTriggerTowerFlagMap_
private

Definition at line 349 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestZsFIR_
private

Definition at line 360 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestPayload_
private

Definition at line 359 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestTriggerTowerFlagMap_
private

Definition at line 351 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestZsFIR_
private

Definition at line 361 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBMediumInterestTriggerTowerFlagMap_
private

Definition at line 350 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBReadoutUnitForcedBitMap_
private

Definition at line 345 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 310 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and anaDigiInit().

edm::InputTag EBSelectiveReadoutTask::EBSRFlagCollection_
private

Definition at line 334 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBTowerSize_
private

Definition at line 343 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 77 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi().

MonitorElement* EBSelectiveReadoutTask::EBTTFlags_
private

Definition at line 352 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBTTFMismatch_
private

Definition at line 344 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EBUnsuppressedDigiCollection_
private

Definition at line 332 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBZeroSuppression1SRFlagMap_
private

Definition at line 348 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EcalRecHitCollection_
private

Definition at line 333 of file EBSelectiveReadoutTask.h.

edm::InputTag EBSelectiveReadoutTask::EcalTrigPrimDigiCollection_
private

Definition at line 335 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

bool EBSelectiveReadoutTask::enableCleanup_
private

Definition at line 327 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and endJob().

edm::InputTag EBSelectiveReadoutTask::FEDRawDataCollection_
private

Definition at line 336 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 319 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 314 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and configFirWeights().

int EBSelectiveReadoutTask::ievt_
private

Definition at line 321 of file EBSelectiveReadoutTask.h.

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

bool EBSelectiveReadoutTask::init_
private

Definition at line 363 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::kByte = 1024
staticprotected

Definition at line 62 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

bool EBSelectiveReadoutTask::mergeRuns_
private

Definition at line 329 of file EBSelectiveReadoutTask.h.

Referenced by beginRun(), and EBSelectiveReadoutTask().

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

To store the readout crystals / tower.

Definition at line 92 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 65 of file EBSelectiveReadoutTask.h.

Referenced by anaDigiInit().

int EBSelectiveReadoutTask::nEb_
private

ECAL barrel read channel count

Definition at line 286 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nEBDcc = 36
staticprotected

Definition at line 61 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 71 of file EBSelectiveReadoutTask.h.

int EBSelectiveReadoutTask::nEbHI_
private

ECAL barrel high interest read channel count

Definition at line 294 of file EBSelectiveReadoutTask.h.

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

int EBSelectiveReadoutTask::nEbLI_
private

ECAL barrel low interest read channel count

Definition at line 290 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 74 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nEbRus = 36*68
staticprotected

number of RUs for EB

Definition at line 68 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nECALDcc = 54
staticprotected

Definition at line 60 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 125 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 101 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 110 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 113 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 95 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 116 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 122 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 119 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 98 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 104 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 107 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nPerDcc_[nECALDcc]
private

ECAL read channel count for each DCC:

Definition at line 298 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 302 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 306 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nTTEta = 34
staticprotected

Constants.

Definition at line 58 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtEta = 56
staticprotected

Number of Trigger Towers along Eta.

Definition at line 83 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTTPhi = 72
staticprotected

Definition at line 59 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtPhi = 72
staticprotected

Number of Trigger Towers along Phi.

Definition at line 86 of file EBSelectiveReadoutTask.h.

std::string EBSelectiveReadoutTask::prefixME_
private

Definition at line 325 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 80 of file EBSelectiveReadoutTask.h.

float EBSelectiveReadoutTask::xbins[37]
private

Definition at line 338 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().

float EBSelectiveReadoutTask::ybins[89]
private

Definition at line 339 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().