21 triggerEventTag_(ps.getParameter<edm::
InputTag>(
"triggerEvent")),
22 triggerEventToken_(consumes<trigger::TriggerEvent>(triggerEventTag_)),
23 triggerName_(ps.getParameter<std::
string>(
"triggerName"))
30 produces<reco::CandidateCollection>();
49 "Error! Can't initialize HLTConfigProvider";
63 using namespace trigger;
70 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerResults product from Event!" ;
75 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerEvent product from Event!" ;
85 std::map<std::string, bool> triggerInMenu;
86 std::map<std::string, bool> triggerUnprescaled;
88 for (std::vector<std::string>::const_iterator iHLT = activeHLTPathsInThisEvent.begin();
89 iHLT != activeHLTPathsInThisEvent.end(); ++iHLT)
92 if (TString(*iHLT).Contains(TRegexp(TString(
triggerName_))))
94 triggerInMenu[*iHLT] =
true;
97 triggerUnprescaled[*iHLT] =
true;
101 for (std::map<std::string, bool>::const_iterator iMyHLT = triggerInMenu.begin();
102 iMyHLT != triggerInMenu.end(); ++iMyHLT)
105 if (!(iMyHLT->second && triggerUnprescaled[iMyHLT->first]))
112 if (triggerIndex>=
n) {
113 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyzeTrigger: path "
135 for (
unsigned int imodule=0;imodule<moduleLabels.size();++imodule)
137 const std::string& moduleLabel(moduleLabels[imodule]);
140 if (moduleType.find(
"Level1GTSeed") != std::string::npos)
144 if (filterIndex<triggerEventHandle_->sizeFilters()) {
unsigned int size() const
number of trigger paths in trigger table
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const std::vector< std::string > & triggerNames() const
names of trigger paths
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")))
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
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_
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
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
~CandidateTriggerObjectProducer()
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
HLTConfigProvider hltConfig_