Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-16 06:12:34

0001 #ifndef HLTReco_TriggerEventWithRefs_h
0002 #define HLTReco_TriggerEventWithRefs_h
0003 
0004 /** \class trigger::TriggerEventWithRefs
0005  *
0006  *  The single EDProduct to be saved for events (RAW case)
0007  *  describing the details of the (HLT) trigger table
0008  *
0009  *
0010  *  \author Martin Grunewald
0011  *
0012  */
0013 
0014 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
0015 #include "DataFormats/HLTReco/interface/TriggerRefsCollections.h"
0016 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
0017 #include "FWCore/Utilities/interface/InputTag.h"
0018 #include "DataFormats/Common/interface/traits.h"
0019 #include <string>
0020 #include <vector>
0021 
0022 namespace trigger {
0023 
0024   /// The single EDProduct to be saved in addition for each event
0025   /// - but only in the "RAW" case: for a fraction of all events
0026 
0027   class TriggerEventWithRefs : public TriggerRefsCollections, public edm::DoNotRecordParents {
0028   public:
0029     /// Helper class: trigger objects firing a single filter
0030     class TriggerFilterObject {
0031     public:
0032       /// encoded InputTag of filter product
0033       std::string filterTag_;
0034       /// 1-after-end (std C++) indices into linearised vector of Refs
0035       /// (-> first start index is always 0)
0036       size_type photons_;
0037       size_type electrons_;
0038       size_type muons_;
0039       size_type jets_;
0040       size_type composites_;
0041       size_type basemets_;
0042       size_type calomets_;
0043       size_type pixtracks_;
0044       size_type l1em_;
0045       size_type l1muon_;
0046       size_type l1jet_;
0047       size_type l1etmiss_;
0048       size_type l1hfrings_;
0049       size_type pfjets_;
0050       size_type pftaus_;
0051       size_type pfmets_;
0052       size_type l1tmuon_;
0053       size_type l1tmuonShower_;
0054       size_type l1tegamma_;
0055       size_type l1tjet_;
0056       size_type l1ttkmuon_;
0057       size_type l1ttkele_;
0058       size_type l1ttkem_;
0059       size_type l1tpfjet_;
0060       size_type l1tpftau_;
0061       size_type l1thpspftau_;
0062       size_type l1tpftrack_;
0063       size_type l1ttau_;
0064       size_type l1tetsum_;
0065 
0066       /// constructor
0067       TriggerFilterObject()
0068           : filterTag_(),
0069             photons_(0),
0070             electrons_(0),
0071             muons_(0),
0072             jets_(0),
0073             composites_(0),
0074             basemets_(0),
0075             calomets_(0),
0076             pixtracks_(0),
0077             l1em_(0),
0078             l1muon_(0),
0079             l1jet_(0),
0080             l1etmiss_(0),
0081             l1hfrings_(0),
0082             pfjets_(0),
0083             pftaus_(0),
0084             pfmets_(0),
0085             l1tmuon_(0),
0086             l1tmuonShower_(0),
0087             l1tegamma_(0),
0088             l1tjet_(0),
0089             l1ttkmuon_(0),
0090             l1ttkele_(0),
0091             l1ttkem_(0),
0092             l1tpfjet_(0),
0093             l1tpftau_(0),
0094             l1thpspftau_(0),
0095             l1tpftrack_(0),
0096             l1ttau_(0),
0097             l1tetsum_(0) {
0098         filterTag_ = edm::InputTag().encode();
0099       }
0100       TriggerFilterObject(const edm::InputTag& filterTag,
0101                           size_type np,
0102                           size_type ne,
0103                           size_type nm,
0104                           size_type nj,
0105                           size_type nc,
0106                           size_type nB,
0107                           size_type nC,
0108                           size_type nt,
0109                           size_type l1em,
0110                           size_type l1muon,
0111                           size_type l1jet,
0112                           size_type l1etmiss,
0113                           size_type l1hfrings,
0114                           size_type pfjets,
0115                           size_type pftaus,
0116                           size_type pfmets,
0117                           size_type l1tmuon,
0118                           size_type l1tmuonShower,
0119                           size_type l1tegamma,
0120                           size_type l1tjet,
0121                           size_type l1ttkmuon,
0122                           size_type l1ttkele,
0123                           size_type l1ttkem,
0124                           size_type l1tpfjet,
0125                           size_type l1tpftau,
0126                           size_type l1thpspftau,
0127                           size_type l1tpftrack,
0128                           size_type l1ttau,
0129                           size_type l1tetsum)
0130           : filterTag_(filterTag.encode()),
0131             photons_(np),
0132             electrons_(ne),
0133             muons_(nm),
0134             jets_(nj),
0135             composites_(nc),
0136             basemets_(nB),
0137             calomets_(nC),
0138             pixtracks_(nt),
0139             l1em_(l1em),
0140             l1muon_(l1muon),
0141             l1jet_(l1jet),
0142             l1etmiss_(l1etmiss),
0143             l1hfrings_(l1hfrings),
0144             pfjets_(pfjets),
0145             pftaus_(pftaus),
0146             pfmets_(pfmets),
0147             l1tmuon_(l1tmuon),
0148             l1tmuonShower_(l1tmuonShower),
0149             l1tegamma_(l1tegamma),
0150             l1tjet_(l1tjet),
0151             l1ttkmuon_(l1ttkmuon),
0152             l1ttkele_(l1ttkele),
0153             l1ttkem_(l1ttkem),
0154             l1tpfjet_(l1tpfjet),
0155             l1tpftau_(l1tpftau),
0156             l1thpspftau_(l1thpspftau),
0157             l1tpftrack_(l1tpftrack),
0158             l1ttau_(l1ttau),
0159             l1tetsum_(l1tetsum) {}
0160     };
0161 
0162     /// data members
0163   private:
0164     /// processName used to select products packed up
0165     std::string usedProcessName_;
0166     /// the filters recorded here
0167     std::vector<TriggerFilterObject> filterObjects_;
0168 
0169     /// methods
0170   public:
0171     /// constructors
0172     TriggerEventWithRefs() : TriggerRefsCollections(), usedProcessName_(), filterObjects_() {}
0173     TriggerEventWithRefs(const std::string& usedProcessName, size_type n)
0174         : TriggerRefsCollections(), usedProcessName_(usedProcessName), filterObjects_() {
0175       filterObjects_.reserve(n);
0176     }
0177 
0178     /// setters - to build EDProduct
0179     void addFilterObject(const edm::InputTag& filterTag, const TriggerFilterObjectWithRefs& tfowr) {
0180       filterObjects_.push_back(
0181 
0182           TriggerFilterObject(filterTag,
0183                               addObjects(tfowr.photonIds(), tfowr.photonRefs()),
0184                               addObjects(tfowr.electronIds(), tfowr.electronRefs()),
0185                               addObjects(tfowr.muonIds(), tfowr.muonRefs()),
0186                               addObjects(tfowr.jetIds(), tfowr.jetRefs()),
0187                               addObjects(tfowr.compositeIds(), tfowr.compositeRefs()),
0188                               addObjects(tfowr.basemetIds(), tfowr.basemetRefs()),
0189                               addObjects(tfowr.calometIds(), tfowr.calometRefs()),
0190                               addObjects(tfowr.pixtrackIds(), tfowr.pixtrackRefs()),
0191                               addObjects(tfowr.l1emIds(), tfowr.l1emRefs()),
0192                               addObjects(tfowr.l1muonIds(), tfowr.l1muonRefs()),
0193                               addObjects(tfowr.l1jetIds(), tfowr.l1jetRefs()),
0194                               addObjects(tfowr.l1etmissIds(), tfowr.l1etmissRefs()),
0195                               addObjects(tfowr.l1hfringsIds(), tfowr.l1hfringsRefs()),
0196                               addObjects(tfowr.pfjetIds(), tfowr.pfjetRefs()),
0197                               addObjects(tfowr.pftauIds(), tfowr.pftauRefs()),
0198                               addObjects(tfowr.pfmetIds(), tfowr.pfmetRefs()),
0199                               addObjects(tfowr.l1tmuonIds(), tfowr.l1tmuonRefs()),
0200                               addObjects(tfowr.l1tmuonShowerIds(), tfowr.l1tmuonShowerRefs()),
0201                               addObjects(tfowr.l1tegammaIds(), tfowr.l1tegammaRefs()),
0202                               addObjects(tfowr.l1tjetIds(), tfowr.l1tjetRefs()),
0203                               addObjects(tfowr.l1ttkmuonIds(), tfowr.l1ttkmuonRefs()),
0204                               addObjects(tfowr.l1ttkeleIds(), tfowr.l1ttkeleRefs()),
0205                               addObjects(tfowr.l1ttkemIds(), tfowr.l1ttkemRefs()),
0206                               addObjects(tfowr.l1tpfjetIds(), tfowr.l1tpfjetRefs()),
0207                               addObjects(tfowr.l1tpftauIds(), tfowr.l1tpftauRefs()),
0208                               addObjects(tfowr.l1thpspftauIds(), tfowr.l1thpspftauRefs()),
0209                               addObjects(tfowr.l1tpftrackIds(), tfowr.l1tpftrackRefs()),
0210                               addObjects(tfowr.l1ttauIds(), tfowr.l1ttauRefs()),
0211                               addObjects(tfowr.l1tetsumIds(), tfowr.l1tetsumRefs()))
0212 
0213       );
0214     }
0215 
0216     /// getters - for user access
0217     const std::string& usedProcessName() const { return usedProcessName_; }
0218 
0219     /// number of filters
0220     size_type size() const { return filterObjects_.size(); }
0221 
0222     /// tag from index
0223     const edm::InputTag filterTag(size_type filterIndex) const {
0224       return edm::InputTag(filterObjects_.at(filterIndex).filterTag_);
0225     }
0226 
0227     /// index from tag
0228     size_type filterIndex(const edm::InputTag& filterTag) const {
0229       const std::string encodedFilterTag(filterTag.encode());
0230       const size_type n(filterObjects_.size());
0231       for (size_type i = 0; i != n; ++i) {
0232         if (encodedFilterTag == filterObjects_[i].filterTag_) {
0233           return i;
0234         }
0235       }
0236       return n;
0237     }
0238 
0239     /// slices of objects for a specific filter: [begin,end[
0240 
0241     std::pair<size_type, size_type> photonSlice(size_type filter) const {
0242       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).photons_);
0243       const size_type end(filterObjects_.at(filter).photons_);
0244       return std::pair<size_type, size_type>(begin, end);
0245     }
0246 
0247     std::pair<size_type, size_type> electronSlice(size_type filter) const {
0248       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).electrons_);
0249       const size_type end(filterObjects_.at(filter).electrons_);
0250       return std::pair<size_type, size_type>(begin, end);
0251     }
0252 
0253     std::pair<size_type, size_type> muonSlice(size_type filter) const {
0254       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).muons_);
0255       const size_type end(filterObjects_.at(filter).muons_);
0256       return std::pair<size_type, size_type>(begin, end);
0257     }
0258 
0259     std::pair<size_type, size_type> jetSlice(size_type filter) const {
0260       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).jets_);
0261       const size_type end(filterObjects_.at(filter).jets_);
0262       return std::pair<size_type, size_type>(begin, end);
0263     }
0264 
0265     std::pair<size_type, size_type> compositeSlice(size_type filter) const {
0266       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).composites_);
0267       const size_type end(filterObjects_.at(filter).composites_);
0268       return std::pair<size_type, size_type>(begin, end);
0269     }
0270 
0271     std::pair<size_type, size_type> basemetSlice(size_type filter) const {
0272       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).basemets_);
0273       const size_type end(filterObjects_.at(filter).basemets_);
0274       return std::pair<size_type, size_type>(begin, end);
0275     }
0276 
0277     std::pair<size_type, size_type> calometSlice(size_type filter) const {
0278       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).calomets_);
0279       const size_type end(filterObjects_.at(filter).calomets_);
0280       return std::pair<size_type, size_type>(begin, end);
0281     }
0282 
0283     std::pair<size_type, size_type> pixtrackSlice(size_type filter) const {
0284       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).pixtracks_);
0285       const size_type end(filterObjects_.at(filter).pixtracks_);
0286       return std::pair<size_type, size_type>(begin, end);
0287     }
0288 
0289     std::pair<size_type, size_type> l1emSlice(size_type filter) const {
0290       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1em_);
0291       const size_type end(filterObjects_.at(filter).l1em_);
0292       return std::pair<size_type, size_type>(begin, end);
0293     }
0294 
0295     std::pair<size_type, size_type> l1muonSlice(size_type filter) const {
0296       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1muon_);
0297       const size_type end(filterObjects_.at(filter).l1muon_);
0298       return std::pair<size_type, size_type>(begin, end);
0299     }
0300 
0301     std::pair<size_type, size_type> l1jetSlice(size_type filter) const {
0302       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1jet_);
0303       const size_type end(filterObjects_.at(filter).l1jet_);
0304       return std::pair<size_type, size_type>(begin, end);
0305     }
0306 
0307     std::pair<size_type, size_type> l1etmissSlice(size_type filter) const {
0308       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1etmiss_);
0309       const size_type end(filterObjects_.at(filter).l1etmiss_);
0310       return std::pair<size_type, size_type>(begin, end);
0311     }
0312 
0313     std::pair<size_type, size_type> l1hfringsSlice(size_type filter) const {
0314       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1hfrings_);
0315       const size_type end(filterObjects_.at(filter).l1hfrings_);
0316       return std::pair<size_type, size_type>(begin, end);
0317     }
0318 
0319     std::pair<size_type, size_type> pfjetSlice(size_type filter) const {
0320       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).pfjets_);
0321       const size_type end(filterObjects_.at(filter).pfjets_);
0322       return std::pair<size_type, size_type>(begin, end);
0323     }
0324 
0325     std::pair<size_type, size_type> pftauSlice(size_type filter) const {
0326       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).pftaus_);
0327       const size_type end(filterObjects_.at(filter).pftaus_);
0328       return std::pair<size_type, size_type>(begin, end);
0329     }
0330 
0331     std::pair<size_type, size_type> pfmetSlice(size_type filter) const {
0332       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).pfmets_);
0333       const size_type end(filterObjects_.at(filter).pfmets_);
0334       return std::pair<size_type, size_type>(begin, end);
0335     }
0336 
0337     std::pair<size_type, size_type> l1tmuonSlice(size_type filter) const {
0338       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tmuon_);
0339       const size_type end(filterObjects_.at(filter).l1tmuon_);
0340       return std::pair<size_type, size_type>(begin, end);
0341     }
0342     std::pair<size_type, size_type> l1tmuonShowerSlice(size_type filter) const {
0343       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tmuonShower_);
0344       const size_type end(filterObjects_.at(filter).l1tmuonShower_);
0345       return std::pair<size_type, size_type>(begin, end);
0346     }
0347     std::pair<size_type, size_type> l1tegammaSlice(size_type filter) const {
0348       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tegamma_);
0349       const size_type end(filterObjects_.at(filter).l1tegamma_);
0350       return std::pair<size_type, size_type>(begin, end);
0351     }
0352     std::pair<size_type, size_type> l1tjetSlice(size_type filter) const {
0353       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tjet_);
0354       const size_type end(filterObjects_.at(filter).l1tjet_);
0355       return std::pair<size_type, size_type>(begin, end);
0356     }
0357 
0358     /* Phase-2 */
0359     std::pair<size_type, size_type> l1ttkmuonSlice(size_type filter) const {
0360       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1ttkmuon_);
0361       const size_type end(filterObjects_.at(filter).l1ttkmuon_);
0362       return std::pair<size_type, size_type>(begin, end);
0363     }
0364     std::pair<size_type, size_type> l1ttkeleSlice(size_type filter) const {
0365       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1ttkele_);
0366       const size_type end(filterObjects_.at(filter).l1ttkele_);
0367       return std::pair<size_type, size_type>(begin, end);
0368     }
0369     std::pair<size_type, size_type> l1ttkemSlice(size_type filter) const {
0370       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1ttkem_);
0371       const size_type end(filterObjects_.at(filter).l1ttkem_);
0372       return std::pair<size_type, size_type>(begin, end);
0373     }
0374     std::pair<size_type, size_type> l1tpfjetSlice(size_type filter) const {
0375       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tpfjet_);
0376       const size_type end(filterObjects_.at(filter).l1tpfjet_);
0377       return std::pair<size_type, size_type>(begin, end);
0378     }
0379     std::pair<size_type, size_type> l1tpftauSlice(size_type filter) const {
0380       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tpftau_);
0381       const size_type end(filterObjects_.at(filter).l1tpftau_);
0382       return std::pair<size_type, size_type>(begin, end);
0383     }
0384     std::pair<size_type, size_type> l1thpspftauSlice(size_type filter) const {
0385       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1thpspftau_);
0386       const size_type end(filterObjects_.at(filter).l1thpspftau_);
0387       return std::pair<size_type, size_type>(begin, end);
0388     }
0389     std::pair<size_type, size_type> l1tpftrackSlice(size_type filter) const {
0390       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tpftrack_);
0391       const size_type end(filterObjects_.at(filter).l1tpftrack_);
0392       return std::pair<size_type, size_type>(begin, end);
0393     }
0394 
0395     std::pair<size_type, size_type> l1ttauSlice(size_type filter) const {
0396       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1ttau_);
0397       const size_type end(filterObjects_.at(filter).l1ttau_);
0398       return std::pair<size_type, size_type>(begin, end);
0399     }
0400 
0401     std::pair<size_type, size_type> l1tetsumSlice(size_type filter) const {
0402       const size_type begin(filter == 0 ? 0 : filterObjects_.at(filter - 1).l1tetsum_);
0403       const size_type end(filterObjects_.at(filter).l1tetsum_);
0404       return std::pair<size_type, size_type>(begin, end);
0405     }
0406 
0407     /// extract Ref<C>s for a specific filter and of specific physics type
0408 
0409     void getObjects(size_type filter, Vids& ids, VRphoton& photons) const {
0410       const size_type begin(photonSlice(filter).first);
0411       const size_type end(photonSlice(filter).second);
0412       TriggerRefsCollections::getObjects(ids, photons, begin, end);
0413     }
0414     void getObjects(size_type filter, int id, VRphoton& photons) const {
0415       const size_type begin(photonSlice(filter).first);
0416       const size_type end(photonSlice(filter).second);
0417       TriggerRefsCollections::getObjects(id, photons, begin, end);
0418     }
0419 
0420     void getObjects(size_type filter, Vids& ids, VRelectron& electrons) const {
0421       const size_type begin(electronSlice(filter).first);
0422       const size_type end(electronSlice(filter).second);
0423       TriggerRefsCollections::getObjects(ids, electrons, begin, end);
0424     }
0425     void getObjects(size_type filter, int id, VRelectron& electrons) const {
0426       const size_type begin(electronSlice(filter).first);
0427       const size_type end(electronSlice(filter).second);
0428       TriggerRefsCollections::getObjects(id, electrons, begin, end);
0429     }
0430 
0431     void getObjects(size_type filter, Vids& ids, VRmuon& muons) const {
0432       const size_type begin(muonSlice(filter).first);
0433       const size_type end(muonSlice(filter).second);
0434       TriggerRefsCollections::getObjects(ids, muons, begin, end);
0435     }
0436     void getObjects(size_type filter, int id, VRmuon& muons) const {
0437       const size_type begin(muonSlice(filter).first);
0438       const size_type end(muonSlice(filter).second);
0439       TriggerRefsCollections::getObjects(id, muons, begin, end);
0440     }
0441 
0442     void getObjects(size_type filter, Vids& ids, VRjet& jets) const {
0443       const size_type begin(jetSlice(filter).first);
0444       const size_type end(jetSlice(filter).second);
0445       TriggerRefsCollections::getObjects(ids, jets, begin, end);
0446     }
0447     void getObjects(size_type filter, int id, VRjet& jets) const {
0448       const size_type begin(jetSlice(filter).first);
0449       const size_type end(jetSlice(filter).second);
0450       TriggerRefsCollections::getObjects(id, jets, begin, end);
0451     }
0452 
0453     void getObjects(size_type filter, Vids& ids, VRcomposite& composites) const {
0454       const size_type begin(compositeSlice(filter).first);
0455       const size_type end(compositeSlice(filter).second);
0456       TriggerRefsCollections::getObjects(ids, composites, begin, end);
0457     }
0458     void getObjects(size_type filter, int id, VRcomposite& composites) const {
0459       const size_type begin(compositeSlice(filter).first);
0460       const size_type end(compositeSlice(filter).second);
0461       TriggerRefsCollections::getObjects(id, composites, begin, end);
0462     }
0463 
0464     void getObjects(size_type filter, Vids& ids, VRbasemet& basemets) const {
0465       const size_type begin(basemetSlice(filter).first);
0466       const size_type end(basemetSlice(filter).second);
0467       TriggerRefsCollections::getObjects(ids, basemets, begin, end);
0468     }
0469     void getObjects(size_type filter, int id, VRbasemet& basemets) const {
0470       const size_type begin(basemetSlice(filter).first);
0471       const size_type end(basemetSlice(filter).second);
0472       TriggerRefsCollections::getObjects(id, basemets, begin, end);
0473     }
0474 
0475     void getObjects(size_type filter, Vids& ids, VRcalomet& calomets) const {
0476       const size_type begin(calometSlice(filter).first);
0477       const size_type end(calometSlice(filter).second);
0478       TriggerRefsCollections::getObjects(ids, calomets, begin, end);
0479     }
0480     void getObjects(size_type filter, int id, VRcalomet& calomets) const {
0481       const size_type begin(calometSlice(filter).first);
0482       const size_type end(calometSlice(filter).second);
0483       TriggerRefsCollections::getObjects(id, calomets, begin, end);
0484     }
0485 
0486     void getObjects(size_type filter, Vids& ids, VRpixtrack& pixtracks) const {
0487       const size_type begin(pixtrackSlice(filter).first);
0488       const size_type end(pixtrackSlice(filter).second);
0489       TriggerRefsCollections::getObjects(ids, pixtracks, begin, end);
0490     }
0491     void getObjects(size_type filter, int id, VRpixtrack& pixtracks) const {
0492       const size_type begin(pixtrackSlice(filter).first);
0493       const size_type end(pixtrackSlice(filter).second);
0494       TriggerRefsCollections::getObjects(id, pixtracks, begin, end);
0495     }
0496 
0497     void getObjects(size_type filter, Vids& ids, VRl1em& l1em) const {
0498       const size_type begin(l1emSlice(filter).first);
0499       const size_type end(l1emSlice(filter).second);
0500       TriggerRefsCollections::getObjects(ids, l1em, begin, end);
0501     }
0502     void getObjects(size_type filter, int id, VRl1em& l1em) const {
0503       const size_type begin(l1emSlice(filter).first);
0504       const size_type end(l1emSlice(filter).second);
0505       TriggerRefsCollections::getObjects(id, l1em, begin, end);
0506     }
0507 
0508     void getObjects(size_type filter, Vids& ids, VRl1muon& l1muon) const {
0509       const size_type begin(l1muonSlice(filter).first);
0510       const size_type end(l1muonSlice(filter).second);
0511       TriggerRefsCollections::getObjects(ids, l1muon, begin, end);
0512     }
0513     void getObjects(size_type filter, int id, VRl1muon& l1muon) const {
0514       const size_type begin(l1muonSlice(filter).first);
0515       const size_type end(l1muonSlice(filter).second);
0516       TriggerRefsCollections::getObjects(id, l1muon, begin, end);
0517     }
0518 
0519     void getObjects(size_type filter, Vids& ids, VRl1jet& l1jet) const {
0520       const size_type begin(l1jetSlice(filter).first);
0521       const size_type end(l1jetSlice(filter).second);
0522       TriggerRefsCollections::getObjects(ids, l1jet, begin, end);
0523     }
0524     void getObjects(size_type filter, int id, VRl1jet& l1jet) const {
0525       const size_type begin(l1jetSlice(filter).first);
0526       const size_type end(l1jetSlice(filter).second);
0527       TriggerRefsCollections::getObjects(id, l1jet, begin, end);
0528     }
0529 
0530     void getObjects(size_type filter, Vids& ids, VRl1etmiss& l1etmiss) const {
0531       const size_type begin(l1etmissSlice(filter).first);
0532       const size_type end(l1etmissSlice(filter).second);
0533       TriggerRefsCollections::getObjects(ids, l1etmiss, begin, end);
0534     }
0535     void getObjects(size_type filter, int id, VRl1etmiss& l1etmiss) const {
0536       const size_type begin(l1etmissSlice(filter).first);
0537       const size_type end(l1etmissSlice(filter).second);
0538       TriggerRefsCollections::getObjects(id, l1etmiss, begin, end);
0539     }
0540 
0541     void getObjects(size_type filter, Vids& ids, VRl1hfrings& l1hfrings) const {
0542       const size_type begin(l1hfringsSlice(filter).first);
0543       const size_type end(l1hfringsSlice(filter).second);
0544       TriggerRefsCollections::getObjects(ids, l1hfrings, begin, end);
0545     }
0546     void getObjects(size_type filter, int id, VRl1hfrings& l1hfrings) const {
0547       const size_type begin(l1hfringsSlice(filter).first);
0548       const size_type end(l1hfringsSlice(filter).second);
0549       TriggerRefsCollections::getObjects(id, l1hfrings, begin, end);
0550     }
0551 
0552     void getObjects(size_type filter, Vids& ids, VRpfjet& pfjets) const {
0553       const size_type begin(pfjetSlice(filter).first);
0554       const size_type end(pfjetSlice(filter).second);
0555       TriggerRefsCollections::getObjects(ids, pfjets, begin, end);
0556     }
0557     void getObjects(size_type filter, int id, VRpfjet& pfjets) const {
0558       const size_type begin(pfjetSlice(filter).first);
0559       const size_type end(pfjetSlice(filter).second);
0560       TriggerRefsCollections::getObjects(id, pfjets, begin, end);
0561     }
0562 
0563     void getObjects(size_type filter, Vids& ids, VRpftau& pftaus) const {
0564       const size_type begin(pftauSlice(filter).first);
0565       const size_type end(pftauSlice(filter).second);
0566       TriggerRefsCollections::getObjects(ids, pftaus, begin, end);
0567     }
0568     void getObjects(size_type filter, int id, VRpftau& pftaus) const {
0569       const size_type begin(pftauSlice(filter).first);
0570       const size_type end(pftauSlice(filter).second);
0571       TriggerRefsCollections::getObjects(id, pftaus, begin, end);
0572     }
0573 
0574     void getObjects(size_type filter, Vids& ids, VRpfmet& pfmets) const {
0575       const size_type begin(pfmetSlice(filter).first);
0576       const size_type end(pfmetSlice(filter).second);
0577       TriggerRefsCollections::getObjects(ids, pfmets, begin, end);
0578     }
0579     void getObjects(size_type filter, int id, VRpfmet& pfmets) const {
0580       const size_type begin(pfmetSlice(filter).first);
0581       const size_type end(pfmetSlice(filter).second);
0582       TriggerRefsCollections::getObjects(id, pfmets, begin, end);
0583     }
0584 
0585     void getObjects(size_type filter, Vids& ids, VRl1tmuon& l1tmuon) const {
0586       const size_type begin(l1tmuonSlice(filter).first);
0587       const size_type end(l1tmuonSlice(filter).second);
0588       TriggerRefsCollections::getObjects(ids, l1tmuon, begin, end);
0589     }
0590     void getObjects(size_type filter, int id, VRl1tmuon& l1tmuon) const {
0591       const size_type begin(l1tmuonSlice(filter).first);
0592       const size_type end(l1tmuonSlice(filter).second);
0593       TriggerRefsCollections::getObjects(id, l1tmuon, begin, end);
0594     }
0595 
0596     void getObjects(size_type filter, Vids& ids, VRl1tmuonShower& l1tmuonShower) const {
0597       const size_type begin(l1tmuonShowerSlice(filter).first);
0598       const size_type end(l1tmuonShowerSlice(filter).second);
0599       TriggerRefsCollections::getObjects(ids, l1tmuonShower, begin, end);
0600     }
0601     void getObjects(size_type filter, int id, VRl1tmuonShower& l1tmuonShower) const {
0602       const size_type begin(l1tmuonShowerSlice(filter).first);
0603       const size_type end(l1tmuonShowerSlice(filter).second);
0604       TriggerRefsCollections::getObjects(id, l1tmuonShower, begin, end);
0605     }
0606 
0607     void getObjects(size_type filter, Vids& ids, VRl1tegamma& l1tegamma) const {
0608       const size_type begin(l1tegammaSlice(filter).first);
0609       const size_type end(l1tegammaSlice(filter).second);
0610       TriggerRefsCollections::getObjects(ids, l1tegamma, begin, end);
0611     }
0612     void getObjects(size_type filter, int id, VRl1tegamma& l1tegamma) const {
0613       const size_type begin(l1tegammaSlice(filter).first);
0614       const size_type end(l1tegammaSlice(filter).second);
0615       TriggerRefsCollections::getObjects(id, l1tegamma, begin, end);
0616     }
0617 
0618     void getObjects(size_type filter, Vids& ids, VRl1tjet& l1tjet) const {
0619       const size_type begin(l1tjetSlice(filter).first);
0620       const size_type end(l1tjetSlice(filter).second);
0621       TriggerRefsCollections::getObjects(ids, l1tjet, begin, end);
0622     }
0623     void getObjects(size_type filter, int id, VRl1tjet& l1tjet) const {
0624       const size_type begin(l1tjetSlice(filter).first);
0625       const size_type end(l1tjetSlice(filter).second);
0626       TriggerRefsCollections::getObjects(id, l1tjet, begin, end);
0627     }
0628 
0629     /* Phase-2 */
0630     void getObjects(size_type filter, Vids& ids, VRl1ttkmuon& l1ttkmuon) const {
0631       const size_type begin(l1ttkmuonSlice(filter).first);
0632       const size_type end(l1ttkmuonSlice(filter).second);
0633       TriggerRefsCollections::getObjects(ids, l1ttkmuon, begin, end);
0634     }
0635     void getObjects(size_type filter, int id, VRl1ttkmuon& l1ttkmuon) const {
0636       const size_type begin(l1ttkmuonSlice(filter).first);
0637       const size_type end(l1ttkmuonSlice(filter).second);
0638       TriggerRefsCollections::getObjects(id, l1ttkmuon, begin, end);
0639     }
0640 
0641     void getObjects(size_type filter, Vids& ids, VRl1ttkele& l1ttkele) const {
0642       const size_type begin(l1ttkeleSlice(filter).first);
0643       const size_type end(l1ttkeleSlice(filter).second);
0644       TriggerRefsCollections::getObjects(ids, l1ttkele, begin, end);
0645     }
0646     void getObjects(size_type filter, int id, VRl1ttkele& l1ttkele) const {
0647       const size_type begin(l1ttkeleSlice(filter).first);
0648       const size_type end(l1ttkeleSlice(filter).second);
0649       TriggerRefsCollections::getObjects(id, l1ttkele, begin, end);
0650     }
0651 
0652     void getObjects(size_type filter, Vids& ids, VRl1ttkem& l1ttkem) const {
0653       const size_type begin(l1ttkemSlice(filter).first);
0654       const size_type end(l1ttkemSlice(filter).second);
0655       TriggerRefsCollections::getObjects(ids, l1ttkem, begin, end);
0656     }
0657     void getObjects(size_type filter, int id, VRl1ttkem& l1ttkem) const {
0658       const size_type begin(l1ttkemSlice(filter).first);
0659       const size_type end(l1ttkemSlice(filter).second);
0660       TriggerRefsCollections::getObjects(id, l1ttkem, begin, end);
0661     }
0662 
0663     void getObjects(size_type filter, Vids& ids, VRl1tpfjet& l1tpfjet) const {
0664       const size_type begin(l1tpfjetSlice(filter).first);
0665       const size_type end(l1tpfjetSlice(filter).second);
0666       TriggerRefsCollections::getObjects(ids, l1tpfjet, begin, end);
0667     }
0668     void getObjects(size_type filter, int id, VRl1tpfjet& l1tpfjet) const {
0669       const size_type begin(l1tpfjetSlice(filter).first);
0670       const size_type end(l1tpfjetSlice(filter).second);
0671       TriggerRefsCollections::getObjects(id, l1tpfjet, begin, end);
0672     }
0673 
0674     void getObjects(size_type filter, Vids& ids, VRl1tpftau& l1tpftau) const {
0675       const size_type begin(l1tpftauSlice(filter).first);
0676       const size_type end(l1tpftauSlice(filter).second);
0677       TriggerRefsCollections::getObjects(ids, l1tpftau, begin, end);
0678     }
0679     void getObjects(size_type filter, int id, VRl1tpftau& l1tpftau) const {
0680       const size_type begin(l1tpftauSlice(filter).first);
0681       const size_type end(l1tpftauSlice(filter).second);
0682       TriggerRefsCollections::getObjects(id, l1tpftau, begin, end);
0683     }
0684 
0685     void getObjects(size_type filter, Vids& ids, VRl1thpspftau& l1thpspftau) const {
0686       const size_type begin(l1thpspftauSlice(filter).first);
0687       const size_type end(l1thpspftauSlice(filter).second);
0688       TriggerRefsCollections::getObjects(ids, l1thpspftau, begin, end);
0689     }
0690     void getObjects(size_type filter, int id, VRl1thpspftau& l1thpspftau) const {
0691       const size_type begin(l1thpspftauSlice(filter).first);
0692       const size_type end(l1thpspftauSlice(filter).second);
0693       TriggerRefsCollections::getObjects(id, l1thpspftau, begin, end);
0694     }
0695 
0696     void getObjects(size_type filter, Vids& ids, VRl1tpftrack& l1tpftrack) const {
0697       const size_type begin(l1tpftrackSlice(filter).first);
0698       const size_type end(l1tpftrackSlice(filter).second);
0699       TriggerRefsCollections::getObjects(ids, l1tpftrack, begin, end);
0700     }
0701     void getObjects(size_type filter, int id, VRl1tpftrack& l1tpftrack) const {
0702       const size_type begin(l1tpftrackSlice(filter).first);
0703       const size_type end(l1tpftrackSlice(filter).second);
0704       TriggerRefsCollections::getObjects(id, l1tpftrack, begin, end);
0705     }
0706 
0707     void getObjects(size_type filter, Vids& ids, VRl1ttau& l1ttau) const {
0708       const size_type begin(l1ttauSlice(filter).first);
0709       const size_type end(l1ttauSlice(filter).second);
0710       TriggerRefsCollections::getObjects(ids, l1ttau, begin, end);
0711     }
0712     void getObjects(size_type filter, int id, VRl1ttau& l1ttau) const {
0713       const size_type begin(l1ttauSlice(filter).first);
0714       const size_type end(l1ttauSlice(filter).second);
0715       TriggerRefsCollections::getObjects(id, l1ttau, begin, end);
0716     }
0717 
0718     void getObjects(size_type filter, Vids& ids, VRl1tetsum& l1tetsum) const {
0719       const size_type begin(l1tetsumSlice(filter).first);
0720       const size_type end(l1tetsumSlice(filter).second);
0721       TriggerRefsCollections::getObjects(ids, l1tetsum, begin, end);
0722     }
0723     void getObjects(size_type filter, int id, VRl1tetsum& l1tetsum) const {
0724       const size_type begin(l1tetsumSlice(filter).first);
0725       const size_type end(l1tetsumSlice(filter).second);
0726       TriggerRefsCollections::getObjects(id, l1tetsum, begin, end);
0727     }
0728   };
0729 
0730 }  // namespace trigger
0731 
0732 #endif