CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalEBTrigPrimAnalyzer Class Reference

#include <EcalEBTrigPrimAnalyzer.h>

Inheritance diagram for EcalEBTrigPrimAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 EcalEBTrigPrimAnalyzer (const edm::ParameterSet &)
 
void endJob () override
 
 ~EcalEBTrigPrimAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

int getIndex (const EBDigiCollection *, EcalTrigTowerDetId &id)
 
void init (const edm::EventSetup &)
 

Private Attributes

edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecordbarrelGeomToken_
 
bool debug_
 
TH1I * ecal_et_ [2]
 
TH1I * ecal_fgvb_ [2]
 
std::vector< std::string > ecal_parts_
 
TH1I * ecal_tt_ [2]
 
float eRec_
 
edm::ESHandle< EcalTrigTowerConstituentsMapeTTmap_
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordeTTmapToken_
 
int fg_
 
TH1F * hAllRechitEt_
 
TH1F * hAllTPperEvt_
 
TH1F * hDeltaEt_
 
TH1I * histBar
 
TH1I * histEndc
 
TFile * histfile_
 
TH1F * hRatioEt_
 
TH1F * hRechitEt_
 
TH2F * hRH_iphiVsieta_
 
TH2F * hRH_iphiVsieta_fullrange_
 
TH2F * hTP_iphiVsieta_
 
TH2F * hTP_iphiVsieta_fullrange_
 
TH1F * hTPEt_
 
TH1F * hTPoverRechit_
 
TH1F * hTPperEvt_
 
TH2F * hTPvsRechit_
 
TH2F * hTPvsTow_eta_
 
TH2F * hTPvsTow_ieta_
 
int nEvents_
 
edm::EDGetTokenT< EcalEBTrigPrimDigiCollectionprimToken_
 
bool recHits_
 
edm::EDGetTokenT< EcalRecHitCollectionrechits_labelEB_
 
int rhIeta_
 
int rhIphi_
 
edm::EDGetTokenT< EBDigiCollectiontokenEBdigi_
 
EcalTPGScale::Tokens tokens_
 
int tpgADC_
 
float tpgGeV_
 
int tpIeta_
 
int tpIphi_
 
TTree * tree_
 
int ttf_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 29 of file EcalEBTrigPrimAnalyzer.h.

Constructor & Destructor Documentation

◆ EcalEBTrigPrimAnalyzer()

EcalEBTrigPrimAnalyzer::EcalEBTrigPrimAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file EcalEBTrigPrimAnalyzer.cc.

References barrelGeomToken_, debug_, ecal_et_, ecal_fgvb_, ecal_parts_, ecal_tt_, eRec_, eTTmapToken_, fg_, edm::ParameterSet::getParameter(), hAllRechitEt_, hAllTPperEvt_, hDeltaEt_, histfile_, hRatioEt_, hRechitEt_, hRH_iphiVsieta_, hRH_iphiVsieta_fullrange_, hTP_iphiVsieta_, hTP_iphiVsieta_fullrange_, hTPEt_, hTPoverRechit_, hTPperEvt_, hTPvsRechit_, hTPvsTow_eta_, hTPvsTow_ieta_, mps_fire::i, nEvents_, primToken_, recHits_, rechits_labelEB_, rhIeta_, rhIphi_, runGCPTkAlMap::title, tokenEBdigi_, tpgADC_, tpgGeV_, tpIeta_, tpIphi_, tree_, and ttf_.

