CMS 3D CMS Logo

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

#include <L1Trigger/GlobalCaloTrigger/test/DumpGctDigis.cc>

Inheritance diagram for DumpGctDigis:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void doEM (const edm::Event &, const edm::InputTag &label)
 
void doEnergySums (const edm::Event &, const edm::InputTag &label)
 
void doFibres (const edm::Event &, const edm::InputTag &label)
 
void doInternEM (const edm::Event &, const edm::InputTag &label)
 
void doJets (const edm::Event &, const edm::InputTag &label)
 
void doRctEM (const edm::Event &, const edm::InputTag &label)
 
void doRegions (const edm::Event &, const edm::InputTag &label)
 
 DumpGctDigis (const edm::ParameterSet &)
 
 ~DumpGctDigis () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool doEM_
 
bool doEmu_
 
bool doEnergySums_
 
bool doFibres_
 
bool doHW_
 
bool doInternEM_
 
bool doJets_
 
bool doRctEM_
 
bool doRegions_
 
edm::InputTag emuGctLabel_
 
edm::InputTag emuRctLabel_
 
std::ofstream outFile_
 
std::string outFilename_
 
edm::InputTag rawLabel_
 
unsigned rctEmMinRank_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 34 of file DumpGctDigis.h.

Constructor & Destructor Documentation

◆ DumpGctDigis()

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

Definition at line 29 of file DumpGctDigis.cc.

30  : rawLabel_(iConfig.getUntrackedParameter<edm::InputTag>("rawInput", edm::InputTag("L1GctRawDigis"))),
31  emuRctLabel_(iConfig.getUntrackedParameter<edm::InputTag>("emuRctInput", edm::InputTag("L1RctEmuDigis"))),
32  emuGctLabel_(iConfig.getUntrackedParameter<edm::InputTag>("emuGctInput", edm::InputTag("L1GctEmuDigis"))),
33  outFilename_(iConfig.getUntrackedParameter<string>("outFile", "gctAnalyzer.txt")),
34  doHW_(iConfig.getUntrackedParameter<bool>("doHardware", true)),
35  doEmu_(iConfig.getUntrackedParameter<bool>("doEmulated", true)),
36  doRctEM_(iConfig.getUntrackedParameter<bool>("doRctEm", true)),
37  doEM_(iConfig.getUntrackedParameter<bool>("doEm", true)),
38  doRegions_(iConfig.getUntrackedParameter<bool>("doRegions", false)),
39  doJets_(iConfig.getUntrackedParameter<bool>("doJets", false)),
40  doInternEM_(iConfig.getUntrackedParameter<bool>("doInternEm", true)),
41  doFibres_(iConfig.getUntrackedParameter<bool>("doFibres", false)),
42  doEnergySums_(iConfig.getUntrackedParameter<bool>("doEnergySums", false)),
43  rctEmMinRank_(iConfig.getUntrackedParameter<unsigned>("rctEmMinRank", 0)) {
44  //now do what ever initialization is needed
45 
46  outFile_.open(outFilename_.c_str(), ios::out);
47 }

References MillePedeFileConverter_cfg::out, outFile_, and outFilename_.

◆ ~DumpGctDigis()

DumpGctDigis::~DumpGctDigis ( )
override

Definition at line 49 of file DumpGctDigis.cc.

49  {
50  // do anything here that needs to be done at desctruction time
51  // (e.g. close files, deallocate resources etc.)
52 
53  outFile_.close();
54 }

References outFile_.

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 61 of file DumpGctDigis.cc.

61  {
62  using namespace edm;
63 
64  outFile_ << "Run :" << iEvent.id().run() << " Event :" << iEvent.id().event() << endl;
65 
66  // EM
67  if (doRctEM_ && doHW_) {
69  }
70  if (doRctEM_ && doEmu_) {
72  }
73  if (doEM_ && doHW_) {
75  }
76  if (doEM_ && doEmu_) {
78  }
79 
80  // Jets
81  if (doRegions_ && doHW_) {
83  }
84  if (doRegions_ && doEmu_) {
86  }
87  if (doJets_ && doHW_) {
89  }
90  if (doJets_ && doEmu_) {
92  }
93 
94  // Energy Sums
95  if (doEnergySums_ && doHW_) {
97  }
98  if (doEnergySums_ && doEmu_) {
100  }
101 
102  // debugging
103  if (doInternEM_ && doHW_) {
105  }
106  if (doFibres_ && doHW_) {
108  }
109 }

