Go to the documentation of this file.00001 #ifndef MU_END_CSC_GAS_COLLISIONS_H
00002 #define MU_END_CSC_GAS_COLLISIONS_H
00003
00014 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00015 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00016 #include "SimMuon/CSCDigitizer/src/CSCCrossGap.h"
00017 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00018 #include "CLHEP/Random/RandFlat.h"
00019 #include "CLHEP/Random/RandExponential.h"
00020
00021 #include <vector>
00022 #include <string>
00023
00024 class CSCGasCollisions {
00025 public:
00026
00027 CSCGasCollisions();
00028 virtual ~CSCGasCollisions();
00029
00030 void setParticleDataTable(const ParticleDataTable * pdt);
00031
00032 void setRandomEngine(CLHEP::HepRandomEngine & engine);
00033
00034 void simulate(const PSimHit&,
00035 std::vector<LocalPoint>& clusters, std::vector<int>& electrons );
00036
00037 static const int N_GAMMA = 21;
00038 static const int N_ENERGY = 63;
00039 static const int N_ENTRIES = N_GAMMA*N_ENERGY;
00040 static const int MAX_STEPS = 400;
00041
00042 private:
00043 void readCollisionTable();
00044 void fillCollisionsForThisGamma( float, std::vector<float>& ) const;
00045 float lnEnergyLoss( float, const std::vector<float>& ) const;
00046 double generateStep( double avCollisions ) const;
00047 float generateEnergyLoss( double avCollisions,
00048 double anmin, double anmax, const std::vector<float>& collisions ) const;
00049
00050 void ionize( double energyTransferred, LocalPoint startHere) const;
00051
00052 void writeSummary( int n_steps, double sum_steps, float dedx, float simHiteloss ) const;
00053
00054 const std::string me;
00055 double gasDensity;
00056
00057
00058
00059
00060
00061 double deCut;
00062 double eion;
00063 double ework;
00064 double clusterExtent;
00065
00066 std::vector<float> theGammaBins;
00067 std::vector<float> theEnergyBins;
00068 std::vector<float> theCollisionTable;
00069
00070 CSCCrossGap* theCrossGap;
00071 const ParticleDataTable * theParticleDataTable;
00072 CLHEP::RandFlat * theRandFlat;
00073 CLHEP::RandExponential * theRandExponential;
00074 bool saveGasCollisions;
00075 };
00076
00077 #endif