CMS 3D CMS Logo

SeedingHitSet.h
Go to the documentation of this file.
1 #ifndef TkSeedingLayers_SeedingHitSet_H
2 #define TkSeedingLayers_SeedingHitSet_H
3 
5 
6 class SeedingHitSet {
7 public:
11 
12  static ConstRecHitPointer nullPtr() { return nullptr; }
13 
14  SeedingHitSet() { theRecHits[0] = theRecHits[1] = theRecHits[2] = theRecHits[3] = nullptr; }
15 
17  // : theRecHits{{one,two,ConstRecHitPointer()}}
18  {
19  theRecHits[0] = one;
20  theRecHits[1] = two;
21  theRecHits[2] = theRecHits[3] = nullptr;
22  }
24  // : theRecHits{{one,two,three}},
25  {
26  theRecHits[0] = one;
27  theRecHits[1] = two;
28  theRecHits[2] = three;
29  theRecHits[3] = nullptr;
30  }
31 
33  theRecHits[0] = one;
34  theRecHits[1] = two;
35  theRecHits[2] = three;
36  theRecHits[3] = four;
37  }
38 
39  ConstRecHitPointer const *data() const { return theRecHits; }
40 
41  unsigned int size() const { return theRecHits[3] ? 4 : (theRecHits[2] ? 3 : (theRecHits[1] ? 2 : 0)); }
42 
43  ConstRecHitPointer get(unsigned int i) const { return theRecHits[i]; }
44  ConstRecHitPointer operator[](unsigned int i) const { return theRecHits[i]; }
45 
46 private:
48 };
49 
50 #endif
SeedingHitSet::SeedingHitSet
SeedingHitSet(ConstRecHitPointer one, ConstRecHitPointer two)
Definition: SeedingHitSet.h:16
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
SeedingHitSet
Definition: SeedingHitSet.h:6
SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
SeedingHitSet::data
const ConstRecHitPointer * data() const
Definition: SeedingHitSet.h:39
SeedingHitSet::get
ConstRecHitPointer get(unsigned int i) const
Definition: SeedingHitSet.h:43
BaseTrackerRecHit
Definition: BaseTrackerRecHit.h:15
SeedingHitSet::theRecHits
ConstRecHitPointer theRecHits[4]
Definition: SeedingHitSet.h:47
SeedingHitSet::nullPtr
static ConstRecHitPointer nullPtr()
Definition: SeedingHitSet.h:12
SeedingHitSet::operator[]
ConstRecHitPointer operator[](unsigned int i) const
Definition: SeedingHitSet.h:44
SeedingHitSet::SeedingHitSet
SeedingHitSet(ConstRecHitPointer one, ConstRecHitPointer two, ConstRecHitPointer three, ConstRecHitPointer four)
Definition: SeedingHitSet.h:32
BaseTrackerRecHit.h
SeedingHitSet::SeedingHitSet
SeedingHitSet()
Definition: SeedingHitSet.h:14
SiPixelPI::two
Definition: SiPixelPayloadInspectorHelper.h:39
SeedingHitSet::size
unsigned int size() const
Definition: SeedingHitSet.h:41
SeedingHitSet::SeedingHitSet
SeedingHitSet(ConstRecHitPointer one, ConstRecHitPointer two, ConstRecHitPointer three)
Definition: SeedingHitSet.h:23