35 
36 {
37  ecal_parts_.push_back("Barrel");
38 
39  histfile_ = new TFile("histos.root", "RECREATE");
40  tree_ = new TTree("TPGtree", "TPGtree");
41  tree_->Branch("tpIphi", &tpIphi_, "tpIphi/I");
42  tree_->Branch("tpIeta", &tpIeta_, "tpIeta/I");
43  tree_->Branch("rhIphi", &rhIphi_, "rhIphi/I");
44  tree_->Branch("rhIeta", &rhIeta_, "rhIeta/I");
45  tree_->Branch("eRec", &eRec_, "eRec/F");
46  tree_->Branch("tpgADC", &tpgADC_, "tpgADC/I");
47  tree_->Branch("tpgGeV", &tpgGeV_, "tpgGeV/F");
48  tree_->Branch("ttf", &ttf_, "ttf/I");
49  tree_->Branch("fg", &fg_, "fg/I");
50  for (unsigned int i = 0; i < ecal_parts_.size(); ++i) {
51  char title[30];
52  sprintf(title, "%s_Et", ecal_parts_[i].c_str());
53  ecal_et_[i] = new TH1I(title, "Et", 255, 0, 255);
54  sprintf(title, "%s_ttf", ecal_parts_[i].c_str());
55  ecal_tt_[i] = new TH1I(title, "TTF", 10, 0, 10);
56  sprintf(title, "%s_fgvb", ecal_parts_[i].c_str());
57  ecal_fgvb_[i] = new TH1I(title, "FGVB", 10, 0, 10);
58  }
59  eTTmapToken_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
60  recHits_ = iConfig.getParameter<bool>("AnalyzeRecHits");
61  debug_ = iConfig.getParameter<bool>("Debug");
62  rechits_labelEB_ = consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("inputRecHitsEB"));
63  primToken_ = consumes<EcalEBTrigPrimDigiCollection>(iConfig.getParameter<edm::InputTag>("inputTP"));
64  barrelGeomToken_ = esConsumes<CaloSubdetectorGeometry, EcalBarrelGeometryRecord>(edm::ESInputTag("", "EcalBarrel"));
65  tokenEBdigi_ = consumes<EBDigiCollection>(iConfig.getParameter<edm::InputTag>("barrelEcalDigis"));
66  nEvents_ = 0;
67 
68  hTPvsTow_eta_ = new TH2F("TP_vs_Tow_eta", "TP vs Tow eta ; #eta(tow); #eta(tp)", 50, -2.5, 2.5, 50, -2.5, 2.5);
69  hAllTPperEvt_ = new TH1F("AllTPperEvt", "TP per Event; N_{TP}; ", 100, 0., 20000.);
70  hTPperEvt_ = new TH1F("TPperEvt", "N_{TP} per Event; N_{TP}; ", 100, 0., 500.);
71  hTP_iphiVsieta_ = new TH2F("TP_iphiVsieta", "TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)", 10, 70, 80, 10, 340, 350);
73  new TH2F("TP_iphiVsieta_fullrange", "TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)", 200, -100, 100, 350, 0, 350);
74 
75  if (recHits_) {
77  new TH2F("TP_vs_Tow_ieta", "TP vs Tow ieta ; i#eta(tow); i#eta(tp)", 200, -100, 100, 200, -100, 100);
78 
79  hTPvsRechit_ = new TH2F("TP_vs_RecHit", "TP vs rechit Et;E_{T}(rh) (GeV);E_{T}(tp) (GeV)", 100, 0, 50, 100, 0, 50);
80  hDeltaEt_ = new TH1F("DeltaEt", "[Et(rh)-Et(TP)]/Et(rh); [E_{T}(rh)-E_{T}(tp)]/E_{T}(rh); Counts", 200, -1, 1);
81  hTPoverRechit_ = new TH1F("TP_over_RecHit", "Et(TP/rechit); E_{T}(tp)/E_{T}(rh); Counts", 200, 0, 2);
82  hRechitEt_ = new TH1F("RecHitEt", "E_{T};E_{T}(rh) (GeV);Counts", 100, 0, 50);
83  hTPEt_ = new TH1F("TPEt", "E_{T}{tp);E_{T}(rh) (GeV);Count", 100, 0, 50);
84  hRatioEt_ = new TH1F("RatioTPoverRH", "Et", 100, 0, 50);
85  hAllRechitEt_ = new TH1F("AllRecHit", "Et", 100, 0, 50);
86 
87  hRH_iphiVsieta_ = new TH2F("RH_iphiVsieta", "RH i#phi vs i#eta ; i#eta(rh); i#phi(rh)", 10, 70, 80, 10, 340, 350);
89  new TH2F("RH_iphiVsieta_fullrange", "RH i#phi vs i#eta ; i#eta(rh); i#phi(rh)", 200, -100, 100, 350, 0, 350);
90  }
91 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< EcalRecHitCollection > rechits_labelEB_
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > barrelGeomToken_
EcalTPGScale::Tokens tokens_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< EBDigiCollection > tokenEBdigi_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTmapToken_
std::vector< std::string > ecal_parts_
edm::EDGetTokenT< EcalEBTrigPrimDigiCollection > primToken_

