27 : nameProcess_(iConfig.getParameter<
std::
string>(
"processName")),
28 autoProcessName_(nameProcess_ ==
"*"),
29 tagTriggerProducer_(
"patTrigger"),
30 tagsTriggerMatcher_(),
34 hltConfigInit_(
false),
36 tagTriggerResults_(
"TriggerResults"),
37 tagTriggerEvent_(
"hltTriggerSummaryAOD"),
43 gtCondRunInit_(
false),
44 gtCondLumiInit_(
false) {
45 if (iConfig.
exists(
"triggerResults"))
52 if (iConfig.
exists(
"triggerEvent"))
54 if (iConfig.
exists(
"patTriggerProducer"))
61 if (iConfig.
exists(
"condGtTag")) {
67 if (iConfig.
exists(
"l1GtTag"))
70 if (iConfig.
exists(
"patTriggerMatches"))
84 produces<TriggerEvent>();
98 if (processHistory.getConfigurationForProcess(iHist->processName(), processConfiguration) &&
108 <<
"' not produced according to process history of input data\n" 109 <<
"No trigger information produced.";
112 LogInfo(
"autoProcessName") <<
"HLT process name " <<
nameProcess_ <<
" used for PAT trigger information";
119 <<
"' differs from HLT process name '" <<
nameProcess_ <<
"'";
125 <<
"' differs from HLT process name '" <<
nameProcess_ <<
"'";
145 LogError(
"hltConfigExtraction") <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
147 LogError(
"hltConfigSize") <<
"HLT config size error";
184 if (!handleTriggerResults.
isValid()) {
186 <<
"' not in event\n" 187 <<
"No trigger information produced";
201 bool physDecl(
false);
205 if (handleL1GlobalTriggerReadoutRecord.
isValid()) {
211 LogError(
"l1GlobalTriggerReadoutRecordValid")
212 <<
"L1GlobalTriggerReadoutRecord product with InputTag '" <<
tagL1Gt_.
encode() <<
"' not in event";
222 handleTriggerResults->
wasrun(),
223 handleTriggerResults->
accept(),
224 handleTriggerResults->
error(),
227 if (handleTriggerAlgorithms.
isValid()) {
230 LogError(
"triggerAlgorithmsValid") <<
"pat::TriggerAlgorithmCollection product with InputTag '" 233 if (handleTriggerConditions.
isValid()) {
236 LogError(
"triggerConditionsValid") <<
"pat::TriggerConditionCollection product with InputTag '" 239 if (handleTriggerPaths.
isValid()) {
242 LogError(
"triggerPathsValid") <<
"pat::TriggerPathCollection product with InputTag '" 245 if (handleTriggerFilters.
isValid()) {
248 LogError(
"triggerFiltersValid") <<
"pat::TriggerFilterCollection product with InputTag '" 251 if (handleTriggerObjects.
isValid()) {
254 LogError(
"triggerObjectsValid") <<
"pat::TriggerObjectCollection product with InputTag '" 272 if (condEventBlock.
isValid()) {
282 if (handleTriggerObjects.
isValid()) {
289 if (!handleTriggerObjectStandAloneMatch.isValid()) {
290 LogError(
"triggerMatchValid") <<
"pat::TriggerObjectStandAloneMatch product with InputTag '" 291 << labelTriggerObjectMatcher <<
"' not in event";
294 auto it = makeAssociativeIterator<reco::CandidateBaseRef>(*handleTriggerObjectStandAloneMatch,
iEvent);
295 auto itEnd = it.end();
298 iEvent.
get(it->first.id(), handleCands);
300 while (it != itEnd) {
301 indices.push_back(it->second.key());
304 auto triggerObjectMatch = std::make_unique<TriggerObjectMatch>(handleTriggerObjects);
307 matchFiller.insert(handleCands, indices.begin(), indices.end());
311 iEvent.
put(
std::move(triggerObjectMatch), labelTriggerObjectMatcher));
313 if (!handleTriggerObjectMatch.isValid()) {
314 LogError(
"triggerMatchValid") <<
"pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher
318 if (!(
triggerEvent->addObjectMatchResult(handleTriggerObjectMatch, labelTriggerObjectMatcher))) {
320 <<
"pat::TriggerEvent contains already a pat::TriggerObjectMatch from matcher module '" 321 << labelTriggerObjectMatcher <<
"'";
unsigned int size() const
number of trigger paths in trigger table
collection_type::const_iterator const_iterator
uint32_t totalIntensityBeam1
edm::EDGetTokenT< TriggerObjectCollection > triggerObjectCollectionToken_
T getParameter(std::string const &) const
std::vector< edm::EDGetTokenT< TriggerObjectStandAloneMatch > > triggerMatcherTokens_
bool wasrun() const
Was at least one path run?
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::ConditionsInLumiBlock > tagCondGtLumiToken_
edm::EDGetTokenT< TriggerConditionCollection > triggerConditionCollectionToken_
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool accept() const
Has at least one path accepted the event?
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
std::string const & processName() const
const std::string & tableName() const
HLT ConfDB table name.
Produces the central entry point to full PAT trigger information.
edm::InputTag tagTriggerEvent_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::ConditionsInEventBlock > tagCondGtEventToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PATTriggerEventProducer(const edm::ParameterSet &iConfig)
bool error() const
Has any path encountered an error (exception)
edm::InputTag tagTriggerProducer_
bool get(ProductID const &oid, Handle< PROD > &result) const
ProcessHistory const & processHistory() const
HLTConfigProvider hltConfig_
edm::EDGetTokenT< edm::ConditionsInRunBlock > tagCondGtRunToken_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
uint32_t totalIntensityBeam2
void beginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
edm::InputTag tagTriggerResults_
edm::ConditionsInRunBlock condRun_
std::vector< edm::InputTag > tagsTriggerMatcher_
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::ConditionsInLumiBlock condLumi_
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override