22 triggerEventTag_(ps.getParameter<edm::
InputTag>(
"triggerEvent")),
23 triggerEventToken_(consumes<trigger::TriggerEvent>(triggerEventTag_)),
24 triggerName_(ps.getParameter<std::
string>(
"triggerName")),
25 hltPrescaleProvider_(ps, consumesCollector(), *this)
32 produces<reco::CandidateCollection>();
51 "Error! Can't initialize HLTConfigProvider";
65 using namespace trigger;
72 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerResults product from Event!" ;
77 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerEvent product from Event!" ;
89 std::vector<std::string> activeHLTPathsInThisEvent =
hltConfig.triggerNames();
90 std::map<std::string, bool> triggerInMenu;
91 std::map<std::string, bool> triggerUnprescaled;
93 for (std::vector<std::string>::const_iterator iHLT = activeHLTPathsInThisEvent.begin();
94 iHLT != activeHLTPathsInThisEvent.end(); ++iHLT)
97 if (TString(*iHLT).Contains(TRegexp(TString(
triggerName_))))
99 triggerInMenu[*iHLT] =
true;
102 triggerUnprescaled[*iHLT] =
true;
106 for (std::map<std::string, bool>::const_iterator iMyHLT = triggerInMenu.begin();
107 iMyHLT != triggerInMenu.end(); ++iMyHLT)
110 if (!(iMyHLT->second && triggerUnprescaled[iMyHLT->first]))
112 const unsigned int triggerIndex(
hltConfig.triggerIndex(iMyHLT->first));
117 if (triggerIndex>=
n) {
118 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyzeTrigger: path "
125 const std::vector<std::string>& moduleLabels(
hltConfig.saveTagsModules(triggerIndex));
140 for (
unsigned int imodule=0;imodule<moduleLabels.size();++imodule)
142 const std::string& moduleLabel(moduleLabels[imodule]);
145 if (moduleType.find(
"Level1GTSeed") != std::string::npos)
149 if (filterIndex<triggerEventHandle_->sizeFilters()) {
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
reco::Particle particle(reco::Particle::Charge q=0, const reco::Particle::Point &vertex=reco::Particle::Point(0, 0, 0), int status=0, bool integerCharge=true) const
edm::Handle< edm::TriggerResults > triggerResultsHandle_
additional class data memebers
CandidateTriggerObjectProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
const LorentzVector & p4() const
four-momentum Lorentz vector
edm::Handle< trigger::TriggerEvent > triggerEventHandle_
triggerResultsToken_(consumes< edm::TriggerResults >(edm::InputTag("TriggerResults")))
Single trigger physics object (e.g., an isolated muon)
unsigned int triggerIndex(std::string const &name) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
edm::InputTag triggerEventTag_
HLTPrescaleProvider hltPrescaleProvider_
virtual void beginRun(const edm::Run &iRun, edm::EventSetup const &iSetup) override
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
std::vector< size_type > Keys
~CandidateTriggerObjectProducer()
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
HLTConfigProvider const & hltConfigProvider() const
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)