CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/SimMuon/CSCDigitizer/src/CSCCrossGap.h

Go to the documentation of this file.
00001 #ifndef MU_END_CROSS_GAP_H
00002 #define MU_END_CROSS_GAP_H
00003 
00018 #include <vector>
00019 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00020 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00021 
00022 class CSCCrossGap {
00023 public:
00024 
00030   CSCCrossGap(double mass, float mom, LocalVector gap);
00031   ~CSCCrossGap(){};
00032 
00033   std::vector<LocalPoint> ionClusters() const { return clusters; }
00034   int noOfClusters() const { return clusters.size(); }
00035   std::vector<int> electrons() const { return electronsInClusters; }
00036   int noOfElectrons() const { return electronsInClusters.size(); }
00037   std::vector<double> stepLengths() const { return steps; }
00038   int noOfSteps() const { return steps.size(); }
00039   std::vector<float> eLossPerStep() const { return elosses; }
00040   int noOfElosses() const { return elosses.size(); }
00041 
00042   void addCluster(LocalPoint here) { clusters.push_back( here ); }
00043   void addElectrons(int nelec = 1) { electronsInClusters.push_back( nelec ); }
00044   void addElectronToBack() { ++electronsInClusters.back(); }
00045 
00046   void addStep( double step ) { steps.push_back( step ); }
00047   void addEloss( float eloss ) { elosses.push_back( eloss ); }
00048   
00049   double logGamma( double mass, float momentum );
00050   double logGamma(){ return loggam; }
00051   double beta2() const { return theBeta2; }
00052   double gamma() const { return theGamma; }
00053   LocalVector gapVector() const { return theGap; }
00054   LocalVector unitVector() const { return theGap.unit(); }
00055   float length() const { return theGap.mag(); }
00056 
00057 private:
00058 
00059   double theBeta2; // Lorentz beta^2
00060   double theGamma; // Lorentz gamma
00061   double loggam; 
00062   LocalVector theGap;
00063 
00064   std::vector<LocalPoint> clusters;
00065   std::vector<int> electronsInClusters;
00066   std::vector<double> steps;
00067   std::vector<float> elosses;
00068 
00069 };
00070 
00071 #endif