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 
19 #include "CLHEP/Random/RandFlat.h"
20 #include "CLHEP/Random/RandExponential.h"
21 
22 #include <vector>
23 #include <string>
24 
26 public:
27 
29  virtual ~CSCGasCollisions();
30 
31  void setParticleDataTable(const ParticleDataTable * pdt);
32 
33  void setRandomEngine(CLHEP::HepRandomEngine & engine);
34 
35  void simulate(const PSimHit&, const CSCLayer * layer,
36  std::vector<LocalPoint>& clusters, std::vector<int>& electrons );
37 
38  static const int N_GAMMA = 21;
39  static const int N_ENERGY = 63;
40  static const int N_ENTRIES = N_GAMMA*N_ENERGY;
41  static const int MAX_STEPS = 400;
42 
43 private:
44  void readCollisionTable();
45  void fillCollisionsForThisGamma( float, std::vector<float>& ) const;
46  float lnEnergyLoss( float, const std::vector<float>& ) const;
47  double generateStep( double avCollisions ) const;
48  float generateEnergyLoss( double avCollisions,
49  double anmin, double anmax, const std::vector<float>& collisions ) const;
50 
51  void ionize( double energyTransferred, LocalPoint startHere) const;
52 
53  void writeSummary( int n_steps, double sum_steps, float dedx ) 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  CLHEP::RandFlat * theRandFlat;
74  CLHEP::RandExponential * theRandExponential;
75  bool saveGasCollisions; // Simple Configurable to flag saving info w. debugV
76 };
77 
78 #endif
HepPDT::ParticleDataTable ParticleDataTable
static const int N_ENERGY
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
void simulate(const PSimHit &, const CSCLayer *layer, std::vector< LocalPoint > &clusters, std::vector< int > &electrons)
CLHEP::RandExponential * theRandExponential
std::vector< float > theCollisionTable
double generateStep(double avCollisions) const
std::vector< float > theEnergyBins
float generateEnergyLoss(double avCollisions, double anmin, double anmax, const std::vector< float > &collisions) const
void fillCollisionsForThisGamma(float, std::vector< float > &) const
CSCCrossGap * theCrossGap
virtual ~CSCGasCollisions()
void writeSummary(int n_steps, double sum_steps, float dedx) const
CLHEP::RandFlat * theRandFlat
void setRandomEngine(CLHEP::HepRandomEngine &engine)