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