|
|
Go to the documentation of this file.
21 triggerEventTag_(ps.getParameter<
edm::
InputTag>(
"triggerEvent")),
23 triggerName_(ps.getParameter<
std::
string>(
"triggerName")),
24 hltPrescaleProvider_(ps, consumesCollector(), *this) {
29 produces<reco::CandidateCollection>();
42 edm::LogError(
"CandidateTriggerObjectProducer") <<
"Error! Can't initialize HLTConfigProvider";
61 <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerResults product from Event!";
67 <<
"CandidateTriggerObjectProducer::analyze: Error in getting TriggerEvent product from Event!";
79 std::vector<std::string> activeHLTPathsInThisEvent =
hltConfig.triggerNames();
80 std::map<std::string, bool> triggerInMenu;
81 std::map<std::string, bool> triggerUnprescaled;
83 for (std::vector<std::string>::const_iterator iHLT = activeHLTPathsInThisEvent.begin();
84 iHLT != activeHLTPathsInThisEvent.end();
87 if (TString(*iHLT).Contains(TRegexp(TString(
triggerName_)))) {
88 triggerInMenu[*iHLT] =
true;
91 triggerUnprescaled[*iHLT] =
true;
95 for (std::map<std::string, bool>::const_iterator iMyHLT = triggerInMenu.begin(); iMyHLT != triggerInMenu.end();
98 if (!(iMyHLT->second && triggerUnprescaled[iMyHLT->first]))
100 const unsigned int triggerIndex(
hltConfig.triggerIndex(iMyHLT->first));
102 assert(triggerIndex ==
iEvent.triggerNames(*triggerResultsHandle_).triggerIndex(iMyHLT->first));
105 if (triggerIndex >=
n) {
107 <<
"CandidateTriggerObjectProducer::analyzeTrigger: path " <<
triggerName_ <<
" - not found!";
113 const std::vector<std::string>& moduleLabels(
hltConfig.saveTagsModules(triggerIndex));
126 for (
unsigned int imodule = 0; imodule < moduleLabels.size(); ++imodule) {
130 if (moduleType.find(
"Level1GTSeed") != std::string::npos)
133 const unsigned int filterIndex(
135 if (filterIndex < triggerEventHandle_->sizeFilters()) {
~CandidateTriggerObjectProducer() override
const Keys & filterKeys(trigger::size_type index) const
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::InputTag triggerEventTag_
void beginRun(const edm::Run &iRun, edm::EventSetup const &iSetup) override
HLTConfigProvider const & hltConfigProvider() const
bool wasrun() const
Was at least one path run?
bool error() const
Has any path encountered an error (exception)
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
#define DEFINE_FWK_MODULE(type)
unsigned int size() const
Get number of paths stored.
edm::Handle< trigger::TriggerEvent > triggerEventHandle_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
std::vector< size_type > Keys
edm::Handle< edm::TriggerResults > triggerResultsHandle_
additional class data memebers
const TriggerObjectCollection & getObjects() const
const LorentzVector & p4() const
four-momentum Lorentz vector
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
HLTPrescaleProvider hltPrescaleProvider_
const Vids & filterIds(trigger::size_type index) const
CandidateTriggerObjectProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
bool accept() const
Has at least one path accepted the event?
math::XYZPoint Point
point in the space
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.
void produce(edm::Event &, const edm::EventSetup &) override