CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCGasCollisions.h
Go to the documentation of this file.
1 #ifndef MU_END_CSC_GAS_COLLISIONS_H
2 #define MU_END_CSC_GAS_COLLISIONS_H
3 
18 
19 #include <vector>
20 #include <string>
21 
22 namespace CLHEP {
23  class HepRandomEngine;
24 }
25 
27 public:
28 
30  virtual ~CSCGasCollisions();
31 
32  void setParticleDataTable(const ParticleDataTable * pdt);
33 
34  void simulate(const PSimHit&,
35  std::vector<LocalPoint>& clusters, std::vector<int>& electrons, CLHEP::HepRandomEngine* );
36 
37  static const int N_GAMMA = 21;
38  static const int N_ENERGY = 63;
39  static const int N_ENTRIES = N_GAMMA*N_ENERGY;
40  static const int MAX_STEPS = 400;
41 
42 private:
43  void readCollisionTable();
44  void fillCollisionsForThisGamma( float, std::vector<float>& ) const;
45  float lnEnergyLoss( float, const std::vector<float>& ) const;
46  double generateStep( double avCollisions, CLHEP::HepRandomEngine* ) const;
47  float generateEnergyLoss( double avCollisions,
48  double anmin, double anmax, const std::vector<float>& collisions,
49  CLHEP::HepRandomEngine* ) const;
50 
51  void ionize( double energyTransferred, LocalPoint startHere) const;
52 
53  void writeSummary( int n_steps, double sum_steps, float dedx, float simHiteloss ) const;
54 
55  const std::string me; // class name
56  double gasDensity; // Density of CSC gas mix
57  // The question of what is reasonable for deCut is complex. But it seems clear that
58  // this simulation is not credible if any delta electrons generated here
59  // have ranges more than a few mm, or equivalently, energies above a few keV.
60  // deCut = 1000 = 1 keV
61  // deCut = 10000 = 10 keV
62  double deCut; // Delta electron cutoff in eV (Match GEANT!)
63  double eion; // ionization threshold (eV) (min. E for ionizatiom)
64  double ework; // effective work function (av. energy to create one ion pair)
65  double clusterExtent; // Precision of localization of ion clus. Typically 10 microns.
66 
67  std::vector<float> theGammaBins;
68  std::vector<float> theEnergyBins;
69  std::vector<float> theCollisionTable;
70 
71  CSCCrossGap* theCrossGap; // Owned by CSCGasCollisions
73  bool saveGasCollisions; // Simple Configurable to flag saving info w. debugV
74 };
75 
76 #endif
HepPDT::ParticleDataTable ParticleDataTable
static const int N_ENERGY
void writeSummary(int n_steps, double sum_steps, float dedx, float simHiteloss) const
std::vector< float > theGammaBins
const std::string me
float lnEnergyLoss(float, const std::vector< float > &) const
const ParticleDataTable * theParticleDataTable
static const int N_GAMMA
static const int MAX_STEPS
void setParticleDataTable(const ParticleDataTable *pdt)
void ionize(double energyTransferred, LocalPoint startHere) const
static const int N_ENTRIES
std::vector< float > theCollisionTable
double generateStep(double avCollisions, CLHEP::HepRandomEngine *) const
std::vector< float > theEnergyBins
float generateEnergyLoss(double avCollisions, double anmin, double anmax, const std::vector< float > &collisions, CLHEP::HepRandomEngine *) const
void fillCollisionsForThisGamma(float, std::vector< float > &) const
CSCCrossGap * theCrossGap
void simulate(const PSimHit &, std::vector< LocalPoint > &clusters, std::vector< int > &electrons, CLHEP::HepRandomEngine *)
virtual ~CSCGasCollisions()