References doEM(), doEM_, doEmu_, doEnergySums(), doEnergySums_, doFibres(), doFibres_, doHW_, doInternEM(), doInternEM_, doJets(), doJets_, doRctEM(), doRctEM_, doRegions(), doRegions_, emuGctLabel_, emuRctLabel_, iEvent, outFile_, and rawLabel_.

◆ doEM()

void DumpGctDigis::doEM ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 111 of file DumpGctDigis.cc.

111  {
112  using namespace edm;
113 
116 
117  L1GctEmCandCollection::const_iterator ie;
118  L1GctEmCandCollection::const_iterator ne;
119 
120  iEvent.getByLabel(label.label(), "isoEm", isoEm);
121  iEvent.getByLabel(label.label(), "nonIsoEm", nonIsoEm);
122 
123  outFile_ << "Iso EM from : " << label.label() << endl;
124  for (ie = isoEm->begin(); ie != isoEm->end(); ie++) {
125  outFile_ << (*ie) << " ieta(detID)=" << ie->regionId().ieta() << " iphi(detID)=" << ie->regionId().iphi() << endl;
126  }
127  outFile_ << endl;
128 
129  outFile_ << "Non-iso EM from : " << label.label() << endl;
130  for (ne = nonIsoEm->begin(); ne != nonIsoEm->end(); ne++) {
131  outFile_ << (*ne) << " ieta(detID)=" << ne->regionId().ieta() << " iphi(detID)=" << ne->regionId().iphi() << endl;
132  }
133  outFile_ << endl;
134 }

References iEvent, label, and outFile_.

Referenced by analyze().

◆ doEnergySums()

void DumpGctDigis::doEnergySums ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 237 of file DumpGctDigis.cc.

237  {
238  using namespace edm;
239 
244 
245  iEvent.getByLabel(label, etTotal);
246  iEvent.getByLabel(label, etHad);
247  iEvent.getByLabel(label, etMiss);
248  iEvent.getByLabel(label, htMiss);
249 
250  outFile_ << "Energy sums from: " << label.label() << endl;
251 
252  L1GctEtTotalCollection::const_iterator et;
253  for (et = etTotal->begin(); et != etTotal->end(); et++) {
254  outFile_ << *(et) << endl;
255  }
256 
257  L1GctEtHadCollection::const_iterator ht;
258  for (ht = etHad->begin(); ht != etHad->end(); ht++) {
259  outFile_ << *(ht) << endl;
260  }
261 
262  L1GctEtMissCollection::const_iterator met;
263  for (met = etMiss->begin(); met != etMiss->end(); met++) {
264  outFile_ << *(met) << endl;
265  }
266 
267  L1GctHtMissCollection::const_iterator mht;
268  for (mht = htMiss->begin(); mht != htMiss->end(); mht++) {
269  outFile_ << *(mht) << endl;
270  }
271 }

References EgHLTOffHistBins_cfi::et, iEvent, label, BTaggingMonitor_cfi::met, and outFile_.

Referenced by analyze().

◆ doFibres()

void DumpGctDigis::doFibres ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 221 of file DumpGctDigis.cc.

221  {
222  using namespace edm;
223 
225 
226  L1GctFibreCollection::const_iterator f;
227 
228  iEvent.getByLabel(label, fibres);
229 
230  outFile_ << "Fibres from : " << label.label() << endl;
231  for (f = fibres->begin(); f != fibres->end(); f++) {
232  outFile_ << (*f) << endl;
233  }
234  outFile_ << endl;
235 }

References f, iEvent, label, and outFile_.

Referenced by analyze().

◆ doInternEM()

