CMS 3D CMS Logo

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

#include <JetToDigiDump.h>

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

Public Member Functions

 JetToDigiDump (const edm::ParameterSet &)
 
- 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

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

std::string CaloJetAlg
 
int DebugLevel
 
int Dump
 
std::string DumpLevel
 
int evtCount
 
bool ShowECal
 

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 15 of file JetToDigiDump.h.

Constructor & Destructor Documentation

◆ JetToDigiDump()

JetToDigiDump::JetToDigiDump ( const edm::ParameterSet cfg)

Definition at line 43 of file JetToDigiDump.cc.

44  : DumpLevel(cfg.getParameter<string>("DumpLevel")),
45  CaloJetAlg(cfg.getParameter<string>("CaloJetAlg")),
46  DebugLevel(cfg.getParameter<int>("DebugLevel")),
47  ShowECal(cfg.getParameter<bool>("ShowECal")) {}
std::string CaloJetAlg
Definition: JetToDigiDump.h:27
std::string DumpLevel
Definition: JetToDigiDump.h:26

Member Function Documentation

◆ analyze()

void JetToDigiDump::analyze ( const edm::Event evt,
const edm::EventSetup es 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 69 of file JetToDigiDump.cc.

References funct::abs(), EcalMGPASample::adc(), HcalQIESample::adc(), CaloJetAlg, isolatedTracks_cfi::caloJets, eleHcalExtractorBlocks_cff::caloTowers, HcalQIESample::capid(), DMR_cfg::cerr, gather_cfg::cout, DebugLevel, HcalDetId::depth(), DetId::det(), Dump, filterRecHits_cfi::EBRecHits, DetId::Ecal, filterRecHits_cfi::EERecHits, evtCount, edm::SortedCollection< T, SORT >::find(), edm::DataFrameContainer::find(), amptDefault_cfi::frame, EcalMGPASample::gainId(), edm::Event::getByLabel(), egHLT::errCodes::HBHERecHits, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, egHLT::errCodes::HFRecHits, mps_fire::i, EBDetId::ieta(), HcalDetId::ieta(), EBDetId::iphi(), HcalDetId::iphi(), EBDetId::ism(), EEDetId::ix(), EEDetId::iy(), dqmiolumiharvest::j, metsig::jet, dqmdumpme::k, custom_jme_cff::nConstituents, HcalQIESample::nominal_fC(), hcalTTPDigis_cfi::presamples, ShowECal, edm::SortedCollection< T, SORT >::size(), HcalDetId::subdet(), DetId::subdetId(), and HLT_2024v13_cff::towers.

69  {
70  int jetInd;
83  // Old:
84  //Handle<edm::SortedCollection<EBDataFrame> > EBDigis;
85  //Handle<edm::SortedCollection<EBDataFrame> > EEDigis;
86 
87  //Find the CaloTowers in leading CaloJets
88  if (DebugLevel)
89  cout << "Getting caloJets" << endl;
90 
92  if (Dump >= 2)
93  evt.getByLabel("towerMaker", caloTowers);
94  if (Dump >= 3) {
95  if (DebugLevel)
96  cout << "Getting recHits" << endl;
97  evt.getByLabel("hbhereco", HBHERecHits);
98  evt.getByLabel("horeco", HORecHits);
99  evt.getByLabel("hfreco", HFRecHits);
100  evt.getByLabel("ecalRecHit", "EcalRecHitsEB", EBRecHits);
101  evt.getByLabel("ecalRecHit", "EcalRecHitsEE", EERecHits);
102  if (DebugLevel)
103  cout << "# of hits gotten - HBHE: " << HBHERecHits->size() << endl;
104  evt.getByLabel("hcalDigis", HBHEDigis);
105  evt.getByLabel("hcalDigis", HODigis);
106  evt.getByLabel("hcalDigis", HFDigis);
107  if (DebugLevel)
108  cout << "# of digis gotten - HBHE: " << HBHEDigis->size() << endl;
109  if (ShowECal) {
110  evt.getByLabel("ecalDigis", "ebDigis", EBDigis);
111  evt.getByLabel("ecalDigis", "eeDigis", EEDigis);
112  }
113  }
114 
115  cout << endl << "Evt: " << evtCount << ", Num Jets=" << caloJets->end() - caloJets->begin() << endl;
116  if (Dump >= 1)
117  cout << " *********************************************************" << endl;
118  jetInd = 0;
119  if (Dump >= 1)
120  for (CaloJetCollection::const_iterator jet = caloJets->begin(); jet != caloJets->end(); ++jet) {
121  //2_1_? std::vector <CaloTowerPtr> towers = jet->getCaloConstituents ();
122  //2_0_7"
123  std::vector<CaloTowerPtr> towers = jet->getCaloConstituents();
124  int nConstituents = towers.size();
125  cout << " Jet: " << jetInd << ", eta=" << jet->eta() << ", phi=" << jet->phi() << ", pt=" << jet->pt()
126  << ",E=" << jet->energy() << ", EB E=" << jet->emEnergyInEB() << " ,HB E=" << jet->hadEnergyInHB()
127  << ", HO E=" << jet->hadEnergyInHO() << " ,EE E=" << jet->emEnergyInEE() << ", HE E=" << jet->hadEnergyInHE()
128  << ", HF E=" << jet->hadEnergyInHF() + jet->emEnergyInHF() << ", Num Towers=" << nConstituents << endl;
129  if (Dump >= 2)
130  cout << " =====================================================" << endl;
131  float sumTowerE = 0.0;
132  if (Dump >= 2)
133  for (int i = 0; i < nConstituents; i++) {
135  caloTowers->find(towers[i]->id()); //Find the tower from its CaloTowerDetID
136  if (theTower == caloTowers->end()) {
137  cerr << "Bug? Can't find the tower" << endl;
138  return;
139  }
140  int ietaTower = towers[i]->id().ieta();
141  int iphiTower = towers[i]->id().iphi();
142  sumTowerE += theTower->energy();
143  size_t numRecHits = theTower->constituentsSize();
144  cout << " Tower " << i << ": ieta=" << ietaTower << ", eta=" << theTower->eta() << ", iphi=" << iphiTower
145  << ", phi=" << theTower->phi() << ", energy=" << theTower->energy() << ", EM=" << theTower->emEnergy()
146  << ", HAD=" << theTower->hadEnergy() << ", HO=" << theTower->outerEnergy()
147  << ", Num Rec Hits =" << numRecHits << endl;
148  if (Dump >= 3)
149  cout << " ------------------------------------------------" << endl;
150  float sumRecHitE = 0.0;
151  if (Dump >= 3)
152  for (size_t j = 0; j < numRecHits; j++) {
153  DetId RecHitDetID = theTower->constituent(j);
154  DetId::Detector DetNum = RecHitDetID.det();
155  if (DetNum == DetId::Hcal) {
156  //cout << "RecHit " << j << ": Detector = " << DetNum << ": Hcal " << endl;
157  HcalDetId HcalID = RecHitDetID;
158  HcalSubdetector HcalNum = HcalID.subdet();
159  if (HcalNum == HcalBarrel) {
160  HBHERecHitCollection::const_iterator theRecHit = HBHERecHits->find(HcalID);
161  sumRecHitE += theRecHit->energy();
162  HBHEDigiCollection::const_iterator theDigis = HBHEDigis->find(HcalID);
163  cout << " RecHit: " << j << ": HB, ieta=" << HcalID.ieta() << ", iphi=" << HcalID.iphi()
164  << ", depth=" << HcalID.depth() << ", energy=" << theRecHit->energy()
165  << ", time=" << theRecHit->time() << ", All Digis=" << theDigis->size()
166  << ", presamples =" << theDigis->presamples() << endl;
167  /* const HcalElectronicsId HW_ID = theDigis->elecId();
168  cout << "Digi: Index=" << HW_ID.linearIndex() << ", raw ID=" << HW_ID.rawId() << ", fiberChan=" << HW_ID.fiberChanId() << ", fiberInd=" << HW_ID.fiberIndex() \
169  << ", HTR chan=" << HW_ID.htrChanId() << ", HTR Slot=" << HW_ID.htrSlot() << ", HDR top/bot=" << HW_ID.htrTopBottom() \
170  << ", VME crate=" << HW_ID.readoutVMECrateId() << ", DCC=" << HW_ID.dccid() << ", DCC spigot=" << HW_ID.spigot() << endl;
171  */
172  float SumDigiCharge = 0.0;
173  float EstimatedPedestal = 0.0;
174  int SamplesToAdd = 4;
175  if (Dump >= 4)
176  cout << " ......................................" << endl;
177  if (Dump >= 4)
178  for (int k = 0; k < theDigis->size(); k++) {
179  const HcalQIESample QIE = theDigis->sample(k);
180  if (k >= theDigis->presamples() && k < theDigis->presamples() + SamplesToAdd)
181  SumDigiCharge += QIE.nominal_fC();
182  if (k < theDigis->presamples() - 1)
183  EstimatedPedestal += QIE.nominal_fC() * SamplesToAdd / (theDigis->presamples() - 1);
184  cout << " Digi: " << k << ", cap ID = " << QIE.capid()
185  << ": ADC Counts = " << QIE.adc() << ", nominal fC = " << QIE.nominal_fC() << endl;
186  }
187  if (Dump >= 4)
188  cout << " 4 Digi fC =" << SumDigiCharge << ", est. ped. fC=" << EstimatedPedestal
189  << ", est. GeV/fc=" << theRecHit->energy() / (SumDigiCharge - EstimatedPedestal) << endl;
190  if (Dump >= 4)
191  cout << " ......................................" << endl;
192  } else if (HcalNum == HcalEndcap) {
193  HBHERecHitCollection::const_iterator theRecHit = HBHERecHits->find(HcalID);
194  if ((abs(HcalID.ieta()) == 28 || abs(HcalID.ieta()) == 29) && HcalID.depth() == 3) {
195  sumRecHitE += theRecHit->energy() / 2; //Depth 3 split over tower 28 & 29
196  } else {
197  sumRecHitE += theRecHit->energy();
198  }
199  HBHEDigiCollection::const_iterator theDigis = HBHEDigis->find(HcalID);
200  cout << " RecHit: " << j << ": HE, ieta=" << HcalID.ieta() << ", iphi=" << HcalID.iphi()
201  << ", depth=" << HcalID.depth() << ", energy=" << theRecHit->energy()
202  << ", time=" << theRecHit->time() << ", All Digis=" << theDigis->size()
203  << ", presamples =" << theDigis->presamples() << endl;
204  float SumDigiCharge = 0.0;
205  float EstimatedPedestal = 0.0;
206  int SamplesToAdd = 4;
207  if (Dump >= 4)
208  cout << " ......................................" << endl;
209  if (Dump >= 4)
210  for (int k = 0; k < theDigis->size(); k++) {
211  const HcalQIESample QIE = theDigis->sample(k);
212  if (k >= theDigis->presamples() && k < theDigis->presamples() + SamplesToAdd)
213  SumDigiCharge += QIE.nominal_fC();
214  if (k < theDigis->presamples() - 1)
215  EstimatedPedestal += QIE.nominal_fC() * SamplesToAdd / (theDigis->presamples() - 1);
216  cout << " Digi: " << k << ", cap ID = " << QIE.capid()
217  << ": ADC Counts = " << QIE.adc() << ", nominal fC = " << QIE.nominal_fC() << endl;
218  }
219  if (Dump >= 4)
220  cout << " 4 Digi fC =" << SumDigiCharge << ", est. ped. fC=" << EstimatedPedestal
221  << ", est. GeV/fc=" << theRecHit->energy() / (SumDigiCharge - EstimatedPedestal) << endl;
222  if (Dump >= 4)
223  cout << " ......................................" << endl;
224  } else if (HcalNum == HcalOuter) {
225  HORecHitCollection::const_iterator theRecHit = HORecHits->find(HcalID);
226  sumRecHitE += theRecHit->energy();
227  HODigiCollection::const_iterator theDigis = HODigis->find(HcalID);
228  cout << " RecHit: " << j << ": HO, ieta=" << HcalID.ieta() << ", iphi=" << HcalID.iphi()
229  << ", depth=" << HcalID.depth() << ", energy=" << theRecHit->energy()
230  << ", time=" << theRecHit->time() << ", All Digis=" << theDigis->size()
231  << ", presamples =" << theDigis->presamples() << endl;
232  float SumDigiCharge = 0.0;
233  float EstimatedPedestal = 0.0;
234  int SamplesToAdd = 4;
235  if (Dump >= 4)
236  cout << " ......................................" << endl;
237  if (Dump >= 4)
238  for (int k = 0; k < theDigis->size(); k++) {
239  const HcalQIESample QIE = theDigis->sample(k);
240  if (k >= theDigis->presamples() && k < theDigis->presamples() + SamplesToAdd)
241  SumDigiCharge += QIE.nominal_fC();
242  if (k < theDigis->presamples() - 1)
243  EstimatedPedestal += QIE.nominal_fC() * SamplesToAdd / (theDigis->presamples() - 1);
244  cout << " Digi: " << k << ", cap ID = " << QIE.capid()
245  << ": ADC Counts = " << QIE.adc() << ", nominal fC = " << QIE.nominal_fC() << endl;
246  }
247  if (Dump >= 4)
248  cout << " 4 Digi fC =" << SumDigiCharge << ", est. ped. fC=" << EstimatedPedestal
249  << ", est. GeV/fc=" << theRecHit->energy() / (SumDigiCharge - EstimatedPedestal) << endl;
250  if (Dump >= 4)
251  cout << " ......................................" << endl;
252  } else if (HcalNum == HcalForward) {
253  HFRecHitCollection::const_iterator theRecHit = HFRecHits->find(HcalID);
254  sumRecHitE += theRecHit->energy();
255  HFDigiCollection::const_iterator theDigis = HFDigis->find(HcalID);
256  cout << " RecHit: " << j << ": HF, ieta=" << HcalID.ieta() << ", iphi=" << HcalID.iphi()
257  << ", depth=" << HcalID.depth() << ", energy=" << theRecHit->energy()
258  << ", time=" << theRecHit->time() << ", All Digis=" << theDigis->size()
259  << ", presamples =" << theDigis->presamples() << endl;
260  float SumDigiCharge = 0.0;
261  float EstimatedPedestal = 0.0;
262  int SamplesToAdd = 1;
263  if (Dump >= 4)
264  cout << " ......................................" << endl;
265  if (Dump >= 4)
266  for (int k = 0; k < theDigis->size(); k++) {
267  const HcalQIESample QIE = theDigis->sample(k);
268  if (k >= theDigis->presamples() && k < theDigis->presamples() + SamplesToAdd)
269  SumDigiCharge += QIE.nominal_fC();
270  if (k < theDigis->presamples() - 1)
271  EstimatedPedestal += QIE.nominal_fC() * SamplesToAdd / (theDigis->presamples() - 1);
272  cout << " Digi: " << k << ", cap ID = " << QIE.capid()
273  << ": ADC Counts = " << QIE.adc() << ", nominal fC = " << QIE.nominal_fC() << endl;
274  }
275  if (Dump >= 4)
276  cout << " 1 Digi fC =" << SumDigiCharge << ", est. ped. fC=" << EstimatedPedestal
277  << ", est. GeV/fc=" << theRecHit->energy() / (SumDigiCharge - EstimatedPedestal) << endl;
278  if (Dump >= 4)
279  cout << " ......................................" << endl;
280  }
281  }
282  if (ShowECal && DetNum == DetId::Ecal) {
283  int EcalNum = RecHitDetID.subdetId();
284  if (EcalNum == 1) {
285  EBDetId EcalID = RecHitDetID;
286  EBRecHitCollection::const_iterator theRecHit = EBRecHits->find(EcalID);
287  EBDigiCollection::const_iterator theDigis = EBDigis->find(EcalID);
288  sumRecHitE += theRecHit->energy();
289  cout << " RecHit " << j << ": EB, ieta=" << EcalID.ieta() << ", iphi=" << EcalID.iphi()
290  << ", SM=" << EcalID.ism() << ", energy=" << theRecHit->energy()
291  << ", All Digis=" << theDigis->size() << endl;
292  if (Dump >= 4)
293  cout << " ......................................" << endl;
294  if (Dump >= 4)
295  for (unsigned int k = 0; k < theDigis->size(); k++) {
296  EBDataFrame frame(*theDigis);
297  const EcalMGPASample MGPA = frame.sample(k);
298  cout << " Digi: " << k << ": ADC Sample = " << MGPA.adc()
299  << ", Gain ID = " << MGPA.gainId() << endl;
300  }
301  if (Dump >= 4)
302  cout << " ......................................" << endl;
303  } else if (EcalNum == 2) {
304  EEDetId EcalID = RecHitDetID;
305  EERecHitCollection::const_iterator theRecHit = EERecHits->find(EcalID);
306  EEDigiCollection::const_iterator theDigis = EEDigis->find(EcalID);
307  sumRecHitE += theRecHit->energy();
308  cout << " RecHit " << j << ": EE, ix=" << EcalID.ix() << ", iy=" << EcalID.iy()
309  << ", energy=" << theRecHit->energy() << ", All Digis=" << theDigis->size() << endl;
310  if (Dump >= 4)
311  cout << " ......................................" << endl;
312  if (Dump >= 4)
313  for (unsigned int k = 0; k < theDigis->size(); k++) {
314  EEDataFrame frame(*theDigis);
315  const EcalMGPASample MGPA = frame.sample(k);
316  cout << " Digi: " << k << ": ADC Sample = " << MGPA.adc()
317  << ", Gain ID = " << MGPA.gainId() << endl;
318  }
319  if (Dump >= 4)
320  cout << " ......................................" << endl;
321  }
322  }
323  }
324  if (Dump >= 3) {
325  if (abs(ietaTower) == 28 || abs(ietaTower) == 29) {
326  cout << " Splitted Sum of RecHit Energies=" << sumRecHitE
327  << ", CaloTower energy=" << theTower->energy() << endl;
328  } else {
329  cout << " Sum of RecHit Energies=" << sumRecHitE << ", CaloTower energy=" << theTower->energy()
330  << endl;
331  }
332  }
333  if (Dump >= 3)
334  cout << " ------------------------------------------------" << endl;
335  }
336  if (Dump >= 2)
337  cout << " Sum of tower energies=" << sumTowerE << ", CaloJet energy=" << jet->energy() << endl;
338  jetInd++;
339  if (Dump >= 2)
340  cout << " =====================================================" << endl;
341  }
342  evtCount++;
343  if (Dump >= 1)
344  cout << " *********************************************************" << endl;
345 }
size_type size() const
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
constexpr double nominal_fC() const
get the nominal FC (no calibrations applied)
Definition: HcalQIESample.h:45
int ix() const
Definition: EEDetId.h:77
std::vector< CaloTower >::const_iterator const_iterator
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
std::string CaloJetAlg
Definition: JetToDigiDump.h:27
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
int ism() const
get the ECAL/SM id
Definition: EBDetId.h:59
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
Detector
Definition: DetId.h:24
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
iterator find(key_type k)
constexpr int capid() const
get the Capacitor id
Definition: HcalQIESample.h:47
constexpr int adc() const
get the ADC sample
Definition: HcalQIESample.h:43
int adc() const
get the ADC sample (12 bits)
const_iterator find(id_type i) const
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:498
int gainId() const
get the gainId (2 bits)
int iy() const
Definition: EEDetId.h:83
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

◆ beginJob()

void JetToDigiDump::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 49 of file JetToDigiDump.cc.

References CaloJetAlg, gather_cfg::cout, DebugLevel, Dump, DumpLevel, and evtCount.

49  {
50  if (DumpLevel == "Jets") {
51  cout << "Dump of Jets" << endl;
52  Dump = 1;
53  } else if (DumpLevel == "Towers") {
54  cout << "Dump of Jets and constituent CaloTowers" << endl;
55  Dump = 2;
56  } else if (DumpLevel == "RecHits") {
57  cout << "Dump of Jets, constituent CaloTowers, and constituent RecHits" << endl;
58  Dump = 3;
59  } else if (DumpLevel == "Digis") {
60  cout << "Dump of Jets, constituent CaloTowers, constituent RecHits and associated Digis" << endl;
61  Dump = 4;
62  }
63  cout << "Jet Algorithm being dumped is " << CaloJetAlg << endl;
64  cout << "Debug level is " << DebugLevel << endl;
65  //Initialize some stuff
66  evtCount = 0;
67 }
std::string CaloJetAlg
Definition: JetToDigiDump.h:27
std::string DumpLevel
Definition: JetToDigiDump.h:26

◆ endJob()

void JetToDigiDump::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 347 of file JetToDigiDump.cc.

347 {}

Member Data Documentation

◆ CaloJetAlg

std::string JetToDigiDump::CaloJetAlg
private

Definition at line 27 of file JetToDigiDump.h.

Referenced by analyze(), and beginJob().

◆ DebugLevel

int JetToDigiDump::DebugLevel
private

Definition at line 28 of file JetToDigiDump.h.

Referenced by analyze(), and beginJob().

◆ Dump

int JetToDigiDump::Dump
private

Definition at line 32 of file JetToDigiDump.h.

Referenced by analyze(), and beginJob().

◆ DumpLevel

std::string JetToDigiDump::DumpLevel
private

Definition at line 26 of file JetToDigiDump.h.

Referenced by beginJob().

◆ evtCount

int JetToDigiDump::evtCount
private

Definition at line 33 of file JetToDigiDump.h.

Referenced by analyze(), and beginJob().

◆ ShowECal

bool JetToDigiDump::ShowECal
private

Definition at line 29 of file JetToDigiDump.h.

Referenced by analyze().