56 : processName_(ps.getParameter<
std::
string>(
"processName")),
57 triggerName_(ps.getParameter<
std::
string>(
"triggerName")),
58 triggerResultsTag_(ps.getParameter<
edm::
InputTag>(
"triggerResults")),
60 triggerEventWithRefsTag_(ps.getParameter<
edm::
InputTag>(
"triggerEventWithRefs")),
61 triggerEventWithRefsToken_(consumes<
trigger::TriggerEventWithRefs>(triggerEventWithRefsTag_)) {
65 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW configuration: " << endl
83 descriptions.
add(
"hltEventAnalyzerRAW",
desc);
99 if (triggerIndex >=
n) {
101 <<
"HLTEventAnalyzerRAW::analyze:" 102 <<
" TriggerName " <<
triggerName_ <<
" not available in (new) config!" << endl;
103 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"Available TriggerNames are: " << endl;
109 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyze:" 110 <<
" config extraction failure with process name " <<
processName_ << endl;
125 <<
"HLTEventAnalyzerRAW::analyze: Error in getting TriggerResults product from Event!" << endl;
131 <<
"HLTEventAnalyzerRAW::analyze: Error in getting TriggerEventWithRefs product from Event!" << endl;
140 for (
unsigned int i = 0;
i !=
n; ++
i) {
155 using namespace reco;
165 if (triggerIndex >=
n) {
166 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyzeTrigger: path " <<
triggerName <<
" - not found!" 172 << triggerIndex <<
"]" << endl;
178 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Trigger path status:" 183 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Last active module - label/type: " << moduleLabels[moduleIndex] <<
"/" 185 <<
" out of 0-" << (
m - 1) <<
" on this path]" << endl;
254 for (
unsigned int j = 0;
j <= moduleIndex; ++
j) {
259 if (filterIndex < triggerEventWithRefsHandle_->
size()) {
261 << moduleType << endl;
262 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Filter packed up at: " << filterIndex << endl;
263 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Accepted objects:" << endl;
266 const unsigned int nPhotons(
photonIds_.size());
268 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Photons: " << nPhotons <<
" - the objects: # id pt" << endl;
269 for (
unsigned int i = 0;
i != nPhotons; ++
i) {
278 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Electrons: " <<
nElectrons <<
" - the objects: # id pt" << endl;
288 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Muons: " <<
nMuons <<
" - the objects: # id pt" << endl;
289 for (
unsigned int i = 0;
i !=
nMuons; ++
i) {
297 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Jets: " <<
nJets <<
" - the objects: # id pt" << endl;
298 for (
unsigned int i = 0;
i !=
nJets; ++
i) {
305 if (nComposites > 0) {
306 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Composites: " << nComposites <<
" - the objects: # id pt" << endl;
307 for (
unsigned int i = 0;
i != nComposites; ++
i) {
316 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" BaseMETs: " << nBaseMETs <<
" - the objects: # id pt" << endl;
317 for (
unsigned int i = 0;
i != nBaseMETs; ++
i) {
326 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" CaloMETs: " << nCaloMETs <<
" - the objects: # id pt" << endl;
327 for (
unsigned int i = 0;
i != nCaloMETs; ++
i) {
335 if (nPixTracks > 0) {
336 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PixTracks: " << nPixTracks <<
" - the objects: # id pt" << endl;
337 for (
unsigned int i = 0;
i != nPixTracks; ++
i) {
344 const unsigned int nL1EM(
l1emIds_.size());
346 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1EM: " << nL1EM <<
" - the objects: # id pt" << endl;
347 for (
unsigned int i = 0;
i != nL1EM; ++
i) {
353 const unsigned int nL1Muon(
l1muonIds_.size());
355 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1Muon: " << nL1Muon <<
" - the objects: # id pt" << endl;
356 for (
unsigned int i = 0;
i != nL1Muon; ++
i) {
363 const unsigned int nL1Jet(
l1jetIds_.size());
365 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1Jet: " << nL1Jet <<
" - the objects: # id pt" << endl;
366 for (
unsigned int i = 0;
i != nL1Jet; ++
i) {
374 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1EtMiss: " << nL1EtMiss <<
" - the objects: # id pt" << endl;
375 for (
unsigned int i = 0;
i != nL1EtMiss; ++
i) {
383 if (nL1HfRings > 0) {
384 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1HfRings: " << nL1HfRings <<
" - the objects: # id 4 4" << endl;
385 for (
unsigned int i = 0;
i != nL1HfRings; ++
i) {
401 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TMuon: " << nL1TMuon <<
" - the objects: # id pt" << endl;
402 for (
unsigned int i = 0;
i != nL1TMuon; ++
i) {
410 if (nL1TMuonShower > 0) {
412 <<
" L1TMuonShower: " << nL1TMuonShower <<
" - the objects: # id pt" << endl;
413 for (
unsigned int i = 0;
i != nL1TMuonShower; ++
i) {
421 if (nL1TEGamma > 0) {
422 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TEGamma: " << nL1TEGamma <<
" - the objects: # id pt" << endl;
423 for (
unsigned int i = 0;
i != nL1TEGamma; ++
i) {
430 const unsigned int nL1TJet(
l1tjetIds_.size());
432 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TJet: " << nL1TJet <<
" - the objects: # id pt" << endl;
433 for (
unsigned int i = 0;
i != nL1TJet; ++
i) {
440 const unsigned int nL1TTau(
l1ttauIds_.size());
442 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TTau: " << nL1TTau <<
" - the objects: # id pt" << endl;
443 for (
unsigned int i = 0;
i != nL1TTau; ++
i) {
452 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TEtSum: " << nL1TEtSum <<
" - the objects: # id pt" << endl;
453 for (
unsigned int i = 0;
i != nL1TEtSum; ++
i) {
462 const unsigned int nL1TTkMuons(
l1ttkmuIds_.size());
463 if (nL1TTkMuons > 0) {
464 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TTkMuons: " << nL1TTkMuons <<
" - the objects: # id pt" << endl;
465 for (
unsigned int i = 0;
i != nL1TTkMuons; ++
i) {
472 const unsigned int nL1TTkElectrons(
l1ttkeleIds_.size());
473 if (nL1TTkElectrons > 0) {
475 <<
" L1TTkElectrons: " << nL1TTkElectrons <<
" - the objects: # id pt" << endl;
476 for (
unsigned int i = 0;
i != nL1TTkElectrons; ++
i) {
485 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TTkEMs: " << nL1TTkEMs <<
" - the objects: # id pt" << endl;
486 for (
unsigned int i = 0;
i != nL1TTkEMs; ++
i) {
494 if (nL1TPFJets > 0) {
495 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TPFJets: " << nL1TPFJets <<
" - the objects: # id pt" << endl;
496 for (
unsigned int i = 0;
i != nL1TPFJets; ++
i) {
504 if (nL1TPFTaus > 0) {
505 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TPFTaus: " << nL1TPFTaus <<
" - the objects: # id pt" << endl;
506 for (
unsigned int i = 0;
i != nL1TPFTaus; ++
i) {
514 if (nL1THPSPFTaus > 0) {
516 <<
" L1THPSPFTaus: " << nL1THPSPFTaus <<
" - the objects: # id pt" << endl;
517 for (
unsigned int i = 0;
i != nL1THPSPFTaus; ++
i) {
525 if (nL1TPFTracks > 0) {
526 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1TPFTracks: " << nL1TPFTracks <<
" - the objects: # id pt" << endl;
527 for (
unsigned int i = 0;
i != nL1TPFTracks; ++
i) {
534 const unsigned int nPFJets(
pfjetIds_.size());
536 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PFJets: " << nPFJets <<
" - the objects: # id pt" << endl;
537 for (
unsigned int i = 0;
i != nPFJets; ++
i) {
543 const unsigned int nPFTaus(
pftauIds_.size());
545 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PFTaus: " << nPFTaus <<
" - the objects: # id pt" << endl;
546 for (
unsigned int i = 0;
i != nPFTaus; ++
i) {
552 const unsigned int nPfMETs(
pfmetIds_.size());
554 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PfMETs: " << nPfMETs <<
" - the objects: # id pt" << endl;
555 for (
unsigned int i = 0;
i != nPfMETs; ++
i) {
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
bool accept() const
Has at least one path accepted the event?
Log< level::Info, true > LogVerbatim
const std::string & triggerName(unsigned int triggerIndex) const
trigger::VRl1ttkele l1ttkeleRefs_
trigger::Vids l1tmuonShowerIds_
trigger::Vids compositeIds_
trigger::Vids calometIds_
trigger::Vids l1thpspftauIds_
trigger::Vids l1etmissIds_
bool error() const
Has any path encountered an error (exception)
edm::Handle< edm::TriggerResults > triggerResultsHandle_
additional class data memebers
trigger::VRl1muon l1muonRefs_
trigger::VRl1tmuonShower l1tmuonShowerRefs_
trigger::VRl1ttau l1ttauRefs_
trigger::Vids electronIds_
const edm::InputTag triggerEventWithRefsTag_
trigger::VRl1em l1emRefs_
trigger::Vids l1tegammaIds_
const std::string moduleType(const std::string &module) const
C++ class name of module.
trigger::VRpftau pftauRefs_
trigger::VRl1tpftrack l1tpftrackRefs_
void endRun(edm::Run const &, edm::EventSetup const &) override
trigger::VRl1tjet l1tjetRefs_
HLTEventAnalyzerRAW(const edm::ParameterSet &)
const edm::InputTag triggerResultsTag_
trigger::VRpfjet pfjetRefs_
bool wasrun() const
Was at least one path run?
trigger::Vids photonIds_
payload extracted from TriggerEventWithRefs
trigger::VRl1jet l1jetRefs_
void beginRun(edm::Run const &, edm::EventSetup const &) override
trigger::Vids l1ttkemIds_
unsigned int size() const
Get number of paths stored.
trigger::VRcomposite compositeRefs_
const std::string processName_
module config parameters
void dump(const std::string &what) const
Dumping config info to cout.
const edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventWithRefsToken_
trigger::VRphoton photonRefs_
trigger::Vids basemetIds_
unsigned int size() const
number of trigger paths in trigger table
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
HLTConfigProvider hltConfig_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
trigger::VRpfmet pfmetRefs_
~HLTEventAnalyzerRAW() override
void analyze(const edm::Event &, const edm::EventSetup &) override
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
trigger::VRelectron electronRefs_
trigger::VRl1tegamma l1tegammaRefs_
trigger::Vids l1tpftauIds_
trigger::VRl1tpftau l1tpftauRefs_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
trigger::Vids pixtrackIds_
trigger::Vids l1hfringsIds_
trigger::VRl1etmiss l1etmissRefs_
trigger::Vids l1ttkeleIds_
trigger::VRl1tpfjet l1tpfjetRefs_
trigger::VRl1thpspftau l1thpspftauRefs_
edm::Handle< trigger::TriggerEventWithRefs > triggerEventWithRefsHandle_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
trigger::Vids l1tpftrackIds_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
trigger::VRl1hfrings l1hfringsRefs_
trigger::VRcalomet calometRefs_
virtual void analyzeTrigger(const edm::Event &, const edm::EventSetup &, const std::string &triggerName)
trigger::Vids l1tmuonIds_
trigger::VRl1ttkmuon l1ttkmuRefs_
const std::string triggerName_
trigger::VRmuon muonRefs_
trigger::VRl1tmuon l1tmuonRefs_
trigger::VRpixtrack pixtrackRefs_
trigger::Vids l1tpfjetIds_
trigger::VRbasemet basemetRefs_
trigger::VRl1ttkem l1ttkemRefs_
trigger::Vids l1tetsumIds_
trigger::VRl1tetsum l1tetsumRefs_
trigger::Vids l1ttkmuIds_
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type