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_
 
const EcalSRSettingssettings_
 
bool useCondDb_
 
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)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 23 of file EBSelectiveReadoutTask.h.

Member Enumeration Documentation

distinguishes barral and endcap of ECAL.

Enumerator
EB 
EE 

Definition at line 132 of file EBSelectiveReadoutTask.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 44 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_, cppFunctionSkipper::operator, prefixME_, useCondDb_, xbins, and ybins.

44  {
45 
46  init_ = false;
47 
49 
50  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
51 
52  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
53 
54  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
55 
56  // parameters...
57  EBDigiCollection_ = ps.getParameter<edm::InputTag>("EBDigiCollection");
58  EBUnsuppressedDigiCollection_ = ps.getParameter<edm::InputTag>("EBUsuppressedDigiCollection");
59  EBSRFlagCollection_ = ps.getParameter<edm::InputTag>("EBSRFlagCollection");
60  EcalTrigPrimDigiCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection");
61  FEDRawDataCollection_ = ps.getParameter<edm::InputTag>("FEDRawDataCollection");
62  firstFIRSample_ = ps.getParameter<int>("ecalDccZs1stSample");
63 
64  useCondDb_ = ps.getParameter<bool>("configFromCondDB");
65 
66  if(!useCondDb_) configFirWeights(ps.getParameter<std::vector<double> >("dccWeights"));
67 
68 
69  // histograms...
70  EBTowerSize_ = 0;
71  EBTTFMismatch_ = 0;
72  EBDccEventSize_ = 0;
81  EBTTFlags_ = 0;
82  EBCompleteZSMap_ = 0;
84  EBDroppedFRMap_ = 0;
86  EBEventSize_ = 0;
91 
92  // initialize variable binning for DCC size...
93  float ZSthreshold = 0.608; // kBytes of 1 TT fully readout
94  float zeroBinSize = ZSthreshold / 20.;
95  for(int i=0; i<20; i++) ybins[i] = i*zeroBinSize;
96  for(int i=20; i<89; i++) ybins[i] = ZSthreshold * (i-19);
97  for(int i=0; i<=36; i++) xbins[i] = i+1;
98 
99 }
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 101 of file EBSelectiveReadoutTask.cc.

101  {
102 
103 }

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

747  {
748 
749  EBDetId id = frame.id();
750 
751  bool barrel = (id.subdetId()==EcalBarrel);
752 
753  if(barrel){
754  ++nEb_;
755 
756  int ieta = id.ieta();
757  int iphi = id.iphi();
758 
759  int iEta0 = iEta2cIndex(ieta);
760  int iPhi0 = iPhi2cIndex(iphi);
761  if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){
762  ++nRuPerDcc_[dccNum(id)-1];
763  ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true;
764  }
765 
766  EcalTrigTowerDetId towid = id.tower();
767  int iet = towid.ieta();
768  int ietindex = (iet>0) ? iet - 1 : 16 + std::abs(iet);
769  // phi_tower: change the range from global to SM-local
770  // phi==0 is in the middle of a SM
771  int ipt = towid.iphi() + 2;
772  if ( ipt > 72 ) ipt = ipt - 72;
773  int iptindex = ipt - 1;
774 
775  int ism = Numbers::iSM( id );
776  int itt = Numbers::iTT( towid );
777 
778  nCryTower[iptindex][ietindex]++;
779 
781 
782  if(srf == srFlagColl.end()){
783  return;
784  }
785 
786  bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK)
788 
789 
790  int dccZsFIRval = dccZsFIR(frame, firWeights_, firstFIRSample_, 0);
791 
792  if(highInterest){
793  ++nEbHI_;
794  // if(statusCode != 9) EBHighInterestZsFIR_->Fill( dccZsFIRval );
795  EBHighInterestZsFIR_->Fill( dccZsFIRval );
796  } else{//low interest
797  ++nEbLI_;
798  // if(statusCode != 9) EBLowInterestZsFIR_->Fill( dccZsFIRval );
799  EBLowInterestZsFIR_->Fill( dccZsFIRval );
800  }
801  ++nPerDcc_[dccNum(id)-1];
802  ++nPerRu_[ism-1][itt-1];
803  }
804 
805 }
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
void Fill(long long x)
static int dccZsFIR(const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0)
std::vector< int > firWeights_
static const int SRF_FULL
Definition: EcalSrFlag.h: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)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int iEta2cIndex(int iEta) const
static unsigned iTT(const unsigned ism, const EcalSubdetector subdet, const unsigned i1, const unsigned i2)
Definition: Numbers.cc:485
void EBSelectiveReadoutTask::anaDigiInit ( )
private

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

Definition at line 807 of file EBSelectiveReadoutTask.cc.

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

Referenced by analyze().

