17 inputTag_(ps.getParameter<edm::InputTag>(
"inputTag")),
18 inputToken_(consumes<trigger::TriggerEventWithRefs>(inputTag_))
32 descriptions.
add(
"triggerSummaryAnalyzerRAW", desc);
42 using namespace l1extra;
43 using namespace trigger;
46 cout <<
"TriggerSummaryAnalyzerRAW: content of TriggerEventWithRefs: " <<
inputTag_.
encode();
51 cout <<
"Used Processname: " <<
handle->usedProcessName() << endl;
53 cout <<
"Number of TriggerFilterObjects: " << nFO << endl;
54 cout <<
"The TriggerFilterObjects: #, tag" << endl;
56 cout << iFO <<
" " <<
handle->filterTag(iFO).encode() << endl;
57 cout <<
" # of objects:";
59 const unsigned int nPhotons(
handle->photonSlice(iFO).second-
60 handle->photonSlice(iFO).first);
61 if (nPhotons>0)
cout <<
" Photons: " << nPhotons;
63 const unsigned int nElectrons(
handle->electronSlice(iFO).second-
64 handle->electronSlice(iFO).first);
65 if (nElectrons>0)
cout <<
" Electrons: " << nElectrons;
67 const unsigned int nMuons(
handle->muonSlice(iFO).second-
68 handle->muonSlice(iFO).first);
69 if (nMuons>0)
cout <<
" Muons: " << nMuons;
71 const unsigned int nJets(
handle->jetSlice(iFO).second-
72 handle->jetSlice(iFO).first);
73 if (nJets>0)
cout <<
" Jets: " << nJets;
75 const unsigned int nComposites(
handle->compositeSlice(iFO).second-
76 handle->compositeSlice(iFO).first);
77 if (nComposites>0)
cout <<
" Composites: " << nComposites;
79 const unsigned int nBaseMETs(
handle->basemetSlice(iFO).second-
80 handle->basemetSlice(iFO).first);
81 if (nBaseMETs>0)
cout <<
" BaseMETs: " << nBaseMETs;
83 const unsigned int nCaloMETs(
handle->calometSlice(iFO).second-
84 handle->calometSlice(iFO).first);
85 if (nCaloMETs>0)
cout <<
" CaloMETs: " << nCaloMETs;
87 const unsigned int nPixTracks(
handle->pixtrackSlice(iFO).second-
88 handle->pixtrackSlice(iFO).first);
89 if (nPixTracks>0)
cout <<
" PixTracks: " << nPixTracks;
91 const unsigned int nL1EM(
handle->l1emSlice(iFO).second-
92 handle->l1emSlice(iFO).first);
93 if (nL1EM>0)
cout <<
" L1EM: " << nL1EM;
95 const unsigned int nL1Muon(
handle->l1muonSlice(iFO).second-
96 handle->l1muonSlice(iFO).first);
97 if (nL1Muon>0)
cout <<
" L1Muon: " << nL1Muon;
99 const unsigned int nL1Jet(
handle->l1jetSlice(iFO).second-
100 handle->l1jetSlice(iFO).first);
101 if (nL1Jet>0)
cout <<
" L1Jet: " << nL1Jet;
103 const unsigned int nL1EtMiss(
handle->l1etmissSlice(iFO).second-
104 handle->l1etmissSlice(iFO).first);
105 if (nL1EtMiss>0)
cout <<
" L1EtMiss: " << nL1EtMiss;
107 const unsigned int nL1HfRings(
handle->l1hfringsSlice(iFO).second-
108 handle->l1hfringsSlice(iFO).first);
109 if (nL1HfRings>0)
cout <<
" L1HfRings: " << nL1HfRings;
111 const unsigned int nPFJets(
handle->pfjetSlice(iFO).second-
112 handle->pfjetSlice(iFO).first);
113 if (nPFJets>0)
cout <<
" PFJets: " << nPFJets;
115 const unsigned int nPFTaus(
handle->pftauSlice(iFO).second-
116 handle->pftauSlice(iFO).first);
117 if (nPFTaus>0)
cout <<
" PFTaus: " << nPFTaus;
121 cout <<
"Elements in linearised collections of Refs: " << endl;
122 cout <<
" Photons: " <<
handle->photonSize() << endl;
123 cout <<
" Electrons: " <<
handle->electronSize() << endl;
124 cout <<
" Muons: " <<
handle->muonSize() << endl;
125 cout <<
" Jets: " <<
handle->jetSize() << endl;
126 cout <<
" Composites: " <<
handle->compositeSize() << endl;
127 cout <<
" BaseMETs: " <<
handle->basemetSize() << endl;
128 cout <<
" CaloMETs: " <<
handle->calometSize() << endl;
129 cout <<
" Pixtracks: " <<
handle->pixtrackSize() << endl;
130 cout <<
" L1EM: " <<
handle->l1emSize() << endl;
131 cout <<
" L1Muon: " <<
handle->l1muonSize() << endl;
132 cout <<
" L1Jet: " <<
handle->l1jetSize() << endl;
133 cout <<
" L1EtMiss: " <<
handle->l1etmissSize() << endl;
134 cout <<
" L1HfRings: " <<
handle->l1hfringsSize() << endl;
135 cout <<
" PFJets: " <<
handle->pfjetSize() << endl;
136 cout <<
" PFTaus: " <<
handle->pftauSize() << endl;
138 cout <<
"Handle invalid! Check InputTag provided." << endl;
TriggerSummaryAnalyzerRAW(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~TriggerSummaryAnalyzerRAW()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< trigger::TriggerEventWithRefs > inputToken_
edm::InputTag inputTag_
InputTag of TriggerEventWithRefs to analyze.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)