◆ ~EcalEBTrigPrimAnalyzer()

EcalEBTrigPrimAnalyzer::~EcalEBTrigPrimAnalyzer ( )
override

Definition at line 93 of file EcalEBTrigPrimAnalyzer.cc.

References histfile_.

93  {
94  // do anything here that needs to be done at desctruction time
95  // (e.g. close files, deallocate resources etc.)
96 
97  histfile_->Write();
98  histfile_->Close();
99 }

Member Function Documentation

◆ analyze()

void EcalEBTrigPrimAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 108 of file EcalEBTrigPrimAnalyzer.cc.

References barrelGeomToken_, gather_cfg::cout, ztail::d, debug_, ecal_et_, hcalRecHitTable_cff::energy, eRec_, CaloSubdetectorGeometry::getGeometry(), edm::EventSetup::getHandle(), hAllRechitEt_, hAllTPperEvt_, hDeltaEt_, hRatioEt_, hRechitEt_, hRH_iphiVsieta_, hRH_iphiVsieta_fullrange_, hTP_iphiVsieta_, hTP_iphiVsieta_fullrange_, hTPEt_, hTPoverRechit_, hTPperEvt_, hTPvsRechit_, mps_fire::i, EBDetId::ieta(), iEvent, init(), EBDetId::iphi(), dqmiolumiharvest::j, nEvents_, primToken_, edm::Handle< T >::product(), edm::ESHandle< T >::product(), recHits_, rechits_labelEB_, rhIeta_, rhIphi_, funct::sin(), edm::SortedCollection< T, SORT >::size(), theta(), tokens_, cmsswSequenceInfo::tp, tpgADC_, tpgGeV_, tpIeta_, tpIphi_, and tree_.

