CMS 3D CMS Logo

CSCGasCollisions.h

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 "Geometry/CSCGeometry/interface/CSCLayer.h"
00016 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00017 #include "SimMuon/CSCDigitizer/src/CSCCrossGap.h"
00018 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00019 #include "CLHEP/Random/RandFlat.h"
00020 #include "CLHEP/Random/RandExponential.h"
00021 
00022 #include <vector>
00023 #include <string>
00024 
00025 class CSCGasCollisions {
00026 public:
00027 
00028    CSCGasCollisions();
00029    virtual ~CSCGasCollisions();
00030 
00031    void setParticleDataTable(const ParticleDataTable * pdt);
00032 
00033    void setRandomEngine(CLHEP::HepRandomEngine & engine);
00034 
00035    void simulate(const PSimHit&, const CSCLayer * layer,
00036       std::vector<LocalPoint>& clusters, std::vector<int>& electrons );
00037 
00038    static const int N_GAMMA = 21;
00039    static const int N_ENERGY = 63;
00040    static const int N_ENTRIES = N_GAMMA*N_ENERGY;
00041    static const int MAX_STEPS = 400;
00042 
00043 private:
00044    void readCollisionTable();
00045    void fillCollisionsForThisGamma( float, std::vector<float>& ) const;
00046    float lnEnergyLoss( float, const std::vector<float>& ) const;
00047    double generateStep( double avCollisions ) const;
00048    float generateEnergyLoss( double avCollisions, 
00049       double anmin, double anmax, const std::vector<float>& collisions ) const;
00050 
00051    void ionize( double energyTransferred, LocalPoint startHere) const;
00052         
00053    void writeSummary( int n_steps, double sum_steps, float dedx ) const;
00054 
00055    const std::string me;       // class name
00056    double gasDensity;     // Density of CSC gas mix
00057    // The question of what is reasonable for deCut is complex. But it seems clear that
00058    // this simulation is not credible if any delta electrons generated here
00059    // have ranges more than a few mm, or equivalently, energies above a few keV.
00060    // deCut = 1000 = 1 keV
00061    // deCut = 10000 = 10 keV
00062    double deCut;          // Delta electron cutoff in eV (Match GEANT!)
00063    double eion;           // ionization threshold (eV) (min. E for ionizatiom)
00064    double ework;          // effective work function (av. energy to create one ion pair)
00065    double clusterExtent;  // Precision of localization of ion clus. Typically 10 microns.
00066 
00067    std::vector<float> theGammaBins;
00068    std::vector<float> theEnergyBins;
00069    std::vector<float> theCollisionTable;
00070 
00071    CSCCrossGap* theCrossGap; // Owned by CSCGasCollisions
00072    const ParticleDataTable * theParticleDataTable;
00073    CLHEP::RandFlat * theRandFlat;
00074    CLHEP::RandExponential * theRandExponential;
00075    bool saveGasCollisions; // Simple Configurable to flag saving info w. debugV
00076 };
00077 
00078 #endif

Generated on Tue Jun 9 17:47:31 2009 for CMSSW by  doxygen 1.5.4