void DumpGctDigis::doInternEM ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 205 of file DumpGctDigis.cc.

205  {
206  using namespace edm;
207 
209 
210  L1GctInternEmCandCollection::const_iterator e;
211 
212  iEvent.getByLabel(label, em);
213 
214  outFile_ << "Internal EM from : " << label.label() << endl;
215  for (e = em->begin(); e != em->end(); e++) {
216  outFile_ << (*e) << " ieta(detID)=" << e->regionId().ieta() << " iphi(detID)=" << e->regionId().iphi() << endl;
217  }
218  outFile_ << endl;
219 }

References MillePedeFileConverter_cfg::e, iEvent, label, and outFile_.

Referenced by analyze().

◆ doJets()

void DumpGctDigis::doJets ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 170 of file DumpGctDigis.cc.

170  {
171  using namespace edm;
172 
176 
177  L1GctJetCandCollection::const_iterator cj;
178  L1GctJetCandCollection::const_iterator fj;
179  L1GctJetCandCollection::const_iterator tj;
180 
181  const std::string& labelStr = label.label();
182 
183  iEvent.getByLabel(labelStr, "cenJets", cenJets);
184  iEvent.getByLabel(labelStr, "forJets", forJets);
185  iEvent.getByLabel(labelStr, "tauJets", tauJets);
186 
187  outFile_ << "Central jets from : " << labelStr << endl;
188  for (cj = cenJets->begin(); cj != cenJets->end(); cj++) {
189  outFile_ << (*cj) << endl;
190  }
191  outFile_ << endl;
192 
193  outFile_ << "Forward jets from : " << labelStr << endl;
194  for (fj = forJets->begin(); fj != forJets->end(); fj++) {
195  outFile_ << (*fj) << endl;
196  }
197  outFile_ << endl;
198 
199  outFile_ << "Tau jets from : " << labelStr << endl;
200  for (tj = tauJets->begin(); tj != tauJets->end(); tj++) {
201  outFile_ << (*tj) << endl;
202  }
203 }

References iEvent, label, outFile_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

◆ doRctEM()

void DumpGctDigis::doRctEM ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 136 of file DumpGctDigis.cc.

136  {
137  using namespace edm;
138 
140 
141  L1CaloEmCollection::const_iterator e;
142 
143  iEvent.getByLabel(label, em);
144 
145  outFile_ << "RCT EM from : " << label.label() << endl;
146  for (e = em->begin(); e != em->end(); e++) {
147  if (e->rank() >= rctEmMinRank_) {
148  outFile_ << (*e) << " ieta(detID)=" << e->regionId().ieta() << " iphi(detID)=" << e->regionId().iphi() << endl;
149  }
150  }
151  outFile_ << endl;
152 }

References MillePedeFileConverter_cfg::e, iEvent, label, outFile_, and rctEmMinRank_.

Referenced by analyze().

◆ doRegions()

void DumpGctDigis::doRegions ( const edm::Event iEvent,
const edm::InputTag label 
)

Definition at line 154 of file DumpGctDigis.cc.

154  {
155  using namespace edm;
156 
158 
159  L1CaloRegionCollection::const_iterator r;
160 
161  iEvent.getByLabel(label, rgns);
162 
163  outFile_ << "Regions from : " << label.label() << endl;
164  for (r = rgns->begin(); r != rgns->end(); r++) {
165  outFile_ << (*r) << endl;
166  }
167  outFile_ << endl;
168 }

References iEvent, label, outFile_, and alignCSCRings::r.

Referenced by analyze().

Member Data Documentation

◆ doEM_

bool DumpGctDigis::doEM_
private

Definition at line 60 of file DumpGctDigis.h.

Referenced by analyze().

◆ doEmu_

bool DumpGctDigis::doEmu_
private

Definition at line 58 of file DumpGctDigis.h.

Referenced by analyze().

◆ doEnergySums_

bool DumpGctDigis::doEnergySums_
private

Definition at line 65 of file DumpGctDigis.h.

Referenced by analyze().

◆ doFibres_

bool DumpGctDigis::doFibres_
private