108  {
109  using namespace edm;
110  using namespace std;
111  nEvents_++;
112 
113  if (nEvents_ == 1)
114  this->init(iSetup);
115 
116  // Get input
118  iEvent.getByToken(primToken_, tp);
119  //
120  /*
121  edm::Handle<EBDigiCollection> barrelDigiHandle;
122  const EBDigiCollection *ebdigi=NULL;
123  iEvent.getByToken(tokenEBdigi_,barrelDigiHandle);
124  ebdigi=barrelDigiHandle.product();
125  */
126 
127  for (unsigned int i = 0; i < tp.product()->size(); i++) {
128  EcalEBTriggerPrimitiveDigi d = (*(tp.product()))[i];
129  int subdet = 0;
130  if (subdet == 0) {
131  ecal_et_[subdet]->Fill(d.encodedEt());
132  }
133  }
134 
135  // if (!recHits_) return;
136 
137  edm::Handle<EcalRecHitCollection> rechit_EB_col;
138  if (recHits_) {
139  // get the RecHits
140  iEvent.getByToken(rechits_labelEB_, rechit_EB_col);
141  }
142 
143  edm::ESHandle<CaloSubdetectorGeometry> theBarrelGeometry_handle = iSetup.getHandle(barrelGeomToken_);
144  const CaloSubdetectorGeometry* theBarrelGeometry = theBarrelGeometry_handle.product();
145 
146  if (debug_) {
147  std::cout << " TP analyzer =================> Treating event " << iEvent.id() << " Number of TPs "
148  << tp.product()->size() << std::endl;
149  if (recHits_)
150  std::cout << " Number of EB rechits " << rechit_EB_col.product()->size() << std::endl;
151  }
152  hAllTPperEvt_->Fill(float(tp.product()->size()));
153 
154  //if ( iEvent.id().event() != 648) return;
155 
156  //EcalEBTPGScale ecalScale ;
157  EcalTPGScale ecalScale(tokens_, iSetup);
158 
159  // for(unsigned int iDigi = 0; iDigi < ebdigi->size() ; ++iDigi) {
160  // EBDataFrame myFrame((*ebdigi)[iDigi]);
161  // const EBDetId & myId = myFrame.id();
162 
163  int nTP = 0;
164  for (unsigned int i = 0; i < tp.product()->size(); i++) {
165  EcalEBTriggerPrimitiveDigi d = (*(tp.product()))[i];
166  const EBDetId TPid = d.id();
167  // if ( myId != TPid ) continue;
168 
169  /*
170  int index=getIndex(ebdigi,coarser);
171  std::cout << " Same xTal " << myId << " " << TPid << " coarser " << coarser << " index " << index << std::endl;
172  double Et = ecalScale.getTPGInGeV(d.encodedEt(), coarser) ;
173  */
174  //this works if the energy is compressed into 8 bits float Et=d.compressedEt()/2.; // 2ADC counts/GeV
175  float Et = d.encodedEt() / 8.; // 8 ADCcounts/GeV
176  if (Et <= 5)
177  continue;
178  //if ( Et<= 0 ) continue;
179  nTP++;
180 
181  std::cout << " TP digi size " << d.size() << std::endl;
182  for (int iBx = 0; iBx < d.size(); iBx++) {
183  std::cout << " TP samples " << d.sample(iBx) << std::endl;
184  }
185 
186  // EcalTrigTowerDetId coarser=(*eTTmap_).towerOf(myId);
187  // does not work float etaTow = theBarrelGeometry->getGeometry(coarser)->getPosition().theta();
188  // float etaTP = theBarrelGeometry->getGeometry(TPid)->getPosition().eta();
189  // does not work hTPvsTow_eta_->Fill ( etaTow, etaTP );
190  // hTPvsTow_ieta_->Fill ( coarser.ieta(), TPid.ieta() );
191 
192  tpIphi_ = TPid.iphi();
193  tpIeta_ = TPid.ieta();
194  tpgADC_ = d.encodedEt();
195  tpgGeV_ = Et;
196 
197  hTP_iphiVsieta_->Fill(TPid.ieta(), TPid.iphi(), Et);
198  hTP_iphiVsieta_fullrange_->Fill(TPid.ieta(), TPid.iphi(), Et);
199 
200  if (recHits_) {
201  for (unsigned int j = 0; j < rechit_EB_col.product()->size(); j++) {
202  const EBDetId& myid1 = (*rechit_EB_col.product())[j].id();
203  float theta = theBarrelGeometry->getGeometry(myid1)->getPosition().theta();
204  float rhEt = ((*rechit_EB_col.product())[j].energy()) * sin(theta);
205  if (myid1 == TPid) {
206  if (debug_)
207  std::cout << " Analyzer same cristal " << myid1 << " " << TPid << std::endl;
208  // if ( rhEt < 1.5 && Et > 10 ) {
209  // std::cout << " TP analyzer =================> Treating event "<<iEvent.id()<< ", Number of EB rechits "<< rechit_EB_col.product()->size() << " Number of TPs " << tp.product()->size() << std::endl;
210  //std::cout << " TP compressed et " << d.encodedEt() << " Et in GeV " << Et << " RH Et " << rhEt << " Et/rhEt " << Et/rhEt << std::endl;
211  //}
212 
213  //std::cout << " TP out " << d << std::endl;
214 
215  // for (int isam=0;isam< d.size();++isam) {
216  // std::cout << " d[isam].raw() " << d[isam].raw() << std::endl;
217  //}
218 
219  rhIphi_ = myid1.iphi();
220  rhIeta_ = myid1.ieta();
221  hRH_iphiVsieta_->Fill(myid1.ieta(), myid1.iphi(), rhEt);
222  hRH_iphiVsieta_fullrange_->Fill(myid1.ieta(), myid1.iphi(), rhEt);
223 
224  hTPvsRechit_->Fill(rhEt, Et);
225  hTPoverRechit_->Fill(Et / rhEt);
226  hDeltaEt_->Fill((rhEt - Et) / rhEt);
227  if (debug_)
228  std::cout << " TP compressed et " << d.encodedEt() << " Et in GeV " << Et << " RH Et " << rhEt
229  << " Et/rhEt " << Et / rhEt << std::endl;
230  hRechitEt_->Fill(rhEt);
231  hTPEt_->Fill(Et);
232  if (rhEt < 1000000)
233  eRec_ = rhEt;
234  tree_->Fill();
235  }
236 
237  } // end loop of recHits
238  } // if recHits
239 
240  } // end loop over TP collection
241 
242  // } // end loop over digi collection
243 
244  hTPperEvt_->Fill(float(nTP));
245 
246  if (recHits_) {
247  hRatioEt_->Divide(hTPEt_, hRechitEt_);
248  for (unsigned int j = 0; j < rechit_EB_col.product()->size(); j++) {
249  const EBDetId& myid1 = (*rechit_EB_col.product())[j].id();
250  float theta = theBarrelGeometry->getGeometry(myid1)->getPosition().theta();
251  float rhEt = ((*rechit_EB_col.product())[j].energy()) * sin(theta);
252  if (rhEt > 0)
253  hAllRechitEt_->Fill(rhEt);
254  }
255  }
256 }
size_type size() const
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< EcalRecHitCollection > rechits_labelEB_
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > barrelGeomToken_
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EcalTPGScale::Tokens tokens_
int iEvent
Definition: GenABIO.cc:224
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
d
Definition: ztail.py:151
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
HLT enums.
edm::EDGetTokenT< EcalEBTrigPrimDigiCollection > primToken_
void init(const edm::EventSetup &)
Geom::Theta< T > theta() const