807  {
808  nEb_ = 0;
809  nEbLI_ = 0;
810  nEbHI_ = 0;
811  bzero(nPerDcc_, sizeof(nPerDcc_));
812  bzero(nRuPerDcc_, sizeof(nRuPerDcc_));
813  bzero(ebRuActive_, sizeof(ebRuActive_));
814 
815  for(int idcc=0; idcc<nECALDcc; idcc++) {
816  for(int isc=0; isc<nDccChs; isc++) {
817  nPerRu_[idcc][isc] = 0;
818  }
819  }
820 
821  for(int ietindex = 0; ietindex < 34; ietindex++ ) {
822  for(int iptindex = 0; iptindex < 72; iptindex++ ) {
823  nCryTower[iptindex][ietindex] = 0;
824  }
825  }
826 
827 }
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 416 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.

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file EBSelectiveReadoutTask.cc.

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

105  {
106 
107  ievt_ = 0;
108 
109  if ( dqmStore_ ) {
110  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
111  dqmStore_->rmdir(prefixME_ + "/EBSelectiveReadoutTask");
112  }
113 
114 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2530
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void EBSelectiveReadoutTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 116 of file EBSelectiveReadoutTask.cc.

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

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

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

converse of iPhi2cIndex() method.

Definition at line 192 of file EBSelectiveReadoutTask.h.

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

converse of iXY2cIndex() method.

Definition at line 180 of file EBSelectiveReadoutTask.h.

180  {
181  return iX0+1;
182 }
void EBSelectiveReadoutTask::cleanup ( void  )
protected

Cleanup.

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

331  {
332 
333  if ( ! init_ ) return;
334 
335  if ( dqmStore_ ) {
336 
337  dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask");
338 
340  EBTowerSize_ = 0;
341 
343  EBTTFMismatch_ = 0;
344 
346  EBDccEventSize_ = 0;
347 
349  EBDccEventSizeMap_ = 0;
350 
353 
356 
359 
362 
365 
368 
371 
373  EBTTFlags_ = 0;
374 
376  EBCompleteZSMap_ = 0;
377 
379  EBCompleteZSCount_ = 0;
380 
382  EBDroppedFRMap_ = 0;
383 
385  EBDroppedFRCount_ = 0;
386 
388  EBEventSize_ = 0;
389 
392 
395 
398 
401 
402  }
403 
404  init_ = false;
405 
406 }
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:2572
MonitorElement * EBHighInterestPayload_
MonitorElement * EBHighInterestTriggerTowerFlagMap_
MonitorElement * EBLowInterestTriggerTowerFlagMap_
MonitorElement * EBHighInterestZsFIR_
MonitorElement * EBDroppedFRCount_
MonitorElement * EBReadoutUnitForcedBitMap_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
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 947 of file EBSelectiveReadoutTask.cc.

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

Referenced by beginRun(), and EBSelectiveReadoutTask().

947  {
948  bool notNormalized = false;
949  bool notInt = false;
950  for(unsigned i=0; i < weightsForZsFIR.size(); ++i){
951  if(weightsForZsFIR[i] > 1.) notNormalized = true;
952  if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true;
953  }
954  if(notInt && notNormalized){
955  throw cms::Exception("InvalidParameter")
956  << "weigtsForZsFIR paramater values are not valid: they "
957  << "must either be integer and uses the hardware representation "
958  << "of the weights or less or equal than 1 and used the normalized "
959  << "representation.";
960  }
961  edm::LogInfo log("DccFir");
962  if(notNormalized){
963  firWeights_ = std::vector<int>(weightsForZsFIR.size());
964  for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){
965  firWeights_[i] = (int)weightsForZsFIR[i];
966  }
967  } else{
968  firWeights_ = getFIRWeights(weightsForZsFIR);
969  }
970 
971  log << "Input weights for FIR: ";
972  for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){
973  log << weightsForZsFIR[i] << "\t";
974  }
975 
976  double s2 = 0.;
977  log << "\nActual FIR weights: ";
978  for(unsigned i = 0; i < firWeights_.size(); ++i){
979  log << firWeights_[i] << "\t";
980  s2 += firWeights_[i]*firWeights_[i];
981  }
982 
983  s2 = sqrt(s2);
984  log << "\nNormalized FIR weights after hw representation rounding: ";
985  for(unsigned i = 0; i < firWeights_.size(); ++i){
986  log << firWeights_[i] / (double)(1<<10) << "\t";
987  }
988 
989  log <<"\nFirst FIR sample: " << firstFIRSample_;
990 }
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:46
std::vector< int > firWeights_
int EBSelectiveReadoutTask::dccIndex ( int  i,
int  j 
) const
private

Gets the index of the DCC reading a crystal

Parameters
iiEta
jiPhi
Returns
DCC index between 0 and 17

Definition at line 872 of file EBSelectiveReadoutTask.cc.

