CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
14 public:
15 
16  typedef std::vector<SiStripLaserRecHit2D>::const_iterator const_iterator;
17 
18  TkLasBeam() {}
19 
20  TkLasBeam( unsigned int aBeamId ) { beamId = aBeamId; }
21 
22  virtual ~TkLasBeam() {} // virtual destructor to work as base class
23 
25  unsigned int getBeamId( void ) const { return beamId; }
26 
28  const std::vector<SiStripLaserRecHit2D>& getData( void ) const { return data; }
29 
31  std::vector<SiStripLaserRecHit2D>::const_iterator begin( void ) const { return data.begin(); }
32 
34  std::vector<SiStripLaserRecHit2D>::const_iterator end( void ) const { return data.end(); }
35 
37  void push_back( const SiStripLaserRecHit2D& aHit ) { data.push_back( aHit ); }
38 
40  unsigned int getBeamNumber( void ) const { return beamId%100/10; }
41 
43  bool isTecInternal( int side = 0 ) const;
44 
46  bool isAlignmentTube( void ) const { return ( beamId%1000/100 ) == 2; }
47 
49  bool isRing6( void ) const { return (beamId%10) == 1; }
50 
51 
52 private:
53 
54  unsigned int beamId;
55  std::vector<SiStripLaserRecHit2D> data;
56 
57 };
58 
59 
60 // To get the typedef for the collection:
62 
63 
64 #endif
virtual ~TkLasBeam()
Definition: TkLasBeam.h:22
std::vector< SiStripLaserRecHit2D > data
Definition: TkLasBeam.h:55
bool isRing6(void) const
true if this beam hits TEC R6 (last digit of beamId)
Definition: TkLasBeam.h:49
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:18
unsigned int getBeamNumber(void) const
returns the beam number (10^1 digit of beamId)
Definition: TkLasBeam.h:40
void push_back(const SiStripLaserRecHit2D &aHit)
insert a hit in the data vector
Definition: TkLasBeam.h:37
unsigned int getBeamId(void) const
return the full beam identifier
Definition: TkLasBeam.h:25
std::vector< SiStripLaserRecHit2D >::const_iterator end(void) const
access iterator to the collection of hits
Definition: TkLasBeam.h:34
std::vector< SiStripLaserRecHit2D >::const_iterator begin(void) const
access iterator to the collection of hits
Definition: TkLasBeam.h:31
TkLasBeam(unsigned int aBeamId)
Definition: TkLasBeam.h:20
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
Definition: TkLasBeam.h:28
unsigned int beamId
Definition: TkLasBeam.h:54
std::vector< SiStripLaserRecHit2D >::const_iterator const_iterator
Definition: TkLasBeam.h:16
bool isAlignmentTube(void) const
true if this is an AT beam (from 10^2 digit of beamId)
Definition: TkLasBeam.h:46