10 std::vector<unsigned int>
12 const std::vector<std::string> &triggersInEvent) {
13 std::vector<unsigned int> triggerIndices;
15 for (
auto requestedTriggerName : requestedTriggers) {
17 std::size_t wildcarPosition = name.find(
"*");
18 if (wildcarPosition != std::string::npos) {
20 name = name.substr(0, wildcarPosition - 1);
23 unsigned int triggerIndex = 0;
24 for (
auto triggerName : triggersInEvent) {
25 if (triggerName.find(name) != std::string::npos) {
26 triggerIndices.push_back(triggerIndex);
32 return triggerIndices;
37 std::vector<bool> results;
38 results.resize(triggers.size());
42 if (triggers[
index] >= triggerResults.
size()) {
43 results[
index] =
false;
48 results[
index] =
true;
50 results[
index] =
false;
56 std::vector<unsigned int>
59 std::vector<unsigned int> results;
61 for (
unsigned int i = 0;
i < triggerResults.size(); ++
i) {
62 if (triggerResults[
i]) {
63 results.push_back(triggers[i]);
71 std::vector<bool> results =
73 if (
std::count(results.begin(), results.end(),
true) == 0) {
85 for (
auto filter : hltFilters) {
90 const size_t nTriggers = triggerEvent.
filterIds(filterIndex).size();
91 for (
size_t i = 0;
i < nTriggers; ++
i) {
92 results.push_back(triggerObjects[triggerKeys[
i]]);
99 [](
const trigObj &obj1,
const trigObj &obj2) {
100 return obj1.et() > obj2.et();
105 std::vector<edm::InputTag>
109 std::vector<edm::InputTag> results;
110 for (
auto trigger : triggers) {
111 unsigned int hltIndexOffset(2);
112 unsigned int moduleIndex = hltConfig.
size(
trigger) - hltIndexOffset;
116 results.push_back(filterInputTag);
126 std::copy_if(triggerObjects.begin(), triggerObjects.end(),
127 std::back_inserter(results),
unsigned int size() const
number of trigger paths in trigger table
trigger::TriggerObjectCollection getMatchedTriggerObjects(double eta, double phi, double maxDeltaR, const trigger::TriggerObjectCollection triggerObjects)
The single EDProduct to be saved for each event (AOD case)
trigger::size_type sizeFilters() const
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
trigger::TriggerObjectCollection getTriggerObjects(const std::vector< edm::InputTag > &hltFilters, const trigger::TriggerEvent &triggerEvent)
std::vector< unsigned int > getTriggerIndices(const std::vector< std::string > &requestedTriggers, const std::vector< std::string > &triggersInEvent)
Single trigger physics object (e.g., an isolated muon)
const Vids & filterIds(trigger::size_type index) const
const TriggerObjectCollection & getObjects() const
unsigned int size() const
Get number of paths stored.
std::vector< edm::InputTag > getHLTFilters(const std::vector< unsigned int > &triggers, const HLTConfigProvider &hltConfig, const std::string triggerProcess)
static std::string const triggerResults
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
std::vector< bool > getTriggerResults(const std::vector< unsigned int > &triggers, const edm::TriggerResults &triggerResults)
std::vector< size_type > Keys
std::vector< unsigned int > getFiredTriggerIndices(const std::vector< unsigned int > &triggers, const std::vector< bool > &triggerResults)
bool passesAnyTriggerFromList(const std::vector< unsigned int > &triggers, const edm::TriggerResults &triggerResults)