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