CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerRefsCollections.h
Go to the documentation of this file.
1 #ifndef HLTReco_TriggerRefsCollections_h
2 #define HLTReco_TriggerRefsCollections_h
3 
21 
24 
34 
40 
43 
44 #include <cassert>
45 #include <vector>
46 
47 #include<typeinfo>
48 
49 namespace trigger
50 {
51 
52  typedef std::vector<reco::RecoEcalCandidateRef> VRphoton;
53  typedef std::vector<reco::ElectronRef> VRelectron;
54  typedef std::vector<reco::RecoChargedCandidateRef> VRmuon;
55  typedef std::vector<reco::CaloJetRef> VRjet;
56  typedef std::vector<reco::CompositeCandidateRef> VRcomposite;
57  typedef std::vector<reco::METRef> VRbasemet;
58  typedef std::vector<reco::CaloMETRef> VRcalomet;
59  typedef std::vector<reco::IsolatedPixelTrackCandidateRef> VRpixtrack;
60 
61  typedef std::vector<l1extra::L1EmParticleRef> VRl1em;
62  typedef std::vector<l1extra::L1MuonParticleRef> VRl1muon;
63  typedef std::vector<l1extra::L1JetParticleRef> VRl1jet;
64  typedef std::vector<l1extra::L1EtMissParticleRef> VRl1etmiss;
65  typedef std::vector<l1extra::L1HFRingsRef> VRl1hfrings;
66 
67  typedef std::vector<reco::PFJetRef> VRpfjet;
68  typedef std::vector<reco::PFTauRef> VRpftau;
69  typedef std::vector<reco::PFMETRef> VRpfmet;
70 
72 
74  private:
92 
103 
110 
112  public:
115  photonIds_(), photonRefs_(),
117  muonIds_(), muonRefs_(),
118  jetIds_(), jetRefs_(),
123 
124  l1emIds_(), l1emRefs_(),
125  l1muonIds_(), l1muonRefs_(),
126  l1jetIds_(), l1jetRefs_(),
129 
130  pfjetIds_(), pfjetRefs_(),
131  pftauIds_(), pftauRefs_(),
132  pfmetIds_(), pfmetRefs_()
133  { }
134 
136  void swap(TriggerRefsCollections & other) {
141  std::swap(muonIds_, other.muonIds_);
142  std::swap(muonRefs_, other.muonRefs_);
143  std::swap(jetIds_, other.jetIds_);
144  std::swap(jetRefs_, other.jetRefs_);
153 
154  std::swap(l1emIds_, other.l1emIds_);
155  std::swap(l1emRefs_, other.l1emRefs_);
158  std::swap(l1jetIds_, other.l1jetIds_);
164 
165  std::swap(pfjetIds_, other.pfjetIds_);
167  std::swap(pftauIds_, other.pftauIds_);
169  std::swap(pfmetIds_, other.pfmetIds_);
171  }
172 
174  void addObject(int id, const reco::RecoEcalCandidateRef& ref) {
175  photonIds_.push_back(id);
176  photonRefs_.push_back(ref);
177  }
178  void addObject(int id, const reco::ElectronRef& ref) {
179  electronIds_.push_back(id);
180  electronRefs_.push_back(ref);
181  }
182  void addObject(int id, const reco::RecoChargedCandidateRef& ref) {
183  muonIds_.push_back(id);
184  muonRefs_.push_back(ref);
185  }
186  void addObject(int id, const reco::CaloJetRef& ref) {
187  jetIds_.push_back(id);
188  jetRefs_.push_back(ref);
189  }
190  void addObject(int id, const reco::CompositeCandidateRef& ref) {
191  compositeIds_.push_back(id);
192  compositeRefs_.push_back(ref);
193  }
194  void addObject(int id, const reco::METRef& ref) {
195  basemetIds_.push_back(id);
196  basemetRefs_.push_back(ref);
197  }
198  void addObject(int id, const reco::CaloMETRef& ref) {
199  calometIds_.push_back(id);
200  calometRefs_.push_back(ref);
201  }
203  pixtrackIds_.push_back(id);
204  pixtrackRefs_.push_back(ref);
205  }
206 
207  void addObject(int id, const l1extra::L1EmParticleRef& ref) {
208  l1emIds_.push_back(id);
209  l1emRefs_.push_back(ref);
210  }
211  void addObject(int id, const l1extra::L1MuonParticleRef& ref) {
212  l1muonIds_.push_back(id);
213  l1muonRefs_.push_back(ref);
214  }
215  void addObject(int id, const l1extra::L1JetParticleRef& ref) {
216  l1jetIds_.push_back(id);
217  l1jetRefs_.push_back(ref);
218  }
219  void addObject(int id, const l1extra::L1EtMissParticleRef& ref) {
220  l1etmissIds_.push_back(id);
221  l1etmissRefs_.push_back(ref);
222  }
223  void addObject(int id, const l1extra::L1HFRingsRef& ref) {
224  l1hfringsIds_.push_back(id);
225  l1hfringsRefs_.push_back(ref);
226  }
227 
228  void addObject(int id, const reco::PFJetRef& ref) {
229  pfjetIds_.push_back(id);
230  pfjetRefs_.push_back(ref);
231  }
232  void addObject(int id, const reco::PFTauRef& ref) {
233  pftauIds_.push_back(id);
234  pftauRefs_.push_back(ref);
235  }
236  void addObject(int id, const reco::PFMETRef& ref) {
237  pfmetIds_.push_back(id);
238  pfmetRefs_.push_back(ref);
239  }
240 
242  size_type addObjects (const Vids& ids, const VRphoton& refs) {
243  assert(ids.size()==refs.size());
244  photonIds_.insert(photonIds_.end(),ids.begin(),ids.end());
245  photonRefs_.insert(photonRefs_.end(),refs.begin(),refs.end());
246  return photonIds_.size();
247  }
248  size_type addObjects (const Vids& ids, const VRelectron& refs) {
249  assert(ids.size()==refs.size());
250  electronIds_.insert(electronIds_.end(),ids.begin(),ids.end());
251  electronRefs_.insert(electronRefs_.end(),refs.begin(),refs.end());
252  return electronIds_.size();
253  }
254  size_type addObjects (const Vids& ids, const VRmuon& refs) {
255  assert(ids.size()==refs.size());
256  muonIds_.insert(muonIds_.end(),ids.begin(),ids.end());
257  muonRefs_.insert(muonRefs_.end(),refs.begin(),refs.end());
258  return muonIds_.size();
259  }
260  size_type addObjects (const Vids& ids, const VRjet& refs) {
261  assert(ids.size()==refs.size());
262  jetIds_.insert(jetIds_.end(),ids.begin(),ids.end());
263  jetRefs_.insert(jetRefs_.end(),refs.begin(),refs.end());
264  return jetIds_.size();
265  }
266  size_type addObjects (const Vids& ids, const VRcomposite& refs) {
267  assert(ids.size()==refs.size());
268  compositeIds_.insert(compositeIds_.end(),ids.begin(),ids.end());
269  compositeRefs_.insert(compositeRefs_.end(),refs.begin(),refs.end());
270  return compositeIds_.size();
271  }
272  size_type addObjects (const Vids& ids, const VRbasemet& refs) {
273  assert(ids.size()==refs.size());
274  basemetIds_.insert(basemetIds_.end(),ids.begin(),ids.end());
275  basemetRefs_.insert(basemetRefs_.end(),refs.begin(),refs.end());
276  return basemetIds_.size();
277  }
278  size_type addObjects (const Vids& ids, const VRcalomet& refs) {
279  assert(ids.size()==refs.size());
280  calometIds_.insert(calometIds_.end(),ids.begin(),ids.end());
281  calometRefs_.insert(calometRefs_.end(),refs.begin(),refs.end());
282  return calometIds_.size();
283  }
284  size_type addObjects (const Vids& ids, const VRpixtrack& refs) {
285  assert(ids.size()==refs.size());
286  pixtrackIds_.insert(pixtrackIds_.end(),ids.begin(),ids.end());
287  pixtrackRefs_.insert(pixtrackRefs_.end(),refs.begin(),refs.end());
288  return pixtrackIds_.size();
289  }
290 
291  size_type addObjects (const Vids& ids, const VRl1em& refs) {
292  assert(ids.size()==refs.size());
293  l1emIds_.insert(l1emIds_.end(),ids.begin(),ids.end());
294  l1emRefs_.insert(l1emRefs_.end(),refs.begin(),refs.end());
295  return l1emIds_.size();
296  }
297  size_type addObjects (const Vids& ids, const VRl1muon& refs) {
298  assert(ids.size()==refs.size());
299  l1muonIds_.insert(l1muonIds_.end(),ids.begin(),ids.end());
300  l1muonRefs_.insert(l1muonRefs_.end(),refs.begin(),refs.end());
301  return l1muonIds_.size();
302  }
303  size_type addObjects (const Vids& ids, const VRl1jet& refs) {
304  assert(ids.size()==refs.size());
305  l1jetIds_.insert(l1jetIds_.end(),ids.begin(),ids.end());
306  l1jetRefs_.insert(l1jetRefs_.end(),refs.begin(),refs.end());
307  return l1jetIds_.size();
308  }
309  size_type addObjects (const Vids& ids, const VRl1etmiss& refs) {
310  assert(ids.size()==refs.size());
311  l1etmissIds_.insert(l1etmissIds_.end(),ids.begin(),ids.end());
312  l1etmissRefs_.insert(l1etmissRefs_.end(),refs.begin(),refs.end());
313  return l1etmissIds_.size();
314  }
315  size_type addObjects (const Vids& ids, const VRl1hfrings& refs) {
316  assert(ids.size()==refs.size());
317  l1hfringsIds_.insert(l1hfringsIds_.end(),ids.begin(),ids.end());
318  l1hfringsRefs_.insert(l1hfringsRefs_.end(),refs.begin(),refs.end());
319  return l1hfringsIds_.size();
320  }
321 
322  size_type addObjects (const Vids& ids, const VRpfjet& refs) {
323  assert(ids.size()==refs.size());
324  pfjetIds_.insert(pfjetIds_.end(),ids.begin(),ids.end());
325  pfjetRefs_.insert(pfjetRefs_.end(),refs.begin(),refs.end());
326  return pfjetIds_.size();
327  }
328  size_type addObjects (const Vids& ids, const VRpftau& refs) {
329  assert(ids.size()==refs.size());
330  pftauIds_.insert(pftauIds_.end(),ids.begin(),ids.end());
331  pftauRefs_.insert(pftauRefs_.end(),refs.begin(),refs.end());
332  return pftauIds_.size();
333  }
334  size_type addObjects (const Vids& ids, const VRpfmet& refs) {
335  assert(ids.size()==refs.size());
336  pfmetIds_.insert(pfmetIds_.end(),ids.begin(),ids.end());
337  pfmetRefs_.insert(pfmetRefs_.end(),refs.begin(),refs.end());
338  return pfmetIds_.size();
339  }
340 
342  void getObjects(Vids& ids, VRphoton& refs) const {
343  getObjects(ids,refs,0,photonIds_.size());
344  }
345  void getObjects(Vids& ids, VRphoton& refs, size_type begin, size_type end) const {
346  assert (begin<=end);
347  assert (end<=photonIds_.size());
348  const size_type n(end-begin);
349  ids.resize(n);
350  refs.resize(n);
351  size_type j(0);
352  for (size_type i=begin; i!=end; ++i) {
353  ids[j]=photonIds_[i];
354  refs[j]=photonRefs_[i];
355  ++j;
356  }
357  }
358  void getObjects(int id, VRphoton& refs) const {
359  getObjects(id,refs,0,photonIds_.size());
360  }
361  void getObjects(int id, VRphoton& refs, size_type begin, size_type end) const {
362  assert (begin<=end);
363  assert (end<=photonIds_.size());
364  size_type n(0);
365  for (size_type i=begin; i!=end; ++i) {if (id==photonIds_[i]) {++n;}}
366  refs.resize(n);
367  size_type j(0);
368  for (size_type i=begin; i!=end; ++i) {
369  if (id==photonIds_[i]) {refs[j]=photonRefs_[i]; ++j;}
370  }
371  return;
372  }
373 
374  void getObjects(Vids& ids, VRelectron& refs) const {
375  getObjects(ids,refs,0,electronIds_.size());
376  }
377  void getObjects(Vids& ids, VRelectron& refs, size_type begin, size_type end) const {
378  assert (begin<=end);
379  assert (end<=electronIds_.size());
380  const size_type n(end-begin);
381  ids.resize(n);
382  refs.resize(n);
383  size_type j(0);
384  for (size_type i=begin; i!=end; ++i) {
385  ids[j]=electronIds_[i];
386  refs[j]=electronRefs_[i];
387  ++j;
388  }
389  }
390  void getObjects(int id, VRelectron& refs) const {
391  getObjects(id,refs,0,electronIds_.size());
392  }
393  void getObjects(int id, VRelectron& refs, size_type begin, size_type end) const {
394  assert (begin<=end);
395  assert (end<=electronIds_.size());
396  size_type n(0);
397  for (size_type i=begin; i!=end; ++i) {if (id==electronIds_[i]) {++n;}}
398  refs.resize(n);
399  size_type j(0);
400  for (size_type i=begin; i!=end; ++i) {
401  if (id==electronIds_[i]) {refs[j]=electronRefs_[i]; ++j;}
402  }
403  return;
404  }
405 
406  void getObjects(Vids& ids, VRmuon& refs) const {
407  getObjects(ids,refs,0,muonIds_.size());
408  }
409  void getObjects(Vids& ids, VRmuon& refs, size_type begin, size_type end) const {
410  assert (begin<=end);
411  assert (end<=muonIds_.size());
412  const size_type n(end-begin);
413  ids.resize(n);
414  refs.resize(n);
415  size_type j(0);
416  for (size_type i=begin; i!=end; ++i) {
417  ids[j]=muonIds_[i];
418  refs[j]=muonRefs_[i];
419  ++j;
420  }
421  }
422  void getObjects(int id, VRmuon& refs) const {
423  getObjects(id,refs,0,muonIds_.size());
424  }
425  void getObjects(int id, VRmuon& refs, size_type begin, size_type end) const {
426  assert (begin<=end);
427  assert (end<=muonIds_.size());
428  size_type n(0);
429  for (size_type i=begin; i!=end; ++i) {if (id==muonIds_[i]) {++n;}}
430  refs.resize(n);
431  size_type j(0);
432  for (size_type i=begin; i!=end; ++i) {
433  if (id==muonIds_[i]) {refs[j]=muonRefs_[i]; ++j;}
434  }
435  return;
436  }
437 
438  void getObjects(Vids& ids, VRjet& refs) const {
439  getObjects(ids,refs,0,jetIds_.size());
440  }
441  void getObjects(Vids& ids, VRjet& refs, size_type begin, size_type end) const {
442  assert (begin<=end);
443  assert (end<=jetIds_.size());
444  const size_type n(end-begin);
445  ids.resize(n);
446  refs.resize(n);
447  size_type j(0);
448  for (size_type i=begin; i!=end; ++i) {
449  ids[j]=jetIds_[i];
450  refs[j]=jetRefs_[i];
451  ++j;
452  }
453  }
454  void getObjects(int id, VRjet& refs) const {
455  getObjects(id,refs,0,jetIds_.size());
456  }
457  void getObjects(int id, VRjet& refs, size_type begin, size_type end) const {
458  assert (begin<=end);
459  assert (end<=jetIds_.size());
460  size_type n(0);
461  for (size_type i=begin; i!=end; ++i) {if (id==jetIds_[i]) {++n;}}
462  refs.resize(n);
463  size_type j(0);
464  for (size_type i=begin; i!=end; ++i) {
465  if (id==jetIds_[i]) {refs[j]=jetRefs_[i]; ++j;}
466  }
467  return;
468  }
469 
470  void getObjects(Vids& ids, VRcomposite& refs) const {
471  getObjects(ids,refs,0,compositeIds_.size());
472  }
473  void getObjects(Vids& ids, VRcomposite& refs, size_type begin, size_type end) const {
474  assert (begin<=end);
475  assert (end<=compositeIds_.size());
476  const size_type n(end-begin);
477  ids.resize(n);
478  refs.resize(n);
479  size_type j(0);
480  for (size_type i=begin; i!=end; ++i) {
481  ids[j]=compositeIds_[i];
482  refs[j]=compositeRefs_[i];
483  ++j;
484  }
485  }
486  void getObjects(int id, VRcomposite& refs) const {
487  getObjects(id,refs,0,compositeIds_.size());
488  }
489  void getObjects(int id, VRcomposite& refs, size_type begin, size_type end) const {
490  assert (begin<=end);
491  assert (end<=compositeIds_.size());
492  size_type n(0);
493  for (size_type i=begin; i!=end; ++i) {if (id==compositeIds_[i]) {++n;}}
494  refs.resize(n);
495  size_type j(0);
496  for (size_type i=begin; i!=end; ++i) {
497  if (id==compositeIds_[i]) {refs[j]=compositeRefs_[i]; ++j;}
498  }
499  return;
500  }
501 
502  void getObjects(Vids& ids, VRbasemet& refs) const {
503  getObjects(ids,refs,0,basemetIds_.size());
504  }
505  void getObjects(Vids& ids, VRbasemet& refs, size_type begin, size_type end) const {
506  assert (begin<=end);
507  assert (end<=basemetIds_.size());
508  const size_type n(end-begin);
509  ids.resize(n);
510  refs.resize(n);
511  size_type j(0);
512  for (size_type i=begin; i!=end; ++i) {
513  ids[j]=basemetIds_[i];
514  refs[j]=basemetRefs_[i];
515  ++j;
516  }
517  }
518  void getObjects(int id, VRbasemet& refs) const {
519  getObjects(id,refs,0,basemetIds_.size());
520  }
521  void getObjects(int id, VRbasemet& refs, size_type begin, size_type end) const {
522  assert (begin<=end);
523  assert (end<=basemetIds_.size());
524  size_type n(0);
525  for (size_type i=begin; i!=end; ++i) {if (id==basemetIds_[i]) {++n;}}
526  refs.resize(n);
527  size_type j(0);
528  for (size_type i=begin; i!=end; ++i) {
529  if (id==basemetIds_[i]) {refs[j]=basemetRefs_[i]; ++j;}
530  }
531  return;
532  }
533 
534  void getObjects(Vids& ids, VRcalomet& refs) const {
535  getObjects(ids,refs,0,calometIds_.size());
536  }
537  void getObjects(Vids& ids, VRcalomet& refs, size_type begin, size_type end) const {
538  assert (begin<=end);
539  assert (end<=calometIds_.size());
540  const size_type n(end-begin);
541  ids.resize(n);
542  refs.resize(n);
543  size_type j(0);
544  for (size_type i=begin; i!=end; ++i) {
545  ids[j]=calometIds_[i];
546  refs[j]=calometRefs_[i];
547  ++j;
548  }
549  }
550  void getObjects(int id, VRcalomet& refs) const {
551  getObjects(id,refs,0,calometIds_.size());
552  }
553  void getObjects(int id, VRcalomet& refs, size_type begin, size_type end) const {
554  assert (begin<=end);
555  assert (end<=calometIds_.size());
556  size_type n(0);
557  for (size_type i=begin; i!=end; ++i) {if (id==calometIds_[i]) {++n;}}
558  refs.resize(n);
559  size_type j(0);
560  for (size_type i=begin; i!=end; ++i) {
561  if (id==calometIds_[i]) {refs[j]=calometRefs_[i]; ++j;}
562  }
563  return;
564  }
565 
566  void getObjects(Vids& ids, VRpixtrack& refs) const {
567  getObjects(ids,refs,0,pixtrackIds_.size());
568  }
569  void getObjects(Vids& ids, VRpixtrack& refs, size_type begin, size_type end) const {
570  assert (begin<=end);
571  assert (end<=pixtrackIds_.size());
572  const size_type n(end-begin);
573  ids.resize(n);
574  refs.resize(n);
575  size_type j(0);
576  for (size_type i=begin; i!=end; ++i) {
577  ids[j]=pixtrackIds_[i];
578  refs[j]=pixtrackRefs_[i];
579  ++j;
580  }
581  }
582  void getObjects(int id, VRpixtrack& refs) const {
583  getObjects(id,refs,0,pixtrackIds_.size());
584  }
585  void getObjects(int id, VRpixtrack& refs, size_type begin, size_type end) const {
586  assert (begin<=end);
587  assert (end<=pixtrackIds_.size());
588  size_type n(0);
589  for (size_type i=begin; i!=end; ++i) {if (id==pixtrackIds_[i]) {++n;}}
590  refs.resize(n);
591  size_type j(0);
592  for (size_type i=begin; i!=end; ++i) {
593  if (id==pixtrackIds_[i]) {refs[j]=pixtrackRefs_[i]; ++j;}
594  }
595  return;
596  }
597 
598  void getObjects(Vids& ids, VRl1em& refs) const {
599  getObjects(ids,refs,0,l1emIds_.size());
600  }
601  void getObjects(Vids& ids, VRl1em& refs, size_type begin, size_type end) const {
602  assert (begin<=end);
603  assert (end<=l1emIds_.size());
604  const size_type n(end-begin);
605  ids.resize(n);
606  refs.resize(n);
607  size_type j(0);
608  for (size_type i=begin; i!=end; ++i) {
609  ids[j]=l1emIds_[i];
610  refs[j]=l1emRefs_[i];
611  ++j;
612  }
613  }
614  void getObjects(int id, VRl1em& refs) const {
615  getObjects(id,refs,0,l1emIds_.size());
616  }
617  void getObjects(int id, VRl1em& refs, size_type begin, size_type end) const {
618  assert (begin<=end);
619  assert (end<=l1emIds_.size());
620  size_type n(0);
621  for (size_type i=begin; i!=end; ++i) {if (id==l1emIds_[i]) {++n;}}
622  refs.resize(n);
623  size_type j(0);
624  for (size_type i=begin; i!=end; ++i) {
625  if (id==l1emIds_[i]) {refs[j]=l1emRefs_[i]; ++j;}
626  }
627  return;
628  }
629 
630  void getObjects(Vids& ids, VRl1muon& refs) const {
631  getObjects(ids,refs,0,l1muonIds_.size());
632  }
633  void getObjects(Vids& ids, VRl1muon& refs, size_type begin, size_type end) const {
634  assert (begin<=end);
635  assert (end<=l1muonIds_.size());
636  const size_type n(end-begin);
637  ids.resize(n);
638  refs.resize(n);
639  size_type j(0);
640  for (size_type i=begin; i!=end; ++i) {
641  ids[j]=l1muonIds_[i];
642  refs[j]=l1muonRefs_[i];
643  ++j;
644  }
645  }
646  void getObjects(int id, VRl1muon& refs) const {
647  getObjects(id,refs,0,l1muonIds_.size());
648  }
649  void getObjects(int id, VRl1muon& refs, size_type begin, size_type end) const {
650  assert (begin<=end);
651  assert (end<=l1muonIds_.size());
652  size_type n(0);
653  for (size_type i=begin; i!=end; ++i) {if (id==l1muonIds_[i]) {++n;}}
654  refs.resize(n);
655  size_type j(0);
656  for (size_type i=begin; i!=end; ++i) {
657  if (id==l1muonIds_[i]) {refs[j]=l1muonRefs_[i]; ++j;}
658  }
659  return;
660  }
661 
662  void getObjects(Vids& ids, VRl1jet& refs) const {
663  getObjects(ids,refs,0,l1jetIds_.size());
664  }
665  void getObjects(Vids& ids, VRl1jet& refs, size_type begin, size_type end) const {
666  assert (begin<=end);
667  assert (end<=l1jetIds_.size());
668  const size_type n(end-begin);
669  ids.resize(n);
670  refs.resize(n);
671  size_type j(0);
672  for (size_type i=begin; i!=end; ++i) {
673  ids[j]=l1jetIds_[i];
674  refs[j]=l1jetRefs_[i];
675  ++j;
676  }
677  }
678  void getObjects(int id, VRl1jet& refs) const {
679  getObjects(id,refs,0,l1jetIds_.size());
680  }
681  void getObjects(int id, VRl1jet& refs, size_type begin, size_type end) const {
682  assert (begin<=end);
683  assert (end<=l1jetIds_.size());
684  size_type n(0);
685  for (size_type i=begin; i!=end; ++i) {if (id==l1jetIds_[i]) {++n;}}
686  refs.resize(n);
687  size_type j(0);
688  for (size_type i=begin; i!=end; ++i) {
689  if (id==l1jetIds_[i]) {refs[j]=l1jetRefs_[i]; ++j;}
690  }
691  return;
692  }
693 
694  void getObjects(Vids& ids, VRl1etmiss& refs) const {
695  getObjects(ids,refs,0,l1etmissIds_.size());
696  }
697  void getObjects(Vids& ids, VRl1etmiss& refs, size_type begin, size_type end) const {
698  assert (begin<=end);
699  assert (end<=l1etmissIds_.size());
700  const size_type n(end-begin);
701  ids.resize(n);
702  refs.resize(n);
703  size_type j(0);
704  for (size_type i=begin; i!=end; ++i) {
705  ids[j]=l1etmissIds_[i];
706  refs[j]=l1etmissRefs_[i];
707  ++j;
708  }
709  }
710  void getObjects(int id, VRl1etmiss& refs) const {
711  getObjects(id,refs,0,l1etmissIds_.size());
712  }
713  void getObjects(int id, VRl1etmiss& refs, size_type begin, size_type end) const {
714  assert (begin<=end);
715  assert (end<=l1etmissIds_.size());
716  size_type n(0);
717  for (size_type i=begin; i!=end; ++i) {if (id==l1etmissIds_[i]) {++n;}}
718  refs.resize(n);
719  size_type j(0);
720  for (size_type i=begin; i!=end; ++i) {
721  if (id==l1etmissIds_[i]) {refs[j]=l1etmissRefs_[i]; ++j;}
722  }
723  return;
724  }
725 
726  void getObjects(Vids& ids, VRl1hfrings& refs) const {
727  getObjects(ids,refs,0,l1hfringsIds_.size());
728  }
729  void getObjects(Vids& ids, VRl1hfrings& refs, size_type begin, size_type end) const {
730  assert (begin<=end);
731  assert (end<=l1hfringsIds_.size());
732  const size_type n(end-begin);
733  ids.resize(n);
734  refs.resize(n);
735  size_type j(0);
736  for (size_type i=begin; i!=end; ++i) {
737  ids[j]=l1hfringsIds_[i];
738  refs[j]=l1hfringsRefs_[i];
739  ++j;
740  }
741  }
742  void getObjects(int id, VRl1hfrings& refs) const {
743  getObjects(id,refs,0,l1hfringsIds_.size());
744  }
745  void getObjects(int id, VRl1hfrings& refs, size_type begin, size_type end) const {
746  assert (begin<=end);
747  assert (end<=l1hfringsIds_.size());
748  size_type n(0);
749  for (size_type i=begin; i!=end; ++i) {if (id==l1hfringsIds_[i]) {++n;}}
750  refs.resize(n);
751  size_type j(0);
752  for (size_type i=begin; i!=end; ++i) {
753  if (id==l1hfringsIds_[i]) {refs[j]=l1hfringsRefs_[i]; ++j;}
754  }
755  return;
756  }
757 
758  void getObjects(Vids& ids, VRpfjet& refs) const {
759  getObjects(ids,refs,0,pfjetIds_.size());
760  }
761  void getObjects(Vids& ids, VRpfjet& refs, size_type begin, size_type end) const {
762  assert (begin<=end);
763  assert (end<=pfjetIds_.size());
764  const size_type n(end-begin);
765  ids.resize(n);
766  refs.resize(n);
767  size_type j(0);
768  for (size_type i=begin; i!=end; ++i) {
769  ids[j]=pfjetIds_[i];
770  refs[j]=pfjetRefs_[i];
771  ++j;
772  }
773  }
774  void getObjects(int id, VRpfjet& refs) const {
775  getObjects(id,refs,0,pfjetIds_.size());
776  }
777  void getObjects(int id, VRpfjet& refs, size_type begin, size_type end) const {
778  assert (begin<=end);
779  assert (end<=pfjetIds_.size());
780  size_type n(0);
781  for (size_type i=begin; i!=end; ++i) {if (id==pfjetIds_[i]) {++n;}}
782  refs.resize(n);
783  size_type j(0);
784  for (size_type i=begin; i!=end; ++i) {
785  if (id==pfjetIds_[i]) {refs[j]=pfjetRefs_[i]; ++j;}
786  }
787  return;
788  }
789 
790  void getObjects(Vids& ids, VRpftau& refs) const {
791  getObjects(ids,refs,0,pftauIds_.size());
792  }
793  void getObjects(Vids& ids, VRpftau& refs, size_type begin, size_type end) const {
794  assert (begin<=end);
795  assert (end<=pftauIds_.size());
796  const size_type n(end-begin);
797  ids.resize(n);
798  refs.resize(n);
799  size_type j(0);
800  for (size_type i=begin; i!=end; ++i) {
801  ids[j]=pftauIds_[i];
802  refs[j]=pftauRefs_[i];
803  ++j;
804  }
805  }
806  void getObjects(int id, VRpftau& refs) const {
807  getObjects(id,refs,0,pftauIds_.size());
808  }
809  void getObjects(int id, VRpftau& refs, size_type begin, size_type end) const {
810  assert (begin<=end);
811  assert (end<=pftauIds_.size());
812  size_type n(0);
813  for (size_type i=begin; i!=end; ++i) {if (id==pftauIds_[i]) {++n;}}
814  refs.resize(n);
815  size_type j(0);
816  for (size_type i=begin; i!=end; ++i) {
817  if (id==pftauIds_[i]) {refs[j]=pftauRefs_[i]; ++j;}
818  }
819  return;
820  }
821 
822  void getObjects(Vids& ids, VRpfmet& refs) const {
823  getObjects(ids,refs,0,pfmetIds_.size());
824  }
825  void getObjects(Vids& ids, VRpfmet& refs, size_type begin, size_type end) const {
826  assert (begin<=end);
827  assert (end<=pfmetIds_.size());
828  const size_type n(end-begin);
829  ids.resize(n);
830  refs.resize(n);
831  size_type j(0);
832  for (size_type i=begin; i!=end; ++i) {
833  ids[j]=pfmetIds_[i];
834  refs[j]=pfmetRefs_[i];
835  ++j;
836  }
837  }
838  void getObjects(int id, VRpfmet& refs) const {
839  getObjects(id,refs,0,pfmetIds_.size());
840  }
841  void getObjects(int id, VRpfmet& refs, size_type begin, size_type end) const {
842  assert (begin<=end);
843  assert (end<=pfmetIds_.size());
844  size_type n(0);
845  for (size_type i=begin; i!=end; ++i) {if (id==pfmetIds_[i]) {++n;}}
846  refs.resize(n);
847  size_type j(0);
848  for (size_type i=begin; i!=end; ++i) {
849  if (id==pfmetIds_[i]) {refs[j]=pfmetRefs_[i]; ++j;}
850  }
851  return;
852  }
853 
855  size_type photonSize() const {return photonIds_.size();}
856  const Vids& photonIds() const {return photonIds_;}
857  const VRphoton& photonRefs() const {return photonRefs_;}
858 
859  size_type electronSize() const {return electronIds_.size();}
860  const Vids& electronIds() const {return electronIds_;}
861  const VRelectron& electronRefs() const {return electronRefs_;}
862 
863  size_type muonSize() const {return muonIds_.size();}
864  const Vids& muonIds() const {return muonIds_;}
865  const VRmuon& muonRefs() const {return muonRefs_;}
866 
867  size_type jetSize() const {return jetIds_.size();}
868  const Vids& jetIds() const {return jetIds_;}
869  const VRjet& jetRefs() const {return jetRefs_;}
870 
871  size_type compositeSize() const {return compositeIds_.size();}
872  const Vids& compositeIds() const {return compositeIds_;}
873  const VRcomposite& compositeRefs() const {return compositeRefs_;}
874 
875  size_type basemetSize() const {return basemetIds_.size();}
876  const Vids& basemetIds() const {return basemetIds_;}
877  const VRbasemet& basemetRefs() const {return basemetRefs_;}
878 
879  size_type calometSize() const {return calometIds_.size();}
880  const Vids& calometIds() const {return calometIds_;}
881  const VRcalomet& calometRefs() const {return calometRefs_;}
882 
883  size_type pixtrackSize() const {return pixtrackIds_.size();}
884  const Vids& pixtrackIds() const {return pixtrackIds_;}
885  const VRpixtrack& pixtrackRefs() const {return pixtrackRefs_;}
886 
887  size_type l1emSize() const {return l1emIds_.size();}
888  const Vids& l1emIds() const {return l1emIds_;}
889  const VRl1em& l1emRefs() const {return l1emRefs_;}
890 
891  size_type l1muonSize() const {return l1muonIds_.size();}
892  const Vids& l1muonIds() const {return l1muonIds_;}
893  const VRl1muon& l1muonRefs() const {return l1muonRefs_;}
894 
895  size_type l1jetSize() const {return l1jetIds_.size();}
896  const Vids& l1jetIds() const {return l1jetIds_;}
897  const VRl1jet& l1jetRefs() const {return l1jetRefs_;}
898 
899  size_type l1etmissSize() const {return l1etmissIds_.size();}
900  const Vids& l1etmissIds() const {return l1etmissIds_;}
901  const VRl1etmiss& l1etmissRefs() const {return l1etmissRefs_;}
902 
903  size_type l1hfringsSize() const {return l1hfringsIds_.size();}
904  const Vids& l1hfringsIds() const {return l1hfringsIds_;}
905  const VRl1hfrings& l1hfringsRefs() const {return l1hfringsRefs_;}
906 
907  size_type pfjetSize() const {return pfjetIds_.size();}
908  const Vids& pfjetIds() const {return pfjetIds_;}
909  const VRpfjet& pfjetRefs() const {return pfjetRefs_;}
910 
911  size_type pftauSize() const {return pftauIds_.size();}
912  const Vids& pftauIds() const {return pftauIds_;}
913  const VRpftau& pftauRefs() const {return pftauRefs_;}
914 
915  size_type pfmetSize() const {return pfmetIds_.size();}
916  const Vids& pfmetIds() const {return pfmetIds_;}
917  const VRpfmet& pfmetRefs() const {return pfmetRefs_;}
918 
919  };
920 
921  // picked up via argument dependent lookup, e-g- by boost::swap()
923  first.swap(second);
924  }
925 
926 }
927 
928 #endif
void getObjects(Vids &ids, VRpfjet &refs) const
void getObjects(int id, VRphoton &refs, size_type begin, size_type end) const
int i
Definition: DBlmapReader.cc:9
void getObjects(Vids &ids, VRpfjet &refs, size_type begin, size_type end) const
size_type addObjects(const Vids &ids, const VRphoton &refs)
void getObjects(Vids &ids, VRl1jet &refs) const
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
void getObjects(int id, VRpfmet &refs, size_type begin, size_type end) const
void getObjects(int id, VRpixtrack &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRpixtrack &refs) const
size_type addObjects(const Vids &ids, const VRbasemet &refs)
const VRbasemet & basemetRefs() const
const VRcalomet & calometRefs() const
size_type addObjects(const Vids &ids, const VRl1muon &refs)
void getObjects(int id, VRcalomet &refs, size_type begin, size_type end) const
void addObject(int id, const reco::CompositeCandidateRef &ref)
void addObject(int id, const reco::METRef &ref)
void getObjects(int id, VRl1em &refs) const
void getObjects(int id, VRelectron &refs, size_type begin, size_type end) const
void swap(TriggerRefsCollections &other)
utility
std::vector< reco::METRef > VRbasemet
assert(m_qm.get())
void addObject(int id, const reco::RecoChargedCandidateRef &ref)
void getObjects(int id, VRl1jet &refs, size_type begin, size_type end) const
void getObjects(int id, VRpfmet &refs) const
void getObjects(int id, VRpfjet &refs) const
void getObjects(Vids &ids, VRbasemet &refs, size_type begin, size_type end) const
void getObjects(int id, VRl1muon &refs, size_type begin, size_type end) const
void getObjects(int id, VRcomposite &refs, size_type begin, size_type end) const
void addObject(int id, const reco::PFJetRef &ref)
void getObjects(int id, VRelectron &refs) const
size_type addObjects(const Vids &ids, const VRpfmet &refs)
uint16_t size_type
size_type addObjects(const Vids &ids, const VRjet &refs)
void getObjects(Vids &ids, VRpixtrack &refs, size_type begin, size_type end) const
std::vector< l1extra::L1MuonParticleRef > VRl1muon
void addObject(int id, const reco::PFTauRef &ref)
void getObjects(Vids &ids, VRl1em &refs) const
size_type addObjects(const Vids &ids, const VRpixtrack &refs)
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref&lt;C&gt;)
U second(std::pair< T, U > const &p)
void getObjects(int id, VRpixtrack &refs) const
void getObjects(int id, VRmuon &refs, size_type begin, size_type end) const
std::vector< l1extra::L1HFRingsRef > VRl1hfrings
void getObjects(int id, VRl1hfrings &refs) const
size_type addObjects(const Vids &ids, const VRl1hfrings &refs)
std::vector< reco::IsolatedPixelTrackCandidateRef > VRpixtrack
size_type addObjects(const Vids &ids, const VRl1em &refs)
size_type addObjects(const Vids &ids, const VRpfjet &refs)
const VRl1muon & l1muonRefs() const
size_type addObjects(const Vids &ids, const VRcalomet &refs)
std::vector< l1extra::L1EtMissParticleRef > VRl1etmiss
size_type addObjects(const Vids &ids, const VRelectron &refs)
void getObjects(Vids &ids, VRcalomet &refs) const
void getObjects(Vids &ids, VRpfmet &refs) const
void getObjects(Vids &ids, VRcomposite &refs) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
size_type addObjects(const Vids &ids, const VRl1etmiss &refs)
void getObjects(Vids &ids, VRelectron &refs, size_type begin, size_type end) const
void addObject(int id, const l1extra::L1EmParticleRef &ref)
void getObjects(int id, VRl1muon &refs) const
void getObjects(Vids &ids, VRjet &refs) const
const VRcomposite & compositeRefs() const
void getObjects(Vids &ids, VRmuon &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRpftau &refs) const
void getObjects(Vids &ids, VRcomposite &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRl1etmiss &refs, size_type begin, size_type end) const
void getObjects(int id, VRcomposite &refs) const
int j
Definition: DBlmapReader.cc:9
size_type photonSize() const
low-level getters for data members
void getObjects(Vids &ids, VRcalomet &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRelectron &refs) const
void getObjects(Vids &ids, VRbasemet &refs) const
void getObjects(int id, VRl1jet &refs) const
#define end
Definition: vmac.h:37
std::vector< l1extra::L1EmParticleRef > VRl1em
void addObject(int id, const l1extra::L1EtMissParticleRef &ref)
void addObject(int id, const reco::ElectronRef &ref)
void getObjects(int id, VRpftau &refs, size_type begin, size_type end) const
void getObjects(int id, VRbasemet &refs, size_type begin, size_type end) const
const VRl1hfrings & l1hfringsRefs() const
void addObject(int id, const reco::IsolatedPixelTrackCandidateRef &ref)
void getObjects(int id, VRl1hfrings &refs, size_type begin, size_type end) const
void addObject(int id, const l1extra::L1MuonParticleRef &ref)
void getObjects(Vids &ids, VRpftau &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRl1hfrings &refs) const
void getObjects(Vids &ids, VRphoton &refs, size_type begin, size_type end) const
void getObjects(int id, VRmuon &refs) const
void getObjects(Vids &ids, VRl1em &refs, size_type begin, size_type end) const
void getObjects(int id, VRl1etmiss &refs, size_type begin, size_type end) const
void swap(TriggerFilterObjectWithRefs &first, TriggerFilterObjectWithRefs &second)
void getObjects(int id, VRpfjet &refs, size_type begin, size_type end) const
const VRl1etmiss & l1etmissRefs() const
std::vector< reco::CaloJetRef > VRjet
size_type addObjects(const Vids &ids, const VRmuon &refs)
std::vector< reco::PFJetRef > VRpfjet
void getObjects(Vids &ids, VRl1muon &refs, size_type begin, size_type end) const
void addObject(int id, const reco::CaloMETRef &ref)
void getObjects(Vids &ids, VRl1hfrings &refs, size_type begin, size_type end) const
void addObject(int id, const reco::PFMETRef &ref)
std::vector< reco::CompositeCandidateRef > VRcomposite
const VRphoton & photonRefs() const
void getObjects(int id, VRcalomet &refs) const
void getObjects(int id, VRjet &refs) const
std::vector< reco::RecoChargedCandidateRef > VRmuon
void addObject(int id, const l1extra::L1HFRingsRef &ref)
size_type addObjects(const Vids &ids, const VRcomposite &refs)
size_type addObjects(const Vids &ids, const VRpftau &refs)
const VRelectron & electronRefs() const
void getObjects(int id, VRl1em &refs, size_type begin, size_type end) const
#define begin
Definition: vmac.h:30
size_type addObjects(const Vids &ids, const VRl1jet &refs)
void getObjects(Vids &ids, VRjet &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRpfmet &refs, size_type begin, size_type end) const
void getObjects(Vids &ids, VRl1muon &refs) const
const VRpixtrack & pixtrackRefs() const
std::vector< reco::ElectronRef > VRelectron
void getObjects(Vids &ids, VRmuon &refs) const
void getObjects(int id, VRphoton &refs) const
std::vector< reco::PFMETRef > VRpfmet
void addObject(int id, const l1extra::L1JetParticleRef &ref)
std::vector< reco::CaloMETRef > VRcalomet
void getObjects(Vids &ids, VRl1jet &refs, size_type begin, size_type end) const
void getObjects(int id, VRjet &refs, size_type begin, size_type end) const
void getObjects(int id, VRpftau &refs) const
std::vector< reco::RecoEcalCandidateRef > VRphoton
std::vector< l1extra::L1JetParticleRef > VRl1jet
std::vector< int > Vids
std::vector< reco::PFTauRef > VRpftau
void getObjects(int id, VRbasemet &refs) const
void addObject(int id, const reco::CaloJetRef &ref)
void getObjects(Vids &ids, VRl1etmiss &refs) const
void getObjects(int id, VRl1etmiss &refs) const