1 #ifndef DQMOFFLINE_TRIGGER_EGHLTTRIGTOOLS 2 #define DQMOFFLINE_TRIGGER_EGHLTTRIGTOOLS 22 const std::vector<std::string>&
filters,
23 const std::vector<std::pair<std::string, std::string> >& l1PreAndSeedFilters,
29 template <
class T,
class U>
32 const std::vector<std::string>&
filters,
40 std::vector<std::string>& activeFilters,
41 std::vector<std::string>& activeEleFilters,
42 std::vector<std::string>& activeEle2LegFilters,
43 std::vector<std::string>& activePhoFilters,
44 std::vector<std::string>& activePho2LegFilters);
49 void filterInactiveTriggers(std::vector<std::string>& namesToFilter, std::vector<std::string>& activeFilters);
52 const std::vector<std::string>& activeFilters);
55 const std::vector<std::string>&
filters,
56 std::vector<std::string>&
paths);
73 const std::vector<std::string>&
filters,
74 const std::vector<std::pair<std::string, std::string> >& l1PreAndSeedFilters,
79 std::vector<TrigCodes::TrigBitSet> partTrigBits(
particles.size());
85 if (filterNrInEvt < trigEvt->sizeFilters()) {
89 for (
size_t partNr = 0; partNr <
particles.size(); partNr++) {
90 for (
unsigned short trigKey : trigKeys) {
91 float trigObjEta = trigObjColl[trigKey].eta();
92 float trigObjPhi = trigObjColl[trigKey].phi();
94 partTrigBits[partNr] |= filterCode;
102 for (
const auto& l1PreAndSeedFilter : l1PreAndSeedFilters) {
104 if ((filterCode & evtTrigBits) == filterCode) {
108 if (filterNrInEvt < trigEvt->sizeFilters()) {
112 for (
size_t partNr = 0; partNr <
particles.size(); partNr++) {
113 for (
unsigned short trigKey : trigKeys) {
114 float trigObjEta = trigObjColl[trigKey].eta();
115 float trigObjPhi = trigObjColl[trigKey].phi();
117 partTrigBits[partNr] |= filterCode;
125 for (
size_t partNr = 0; partNr <
particles.size(); partNr++)
126 particles[partNr].setTrigBits(partTrigBits[partNr]);
129 template <
class T,
class U>
132 const std::vector<std::string>&
filters,
135 std::vector<TrigCodes::TrigBitSet> partTrigBits(1);
140 if (filterNrInEvt < trigEvt->sizeFilters()) {
144 for (
unsigned short trigKey : trigKeys) {
145 float trigObjEta = trigObjColl[trigKey].eta();
146 float trigObjPhi = trigObjColl[trigKey].phi();
147 float trigObjE = trigObjColl[trigKey].energy();
148 if (
reco::deltaR(particle.superCluster()->eta(), particle.superCluster()->phi(), trigObjEta, trigObjPhi) <
150 hltData.HLTeta = trigObjEta;
151 hltData.HLTphi = trigObjPhi;
152 hltData.HLTenergy = trigObjE;
const Keys & filterKeys(trigger::size_type index) const
The single EDProduct to be saved for each event (AOD case)
std::vector< TPRegexp > filters
const TriggerObjectCollection & getObjects() const
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
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
TrigBitSet getCode(const char *descript) const
std::bitset< maxNrBits_ > TrigBitSet