◆ endJob()

void EcalEBTrigPrimAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 258 of file EcalEBTrigPrimAnalyzer.cc.

References ecal_et_, ecal_fgvb_, ecal_parts_, ecal_tt_, hAllRechitEt_, hAllTPperEvt_, hDeltaEt_, hRatioEt_, hRechitEt_, hRH_iphiVsieta_, hRH_iphiVsieta_fullrange_, hTP_iphiVsieta_, hTP_iphiVsieta_fullrange_, hTPEt_, hTPoverRechit_, hTPperEvt_, hTPvsRechit_, hTPvsTow_eta_, hTPvsTow_ieta_, mps_fire::i, and recHits_.

258  {
259  for (unsigned int i = 0; i < ecal_parts_.size(); ++i) {
260  ecal_et_[i]->Write();
261  ecal_tt_[i]->Write();
262  ecal_fgvb_[i]->Write();
263  }
264 
265  hAllTPperEvt_->Write();
266  hTPperEvt_->Write();
267 
268  if (recHits_) {
269  hTPvsTow_ieta_->Write();
270  hTPvsTow_eta_->Write();
271  hTPvsRechit_->Write();
272  hTPoverRechit_->Write();
273  hAllRechitEt_->Write();
274  hRechitEt_->Write();
275  hDeltaEt_->Write();
276  hTPEt_->Write();
277  hRatioEt_->Write();
278  hTP_iphiVsieta_->Write();
279  hRH_iphiVsieta_->Write();
280  hTP_iphiVsieta_fullrange_->Write();
281  hRH_iphiVsieta_fullrange_->Write();
282  }
283 }
std::vector< std::string > ecal_parts_

