Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:16

0001 #ifndef MUONBREMSSTRAHLUNGSIMULATOR_H
0002 #define MUONBREMSSTRAHLUNGSIMULATOR_H
0003 
0004 #include "FastSimulation/MaterialEffects/interface/MaterialEffectsSimulator.h"
0005 
0006 /** 
0007  * This class computes the number, energy and angles of Bremsstrahlung 
0008  * photons emitted by electrons and positrons (under the form of a 
0009  * ParticlePropagator, i.e., a RawParticle) in the tracker layer, 
0010  * and returns the RawParticle modified after radiation as well as 
0011  * a list of photons (i.e., a list of RawParticles as well).
0012  * The fraction of radiation lengths traversed by the particle 
0013  * in this tracker layer is determined in MaterialEffectsSimulator.
0014  *
0015  * This version (a la PDG) of a dE/dx generator replaces the buggy 
0016  * GEANT3 Fortran -> C++ former version (up to FAMOS_0_8_0_pre7).
0017  *
0018  * \author Patrick Janot
0019  * $Date: 25-Dec-2003
0020  */
0021 
0022 #include <string>
0023 
0024 class TF1;
0025 
0026 class ParticlePropagator;
0027 class RandomEngineAndDistribution;
0028 
0029 class MuonBremsstrahlungSimulator : public MaterialEffectsSimulator {
0030 public:
0031   /// Constructor
0032   MuonBremsstrahlungSimulator(
0033       double A, double Z, double density, double radLen, double photonEnergyCut, double photonFractECut);
0034 
0035   /// Default destructor
0036   ~MuonBremsstrahlungSimulator() override {}
0037 
0038   // Returns the actual Muon brem Energy
0039   inline const XYZTLorentzVector& deltaP_BremMuon() const { return deltaPMuon; }
0040 
0041   // Returns the actual photon brem Energy
0042   inline const XYZTLorentzVector& deltaP_BremPhoton() const { return brem_photon; }
0043 
0044 private:
0045   TF1* f1;
0046 
0047   int npar;
0048 
0049   /// The minimum photon energy to be radiated, in GeV
0050   double photonEnergy;
0051   double bremProba;
0052   /// The minimum photon fractional energy (wrt that of the electron)
0053   double photonFractE;
0054 
0055   /// The fractional photon energy cut (determined from the above two)
0056   double xmin, xmax, rand;
0057   double d;  //distance
0058 
0059   /// Generate numbers according to a Poisson distribution of mean ymu.
0060   unsigned int poisson(double ymu);
0061 
0062   /// Generate Bremsstrahlung photons
0063   void compute(ParticlePropagator& Particle, RandomEngineAndDistribution const*) override;
0064 
0065   /// Compute Brem photon energy and angles, if any.
0066   XYZTLorentzVector brem(ParticlePropagator& p, RandomEngineAndDistribution const*) const;
0067 
0068   /// A universal angular distribution - still from GEANT.
0069   double gbteth(const double ener, const double partm, const double efrac, RandomEngineAndDistribution const*) const;
0070 
0071   // The actual Muon Brem
0072   XYZTLorentzVector deltaPMuon;
0073   //The photon brem
0074   XYZTLorentzVector brem_photon;
0075 };
0076 #endif