Referenced by dccNum().

872  {
873  //a SM is 85 crystal long:
874  int iEtaSM = i/85;
875  //a SM is 20 crystal wide:
876  int iPhiSM = j/20;
877  //DCC numbers start at 9 in the barrel and there 18 DCC/SM
878  return 9+18*iEtaSM+iPhiSM;
879 }
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 834 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().

834  {
835  int j;
836  int k;
837 
838  if ( xtalId.det()!=DetId::Ecal ) {
839  throw cms::Exception("EBSelectiveReadoutTask") << "Crystal does not belong to ECAL";
840  }
841 
842  if(xtalId.subdetId()==EcalBarrel){
843  EBDetId ebDetId(xtalId);
844  j = iEta2cIndex(ebDetId.ieta());
845  k = iPhi2cIndex(ebDetId.iphi());
846  } else {
847  throw cms::Exception("EBSelectiveReadoutTask") << "Not ECAL barrel.";
848  }
849  int iDcc0 = dccIndex(j,k);
850  assert(iDcc0>=0 && iDcc0<nECALDcc);
851  return iDcc0+1;
852 }
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 237 of file EBSelectiveReadoutTask.h.

References dccPhiIndexOfRU().

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

Referenced by dccPhiIndex().

866  {
867  //iEta=i, iPhi=j
868  //phi edge of a SM is 4 TT
869  return j/4;
870 }
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 884 of file EBSelectiveReadoutTask.cc.

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

Referenced by anaDigi().

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

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 408 of file EBSelectiveReadoutTask.cc.

References cleanup(), enableCleanup_, and ievt_.

408  {
409 
410  edm::LogInfo("EBSelectiveReadoutTask") << "analyzed " << ievt_ << " events";
411 
412  if ( enableCleanup_ ) this->cleanup();
413 
414 }
void EBSelectiveReadoutTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 159 of file EBSelectiveReadoutTask.cc.

159  {
160 
161 }
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 283 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

