CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TkLasBeam.h
Go to the documentation of this file.
1 #ifndef DataFormats_Alignment_TkLasBeam_h
2 #define DataFormats_Alignment_TkLasBeam_h
3 
4 #include <vector>
5 #include <cmath>
6 
8 
12 class TkLasBeam {
13 public:
14  typedef std::vector<SiStripLaserRecHit2D>::const_iterator const_iterator;
15 
16  TkLasBeam() {}
17 
18  TkLasBeam(unsigned int aBeamId) { beamId = aBeamId; }
19 
20  virtual ~TkLasBeam() {} // virtual destructor to work as base class
21 
23  unsigned int getBeamId(void) const { return beamId; }
24 
26  const std::vector<SiStripLaserRecHit2D>& getData(void) const { return data; }
27 
29  std::vector<SiStripLaserRecHit2D>::const_iterator begin(void) const { return data.begin(); }
30 
32  std::vector<SiStripLaserRecHit2D>::const_iterator end(void) const { return data.end(); }
33 
35  void push_back(const SiStripLaserRecHit2D& aHit) { data.push_back(aHit); }
36 
38  unsigned int getBeamNumber(void) const { return beamId % 100 / 10; }
39 
41  bool isTecInternal(int side = 0) const;
42 
44  bool isAlignmentTube(void) const { return (beamId % 1000 / 100) == 2; }
45 
47  bool isRing6(void) const { return (beamId % 10) == 1; }
48 
49 private:
50  unsigned int beamId;
51  std::vector<SiStripLaserRecHit2D> data;
52 };
53 
54 // To get the typedef for the collection:
56 
57 #endif
virtual ~TkLasBeam()
Definition: TkLasBeam.h:20
std::vector< SiStripLaserRecHit2D > data
Definition: TkLasBeam.h:51
bool isRing6(void) const
true if this beam hits TEC R6 (last digit of beamId)
Definition: TkLasBeam.h:47
bool isTecInternal(int side=0) const
true if this is a TEC internal beam (from 10^2 digit of beamId). side parameter: -1 = ask if TEC-...
Definition: TkLasBeam.cc:4
TkLasBeam()
Definition: TkLasBeam.h:16
unsigned int getBeamNumber(void) const
returns the beam number (10^1 digit of beamId)
Definition: TkLasBeam.h:38
void push_back(const SiStripLaserRecHit2D &aHit)
insert a hit in the data vector
Definition: TkLasBeam.h:35
unsigned int getBeamId(void) const
return the full beam identifier
Definition: TkLasBeam.h:23
std::vector< SiStripLaserRecHit2D >::const_iterator end(void) const
access iterator to the collection of hits
Definition: TkLasBeam.h:32
std::vector< SiStripLaserRecHit2D >::const_iterator begin(void) const
access iterator to the collection of hits
Definition: TkLasBeam.h:29
TkLasBeam(unsigned int aBeamId)
Definition: TkLasBeam.h:18
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
Definition: TkLasBeam.h:26
unsigned int beamId
Definition: TkLasBeam.h:50
std::vector< SiStripLaserRecHit2D >::const_iterator const_iterator
Definition: TkLasBeam.h:14
bool isAlignmentTube(void) const
true if this is an AT beam (from 10^2 digit of beamId)
Definition: TkLasBeam.h:44