40 processName_(ps.getParameter<
std::
string>(
"processName")),
41 triggerName_(ps.getParameter<
std::
string>(
"triggerName")),
42 triggerResultsTag_(ps.getParameter<
edm::InputTag>(
"triggerResults")),
43 triggerResultsToken_(consumes<
edm::TriggerResults>(triggerResultsTag_)),
44 triggerEventWithRefsTag_(ps.getParameter<
edm::InputTag>(
"triggerEventWithRefs")),
45 triggerEventWithRefsToken_(consumes<
trigger::TriggerEventWithRefs>(triggerEventWithRefsTag_))
50 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW configuration: " << endl
70 descriptions.
add(
"hltEventAnalyzerRAW", desc);
89 if (triggerIndex>=
n) {
90 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyze:" 92 <<
" not available in (new) config!" << endl;
93 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"Available TriggerNames are: " << endl;
99 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyze:" 100 <<
" config extraction failure with process name " 118 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyze: Error in getting TriggerResults product from Event!" << endl;
123 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyze: Error in getting TriggerEventWithRefs product from Event!" << endl;
132 for (
unsigned int i=0;
i!=
n; ++
i) {
147 using namespace reco;
157 if (triggerIndex>=
n) {
158 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyzeTrigger: path " 159 << triggerName <<
" - not found!" << endl;
163 LogVerbatim(
"HLTEventAnalyzerRAW") <<
"HLTEventAnalyzerRAW::analyzeTrigger: path " 164 << triggerName <<
" [" << triggerIndex <<
"]" << endl;
170 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Trigger path status:" 176 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Last active module - label/type: " 178 <<
" [" << moduleIndex <<
" out of 0-" << (
m-1) <<
" on this path]" 180 assert (moduleIndex<
m);
218 for (
unsigned int j=0; j<=moduleIndex; ++j) {
219 const string& moduleLabel(moduleLabels[j]);
223 if (filterIndex<triggerEventWithRefsHandle_->
size()) {
224 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Filter in slot " << j <<
" - label/type " << moduleLabel <<
"/" << moduleType << endl;
225 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Filter packed up at: " << filterIndex << endl;
226 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Accepted objects:" << endl;
229 const unsigned int nPhotons(
photonIds_.size());
231 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Photons: " << nPhotons <<
" - the objects: # id pt" << endl;
232 for (
unsigned int i=0;
i!=nPhotons; ++
i) {
242 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Electrons: " << nElectrons <<
" - the objects: # id pt" << endl;
243 for (
unsigned int i=0;
i!=nElectrons; ++
i) {
251 const unsigned int nMuons(
muonIds_.size());
253 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Muons: " << nMuons <<
" - the objects: # id pt" << endl;
254 for (
unsigned int i=0;
i!=nMuons; ++
i) {
262 const unsigned int nJets(
jetIds_.size());
264 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Jets: " << nJets <<
" - the objects: # id pt" << endl;
265 for (
unsigned int i=0;
i!=nJets; ++
i) {
275 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" Composites: " << nComposites <<
" - the objects: # id pt" << endl;
276 for (
unsigned int i=0;
i!=nComposites; ++
i) {
286 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" BaseMETs: " << nBaseMETs <<
" - the objects: # id pt" << endl;
287 for (
unsigned int i=0;
i!=nBaseMETs; ++
i) {
297 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" CaloMETs: " << nCaloMETs <<
" - the objects: # id pt" << endl;
298 for (
unsigned int i=0;
i!=nCaloMETs; ++
i) {
308 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PixTracks: " << nPixTracks <<
" - the objects: # id pt" << endl;
309 for (
unsigned int i=0;
i!=nPixTracks; ++
i) {
317 const unsigned int nL1EM(
l1emIds_.size());
319 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1EM: " << nL1EM <<
" - the objects: # id pt" << endl;
320 for (
unsigned int i=0;
i!=nL1EM; ++
i) {
328 const unsigned int nL1Muon(
l1muonIds_.size());
330 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1Muon: " << nL1Muon <<
" - the objects: # id pt" << endl;
331 for (
unsigned int i=0;
i!=nL1Muon; ++
i) {
339 const unsigned int nL1Jet(
l1jetIds_.size());
341 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1Jet: " << nL1Jet <<
" - the objects: # id pt" << endl;
342 for (
unsigned int i=0;
i!=nL1Jet; ++
i) {
352 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1EtMiss: " << nL1EtMiss <<
" - the objects: # id pt" << endl;
353 for (
unsigned int i=0;
i!=nL1EtMiss; ++
i) {
363 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" L1HfRings: " << nL1HfRings <<
" - the objects: # id 4 4" << endl;
364 for (
unsigned int i=0;
i!=nL1HfRings; ++
i) {
379 const unsigned int nPFJets(
pfjetIds_.size());
381 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PFJets: " << nPFJets <<
" - the objects: # id pt" << endl;
382 for (
unsigned int i=0;
i!=nPFJets; ++
i) {
390 const unsigned int nPFTaus(
pftauIds_.size());
392 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PFTaus: " << nPFTaus <<
" - the objects: # id pt" << endl;
393 for (
unsigned int i=0;
i!=nPFTaus; ++
i) {
401 const unsigned int nPfMETs(
pfmetIds_.size());
403 LogVerbatim(
"HLTEventAnalyzerRAW") <<
" PfMETs: " << nPfMETs <<
" - the objects: # id pt" << endl;
404 for (
unsigned int i=0;
i!=nPfMETs; ++
i) {
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
bool wasrun() const
Was at least one path run?
trigger::Vids compositeIds_
trigger::Vids calometIds_
const std::string moduleType(const std::string &module) const
C++ class name of module.
trigger::Vids l1etmissIds_
edm::Handle< edm::TriggerResults > triggerResultsHandle_
additional class data memebers
const std::string & triggerName(unsigned int triggerIndex) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
trigger::VRl1muon l1muonRefs_
trigger::Vids electronIds_
const edm::InputTag triggerEventWithRefsTag_
bool accept() const
Has at least one path accepted the event?
trigger::VRl1em l1emRefs_
trigger::VRpftau pftauRefs_
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
HLTEventAnalyzerRAW(const edm::ParameterSet &)
const edm::InputTag triggerResultsTag_
trigger::VRpfjet pfjetRefs_
trigger::Vids photonIds_
payload extracted from TriggerEventWithRefs
trigger::VRl1jet l1jetRefs_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
trigger::VRcomposite compositeRefs_
const std::string processName_
module config parameters
const edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventWithRefsToken_
trigger::VRphoton photonRefs_
trigger::Vids basemetIds_
unsigned int triggerIndex(std::string const &name) const
virtual ~HLTEventAnalyzerRAW()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned int size() const
Get number of paths stored.
HLTConfigProvider hltConfig_
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
trigger::VRpfmet pfmetRefs_
bool error() const
Has any path encountered an error (exception)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
trigger::VRelectron electronRefs_
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
trigger::Vids pixtrackIds_
trigger::Vids l1hfringsIds_
trigger::VRl1etmiss l1etmissRefs_
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type
edm::Handle< trigger::TriggerEventWithRefs > triggerEventWithRefsHandle_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
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)
const std::string triggerName_
trigger::VRmuon muonRefs_
trigger::VRpixtrack pixtrackRefs_
trigger::VRbasemet basemetRefs_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override