CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/Alignment/interface/TkLasBeam.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Alignment_TkLasBeam_h
00002 #define DataFormats_Alignment_TkLasBeam_h
00003 
00004 #include <vector>
00005 #include <cmath>
00006 
00007 #include "DataFormats/Alignment/interface/SiStripLaserRecHit2D.h"
00008 
00012 class TkLasBeam {
00013 
00014 public:
00015 
00016   typedef std::vector<SiStripLaserRecHit2D>::const_iterator const_iterator;
00017 
00018   TkLasBeam() {}
00019 
00020   TkLasBeam( unsigned int aBeamId ) { beamId = aBeamId; }
00021 
00022   virtual ~TkLasBeam() {} // virtual destructor to work as base class
00023   
00025   unsigned int getBeamId( void ) const { return beamId; }
00026 
00028   const std::vector<SiStripLaserRecHit2D>& getData( void ) const { return data; }
00029 
00031   std::vector<SiStripLaserRecHit2D>::const_iterator begin( void ) const { return data.begin(); }
00032 
00034   std::vector<SiStripLaserRecHit2D>::const_iterator end( void ) const { return data.end(); }
00035 
00037   void push_back( const SiStripLaserRecHit2D& aHit ) { data.push_back( aHit ); }
00038 
00040   unsigned int getBeamNumber( void ) const { return beamId%100/10; }
00041   
00043   bool isTecInternal( int side = 0 ) const;
00044  
00046   bool isAlignmentTube( void ) const { return ( beamId%1000/100 ) == 2; }
00047 
00049   bool isRing6( void ) const { return (beamId%10) == 1; }
00050 
00051 
00052 private:
00053 
00054   unsigned int beamId;
00055   std::vector<SiStripLaserRecHit2D> data;
00056 
00057 };
00058 
00059 
00060 // To get the typedef for the collection:
00061 #include "DataFormats/Alignment/interface/TkLasBeamCollectionFwd.h"
00062 
00063 
00064 #endif