Definition at line 64 of file DumpGctDigis.h.

Referenced by analyze().

◆ doHW_

bool DumpGctDigis::doHW_
private

Definition at line 57 of file DumpGctDigis.h.

Referenced by analyze().

◆ doInternEM_

bool DumpGctDigis::doInternEM_
private

Definition at line 63 of file DumpGctDigis.h.

Referenced by analyze().

◆ doJets_

bool DumpGctDigis::doJets_
private

Definition at line 62 of file DumpGctDigis.h.

Referenced by analyze().

◆ doRctEM_

bool DumpGctDigis::doRctEM_
private

Definition at line 59 of file DumpGctDigis.h.

Referenced by analyze().

◆ doRegions_

bool DumpGctDigis::doRegions_
private

Definition at line 61 of file DumpGctDigis.h.

Referenced by analyze().

◆ emuGctLabel_

edm::InputTag DumpGctDigis::emuGctLabel_
private

Definition at line 54 of file DumpGctDigis.h.

Referenced by analyze().

◆ emuRctLabel_

edm::InputTag DumpGctDigis::emuRctLabel_
private

Definition at line 53 of file DumpGctDigis.h.

Referenced by analyze().

◆ outFile_

std::ofstream DumpGctDigis::outFile_
private

◆ outFilename_

std::string DumpGctDigis::outFilename_
private

Definition at line 55 of file DumpGctDigis.h.

Referenced by DumpGctDigis().

◆ rawLabel_

edm::InputTag DumpGctDigis::rawLabel_
private

Definition at line 52 of file DumpGctDigis.h.

Referenced by analyze().

◆ rctEmMinRank_

unsigned DumpGctDigis::rctEmMinRank_
private

Definition at line 67 of file DumpGctDigis.h.

Referenced by doRctEM().

DumpGctDigis::rctEmMinRank_
unsigned rctEmMinRank_
Definition: DumpGctDigis.h:67
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DumpGctDigis::doRegions
void doRegions(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:154
DumpGctDigis::doEmu_
bool doEmu_
Definition: DumpGctDigis.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
DumpGctDigis::outFile_
std::ofstream outFile_
Definition: DumpGctDigis.h:69
DumpGctDigis::doRctEM
void doRctEM(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:136
DumpGctDigis::doFibres_
bool doFibres_
Definition: DumpGctDigis.h:64
DumpGctDigis::rawLabel_
edm::InputTag rawLabel_
Definition: DumpGctDigis.h:52
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DumpGctDigis::emuRctLabel_
edm::InputTag emuRctLabel_
Definition: DumpGctDigis.h:53
DumpGctDigis::doEM_
bool doEM_
Definition: DumpGctDigis.h:60
DumpGctDigis::doEnergySums_
bool doEnergySums_
Definition: DumpGctDigis.h:65
edm::Handle
Definition: AssociativeIterator.h:50
DumpGctDigis::doRctEM_
bool doRctEM_
Definition: DumpGctDigis.h:59
DumpGctDigis::doFibres
void doFibres(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:221
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
DumpGctDigis::outFilename_
std::string outFilename_
Definition: DumpGctDigis.h:55
DumpGctDigis::doJets
void doJets(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:170
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DumpGctDigis::doRegions_
bool doRegions_
Definition: DumpGctDigis.h:61
DumpGctDigis::doInternEM
void doInternEM(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:205
DumpGctDigis::doJets_
bool doJets_
Definition: DumpGctDigis.h:62
iEvent
int iEvent
Definition: GenABIO.cc:224
DumpGctDigis::doEnergySums
void doEnergySums(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:237
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DumpGctDigis::doEM
void doEM(const edm::Event &, const edm::InputTag &label)
Definition: DumpGctDigis.cc:111
DumpGctDigis::doHW_
bool doHW_
Definition: DumpGctDigis.h:57
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
DumpGctDigis::doInternEM_
bool doInternEM_
Definition: DumpGctDigis.h:63
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DumpGctDigis::emuGctLabel_
edm::InputTag emuGctLabel_
Definition: DumpGctDigis.h:54