Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:23

0001 #ifndef HLTReco_TriggerRefsCollections_h
0002 #define HLTReco_TriggerRefsCollections_h
0003 
0004 /** \class trigger::TriggerRefsCollections
0005  *
0006  *  Holds the collections of Ref<C>s which describe the physics
0007  *  objects passing trigger cuts.
0008  *
0009  *  This implementation is not completely space-efficient as some
0010  *  physics object containers may stay empty. However, the big
0011  *  advantage is that the solution is generic, i.e., works for all
0012  *  possible HLT filters. Hence we accept the reasonably small
0013  *  overhead of empty containers.
0014  *
0015  *
0016  *  \author Martin Grunewald
0017  *
0018  */
0019 
0020 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
0021 
0022 #include "DataFormats/Common/interface/Ref.h"
0023 #include "DataFormats/Common/interface/RefProd.h"
0024 
0025 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
0026 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0027 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
0028 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0029 #include "DataFormats/Candidate/interface/CompositeCandidateFwd.h"
0030 #include "DataFormats/METReco/interface/METFwd.h"
0031 #include "DataFormats/METReco/interface/CaloMETFwd.h"
0032 #include "DataFormats/METReco/interface/PFMETFwd.h"
0033 #include "DataFormats/HcalIsolatedTrack/interface/IsolatedPixelTrackCandidateFwd.h"
0034 
0035 #include "DataFormats/L1Trigger/interface/L1HFRingsFwd.h"         // deprecate
0036 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"      // deprecate
0037 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"     // deprecate
0038 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"    // deprecate
0039 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"  // deprecate
0040 
0041 #include "DataFormats/L1Trigger/interface/Muon.h"
0042 #include "DataFormats/L1Trigger/interface/MuonShower.h"
0043 #include "DataFormats/L1Trigger/interface/EGamma.h"
0044 #include "DataFormats/L1Trigger/interface/Jet.h"
0045 #include "DataFormats/L1Trigger/interface/Tau.h"
0046 #include "DataFormats/L1Trigger/interface/EtSum.h"
0047 #include "DataFormats/L1Trigger/interface/P2GTCandidate.h"
0048 #include "DataFormats/L1TMuonPhase2/interface/TrackerMuon.h"
0049 #include "DataFormats/L1TCorrelator/interface/TkElectron.h"
0050 #include "DataFormats/L1TCorrelator/interface/TkElectronFwd.h"
0051 #include "DataFormats/L1TCorrelator/interface/TkEm.h"
0052 #include "DataFormats/L1TCorrelator/interface/TkEmFwd.h"
0053 #include "DataFormats/L1TParticleFlow/interface/PFJet.h"
0054 #include "DataFormats/L1TParticleFlow/interface/PFTau.h"
0055 #include "DataFormats/L1TParticleFlow/interface/HPSPFTau.h"
0056 #include "DataFormats/L1TParticleFlow/interface/HPSPFTauFwd.h"
0057 
0058 #include "DataFormats/JetReco/interface/PFJetCollection.h"
0059 #include "DataFormats/TauReco/interface/PFTauFwd.h"
0060 
0061 #include <cassert>
0062 #include <vector>
0063 
0064 #include <typeinfo>
0065 
0066 namespace trigger {
0067 
0068   typedef std::vector<reco::RecoEcalCandidateRef> VRphoton;
0069   typedef std::vector<reco::ElectronRef> VRelectron;
0070   typedef std::vector<reco::RecoChargedCandidateRef> VRmuon;
0071   typedef std::vector<reco::CaloJetRef> VRjet;
0072   typedef std::vector<reco::CompositeCandidateRef> VRcomposite;
0073   typedef std::vector<reco::METRef> VRbasemet;
0074   typedef std::vector<reco::CaloMETRef> VRcalomet;
0075   typedef std::vector<reco::IsolatedPixelTrackCandidateRef> VRpixtrack;
0076 
0077   typedef std::vector<l1extra::L1EmParticleRef> VRl1em;          //deprecate
0078   typedef std::vector<l1extra::L1MuonParticleRef> VRl1muon;      //deprecate
0079   typedef std::vector<l1extra::L1JetParticleRef> VRl1jet;        //deprecate
0080   typedef std::vector<l1extra::L1EtMissParticleRef> VRl1etmiss;  //deprecate
0081   typedef std::vector<l1extra::L1HFRingsRef> VRl1hfrings;        //deprecate
0082 
0083   typedef l1t::MuonVectorRef VRl1tmuon;
0084   typedef l1t::MuonShowerVectorRef VRl1tmuonShower;
0085   typedef l1t::EGammaVectorRef VRl1tegamma;
0086   typedef l1t::JetVectorRef VRl1tjet;
0087   typedef l1t::TauVectorRef VRl1ttau;
0088   typedef l1t::EtSumVectorRef VRl1tetsum;
0089 
0090   /* Phase-2 */
0091   // This is a std::vector<TrackerMuonRef>,
0092   // and should be called TrackerMuonVectorRef upstream.
0093   // The L1T group should be made aware of that
0094   typedef l1t::TrackerMuonRefVector VRl1ttkmuon;
0095   typedef l1t::TkElectronVectorRef VRl1ttkele;
0096   typedef l1t::TkEmVectorRef VRl1ttkem;
0097   typedef l1t::PFJetVectorRef VRl1tpfjet;
0098   typedef l1t::HPSPFTauVectorRef VRl1thpspftau;
0099   typedef l1t::PFTauVectorRef VRl1tpftau;
0100   typedef l1t::PFTrackVectorRef VRl1tpftrack;
0101   typedef l1t::EtSumVectorP2Ref VRl1tp2etsum;
0102 
0103   typedef std::vector<reco::PFJetRef> VRpfjet;
0104   typedef std::vector<reco::PFTauRef> VRpftau;
0105   typedef std::vector<reco::PFMETRef> VRpfmet;
0106 
0107   typedef l1t::P2GTCandidateVectorRef VRl1tp2gtcand;
0108 
0109   class TriggerRefsCollections {
0110     /// data members
0111   private:
0112     /// physics type ids and Refs
0113     Vids photonIds_;
0114     VRphoton photonRefs_;
0115     Vids electronIds_;
0116     VRelectron electronRefs_;
0117     Vids muonIds_;
0118     VRmuon muonRefs_;
0119     Vids jetIds_;
0120     VRjet jetRefs_;
0121     Vids compositeIds_;
0122     VRcomposite compositeRefs_;
0123     Vids basemetIds_;
0124     VRbasemet basemetRefs_;
0125     Vids calometIds_;
0126     VRcalomet calometRefs_;
0127     Vids pixtrackIds_;
0128     VRpixtrack pixtrackRefs_;
0129 
0130     Vids l1emIds_;
0131     VRl1em l1emRefs_;
0132     Vids l1muonIds_;
0133     VRl1muon l1muonRefs_;
0134     Vids l1jetIds_;
0135     VRl1jet l1jetRefs_;
0136     Vids l1etmissIds_;
0137     VRl1etmiss l1etmissRefs_;
0138     Vids l1hfringsIds_;
0139     VRl1hfrings l1hfringsRefs_;
0140 
0141     Vids l1tmuonIds_;
0142     VRl1tmuon l1tmuonRefs_;
0143     Vids l1tmuonShowerIds_;
0144     VRl1tmuonShower l1tmuonShowerRefs_;
0145     Vids l1tegammaIds_;
0146     VRl1tegamma l1tegammaRefs_;
0147     Vids l1tjetIds_;
0148     VRl1tjet l1tjetRefs_;
0149     Vids l1ttauIds_;
0150     VRl1ttau l1ttauRefs_;
0151     Vids l1tetsumIds_;
0152     VRl1tetsum l1tetsumRefs_;
0153 
0154     /* Phase-2 */
0155     Vids l1ttkmuonIds_;
0156     VRl1ttkmuon l1ttkmuonRefs_;
0157     Vids l1ttkeleIds_;
0158     VRl1ttkele l1ttkeleRefs_;
0159     Vids l1ttkemIds_;
0160     VRl1ttkem l1ttkemRefs_;
0161     Vids l1tpfjetIds_;
0162     VRl1tpfjet l1tpfjetRefs_;
0163     Vids l1tpftauIds_;
0164     VRl1tpftau l1tpftauRefs_;
0165     Vids l1thpspftauIds_;
0166     VRl1thpspftau l1thpspftauRefs_;
0167     Vids l1tpftrackIds_;
0168     VRl1tpftrack l1tpftrackRefs_;
0169     Vids l1tp2etsumIds_;
0170     VRl1tp2etsum l1tp2etsumRefs_;
0171 
0172     Vids pfjetIds_;
0173     VRpfjet pfjetRefs_;
0174     Vids pftauIds_;
0175     VRpftau pftauRefs_;
0176     Vids pfmetIds_;
0177     VRpfmet pfmetRefs_;
0178 
0179     Vids l1tp2gtcandIds_;
0180     VRl1tp2gtcand l1tp2gtcandRefs_;
0181 
0182     /// methods
0183   public:
0184     /// constructors
0185     TriggerRefsCollections()
0186         : photonIds_(),
0187           photonRefs_(),
0188           electronIds_(),
0189           electronRefs_(),
0190           muonIds_(),
0191           muonRefs_(),
0192           jetIds_(),
0193           jetRefs_(),
0194           compositeIds_(),
0195           compositeRefs_(),
0196           basemetIds_(),
0197           basemetRefs_(),
0198           calometIds_(),
0199           calometRefs_(),
0200           pixtrackIds_(),
0201           pixtrackRefs_(),
0202 
0203           l1emIds_(),
0204           l1emRefs_(),
0205           l1muonIds_(),
0206           l1muonRefs_(),
0207           l1jetIds_(),
0208           l1jetRefs_(),
0209           l1etmissIds_(),
0210           l1etmissRefs_(),
0211           l1hfringsIds_(),
0212           l1hfringsRefs_(),
0213 
0214           l1tmuonIds_(),
0215           l1tmuonRefs_(),
0216           l1tmuonShowerIds_(),
0217           l1tmuonShowerRefs_(),
0218           l1tegammaIds_(),
0219           l1tegammaRefs_(),
0220           l1tjetIds_(),
0221           l1tjetRefs_(),
0222           l1ttauIds_(),
0223           l1ttauRefs_(),
0224           l1tetsumIds_(),
0225           l1tetsumRefs_(),
0226 
0227           /* Phase-2 */
0228           l1ttkmuonIds_(),
0229           l1ttkmuonRefs_(),
0230           l1ttkeleIds_(),
0231           l1ttkeleRefs_(),
0232           l1ttkemIds_(),
0233           l1ttkemRefs_(),
0234           l1tpfjetIds_(),
0235           l1tpfjetRefs_(),
0236           l1tpftauIds_(),
0237           l1tpftauRefs_(),
0238           l1thpspftauIds_(),
0239           l1thpspftauRefs_(),
0240           l1tpftrackIds_(),
0241           l1tpftrackRefs_(),
0242           l1tp2etsumIds_(),
0243           l1tp2etsumRefs_(),
0244 
0245           pfjetIds_(),
0246           pfjetRefs_(),
0247           pftauIds_(),
0248           pftauRefs_(),
0249           pfmetIds_(),
0250           pfmetRefs_(),
0251 
0252           l1tp2gtcandIds_(),
0253           l1tp2gtcandRefs_() {}
0254 
0255     /// utility
0256     void swap(TriggerRefsCollections& other) {
0257       std::swap(photonIds_, other.photonIds_);
0258       std::swap(photonRefs_, other.photonRefs_);
0259       std::swap(electronIds_, other.electronIds_);
0260       std::swap(electronRefs_, other.electronRefs_);
0261       std::swap(muonIds_, other.muonIds_);
0262       std::swap(muonRefs_, other.muonRefs_);
0263       std::swap(jetIds_, other.jetIds_);
0264       std::swap(jetRefs_, other.jetRefs_);
0265       std::swap(compositeIds_, other.compositeIds_);
0266       std::swap(compositeRefs_, other.compositeRefs_);
0267       std::swap(basemetIds_, other.basemetIds_);
0268       std::swap(basemetRefs_, other.basemetRefs_);
0269       std::swap(calometIds_, other.calometIds_);
0270       std::swap(calometRefs_, other.calometRefs_);
0271       std::swap(pixtrackIds_, other.pixtrackIds_);
0272       std::swap(pixtrackRefs_, other.pixtrackRefs_);
0273 
0274       std::swap(l1emIds_, other.l1emIds_);
0275       std::swap(l1emRefs_, other.l1emRefs_);
0276       std::swap(l1muonIds_, other.l1muonIds_);
0277       std::swap(l1muonRefs_, other.l1muonRefs_);
0278       std::swap(l1jetIds_, other.l1jetIds_);
0279       std::swap(l1jetRefs_, other.l1jetRefs_);
0280       std::swap(l1etmissIds_, other.l1etmissIds_);
0281       std::swap(l1etmissRefs_, other.l1etmissRefs_);
0282       std::swap(l1hfringsIds_, other.l1hfringsIds_);
0283       std::swap(l1hfringsRefs_, other.l1hfringsRefs_);
0284 
0285       std::swap(l1tmuonIds_, other.l1tmuonIds_);
0286       std::swap(l1tmuonRefs_, other.l1tmuonRefs_);
0287       std::swap(l1tmuonShowerIds_, other.l1tmuonShowerIds_);
0288       std::swap(l1tmuonShowerRefs_, other.l1tmuonShowerRefs_);
0289       std::swap(l1tegammaIds_, other.l1tegammaIds_);
0290       std::swap(l1tegammaRefs_, other.l1tegammaRefs_);
0291       std::swap(l1tjetIds_, other.l1tjetIds_);
0292       std::swap(l1tjetRefs_, other.l1tjetRefs_);
0293       std::swap(l1ttauIds_, other.l1ttauIds_);
0294       std::swap(l1ttauRefs_, other.l1ttauRefs_);
0295       std::swap(l1tetsumIds_, other.l1tetsumIds_);
0296       std::swap(l1tetsumRefs_, other.l1tetsumRefs_);
0297 
0298       /* Phase-2 */
0299       std::swap(l1ttkmuonIds_, other.l1ttkmuonIds_);
0300       std::swap(l1ttkmuonRefs_, other.l1ttkmuonRefs_);
0301       std::swap(l1ttkeleIds_, other.l1ttkeleIds_);
0302       std::swap(l1ttkeleRefs_, other.l1ttkeleRefs_);
0303       std::swap(l1ttkemIds_, other.l1ttkemIds_);
0304       std::swap(l1ttkemRefs_, other.l1ttkemRefs_);
0305       std::swap(l1tpfjetIds_, other.l1tpfjetIds_);
0306       std::swap(l1tpfjetRefs_, other.l1tpfjetRefs_);
0307       std::swap(l1tpftauIds_, other.l1tpftauIds_);
0308       std::swap(l1tpftauRefs_, other.l1tpftauRefs_);
0309       std::swap(l1thpspftauIds_, other.l1thpspftauIds_);
0310       std::swap(l1thpspftauRefs_, other.l1thpspftauRefs_);
0311       std::swap(l1tpftrackIds_, other.l1tpftrackIds_);
0312       std::swap(l1tpftrackRefs_, other.l1tpftrackRefs_);
0313       std::swap(l1tp2etsumIds_, other.l1tp2etsumIds_);
0314       std::swap(l1tp2etsumRefs_, other.l1tp2etsumRefs_);
0315 
0316       std::swap(pfjetIds_, other.pfjetIds_);
0317       std::swap(pfjetRefs_, other.pfjetRefs_);
0318       std::swap(pftauIds_, other.pftauIds_);
0319       std::swap(pftauRefs_, other.pftauRefs_);
0320       std::swap(pfmetIds_, other.pfmetIds_);
0321       std::swap(pfmetRefs_, other.pfmetRefs_);
0322 
0323       std::swap(l1tp2gtcandIds_, other.l1tp2gtcandIds_);
0324       std::swap(l1tp2gtcandRefs_, other.l1tp2gtcandRefs_);
0325     }
0326 
0327     /// setters for L3 collections: (id=physics type, and Ref<C>)
0328     void addObject(int id, const reco::RecoEcalCandidateRef& ref) {
0329       photonIds_.push_back(id);
0330       photonRefs_.push_back(ref);
0331     }
0332     void addObject(int id, const reco::ElectronRef& ref) {
0333       electronIds_.push_back(id);
0334       electronRefs_.push_back(ref);
0335     }
0336     void addObject(int id, const reco::RecoChargedCandidateRef& ref) {
0337       muonIds_.push_back(id);
0338       muonRefs_.push_back(ref);
0339     }
0340     void addObject(int id, const reco::CaloJetRef& ref) {
0341       jetIds_.push_back(id);
0342       jetRefs_.push_back(ref);
0343     }
0344     void addObject(int id, const reco::CompositeCandidateRef& ref) {
0345       compositeIds_.push_back(id);
0346       compositeRefs_.push_back(ref);
0347     }
0348     void addObject(int id, const reco::METRef& ref) {
0349       basemetIds_.push_back(id);
0350       basemetRefs_.push_back(ref);
0351     }
0352     void addObject(int id, const reco::CaloMETRef& ref) {
0353       calometIds_.push_back(id);
0354       calometRefs_.push_back(ref);
0355     }
0356     void addObject(int id, const reco::IsolatedPixelTrackCandidateRef& ref) {
0357       pixtrackIds_.push_back(id);
0358       pixtrackRefs_.push_back(ref);
0359     }
0360 
0361     void addObject(int id, const l1extra::L1EmParticleRef& ref) {
0362       l1emIds_.push_back(id);
0363       l1emRefs_.push_back(ref);
0364     }
0365     void addObject(int id, const l1extra::L1MuonParticleRef& ref) {
0366       l1muonIds_.push_back(id);
0367       l1muonRefs_.push_back(ref);
0368     }
0369     void addObject(int id, const l1extra::L1JetParticleRef& ref) {
0370       l1jetIds_.push_back(id);
0371       l1jetRefs_.push_back(ref);
0372     }
0373     void addObject(int id, const l1extra::L1EtMissParticleRef& ref) {
0374       l1etmissIds_.push_back(id);
0375       l1etmissRefs_.push_back(ref);
0376     }
0377     void addObject(int id, const l1extra::L1HFRingsRef& ref) {
0378       l1hfringsIds_.push_back(id);
0379       l1hfringsRefs_.push_back(ref);
0380     }
0381     void addObject(int id, const l1t::MuonRef& ref) {
0382       l1tmuonIds_.push_back(id);
0383       l1tmuonRefs_.push_back(ref);
0384     }
0385     void addObject(int id, const l1t::MuonShowerRef& ref) {
0386       l1tmuonShowerIds_.push_back(id);
0387       l1tmuonShowerRefs_.push_back(ref);
0388     }
0389     void addObject(int id, const l1t::EGammaRef& ref) {
0390       l1tegammaIds_.push_back(id);
0391       l1tegammaRefs_.push_back(ref);
0392     }
0393     void addObject(int id, const l1t::JetRef& ref) {
0394       l1tjetIds_.push_back(id);
0395       l1tjetRefs_.push_back(ref);
0396     }
0397     void addObject(int id, const l1t::TauRef& ref) {
0398       l1ttauIds_.push_back(id);
0399       l1ttauRefs_.push_back(ref);
0400     }
0401     void addObject(int id, const l1t::EtSumRef& ref) {
0402       l1tetsumIds_.push_back(id);
0403       l1tetsumRefs_.push_back(ref);
0404     }
0405 
0406     /* Phase-2 */
0407     void addObject(int id, const l1t::TrackerMuonRef& ref) {
0408       l1ttkmuonIds_.push_back(id);
0409       l1ttkmuonRefs_.push_back(ref);
0410     }
0411     void addObject(int id, const l1t::TkElectronRef& ref) {
0412       l1ttkeleIds_.push_back(id);
0413       l1ttkeleRefs_.push_back(ref);
0414     }
0415     void addObject(int id, const l1t::TkEmRef& ref) {
0416       l1ttkemIds_.push_back(id);
0417       l1ttkemRefs_.push_back(ref);
0418     }
0419     void addObject(int id, const l1t::PFJetRef& ref) {
0420       l1tpfjetIds_.push_back(id);
0421       l1tpfjetRefs_.push_back(ref);
0422     }
0423     void addObject(int id, const l1t::PFTauRef& ref) {
0424       l1tpftauIds_.push_back(id);
0425       l1tpftauRefs_.push_back(ref);
0426     }
0427     void addObject(int id, const l1t::HPSPFTauRef& ref) {
0428       l1thpspftauIds_.push_back(id);
0429       l1thpspftauRefs_.push_back(ref);
0430     }
0431     void addObject(int id, const l1t::PFTrackRef& ref) {
0432       l1tpftrackIds_.push_back(id);
0433       l1tpftrackRefs_.push_back(ref);
0434     }
0435     void addObject(int id, const l1t::EtSumP2Ref& ref) {
0436       l1tp2etsumIds_.push_back(id);
0437       l1tp2etsumRefs_.push_back(ref);
0438     }
0439     void addObject(int id, const reco::PFJetRef& ref) {
0440       pfjetIds_.push_back(id);
0441       pfjetRefs_.push_back(ref);
0442     }
0443     void addObject(int id, const reco::PFTauRef& ref) {
0444       pftauIds_.push_back(id);
0445       pftauRefs_.push_back(ref);
0446     }
0447     void addObject(int id, const reco::PFMETRef& ref) {
0448       pfmetIds_.push_back(id);
0449       pfmetRefs_.push_back(ref);
0450     }
0451     void addObject(int id, const l1t::P2GTCandidateRef& ref) {
0452       l1tp2gtcandIds_.push_back(id);
0453       l1tp2gtcandRefs_.push_back(ref);
0454     }
0455 
0456     ///
0457     size_type addObjects(const Vids& ids, const VRphoton& refs) {
0458       assert(ids.size() == refs.size());
0459       photonIds_.insert(photonIds_.end(), ids.begin(), ids.end());
0460       photonRefs_.insert(photonRefs_.end(), refs.begin(), refs.end());
0461       return photonIds_.size();
0462     }
0463     size_type addObjects(const Vids& ids, const VRelectron& refs) {
0464       assert(ids.size() == refs.size());
0465       electronIds_.insert(electronIds_.end(), ids.begin(), ids.end());
0466       electronRefs_.insert(electronRefs_.end(), refs.begin(), refs.end());
0467       return electronIds_.size();
0468     }
0469     size_type addObjects(const Vids& ids, const VRmuon& refs) {
0470       assert(ids.size() == refs.size());
0471       muonIds_.insert(muonIds_.end(), ids.begin(), ids.end());
0472       muonRefs_.insert(muonRefs_.end(), refs.begin(), refs.end());
0473       return muonIds_.size();
0474     }
0475     size_type addObjects(const Vids& ids, const VRjet& refs) {
0476       assert(ids.size() == refs.size());
0477       jetIds_.insert(jetIds_.end(), ids.begin(), ids.end());
0478       jetRefs_.insert(jetRefs_.end(), refs.begin(), refs.end());
0479       return jetIds_.size();
0480     }
0481     size_type addObjects(const Vids& ids, const VRcomposite& refs) {
0482       assert(ids.size() == refs.size());
0483       compositeIds_.insert(compositeIds_.end(), ids.begin(), ids.end());
0484       compositeRefs_.insert(compositeRefs_.end(), refs.begin(), refs.end());
0485       return compositeIds_.size();
0486     }
0487     size_type addObjects(const Vids& ids, const VRbasemet& refs) {
0488       assert(ids.size() == refs.size());
0489       basemetIds_.insert(basemetIds_.end(), ids.begin(), ids.end());
0490       basemetRefs_.insert(basemetRefs_.end(), refs.begin(), refs.end());
0491       return basemetIds_.size();
0492     }
0493     size_type addObjects(const Vids& ids, const VRcalomet& refs) {
0494       assert(ids.size() == refs.size());
0495       calometIds_.insert(calometIds_.end(), ids.begin(), ids.end());
0496       calometRefs_.insert(calometRefs_.end(), refs.begin(), refs.end());
0497       return calometIds_.size();
0498     }
0499     size_type addObjects(const Vids& ids, const VRpixtrack& refs) {
0500       assert(ids.size() == refs.size());
0501       pixtrackIds_.insert(pixtrackIds_.end(), ids.begin(), ids.end());
0502       pixtrackRefs_.insert(pixtrackRefs_.end(), refs.begin(), refs.end());
0503       return pixtrackIds_.size();
0504     }
0505 
0506     size_type addObjects(const Vids& ids, const VRl1em& refs) {
0507       assert(ids.size() == refs.size());
0508       l1emIds_.insert(l1emIds_.end(), ids.begin(), ids.end());
0509       l1emRefs_.insert(l1emRefs_.end(), refs.begin(), refs.end());
0510       return l1emIds_.size();
0511     }
0512     size_type addObjects(const Vids& ids, const VRl1muon& refs) {
0513       assert(ids.size() == refs.size());
0514       l1muonIds_.insert(l1muonIds_.end(), ids.begin(), ids.end());
0515       l1muonRefs_.insert(l1muonRefs_.end(), refs.begin(), refs.end());
0516       return l1muonIds_.size();
0517     }
0518     size_type addObjects(const Vids& ids, const VRl1jet& refs) {
0519       assert(ids.size() == refs.size());
0520       l1jetIds_.insert(l1jetIds_.end(), ids.begin(), ids.end());
0521       l1jetRefs_.insert(l1jetRefs_.end(), refs.begin(), refs.end());
0522       return l1jetIds_.size();
0523     }
0524     size_type addObjects(const Vids& ids, const VRl1etmiss& refs) {
0525       assert(ids.size() == refs.size());
0526       l1etmissIds_.insert(l1etmissIds_.end(), ids.begin(), ids.end());
0527       l1etmissRefs_.insert(l1etmissRefs_.end(), refs.begin(), refs.end());
0528       return l1etmissIds_.size();
0529     }
0530     size_type addObjects(const Vids& ids, const VRl1tmuon& refs) {
0531       assert(ids.size() == refs.size());
0532       l1tmuonIds_.insert(l1tmuonIds_.end(), ids.begin(), ids.end());
0533       l1tmuonRefs_.insert(l1tmuonRefs_.end(), refs.begin(), refs.end());
0534       return l1tmuonIds_.size();
0535     }
0536     size_type addObjects(const Vids& ids, const VRl1tmuonShower& refs) {
0537       assert(ids.size() == refs.size());
0538       l1tmuonShowerIds_.insert(l1tmuonShowerIds_.end(), ids.begin(), ids.end());
0539       l1tmuonShowerRefs_.insert(l1tmuonShowerRefs_.end(), refs.begin(), refs.end());
0540       return l1tmuonShowerIds_.size();
0541     }
0542     size_type addObjects(const Vids& ids, const VRl1tegamma& refs) {
0543       assert(ids.size() == refs.size());
0544       l1tegammaIds_.insert(l1tegammaIds_.end(), ids.begin(), ids.end());
0545       l1tegammaRefs_.insert(l1tegammaRefs_.end(), refs.begin(), refs.end());
0546       return l1tegammaIds_.size();
0547     }
0548     size_type addObjects(const Vids& ids, const VRl1tjet& refs) {
0549       assert(ids.size() == refs.size());
0550       l1tjetIds_.insert(l1tjetIds_.end(), ids.begin(), ids.end());
0551       l1tjetRefs_.insert(l1tjetRefs_.end(), refs.begin(), refs.end());
0552       return l1tjetIds_.size();
0553     }
0554     size_type addObjects(const Vids& ids, const VRl1ttau& refs) {
0555       assert(ids.size() == refs.size());
0556       l1ttauIds_.insert(l1ttauIds_.end(), ids.begin(), ids.end());
0557       l1ttauRefs_.insert(l1ttauRefs_.end(), refs.begin(), refs.end());
0558       return l1ttauIds_.size();
0559     }
0560     size_type addObjects(const Vids& ids, const VRl1tetsum& refs) {
0561       assert(ids.size() == refs.size());
0562       l1tetsumIds_.insert(l1tetsumIds_.end(), ids.begin(), ids.end());
0563       l1tetsumRefs_.insert(l1tetsumRefs_.end(), refs.begin(), refs.end());
0564       return l1tetsumIds_.size();
0565     }
0566     size_type addObjects(const Vids& ids, const VRl1hfrings& refs) {
0567       assert(ids.size() == refs.size());
0568       l1hfringsIds_.insert(l1hfringsIds_.end(), ids.begin(), ids.end());
0569       l1hfringsRefs_.insert(l1hfringsRefs_.end(), refs.begin(), refs.end());
0570       return l1hfringsIds_.size();
0571     }
0572 
0573     /* Phase-2 */
0574     size_type addObjects(const Vids& ids, const VRl1ttkmuon& refs) {
0575       assert(ids.size() == refs.size());
0576       l1ttkmuonIds_.insert(l1ttkmuonIds_.end(), ids.begin(), ids.end());
0577       l1ttkmuonRefs_.insert(l1ttkmuonRefs_.end(), refs.begin(), refs.end());
0578       return l1ttkmuonIds_.size();
0579     }
0580     size_type addObjects(const Vids& ids, const VRl1ttkele& refs) {
0581       assert(ids.size() == refs.size());
0582       l1ttkeleIds_.insert(l1ttkeleIds_.end(), ids.begin(), ids.end());
0583       l1ttkeleRefs_.insert(l1ttkeleRefs_.end(), refs.begin(), refs.end());
0584       return l1ttkeleIds_.size();
0585     }
0586     size_type addObjects(const Vids& ids, const VRl1ttkem& refs) {
0587       assert(ids.size() == refs.size());
0588       l1ttkemIds_.insert(l1ttkemIds_.end(), ids.begin(), ids.end());
0589       l1ttkemRefs_.insert(l1ttkemRefs_.end(), refs.begin(), refs.end());
0590       return l1ttkemIds_.size();
0591     }
0592     size_type addObjects(const Vids& ids, const VRl1tpfjet& refs) {
0593       assert(ids.size() == refs.size());
0594       l1tpfjetIds_.insert(l1tpfjetIds_.end(), ids.begin(), ids.end());
0595       l1tpfjetRefs_.insert(l1tpfjetRefs_.end(), refs.begin(), refs.end());
0596       return l1tpfjetIds_.size();
0597     }
0598     size_type addObjects(const Vids& ids, const VRl1tpftau& refs) {
0599       assert(ids.size() == refs.size());
0600       l1tpftauIds_.insert(l1tpftauIds_.end(), ids.begin(), ids.end());
0601       l1tpftauRefs_.insert(l1tpftauRefs_.end(), refs.begin(), refs.end());
0602       return l1tpftauIds_.size();
0603     }
0604     size_type addObjects(const Vids& ids, const VRl1thpspftau& refs) {
0605       assert(ids.size() == refs.size());
0606       l1thpspftauIds_.insert(l1thpspftauIds_.end(), ids.begin(), ids.end());
0607       l1thpspftauRefs_.insert(l1thpspftauRefs_.end(), refs.begin(), refs.end());
0608       return l1thpspftauIds_.size();
0609     }
0610     size_type addObjects(const Vids& ids, const VRl1tpftrack& refs) {
0611       assert(ids.size() == refs.size());
0612       l1tpftrackIds_.insert(l1tpftrackIds_.end(), ids.begin(), ids.end());
0613       l1tpftrackRefs_.insert(l1tpftrackRefs_.end(), refs.begin(), refs.end());
0614       return l1tpftrackIds_.size();
0615     }
0616     size_type addObjects(const Vids& ids, const VRl1tp2etsum& refs) {
0617       assert(ids.size() == refs.size());
0618       l1tp2etsumIds_.insert(l1tp2etsumIds_.end(), ids.begin(), ids.end());
0619       l1tp2etsumRefs_.insert(l1tp2etsumRefs_.end(), refs.begin(), refs.end());
0620       return l1tp2etsumIds_.size();
0621     }
0622 
0623     size_type addObjects(const Vids& ids, const VRpfjet& refs) {
0624       assert(ids.size() == refs.size());
0625       pfjetIds_.insert(pfjetIds_.end(), ids.begin(), ids.end());
0626       pfjetRefs_.insert(pfjetRefs_.end(), refs.begin(), refs.end());
0627       return pfjetIds_.size();
0628     }
0629     size_type addObjects(const Vids& ids, const VRpftau& refs) {
0630       assert(ids.size() == refs.size());
0631       pftauIds_.insert(pftauIds_.end(), ids.begin(), ids.end());
0632       pftauRefs_.insert(pftauRefs_.end(), refs.begin(), refs.end());
0633       return pftauIds_.size();
0634     }
0635     size_type addObjects(const Vids& ids, const VRpfmet& refs) {
0636       assert(ids.size() == refs.size());
0637       pfmetIds_.insert(pfmetIds_.end(), ids.begin(), ids.end());
0638       pfmetRefs_.insert(pfmetRefs_.end(), refs.begin(), refs.end());
0639       return pfmetIds_.size();
0640     }
0641     size_type addObjects(const Vids& ids, const VRl1tp2gtcand& refs) {
0642       assert(ids.size() == refs.size());
0643       l1tp2gtcandIds_.insert(l1tp2gtcandIds_.end(), ids.begin(), ids.end());
0644       l1tp2gtcandRefs_.insert(l1tp2gtcandRefs_.end(), refs.begin(), refs.end());
0645       return l1tp2gtcandIds_.size();
0646     }
0647 
0648     /// various physics-level getters:
0649     void getObjects(Vids& ids, VRphoton& refs) const { getObjects(ids, refs, 0, photonIds_.size()); }
0650     void getObjects(Vids& ids, VRphoton& refs, size_type begin, size_type end) const {
0651       assert(begin <= end);
0652       assert(end <= photonIds_.size());
0653       const size_type n(end - begin);
0654       ids.resize(n);
0655       refs.resize(n);
0656       size_type j(0);
0657       for (size_type i = begin; i != end; ++i) {
0658         ids[j] = photonIds_[i];
0659         refs[j] = photonRefs_[i];
0660         ++j;
0661       }
0662     }
0663     void getObjects(int id, VRphoton& refs) const { getObjects(id, refs, 0, photonIds_.size()); }
0664     void getObjects(int id, VRphoton& refs, size_type begin, size_type end) const {
0665       assert(begin <= end);
0666       assert(end <= photonIds_.size());
0667       size_type n(0);
0668       for (size_type i = begin; i != end; ++i) {
0669         if (id == photonIds_[i]) {
0670           ++n;
0671         }
0672       }
0673       refs.resize(n);
0674       size_type j(0);
0675       for (size_type i = begin; i != end; ++i) {
0676         if (id == photonIds_[i]) {
0677           refs[j] = photonRefs_[i];
0678           ++j;
0679         }
0680       }
0681       return;
0682     }
0683 
0684     void getObjects(Vids& ids, VRelectron& refs) const { getObjects(ids, refs, 0, electronIds_.size()); }
0685     void getObjects(Vids& ids, VRelectron& refs, size_type begin, size_type end) const {
0686       assert(begin <= end);
0687       assert(end <= electronIds_.size());
0688       const size_type n(end - begin);
0689       ids.resize(n);
0690       refs.resize(n);
0691       size_type j(0);
0692       for (size_type i = begin; i != end; ++i) {
0693         ids[j] = electronIds_[i];
0694         refs[j] = electronRefs_[i];
0695         ++j;
0696       }
0697     }
0698     void getObjects(int id, VRelectron& refs) const { getObjects(id, refs, 0, electronIds_.size()); }
0699     void getObjects(int id, VRelectron& refs, size_type begin, size_type end) const {
0700       assert(begin <= end);
0701       assert(end <= electronIds_.size());
0702       size_type n(0);
0703       for (size_type i = begin; i != end; ++i) {
0704         if (id == electronIds_[i]) {
0705           ++n;
0706         }
0707       }
0708       refs.resize(n);
0709       size_type j(0);
0710       for (size_type i = begin; i != end; ++i) {
0711         if (id == electronIds_[i]) {
0712           refs[j] = electronRefs_[i];
0713           ++j;
0714         }
0715       }
0716       return;
0717     }
0718 
0719     void getObjects(Vids& ids, VRmuon& refs) const { getObjects(ids, refs, 0, muonIds_.size()); }
0720     void getObjects(Vids& ids, VRmuon& refs, size_type begin, size_type end) const {
0721       assert(begin <= end);
0722       assert(end <= muonIds_.size());
0723       const size_type n(end - begin);
0724       ids.resize(n);
0725       refs.resize(n);
0726       size_type j(0);
0727       for (size_type i = begin; i != end; ++i) {
0728         ids[j] = muonIds_[i];
0729         refs[j] = muonRefs_[i];
0730         ++j;
0731       }
0732     }
0733     void getObjects(int id, VRmuon& refs) const { getObjects(id, refs, 0, muonIds_.size()); }
0734     void getObjects(int id, VRmuon& refs, size_type begin, size_type end) const {
0735       assert(begin <= end);
0736       assert(end <= muonIds_.size());
0737       size_type n(0);
0738       for (size_type i = begin; i != end; ++i) {
0739         if (id == muonIds_[i]) {
0740           ++n;
0741         }
0742       }
0743       refs.resize(n);
0744       size_type j(0);
0745       for (size_type i = begin; i != end; ++i) {
0746         if (id == muonIds_[i]) {
0747           refs[j] = muonRefs_[i];
0748           ++j;
0749         }
0750       }
0751       return;
0752     }
0753 
0754     void getObjects(Vids& ids, VRjet& refs) const { getObjects(ids, refs, 0, jetIds_.size()); }
0755     void getObjects(Vids& ids, VRjet& refs, size_type begin, size_type end) const {
0756       assert(begin <= end);
0757       assert(end <= jetIds_.size());
0758       const size_type n(end - begin);
0759       ids.resize(n);
0760       refs.resize(n);
0761       size_type j(0);
0762       for (size_type i = begin; i != end; ++i) {
0763         ids[j] = jetIds_[i];
0764         refs[j] = jetRefs_[i];
0765         ++j;
0766       }
0767     }
0768     void getObjects(int id, VRjet& refs) const { getObjects(id, refs, 0, jetIds_.size()); }
0769     void getObjects(int id, VRjet& refs, size_type begin, size_type end) const {
0770       assert(begin <= end);
0771       assert(end <= jetIds_.size());
0772       size_type n(0);
0773       for (size_type i = begin; i != end; ++i) {
0774         if (id == jetIds_[i]) {
0775           ++n;
0776         }
0777       }
0778       refs.resize(n);
0779       size_type j(0);
0780       for (size_type i = begin; i != end; ++i) {
0781         if (id == jetIds_[i]) {
0782           refs[j] = jetRefs_[i];
0783           ++j;
0784         }
0785       }
0786       return;
0787     }
0788 
0789     void getObjects(Vids& ids, VRcomposite& refs) const { getObjects(ids, refs, 0, compositeIds_.size()); }
0790     void getObjects(Vids& ids, VRcomposite& refs, size_type begin, size_type end) const {
0791       assert(begin <= end);
0792       assert(end <= compositeIds_.size());
0793       const size_type n(end - begin);
0794       ids.resize(n);
0795       refs.resize(n);
0796       size_type j(0);
0797       for (size_type i = begin; i != end; ++i) {
0798         ids[j] = compositeIds_[i];
0799         refs[j] = compositeRefs_[i];
0800         ++j;
0801       }
0802     }
0803     void getObjects(int id, VRcomposite& refs) const { getObjects(id, refs, 0, compositeIds_.size()); }
0804     void getObjects(int id, VRcomposite& refs, size_type begin, size_type end) const {
0805       assert(begin <= end);
0806       assert(end <= compositeIds_.size());
0807       size_type n(0);
0808       for (size_type i = begin; i != end; ++i) {
0809         if (id == compositeIds_[i]) {
0810           ++n;
0811         }
0812       }
0813       refs.resize(n);
0814       size_type j(0);
0815       for (size_type i = begin; i != end; ++i) {
0816         if (id == compositeIds_[i]) {
0817           refs[j] = compositeRefs_[i];
0818           ++j;
0819         }
0820       }
0821       return;
0822     }
0823 
0824     void getObjects(Vids& ids, VRbasemet& refs) const { getObjects(ids, refs, 0, basemetIds_.size()); }
0825     void getObjects(Vids& ids, VRbasemet& refs, size_type begin, size_type end) const {
0826       assert(begin <= end);
0827       assert(end <= basemetIds_.size());
0828       const size_type n(end - begin);
0829       ids.resize(n);
0830       refs.resize(n);
0831       size_type j(0);
0832       for (size_type i = begin; i != end; ++i) {
0833         ids[j] = basemetIds_[i];
0834         refs[j] = basemetRefs_[i];
0835         ++j;
0836       }
0837     }
0838     void getObjects(int id, VRbasemet& refs) const { getObjects(id, refs, 0, basemetIds_.size()); }
0839     void getObjects(int id, VRbasemet& refs, size_type begin, size_type end) const {
0840       assert(begin <= end);
0841       assert(end <= basemetIds_.size());
0842       size_type n(0);
0843       for (size_type i = begin; i != end; ++i) {
0844         if (id == basemetIds_[i]) {
0845           ++n;
0846         }
0847       }
0848       refs.resize(n);
0849       size_type j(0);
0850       for (size_type i = begin; i != end; ++i) {
0851         if (id == basemetIds_[i]) {
0852           refs[j] = basemetRefs_[i];
0853           ++j;
0854         }
0855       }
0856       return;
0857     }
0858 
0859     void getObjects(Vids& ids, VRcalomet& refs) const { getObjects(ids, refs, 0, calometIds_.size()); }
0860     void getObjects(Vids& ids, VRcalomet& refs, size_type begin, size_type end) const {
0861       assert(begin <= end);
0862       assert(end <= calometIds_.size());
0863       const size_type n(end - begin);
0864       ids.resize(n);
0865       refs.resize(n);
0866       size_type j(0);
0867       for (size_type i = begin; i != end; ++i) {
0868         ids[j] = calometIds_[i];
0869         refs[j] = calometRefs_[i];
0870         ++j;
0871       }
0872     }
0873     void getObjects(int id, VRcalomet& refs) const { getObjects(id, refs, 0, calometIds_.size()); }
0874     void getObjects(int id, VRcalomet& refs, size_type begin, size_type end) const {
0875       assert(begin <= end);
0876       assert(end <= calometIds_.size());
0877       size_type n(0);
0878       for (size_type i = begin; i != end; ++i) {
0879         if (id == calometIds_[i]) {
0880           ++n;
0881         }
0882       }
0883       refs.resize(n);
0884       size_type j(0);
0885       for (size_type i = begin; i != end; ++i) {
0886         if (id == calometIds_[i]) {
0887           refs[j] = calometRefs_[i];
0888           ++j;
0889         }
0890       }
0891       return;
0892     }
0893 
0894     void getObjects(Vids& ids, VRpixtrack& refs) const { getObjects(ids, refs, 0, pixtrackIds_.size()); }
0895     void getObjects(Vids& ids, VRpixtrack& refs, size_type begin, size_type end) const {
0896       assert(begin <= end);
0897       assert(end <= pixtrackIds_.size());
0898       const size_type n(end - begin);
0899       ids.resize(n);
0900       refs.resize(n);
0901       size_type j(0);
0902       for (size_type i = begin; i != end; ++i) {
0903         ids[j] = pixtrackIds_[i];
0904         refs[j] = pixtrackRefs_[i];
0905         ++j;
0906       }
0907     }
0908     void getObjects(int id, VRpixtrack& refs) const { getObjects(id, refs, 0, pixtrackIds_.size()); }
0909     void getObjects(int id, VRpixtrack& refs, size_type begin, size_type end) const {
0910       assert(begin <= end);
0911       assert(end <= pixtrackIds_.size());
0912       size_type n(0);
0913       for (size_type i = begin; i != end; ++i) {
0914         if (id == pixtrackIds_[i]) {
0915           ++n;
0916         }
0917       }
0918       refs.resize(n);
0919       size_type j(0);
0920       for (size_type i = begin; i != end; ++i) {
0921         if (id == pixtrackIds_[i]) {
0922           refs[j] = pixtrackRefs_[i];
0923           ++j;
0924         }
0925       }
0926       return;
0927     }
0928 
0929     void getObjects(Vids& ids, VRl1em& refs) const { getObjects(ids, refs, 0, l1emIds_.size()); }
0930     void getObjects(Vids& ids, VRl1em& refs, size_type begin, size_type end) const {
0931       assert(begin <= end);
0932       assert(end <= l1emIds_.size());
0933       const size_type n(end - begin);
0934       ids.resize(n);
0935       refs.resize(n);
0936       size_type j(0);
0937       for (size_type i = begin; i != end; ++i) {
0938         ids[j] = l1emIds_[i];
0939         refs[j] = l1emRefs_[i];
0940         ++j;
0941       }
0942     }
0943     void getObjects(int id, VRl1em& refs) const { getObjects(id, refs, 0, l1emIds_.size()); }
0944     void getObjects(int id, VRl1em& refs, size_type begin, size_type end) const {
0945       assert(begin <= end);
0946       assert(end <= l1emIds_.size());
0947       size_type n(0);
0948       for (size_type i = begin; i != end; ++i) {
0949         if (id == l1emIds_[i]) {
0950           ++n;
0951         }
0952       }
0953       refs.resize(n);
0954       size_type j(0);
0955       for (size_type i = begin; i != end; ++i) {
0956         if (id == l1emIds_[i]) {
0957           refs[j] = l1emRefs_[i];
0958           ++j;
0959         }
0960       }
0961       return;
0962     }
0963 
0964     void getObjects(Vids& ids, VRl1muon& refs) const { getObjects(ids, refs, 0, l1muonIds_.size()); }
0965     void getObjects(Vids& ids, VRl1muon& refs, size_type begin, size_type end) const {
0966       assert(begin <= end);
0967       assert(end <= l1muonIds_.size());
0968       const size_type n(end - begin);
0969       ids.resize(n);
0970       refs.resize(n);
0971       size_type j(0);
0972       for (size_type i = begin; i != end; ++i) {
0973         ids[j] = l1muonIds_[i];
0974         refs[j] = l1muonRefs_[i];
0975         ++j;
0976       }
0977     }
0978     void getObjects(int id, VRl1muon& refs) const { getObjects(id, refs, 0, l1muonIds_.size()); }
0979     void getObjects(int id, VRl1muon& refs, size_type begin, size_type end) const {
0980       assert(begin <= end);
0981       assert(end <= l1muonIds_.size());
0982       size_type n(0);
0983       for (size_type i = begin; i != end; ++i) {
0984         if (id == l1muonIds_[i]) {
0985           ++n;
0986         }
0987       }
0988       refs.resize(n);
0989       size_type j(0);
0990       for (size_type i = begin; i != end; ++i) {
0991         if (id == l1muonIds_[i]) {
0992           refs[j] = l1muonRefs_[i];
0993           ++j;
0994         }
0995       }
0996       return;
0997     }
0998 
0999     void getObjects(Vids& ids, VRl1jet& refs) const { getObjects(ids, refs, 0, l1jetIds_.size()); }
1000     void getObjects(Vids& ids, VRl1jet& refs, size_type begin, size_type end) const {
1001       assert(begin <= end);
1002       assert(end <= l1jetIds_.size());
1003       const size_type n(end - begin);
1004       ids.resize(n);
1005       refs.resize(n);
1006       size_type j(0);
1007       for (size_type i = begin; i != end; ++i) {
1008         ids[j] = l1jetIds_[i];
1009         refs[j] = l1jetRefs_[i];
1010         ++j;
1011       }
1012     }
1013     void getObjects(int id, VRl1jet& refs) const { getObjects(id, refs, 0, l1jetIds_.size()); }
1014     void getObjects(int id, VRl1jet& refs, size_type begin, size_type end) const {
1015       assert(begin <= end);
1016       assert(end <= l1jetIds_.size());
1017       size_type n(0);
1018       for (size_type i = begin; i != end; ++i) {
1019         if (id == l1jetIds_[i]) {
1020           ++n;
1021         }
1022       }
1023       refs.resize(n);
1024       size_type j(0);
1025       for (size_type i = begin; i != end; ++i) {
1026         if (id == l1jetIds_[i]) {
1027           refs[j] = l1jetRefs_[i];
1028           ++j;
1029         }
1030       }
1031       return;
1032     }
1033 
1034     void getObjects(Vids& ids, VRl1etmiss& refs) const { getObjects(ids, refs, 0, l1etmissIds_.size()); }
1035     void getObjects(Vids& ids, VRl1etmiss& refs, size_type begin, size_type end) const {
1036       assert(begin <= end);
1037       assert(end <= l1etmissIds_.size());
1038       const size_type n(end - begin);
1039       ids.resize(n);
1040       refs.resize(n);
1041       size_type j(0);
1042       for (size_type i = begin; i != end; ++i) {
1043         ids[j] = l1etmissIds_[i];
1044         refs[j] = l1etmissRefs_[i];
1045         ++j;
1046       }
1047     }
1048     void getObjects(int id, VRl1etmiss& refs) const { getObjects(id, refs, 0, l1etmissIds_.size()); }
1049     void getObjects(int id, VRl1etmiss& refs, size_type begin, size_type end) const {
1050       assert(begin <= end);
1051       assert(end <= l1etmissIds_.size());
1052       size_type n(0);
1053       for (size_type i = begin; i != end; ++i) {
1054         if (id == l1etmissIds_[i]) {
1055           ++n;
1056         }
1057       }
1058       refs.resize(n);
1059       size_type j(0);
1060       for (size_type i = begin; i != end; ++i) {
1061         if (id == l1etmissIds_[i]) {
1062           refs[j] = l1etmissRefs_[i];
1063           ++j;
1064         }
1065       }
1066       return;
1067     }
1068 
1069     void getObjects(Vids& ids, VRl1hfrings& refs) const { getObjects(ids, refs, 0, l1hfringsIds_.size()); }
1070     void getObjects(Vids& ids, VRl1hfrings& refs, size_type begin, size_type end) const {
1071       assert(begin <= end);
1072       assert(end <= l1hfringsIds_.size());
1073       const size_type n(end - begin);
1074       ids.resize(n);
1075       refs.resize(n);
1076       size_type j(0);
1077       for (size_type i = begin; i != end; ++i) {
1078         ids[j] = l1hfringsIds_[i];
1079         refs[j] = l1hfringsRefs_[i];
1080         ++j;
1081       }
1082     }
1083     void getObjects(int id, VRl1hfrings& refs) const { getObjects(id, refs, 0, l1hfringsIds_.size()); }
1084     void getObjects(int id, VRl1hfrings& refs, size_type begin, size_type end) const {
1085       assert(begin <= end);
1086       assert(end <= l1hfringsIds_.size());
1087       size_type n(0);
1088       for (size_type i = begin; i != end; ++i) {
1089         if (id == l1hfringsIds_[i]) {
1090           ++n;
1091         }
1092       }
1093       refs.resize(n);
1094       size_type j(0);
1095       for (size_type i = begin; i != end; ++i) {
1096         if (id == l1hfringsIds_[i]) {
1097           refs[j] = l1hfringsRefs_[i];
1098           ++j;
1099         }
1100       }
1101       return;
1102     }
1103 
1104     void getObjects(Vids& ids, VRl1tmuon& refs) const { getObjects(ids, refs, 0, l1tmuonIds_.size()); }
1105     void getObjects(Vids& ids, VRl1tmuon& refs, size_type begin, size_type end) const {
1106       assert(begin <= end);
1107       assert(end <= l1tmuonIds_.size());
1108       const size_type n(end - begin);
1109       ids.resize(n);
1110       refs.resize(n);
1111       size_type j(0);
1112       for (size_type i = begin; i != end; ++i) {
1113         ids[j] = l1tmuonIds_[i];
1114         refs[j] = l1tmuonRefs_[i];
1115         ++j;
1116       }
1117     }
1118     void getObjects(int id, VRl1tmuon& refs) const { getObjects(id, refs, 0, l1tmuonIds_.size()); }
1119     void getObjects(int id, VRl1tmuon& refs, size_type begin, size_type end) const {
1120       assert(begin <= end);
1121       assert(end <= l1tmuonIds_.size());
1122       size_type n(0);
1123       for (size_type i = begin; i != end; ++i) {
1124         if (id == l1tmuonIds_[i]) {
1125           ++n;
1126         }
1127       }
1128       refs.resize(n);
1129       size_type j(0);
1130       for (size_type i = begin; i != end; ++i) {
1131         if (id == l1tmuonIds_[i]) {
1132           refs[j] = l1tmuonRefs_[i];
1133           ++j;
1134         }
1135       }
1136       return;
1137     }
1138 
1139     void getObjects(Vids& ids, VRl1tmuonShower& refs) const { getObjects(ids, refs, 0, l1tmuonShowerIds_.size()); }
1140     void getObjects(Vids& ids, VRl1tmuonShower& refs, size_type begin, size_type end) const {
1141       assert(begin <= end);
1142       assert(end <= l1tmuonShowerIds_.size());
1143       const size_type n(end - begin);
1144       ids.resize(n);
1145       refs.resize(n);
1146       size_type j(0);
1147       for (size_type i = begin; i != end; ++i) {
1148         ids[j] = l1tmuonShowerIds_[i];
1149         refs[j] = l1tmuonShowerRefs_[i];
1150         ++j;
1151       }
1152     }
1153     void getObjects(int id, VRl1tmuonShower& refs) const { getObjects(id, refs, 0, l1tmuonShowerIds_.size()); }
1154     void getObjects(int id, VRl1tmuonShower& refs, size_type begin, size_type end) const {
1155       assert(begin <= end);
1156       assert(end <= l1tmuonShowerIds_.size());
1157       size_type n(0);
1158       for (size_type i = begin; i != end; ++i) {
1159         if (id == l1tmuonShowerIds_[i]) {
1160           ++n;
1161         }
1162       }
1163       refs.resize(n);
1164       size_type j(0);
1165       for (size_type i = begin; i != end; ++i) {
1166         if (id == l1tmuonShowerIds_[i]) {
1167           refs[j] = l1tmuonShowerRefs_[i];
1168           ++j;
1169         }
1170       }
1171       return;
1172     }
1173 
1174     void getObjects(Vids& ids, VRl1tegamma& refs) const { getObjects(ids, refs, 0, l1tegammaIds_.size()); }
1175     void getObjects(Vids& ids, VRl1tegamma& refs, size_type begin, size_type end) const {
1176       assert(begin <= end);
1177       assert(end <= l1tegammaIds_.size());
1178       const size_type n(end - begin);
1179       ids.resize(n);
1180       refs.resize(n);
1181       size_type j(0);
1182       for (size_type i = begin; i != end; ++i) {
1183         ids[j] = l1tegammaIds_[i];
1184         refs[j] = l1tegammaRefs_[i];
1185         ++j;
1186       }
1187     }
1188     void getObjects(int id, VRl1tegamma& refs) const { getObjects(id, refs, 0, l1tegammaIds_.size()); }
1189     void getObjects(int id, VRl1tegamma& refs, size_type begin, size_type end) const {
1190       assert(begin <= end);
1191       assert(end <= l1tegammaIds_.size());
1192       size_type n(0);
1193       for (size_type i = begin; i != end; ++i) {
1194         if (id == l1tegammaIds_[i]) {
1195           ++n;
1196         }
1197       }
1198       refs.resize(n);
1199       size_type j(0);
1200       for (size_type i = begin; i != end; ++i) {
1201         if (id == l1tegammaIds_[i]) {
1202           refs[j] = l1tegammaRefs_[i];
1203           ++j;
1204         }
1205       }
1206       return;
1207     }
1208 
1209     void getObjects(Vids& ids, VRl1tjet& refs) const { getObjects(ids, refs, 0, l1tjetIds_.size()); }
1210     void getObjects(Vids& ids, VRl1tjet& refs, size_type begin, size_type end) const {
1211       assert(begin <= end);
1212       assert(end <= l1tjetIds_.size());
1213       const size_type n(end - begin);
1214       ids.resize(n);
1215       refs.resize(n);
1216       size_type j(0);
1217       for (size_type i = begin; i != end; ++i) {
1218         ids[j] = l1tjetIds_[i];
1219         refs[j] = l1tjetRefs_[i];
1220         ++j;
1221       }
1222     }
1223     void getObjects(int id, VRl1tjet& refs) const { getObjects(id, refs, 0, l1tjetIds_.size()); }
1224     void getObjects(int id, VRl1tjet& refs, size_type begin, size_type end) const {
1225       assert(begin <= end);
1226       assert(end <= l1tjetIds_.size());
1227       size_type n(0);
1228       for (size_type i = begin; i != end; ++i) {
1229         if (id == l1tjetIds_[i]) {
1230           ++n;
1231         }
1232       }
1233       refs.resize(n);
1234       size_type j(0);
1235       for (size_type i = begin; i != end; ++i) {
1236         if (id == l1tjetIds_[i]) {
1237           refs[j] = l1tjetRefs_[i];
1238           ++j;
1239         }
1240       }
1241       return;
1242     }
1243 
1244     void getObjects(Vids& ids, VRl1ttau& refs) const { getObjects(ids, refs, 0, l1ttauIds_.size()); }
1245     void getObjects(Vids& ids, VRl1ttau& refs, size_type begin, size_type end) const {
1246       assert(begin <= end);
1247       assert(end <= l1ttauIds_.size());
1248       const size_type n(end - begin);
1249       ids.resize(n);
1250       refs.resize(n);
1251       size_type j(0);
1252       for (size_type i = begin; i != end; ++i) {
1253         ids[j] = l1ttauIds_[i];
1254         refs[j] = l1ttauRefs_[i];
1255         ++j;
1256       }
1257     }
1258     void getObjects(int id, VRl1ttau& refs) const { getObjects(id, refs, 0, l1ttauIds_.size()); }
1259     void getObjects(int id, VRl1ttau& refs, size_type begin, size_type end) const {
1260       assert(begin <= end);
1261       assert(end <= l1ttauIds_.size());
1262       size_type n(0);
1263       for (size_type i = begin; i != end; ++i) {
1264         if (id == l1ttauIds_[i]) {
1265           ++n;
1266         }
1267       }
1268       refs.resize(n);
1269       size_type j(0);
1270       for (size_type i = begin; i != end; ++i) {
1271         if (id == l1ttauIds_[i]) {
1272           refs[j] = l1ttauRefs_[i];
1273           ++j;
1274         }
1275       }
1276       return;
1277     }
1278 
1279     void getObjects(Vids& ids, VRl1tetsum& refs) const { getObjects(ids, refs, 0, l1tetsumIds_.size()); }
1280     void getObjects(Vids& ids, VRl1tetsum& refs, size_type begin, size_type end) const {
1281       assert(begin <= end);
1282       assert(end <= l1tetsumIds_.size());
1283       const size_type n(end - begin);
1284       ids.resize(n);
1285       refs.resize(n);
1286       size_type j(0);
1287       for (size_type i = begin; i != end; ++i) {
1288         ids[j] = l1tetsumIds_[i];
1289         refs[j] = l1tetsumRefs_[i];
1290         ++j;
1291       }
1292     }
1293     void getObjects(int id, VRl1tetsum& refs) const { getObjects(id, refs, 0, l1tetsumIds_.size()); }
1294     void getObjects(int id, VRl1tetsum& refs, size_type begin, size_type end) const {
1295       assert(begin <= end);
1296       assert(end <= l1tetsumIds_.size());
1297       size_type n(0);
1298       for (size_type i = begin; i != end; ++i) {
1299         if (id == l1tetsumIds_[i]) {
1300           ++n;
1301         }
1302       }
1303       refs.resize(n);
1304       size_type j(0);
1305       for (size_type i = begin; i != end; ++i) {
1306         if (id == l1tetsumIds_[i]) {
1307           refs[j] = l1tetsumRefs_[i];
1308           ++j;
1309         }
1310       }
1311       return;
1312     }
1313 
1314     /* Phase-2 */
1315     void getObjects(Vids& ids, VRl1ttkmuon& refs) const { getObjects(ids, refs, 0, l1ttkmuonIds_.size()); }
1316     void getObjects(Vids& ids, VRl1ttkmuon& refs, size_type begin, size_type end) const {
1317       assert(begin <= end);
1318       assert(end <= l1ttkmuonIds_.size());
1319       const size_type n(end - begin);
1320       ids.resize(n);
1321       refs.resize(n);
1322       size_type j(0);
1323       for (size_type i = begin; i != end; ++i) {
1324         ids[j] = l1ttkmuonIds_[i];
1325         refs[j] = l1ttkmuonRefs_[i];
1326         ++j;
1327       }
1328     }
1329     void getObjects(int id, VRl1ttkmuon& refs) const { getObjects(id, refs, 0, l1ttkmuonIds_.size()); }
1330     void getObjects(int id, VRl1ttkmuon& refs, size_type begin, size_type end) const {
1331       assert(begin <= end);
1332       assert(end <= l1ttkmuonIds_.size());
1333       size_type n(0);
1334       for (size_type i = begin; i != end; ++i) {
1335         if (id == l1ttkmuonIds_[i]) {
1336           ++n;
1337         }
1338       }
1339       refs.resize(n);
1340       size_type j(0);
1341       for (size_type i = begin; i != end; ++i) {
1342         if (id == l1ttkmuonIds_[i]) {
1343           refs[j] = l1ttkmuonRefs_[i];
1344           ++j;
1345         }
1346       }
1347       return;
1348     }
1349 
1350     void getObjects(Vids& ids, VRl1ttkele& refs) const { getObjects(ids, refs, 0, l1ttkeleIds_.size()); }
1351     void getObjects(Vids& ids, VRl1ttkele& refs, size_type begin, size_type end) const {
1352       assert(begin <= end);
1353       assert(end <= l1ttkeleIds_.size());
1354       const size_type n(end - begin);
1355       ids.resize(n);
1356       refs.resize(n);
1357       size_type j(0);
1358       for (size_type i = begin; i != end; ++i) {
1359         ids[j] = l1ttkeleIds_[i];
1360         refs[j] = l1ttkeleRefs_[i];
1361         ++j;
1362       }
1363     }
1364     void getObjects(int id, VRl1ttkele& refs) const { getObjects(id, refs, 0, l1ttkeleIds_.size()); }
1365     void getObjects(int id, VRl1ttkele& refs, size_type begin, size_type end) const {
1366       assert(begin <= end);
1367       assert(end <= l1ttkeleIds_.size());
1368       size_type n(0);
1369       for (size_type i = begin; i != end; ++i) {
1370         if (id == l1ttkeleIds_[i]) {
1371           ++n;
1372         }
1373       }
1374       refs.resize(n);
1375       size_type j(0);
1376       for (size_type i = begin; i != end; ++i) {
1377         if (id == l1ttkeleIds_[i]) {
1378           refs[j] = l1ttkeleRefs_[i];
1379           ++j;
1380         }
1381       }
1382       return;
1383     }
1384 
1385     void getObjects(Vids& ids, VRl1ttkem& refs) const { getObjects(ids, refs, 0, l1ttkemIds_.size()); }
1386     void getObjects(Vids& ids, VRl1ttkem& refs, size_type begin, size_type end) const {
1387       assert(begin <= end);
1388       assert(end <= l1ttkemIds_.size());
1389       const size_type n(end - begin);
1390       ids.resize(n);
1391       refs.resize(n);
1392       size_type j(0);
1393       for (size_type i = begin; i != end; ++i) {
1394         ids[j] = l1ttkemIds_[i];
1395         refs[j] = l1ttkemRefs_[i];
1396         ++j;
1397       }
1398     }
1399     void getObjects(int id, VRl1ttkem& refs) const { getObjects(id, refs, 0, l1ttkemIds_.size()); }
1400     void getObjects(int id, VRl1ttkem& refs, size_type begin, size_type end) const {
1401       assert(begin <= end);
1402       assert(end <= l1ttkemIds_.size());
1403       size_type n(0);
1404       for (size_type i = begin; i != end; ++i) {
1405         if (id == l1ttkemIds_[i]) {
1406           ++n;
1407         }
1408       }
1409       refs.resize(n);
1410       size_type j(0);
1411       for (size_type i = begin; i != end; ++i) {
1412         if (id == l1ttkemIds_[i]) {
1413           refs[j] = l1ttkemRefs_[i];
1414           ++j;
1415         }
1416       }
1417       return;
1418     }
1419 
1420     void getObjects(Vids& ids, VRl1tpfjet& refs) const { getObjects(ids, refs, 0, l1tpfjetIds_.size()); }
1421     void getObjects(Vids& ids, VRl1tpfjet& refs, size_type begin, size_type end) const {
1422       assert(begin <= end);
1423       assert(end <= l1tpfjetIds_.size());
1424       const size_type n(end - begin);
1425       ids.resize(n);
1426       refs.resize(n);
1427       size_type j(0);
1428       for (size_type i = begin; i != end; ++i) {
1429         ids[j] = l1tpfjetIds_[i];
1430         refs[j] = l1tpfjetRefs_[i];
1431         ++j;
1432       }
1433     }
1434     void getObjects(int id, VRl1tpfjet& refs) const { getObjects(id, refs, 0, l1tpfjetIds_.size()); }
1435     void getObjects(int id, VRl1tpfjet& refs, size_type begin, size_type end) const {
1436       assert(begin <= end);
1437       assert(end <= l1tpfjetIds_.size());
1438       size_type n(0);
1439       for (size_type i = begin; i != end; ++i) {
1440         if (id == l1tpfjetIds_[i]) {
1441           ++n;
1442         }
1443       }
1444       refs.resize(n);
1445       size_type j(0);
1446       for (size_type i = begin; i != end; ++i) {
1447         if (id == l1tpfjetIds_[i]) {
1448           refs[j] = l1tpfjetRefs_[i];
1449           ++j;
1450         }
1451       }
1452       return;
1453     }
1454 
1455     void getObjects(Vids& ids, VRl1tpftau& refs) const { getObjects(ids, refs, 0, l1tpftauIds_.size()); }
1456     void getObjects(Vids& ids, VRl1tpftau& refs, size_type begin, size_type end) const {
1457       assert(begin <= end);
1458       assert(end <= l1tpftauIds_.size());
1459       const size_type n(end - begin);
1460       ids.resize(n);
1461       refs.resize(n);
1462       size_type j(0);
1463       for (size_type i = begin; i != end; ++i) {
1464         ids[j] = l1tpftauIds_[i];
1465         refs[j] = l1tpftauRefs_[i];
1466         ++j;
1467       }
1468     }
1469     void getObjects(int id, VRl1tpftau& refs) const { getObjects(id, refs, 0, l1tpftauIds_.size()); }
1470     void getObjects(int id, VRl1tpftau& refs, size_type begin, size_type end) const {
1471       assert(begin <= end);
1472       assert(end <= l1tpftauIds_.size());
1473       size_type n(0);
1474       for (size_type i = begin; i != end; ++i) {
1475         if (id == l1tpftauIds_[i]) {
1476           ++n;
1477         }
1478       }
1479       refs.resize(n);
1480       size_type j(0);
1481       for (size_type i = begin; i != end; ++i) {
1482         if (id == l1tpftauIds_[i]) {
1483           refs[j] = l1tpftauRefs_[i];
1484           ++j;
1485         }
1486       }
1487       return;
1488     }
1489 
1490     void getObjects(Vids& ids, VRl1thpspftau& refs) const { getObjects(ids, refs, 0, l1thpspftauIds_.size()); }
1491     void getObjects(Vids& ids, VRl1thpspftau& refs, size_type begin, size_type end) const {
1492       assert(begin <= end);
1493       assert(end <= l1thpspftauIds_.size());
1494       const size_type n(end - begin);
1495       ids.resize(n);
1496       refs.resize(n);
1497       size_type j(0);
1498       for (size_type i = begin; i != end; ++i) {
1499         ids[j] = l1thpspftauIds_[i];
1500         refs[j] = l1thpspftauRefs_[i];
1501         ++j;
1502       }
1503     }
1504     void getObjects(int id, VRl1thpspftau& refs) const { getObjects(id, refs, 0, l1thpspftauIds_.size()); }
1505     void getObjects(int id, VRl1thpspftau& refs, size_type begin, size_type end) const {
1506       assert(begin <= end);
1507       assert(end <= l1thpspftauIds_.size());
1508       size_type n(0);
1509       for (size_type i = begin; i != end; ++i) {
1510         if (id == l1thpspftauIds_[i]) {
1511           ++n;
1512         }
1513       }
1514       refs.resize(n);
1515       size_type j(0);
1516       for (size_type i = begin; i != end; ++i) {
1517         if (id == l1thpspftauIds_[i]) {
1518           refs[j] = l1thpspftauRefs_[i];
1519           ++j;
1520         }
1521       }
1522       return;
1523     }
1524 
1525     void getObjects(Vids& ids, VRl1tpftrack& refs) const { getObjects(ids, refs, 0, l1tpftrackIds_.size()); }
1526     void getObjects(Vids& ids, VRl1tpftrack& refs, size_type begin, size_type end) const {
1527       assert(begin <= end);
1528       assert(end <= l1tpftrackIds_.size());
1529       const size_type n(end - begin);
1530       ids.resize(n);
1531       refs.resize(n);
1532       size_type j(0);
1533       for (size_type i = begin; i != end; ++i) {
1534         ids[j] = l1tpftrackIds_[i];
1535         refs[j] = l1tpftrackRefs_[i];
1536         ++j;
1537       }
1538     }
1539     void getObjects(int id, VRl1tpftrack& refs) const { getObjects(id, refs, 0, l1tpftrackIds_.size()); }
1540     void getObjects(int id, VRl1tpftrack& refs, size_type begin, size_type end) const {
1541       assert(begin <= end);
1542       assert(end <= l1tpftrackIds_.size());
1543       size_type n(0);
1544       for (size_type i = begin; i != end; ++i) {
1545         if (id == l1tpftrackIds_[i]) {
1546           ++n;
1547         }
1548       }
1549       refs.resize(n);
1550       size_type j(0);
1551       for (size_type i = begin; i != end; ++i) {
1552         if (id == l1tpftrackIds_[i]) {
1553           refs[j] = l1tpftrackRefs_[i];
1554           ++j;
1555         }
1556       }
1557       return;
1558     }
1559 
1560     void getObjects(Vids& ids, VRl1tp2etsum& refs) const { getObjects(ids, refs, 0, l1tp2etsumIds_.size()); }
1561     void getObjects(Vids& ids, VRl1tp2etsum& refs, size_type begin, size_type end) const {
1562       assert(begin <= end);
1563       assert(end <= l1tp2etsumIds_.size());
1564       const size_type n(end - begin);
1565       ids.resize(n);
1566       refs.resize(n);
1567       size_type j(0);
1568       for (size_type i = begin; i != end; ++i) {
1569         ids[j] = l1tp2etsumIds_[i];
1570         refs[j] = l1tp2etsumRefs_[i];
1571         ++j;
1572       }
1573     }
1574     void getObjects(int id, VRl1tp2etsum& refs) const { getObjects(id, refs, 0, l1tp2etsumIds_.size()); }
1575     void getObjects(int id, VRl1tp2etsum& refs, size_type begin, size_type end) const {
1576       assert(begin <= end);
1577       assert(end <= l1tp2etsumIds_.size());
1578       size_type n(0);
1579       for (size_type i = begin; i != end; ++i) {
1580         if (id == l1tp2etsumIds_[i]) {
1581           ++n;
1582         }
1583       }
1584       refs.resize(n);
1585       size_type j(0);
1586       for (size_type i = begin; i != end; ++i) {
1587         if (id == l1tp2etsumIds_[i]) {
1588           refs[j] = l1tp2etsumRefs_[i];
1589           ++j;
1590         }
1591       }
1592       return;
1593     }
1594 
1595     void getObjects(Vids& ids, VRpfjet& refs) const { getObjects(ids, refs, 0, pfjetIds_.size()); }
1596     void getObjects(Vids& ids, VRpfjet& refs, size_type begin, size_type end) const {
1597       assert(begin <= end);
1598       assert(end <= pfjetIds_.size());
1599       const size_type n(end - begin);
1600       ids.resize(n);
1601       refs.resize(n);
1602       size_type j(0);
1603       for (size_type i = begin; i != end; ++i) {
1604         ids[j] = pfjetIds_[i];
1605         refs[j] = pfjetRefs_[i];
1606         ++j;
1607       }
1608     }
1609     void getObjects(int id, VRpfjet& refs) const { getObjects(id, refs, 0, pfjetIds_.size()); }
1610     void getObjects(int id, VRpfjet& refs, size_type begin, size_type end) const {
1611       assert(begin <= end);
1612       assert(end <= pfjetIds_.size());
1613       size_type n(0);
1614       for (size_type i = begin; i != end; ++i) {
1615         if (id == pfjetIds_[i]) {
1616           ++n;
1617         }
1618       }
1619       refs.resize(n);
1620       size_type j(0);
1621       for (size_type i = begin; i != end; ++i) {
1622         if (id == pfjetIds_[i]) {
1623           refs[j] = pfjetRefs_[i];
1624           ++j;
1625         }
1626       }
1627       return;
1628     }
1629 
1630     void getObjects(Vids& ids, VRpftau& refs) const { getObjects(ids, refs, 0, pftauIds_.size()); }
1631     void getObjects(Vids& ids, VRpftau& refs, size_type begin, size_type end) const {
1632       assert(begin <= end);
1633       assert(end <= pftauIds_.size());
1634       const size_type n(end - begin);
1635       ids.resize(n);
1636       refs.resize(n);
1637       size_type j(0);
1638       for (size_type i = begin; i != end; ++i) {
1639         ids[j] = pftauIds_[i];
1640         refs[j] = pftauRefs_[i];
1641         ++j;
1642       }
1643     }
1644     void getObjects(int id, VRpftau& refs) const { getObjects(id, refs, 0, pftauIds_.size()); }
1645     void getObjects(int id, VRpftau& refs, size_type begin, size_type end) const {
1646       assert(begin <= end);
1647       assert(end <= pftauIds_.size());
1648       size_type n(0);
1649       for (size_type i = begin; i != end; ++i) {
1650         if (id == pftauIds_[i]) {
1651           ++n;
1652         }
1653       }
1654       refs.resize(n);
1655       size_type j(0);
1656       for (size_type i = begin; i != end; ++i) {
1657         if (id == pftauIds_[i]) {
1658           refs[j] = pftauRefs_[i];
1659           ++j;
1660         }
1661       }
1662       return;
1663     }
1664 
1665     void getObjects(Vids& ids, VRpfmet& refs) const { getObjects(ids, refs, 0, pfmetIds_.size()); }
1666     void getObjects(Vids& ids, VRpfmet& refs, size_type begin, size_type end) const {
1667       assert(begin <= end);
1668       assert(end <= pfmetIds_.size());
1669       const size_type n(end - begin);
1670       ids.resize(n);
1671       refs.resize(n);
1672       size_type j(0);
1673       for (size_type i = begin; i != end; ++i) {
1674         ids[j] = pfmetIds_[i];
1675         refs[j] = pfmetRefs_[i];
1676         ++j;
1677       }
1678     }
1679     void getObjects(int id, VRpfmet& refs) const { getObjects(id, refs, 0, pfmetIds_.size()); }
1680     void getObjects(int id, VRpfmet& refs, size_type begin, size_type end) const {
1681       assert(begin <= end);
1682       assert(end <= pfmetIds_.size());
1683       size_type n(0);
1684       for (size_type i = begin; i != end; ++i) {
1685         if (id == pfmetIds_[i]) {
1686           ++n;
1687         }
1688       }
1689       refs.resize(n);
1690       size_type j(0);
1691       for (size_type i = begin; i != end; ++i) {
1692         if (id == pfmetIds_[i]) {
1693           refs[j] = pfmetRefs_[i];
1694           ++j;
1695         }
1696       }
1697       return;
1698     }
1699 
1700     void getObjects(Vids& ids, VRl1tp2gtcand& refs) const { getObjects(ids, refs, 0, l1tp2gtcandIds_.size()); }
1701     void getObjects(Vids& ids, VRl1tp2gtcand& refs, size_type begin, size_type end) const {
1702       assert(begin <= end);
1703       assert(end <= l1tp2gtcandIds_.size());
1704       const size_type n(end - begin);
1705       ids.resize(n);
1706       refs.resize(n);
1707       size_type j(0);
1708       for (size_type i = begin; i != end; ++i) {
1709         ids[j] = l1tp2gtcandIds_[i];
1710         refs[j] = l1tp2gtcandRefs_[i];
1711         ++j;
1712       }
1713     }
1714     void getObjects(int id, VRl1tp2gtcand& refs) const { getObjects(id, refs, 0, l1tp2gtcandIds_.size()); }
1715     void getObjects(int id, VRl1tp2gtcand& refs, size_type begin, size_type end) const {
1716       assert(begin <= end);
1717       assert(end <= l1tp2gtcandIds_.size());
1718       size_type n(0);
1719       for (size_type i = begin; i != end; ++i) {
1720         if (id == l1tp2gtcandIds_[i]) {
1721           ++n;
1722         }
1723       }
1724       refs.resize(n);
1725       size_type j(0);
1726       for (size_type i = begin; i != end; ++i) {
1727         if (id == l1tp2gtcandIds_[i]) {
1728           refs[j] = l1tp2gtcandRefs_[i];
1729           ++j;
1730         }
1731       }
1732       return;
1733     }
1734 
1735     /// low-level getters for data members
1736     size_type photonSize() const { return photonIds_.size(); }
1737     const Vids& photonIds() const { return photonIds_; }
1738     const VRphoton& photonRefs() const { return photonRefs_; }
1739 
1740     size_type electronSize() const { return electronIds_.size(); }
1741     const Vids& electronIds() const { return electronIds_; }
1742     const VRelectron& electronRefs() const { return electronRefs_; }
1743 
1744     size_type muonSize() const { return muonIds_.size(); }
1745     const Vids& muonIds() const { return muonIds_; }
1746     const VRmuon& muonRefs() const { return muonRefs_; }
1747 
1748     size_type jetSize() const { return jetIds_.size(); }
1749     const Vids& jetIds() const { return jetIds_; }
1750     const VRjet& jetRefs() const { return jetRefs_; }
1751 
1752     size_type compositeSize() const { return compositeIds_.size(); }
1753     const Vids& compositeIds() const { return compositeIds_; }
1754     const VRcomposite& compositeRefs() const { return compositeRefs_; }
1755 
1756     size_type basemetSize() const { return basemetIds_.size(); }
1757     const Vids& basemetIds() const { return basemetIds_; }
1758     const VRbasemet& basemetRefs() const { return basemetRefs_; }
1759 
1760     size_type calometSize() const { return calometIds_.size(); }
1761     const Vids& calometIds() const { return calometIds_; }
1762     const VRcalomet& calometRefs() const { return calometRefs_; }
1763 
1764     size_type pixtrackSize() const { return pixtrackIds_.size(); }
1765     const Vids& pixtrackIds() const { return pixtrackIds_; }
1766     const VRpixtrack& pixtrackRefs() const { return pixtrackRefs_; }
1767 
1768     size_type l1emSize() const { return l1emIds_.size(); }
1769     const Vids& l1emIds() const { return l1emIds_; }
1770     const VRl1em& l1emRefs() const { return l1emRefs_; }
1771 
1772     size_type l1muonSize() const { return l1muonIds_.size(); }
1773     const Vids& l1muonIds() const { return l1muonIds_; }
1774     const VRl1muon& l1muonRefs() const { return l1muonRefs_; }
1775 
1776     size_type l1jetSize() const { return l1jetIds_.size(); }
1777     const Vids& l1jetIds() const { return l1jetIds_; }
1778     const VRl1jet& l1jetRefs() const { return l1jetRefs_; }
1779 
1780     size_type l1etmissSize() const { return l1etmissIds_.size(); }
1781     const Vids& l1etmissIds() const { return l1etmissIds_; }
1782     const VRl1etmiss& l1etmissRefs() const { return l1etmissRefs_; }
1783 
1784     size_type l1hfringsSize() const { return l1hfringsIds_.size(); }
1785     const Vids& l1hfringsIds() const { return l1hfringsIds_; }
1786     const VRl1hfrings& l1hfringsRefs() const { return l1hfringsRefs_; }
1787 
1788     size_type pfjetSize() const { return pfjetIds_.size(); }
1789     const Vids& pfjetIds() const { return pfjetIds_; }
1790     const VRpfjet& pfjetRefs() const { return pfjetRefs_; }
1791 
1792     size_type pftauSize() const { return pftauIds_.size(); }
1793     const Vids& pftauIds() const { return pftauIds_; }
1794     const VRpftau& pftauRefs() const { return pftauRefs_; }
1795 
1796     size_type pfmetSize() const { return pfmetIds_.size(); }
1797     const Vids& pfmetIds() const { return pfmetIds_; }
1798     const VRpfmet& pfmetRefs() const { return pfmetRefs_; }
1799 
1800     size_type l1tmuonSize() const { return l1tmuonIds_.size(); }
1801     const Vids& l1tmuonIds() const { return l1tmuonIds_; }
1802     const VRl1tmuon& l1tmuonRefs() const { return l1tmuonRefs_; }
1803 
1804     size_type l1tmuonShowerSize() const { return l1tmuonShowerIds_.size(); }
1805     const Vids& l1tmuonShowerIds() const { return l1tmuonShowerIds_; }
1806     const VRl1tmuonShower& l1tmuonShowerRefs() const { return l1tmuonShowerRefs_; }
1807 
1808     size_type l1tegammaSize() const { return l1tegammaIds_.size(); }
1809     const Vids& l1tegammaIds() const { return l1tegammaIds_; }
1810     const VRl1tegamma& l1tegammaRefs() const { return l1tegammaRefs_; }
1811 
1812     size_type l1tjetSize() const { return l1tjetIds_.size(); }
1813     const Vids& l1tjetIds() const { return l1tjetIds_; }
1814     const VRl1tjet& l1tjetRefs() const { return l1tjetRefs_; }
1815 
1816     /* Phase-2 */
1817 
1818     size_type l1ttkmuonSize() const { return l1ttkmuonIds_.size(); }
1819     const Vids& l1ttkmuonIds() const { return l1ttkmuonIds_; }
1820     const VRl1ttkmuon& l1ttkmuonRefs() const { return l1ttkmuonRefs_; }
1821 
1822     size_type l1ttkeleSize() const { return l1ttkeleIds_.size(); }
1823     const Vids& l1ttkeleIds() const { return l1ttkeleIds_; }
1824     const VRl1ttkele& l1ttkeleRefs() const { return l1ttkeleRefs_; }
1825 
1826     size_type l1ttkemSize() const { return l1ttkemIds_.size(); }
1827     const Vids& l1ttkemIds() const { return l1ttkemIds_; }
1828     const VRl1ttkem& l1ttkemRefs() const { return l1ttkemRefs_; }
1829 
1830     size_type l1tpfjetSize() const { return l1tpfjetIds_.size(); }
1831     const Vids& l1tpfjetIds() const { return l1tpfjetIds_; }
1832     const VRl1tpfjet& l1tpfjetRefs() const { return l1tpfjetRefs_; }
1833 
1834     size_type l1tpftauSize() const { return l1tpftauIds_.size(); }
1835     const Vids& l1tpftauIds() const { return l1tpftauIds_; }
1836     const VRl1tpftau& l1tpftauRefs() const { return l1tpftauRefs_; }
1837 
1838     size_type l1thpspftauSize() const { return l1thpspftauIds_.size(); }
1839     const Vids& l1thpspftauIds() const { return l1thpspftauIds_; }
1840     const VRl1thpspftau& l1thpspftauRefs() const { return l1thpspftauRefs_; }
1841 
1842     size_type l1tpftrackSize() const { return l1tpftrackIds_.size(); }
1843     const Vids& l1tpftrackIds() const { return l1tpftrackIds_; }
1844     const VRl1tpftrack& l1tpftrackRefs() const { return l1tpftrackRefs_; }
1845 
1846     size_type l1tp2etsumSize() const { return l1tp2etsumIds_.size(); }
1847     const Vids& l1tp2etsumIds() const { return l1tp2etsumIds_; }
1848     const VRl1tp2etsum& l1tp2etsumRefs() const { return l1tp2etsumRefs_; }
1849 
1850     size_type l1ttauSize() const { return l1ttauIds_.size(); }
1851     const Vids& l1ttauIds() const { return l1ttauIds_; }
1852     const VRl1ttau& l1ttauRefs() const { return l1ttauRefs_; }
1853 
1854     size_type l1tetsumSize() const { return l1tetsumIds_.size(); }
1855     const Vids& l1tetsumIds() const { return l1tetsumIds_; }
1856     const VRl1tetsum& l1tetsumRefs() const { return l1tetsumRefs_; }
1857 
1858     size_type l1tp2gtcandSize() const { return l1tp2gtcandIds_.size(); }
1859     const Vids& l1tp2gtcandIds() const { return l1tp2gtcandIds_; }
1860     const VRl1tp2gtcand& l1tp2gtcandRefs() const { return l1tp2gtcandRefs_; }
1861   };
1862 
1863   // picked up via argument dependent lookup, e-g- by boost::swap()
1864   inline void swap(TriggerRefsCollections& first, TriggerRefsCollections& second) { first.swap(second); }
1865 
1866 }  // namespace trigger
1867 
1868 #endif