◆ getIndex()

int EcalEBTrigPrimAnalyzer::getIndex ( const EBDigiCollection ,
EcalTrigTowerDetId id 
)
inlineprivate

Definition at line 81 of file EcalEBTrigPrimAnalyzer.h.

81 { return id.hashedIndex(); }

◆ init()

void EcalEBTrigPrimAnalyzer::init ( const edm::EventSetup iSetup)
private

Definition at line 101 of file EcalEBTrigPrimAnalyzer.cc.

References eTTmap_, eTTmapToken_, and edm::EventSetup::getHandle().

Referenced by analyze().

101 { eTTmap_ = iSetup.getHandle(eTTmapToken_); }
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTmapToken_
edm::ESHandle< EcalTrigTowerConstituentsMap > eTTmap_

Member Data Documentation

◆ barrelGeomToken_

edm::ESGetToken<CaloSubdetectorGeometry, EcalBarrelGeometryRecord> EcalEBTrigPrimAnalyzer::barrelGeomToken_
private

Definition at line 78 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ debug_

bool EcalEBTrigPrimAnalyzer::debug_
private

Definition at line 75 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ ecal_et_

TH1I* EcalEBTrigPrimAnalyzer::ecal_et_[2]
private

Definition at line 43 of file EcalEBTrigPrimAnalyzer.h.

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

◆ ecal_fgvb_

TH1I* EcalEBTrigPrimAnalyzer::ecal_fgvb_[2]
private

Definition at line 45 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and endJob().

◆ ecal_parts_

std::vector<std::string> EcalEBTrigPrimAnalyzer::ecal_parts_
private

Definition at line 42 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and endJob().

◆ ecal_tt_

TH1I* EcalEBTrigPrimAnalyzer::ecal_tt_[2]
private

Definition at line 44 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and endJob().

◆ eRec_

float EcalEBTrigPrimAnalyzer::eRec_
private

Definition at line 68 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ eTTmap_

edm::ESHandle<EcalTrigTowerConstituentsMap> EcalEBTrigPrimAnalyzer::eTTmap_
private

Definition at line 76 of file EcalEBTrigPrimAnalyzer.h.

Referenced by init().

◆ eTTmapToken_

edm::ESGetToken<EcalTrigTowerConstituentsMap, IdealGeometryRecord> EcalEBTrigPrimAnalyzer::eTTmapToken_
private

Definition at line 77 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and init().

◆ fg_

int EcalEBTrigPrimAnalyzer::fg_
private

Definition at line 66 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer().

◆ hAllRechitEt_

TH1F* EcalEBTrigPrimAnalyzer::hAllRechitEt_
private

Definition at line 53 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hAllTPperEvt_

TH1F* EcalEBTrigPrimAnalyzer::hAllTPperEvt_
private

Definition at line 48 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hDeltaEt_

TH1F* EcalEBTrigPrimAnalyzer::hDeltaEt_
private

Definition at line 52 of file EcalEBTrigPrimAnalyzer.h.

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

◆ histBar

TH1I * EcalEBTrigPrimAnalyzer::histBar
private

Definition at line 46 of file EcalEBTrigPrimAnalyzer.h.

◆ histEndc

TH1I* EcalEBTrigPrimAnalyzer::histEndc
private

Definition at line 46 of file EcalEBTrigPrimAnalyzer.h.

◆ histfile_

TFile* EcalEBTrigPrimAnalyzer::histfile_
private

Definition at line 47 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and ~EcalEBTrigPrimAnalyzer().

◆ hRatioEt_

TH1F* EcalEBTrigPrimAnalyzer::hRatioEt_
private

