16 triggerResultsTag_(ps.getParameter<edm::InputTag>(
"triggerResults")),
17 triggerEventTag_(ps.getParameter<edm::InputTag>(
"triggerEvent")),
18 triggerName_(ps.getParameter<std::string>(
"triggerName"))
26 produces<reco::CandidateCollection>();
45 "Error! Can't initialize HLTConfigProvider";
59 using namespace trigger;
66 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerResults product from Event!" ;
71 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerEvent product from Event!" ;
81 std::map<std::string, bool> triggerInMenu;
82 std::map<std::string, bool> triggerUnprescaled;
84 for (std::vector<std::string>::const_iterator iHLT = activeHLTPathsInThisEvent.begin();
85 iHLT != activeHLTPathsInThisEvent.end(); ++iHLT)
88 if (TString(*iHLT).Contains(TRegexp(TString(
triggerName_))))
90 triggerInMenu[*iHLT] =
true;
93 triggerUnprescaled[*iHLT] =
true;
97 for (std::map<std::string, bool>::const_iterator iMyHLT = triggerInMenu.begin();
98 iMyHLT != triggerInMenu.end(); ++iMyHLT)
101 if (!(iMyHLT->second && triggerUnprescaled[iMyHLT->first]))
108 if (triggerIndex>=
n) {
109 edm::LogError(
"CandidateTriggerObjectProducer" ) <<
"CandidateTriggerObjectProducer::analyzeTrigger: path "
131 for (
unsigned int imodule=0;imodule<moduleLabels.size();++imodule)
133 const std::string& moduleLabel(moduleLabels[imodule]);
136 if (moduleType.find(
"Level1GTSeed") != std::string::npos)
140 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.
#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 &)
const LorentzVector & p4() const
four-momentum Lorentz vector
edm::Handle< trigger::TriggerEvent > triggerEventHandle_
edm::InputTag triggerResultsTag_
module config parameters
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
const T & max(const T &a, const T &b)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void beginRun(edm::Run &iRun, edm::EventSetup const &iSetup)
math::XYZPoint Point
point in the space
edm::InputTag triggerEventTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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.
virtual void produce(edm::Event &, const edm::EventSetup &)
HLTConfigProvider hltConfig_