283 { 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 215 of file EBSelectiveReadoutTask.h.

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

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

References EB.

Referenced by getDccEventSize(), and getEbEventSize().

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

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

Referenced by analyze().

854  {
855  double ruHeaderPayload = 0.;
856  const int nEEDcc = 18;
857  const int firstEbDcc0 = nEEDcc/2;
858  for (int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEBDcc; ++iDcc0 ) {
859  ruHeaderPayload += nRuPerDcc_[iDcc0]*8.;
860  }
861  return getDccOverhead(EB)*nEBDcc +
862  nReadXtals*bytesPerCrystal +
863  ruHeaderPayload;
864 }
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 932 of file EBSelectiveReadoutTask.cc.

References abs, i, and min.

Referenced by configFirWeights().

933  {
934  const int nFIRTaps = 6;
935  std::vector<int> firWeights(nFIRTaps, 0); //default weight: 0;
936  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
937  for(unsigned i=0; i < std::min((size_t)nFIRTaps,normalizedWeights.size()); ++i){
938  firWeights[i] = lround(normalizedWeights[i] * (1<<10));
939  if(std::abs(firWeights[i])>maxWeight){//overflow
940  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
941  }
942  }
943  return firWeights;
944 }
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 153 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and dccNum().

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

Referenced by anaDigi(), and dccNum().

160  {
161  return iPhi-1;
162 }
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 174 of file EBSelectiveReadoutTask.h.

174  {
175  return iX-1;
176 }
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 830 of file EBSelectiveReadoutTask.cc.

References EBDetId::tower().

Referenced by anaDigi().

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

Reset.

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

163  {
164 
165  if ( EBTowerSize_ ) EBTowerSize_->Reset();
166 
168 
170 
172 
174 
176 
178 
180 
182 
184 
186 
187  if ( EBTTFlags_ ) EBTTFlags_->Reset();
188 
190 
192 
194 
196 
197  if ( EBEventSize_ ) EBEventSize_->Reset();
198 
200 
202 
204 
206 
207 }
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 209 of file EBSelectiveReadoutTask.cc.

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

Referenced by analyze().

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

Member Data Documentation

const int EBSelectiveReadoutTask::bytesPerCrystal = 24
staticprotected

Number of bytes per crystal.

Definition at line 91 of file EBSelectiveReadoutTask.h.

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

DQMStore* EBSelectiveReadoutTask::dqmStore_
private

Definition at line 325 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSCount_
private

Definition at line 356 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBCompleteZSMap_
private

Definition at line 355 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDccEventSize_
private

Definition at line 343 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDccEventSizeMap_
private

Definition at line 344 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EBDigiCollection_
private

Definition at line 333 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRCount_
private

Definition at line 358 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBDroppedFRMap_
private

Definition at line 357 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBEventSize_
private

Definition at line 359 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagCount_
private

Definition at line 349 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBFullReadoutSRFlagMap_
private

Definition at line 348 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestPayload_
private

Definition at line 360 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestTriggerTowerFlagMap_
private

Definition at line 351 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBHighInterestZsFIR_
private

Definition at line 362 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestPayload_
private

Definition at line 361 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestTriggerTowerFlagMap_
private

Definition at line 353 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBLowInterestZsFIR_
private

Definition at line 363 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBMediumInterestTriggerTowerFlagMap_
private

Definition at line 352 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBReadoutUnitForcedBitMap_
private

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

Referenced by anaDigi(), and anaDigiInit().

edm::InputTag EBSelectiveReadoutTask::EBSRFlagCollection_
private

Definition at line 336 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBTowerSize_
private

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

Referenced by anaDigi().

MonitorElement* EBSelectiveReadoutTask::EBTTFlags_
private

Definition at line 354 of file EBSelectiveReadoutTask.h.

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

MonitorElement* EBSelectiveReadoutTask::EBTTFMismatch_
private

Definition at line 346 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EBUnsuppressedDigiCollection_
private

Definition at line 334 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask().

MonitorElement* EBSelectiveReadoutTask::EBZeroSuppression1SRFlagMap_
private

Definition at line 350 of file EBSelectiveReadoutTask.h.

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

edm::InputTag EBSelectiveReadoutTask::EcalRecHitCollection_
private

Definition at line 335 of file EBSelectiveReadoutTask.h.

edm::InputTag EBSelectiveReadoutTask::EcalTrigPrimDigiCollection_
private

Definition at line 337 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and EBSelectiveReadoutTask().

bool EBSelectiveReadoutTask::enableCleanup_
private

Definition at line 329 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and endJob().

edm::InputTag EBSelectiveReadoutTask::FEDRawDataCollection_
private

Definition at line 338 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 321 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 316 of file EBSelectiveReadoutTask.h.

Referenced by anaDigi(), and configFirWeights().

int EBSelectiveReadoutTask::ievt_
private

Definition at line 323 of file EBSelectiveReadoutTask.h.

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

bool EBSelectiveReadoutTask::init_
private

Definition at line 365 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::kByte = 1024
staticprotected

Definition at line 64 of file EBSelectiveReadoutTask.h.

Referenced by analyze().

bool EBSelectiveReadoutTask::mergeRuns_
private

Definition at line 331 of file EBSelectiveReadoutTask.h.

Referenced by beginRun(), and EBSelectiveReadoutTask().

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

To store the readout crystals / tower.

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

Referenced by anaDigiInit().

int EBSelectiveReadoutTask::nEb_
private

ECAL barrel read channel count

Definition at line 288 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nEBDcc = 36
staticprotected

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

int EBSelectiveReadoutTask::nEbHI_
private

ECAL barrel high interest read channel count

Definition at line 296 of file EBSelectiveReadoutTask.h.

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

int EBSelectiveReadoutTask::nEbLI_
private

ECAL barrel low interest read channel count

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

const int EBSelectiveReadoutTask::nEbRus = 36*68
staticprotected

number of RUs for EB

Definition at line 70 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nECALDcc = 54
staticprotected

Definition at line 62 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 127 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 103 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 112 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 115 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 97 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 118 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 124 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 121 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 100 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 106 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 109 of file EBSelectiveReadoutTask.h.

Referenced by analyze(), and beginRun().

int EBSelectiveReadoutTask::nPerDcc_[nECALDcc]
private

ECAL read channel count for each DCC:

Definition at line 300 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 304 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 308 of file EBSelectiveReadoutTask.h.

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

const int EBSelectiveReadoutTask::nTTEta = 34
staticprotected

Constants.

Definition at line 60 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtEta = 56
staticprotected

Number of Trigger Towers along Eta.

Definition at line 85 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTTPhi = 72
staticprotected

Definition at line 61 of file EBSelectiveReadoutTask.h.

const int EBSelectiveReadoutTask::nTtPhi = 72
staticprotected

Number of Trigger Towers along Phi.

Definition at line 88 of file EBSelectiveReadoutTask.h.

std::string EBSelectiveReadoutTask::prefixME_
private

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

const EcalSRSettings* EBSelectiveReadoutTask::settings_
private

Definition at line 368 of file EBSelectiveReadoutTask.h.

Referenced by beginRun().

bool EBSelectiveReadoutTask::useCondDb_
private

Definition at line 367 of file EBSelectiveReadoutTask.h.

Referenced by beginRun(), and EBSelectiveReadoutTask().

float EBSelectiveReadoutTask::xbins[37]
private

Definition at line 340 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().

float EBSelectiveReadoutTask::ybins[89]
private

Definition at line 341 of file EBSelectiveReadoutTask.h.

Referenced by EBSelectiveReadoutTask(), and setup().