Definition at line 56 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hRechitEt_

TH1F* EcalEBTrigPrimAnalyzer::hRechitEt_
private

Definition at line 54 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hRH_iphiVsieta_

TH2F* EcalEBTrigPrimAnalyzer::hRH_iphiVsieta_
private

Definition at line 60 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hRH_iphiVsieta_fullrange_

TH2F* EcalEBTrigPrimAnalyzer::hRH_iphiVsieta_fullrange_
private

Definition at line 62 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTP_iphiVsieta_

TH2F* EcalEBTrigPrimAnalyzer::hTP_iphiVsieta_
private

Definition at line 59 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTP_iphiVsieta_fullrange_

TH2F* EcalEBTrigPrimAnalyzer::hTP_iphiVsieta_fullrange_
private

Definition at line 61 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTPEt_

TH1F* EcalEBTrigPrimAnalyzer::hTPEt_
private

Definition at line 55 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTPoverRechit_

TH1F* EcalEBTrigPrimAnalyzer::hTPoverRechit_
private

Definition at line 51 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTPperEvt_

TH1F* EcalEBTrigPrimAnalyzer::hTPperEvt_
private

Definition at line 49 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTPvsRechit_

TH2F* EcalEBTrigPrimAnalyzer::hTPvsRechit_
private

Definition at line 50 of file EcalEBTrigPrimAnalyzer.h.

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

◆ hTPvsTow_eta_

TH2F* EcalEBTrigPrimAnalyzer::hTPvsTow_eta_
private

Definition at line 58 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and endJob().

◆ hTPvsTow_ieta_

TH2F* EcalEBTrigPrimAnalyzer::hTPvsTow_ieta_
private

Definition at line 57 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer(), and endJob().

◆ nEvents_

int EcalEBTrigPrimAnalyzer::nEvents_
private

Definition at line 38 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ primToken_

edm::EDGetTokenT<EcalEBTrigPrimDigiCollection> EcalEBTrigPrimAnalyzer::primToken_
private

Definition at line 71 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ recHits_

bool EcalEBTrigPrimAnalyzer::recHits_
private

Definition at line 74 of file EcalEBTrigPrimAnalyzer.h.

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

◆ rechits_labelEB_

edm::EDGetTokenT<EcalRecHitCollection> EcalEBTrigPrimAnalyzer::rechits_labelEB_
private

Definition at line 72 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ rhIeta_

int EcalEBTrigPrimAnalyzer::rhIeta_
private

Definition at line 67 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ rhIphi_

int EcalEBTrigPrimAnalyzer::rhIphi_
private

Definition at line 67 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ tokenEBdigi_

edm::EDGetTokenT<EBDigiCollection> EcalEBTrigPrimAnalyzer::tokenEBdigi_
private

Definition at line 73 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer().

◆ tokens_

EcalTPGScale::Tokens EcalEBTrigPrimAnalyzer::tokens_
private

Definition at line 79 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze().

◆ tpgADC_

int EcalEBTrigPrimAnalyzer::tpgADC_
private

Definition at line 66 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ tpgGeV_

float EcalEBTrigPrimAnalyzer::tpgGeV_
private

Definition at line 68 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ tpIeta_

int EcalEBTrigPrimAnalyzer::tpIeta_
private

Definition at line 66 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ tpIphi_

int EcalEBTrigPrimAnalyzer::tpIphi_
private

Definition at line 66 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ tree_

TTree* EcalEBTrigPrimAnalyzer::tree_
private

Definition at line 64 of file EcalEBTrigPrimAnalyzer.h.

Referenced by analyze(), and EcalEBTrigPrimAnalyzer().

◆ ttf_

int EcalEBTrigPrimAnalyzer::ttf_
private

Definition at line 66 of file EcalEBTrigPrimAnalyzer.h.

Referenced by EcalEBTrigPrimAnalyzer().