Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-28 07:02:48

0001 /**
0002  \file
0003  Declaration of class Smear::Bremsstrahlung.
0004  
0005  \author    Michael Savastio
0006  \date      2011-08-19
0007  \copyright 2011 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_SMEAR_BREMSSTRAHLUNG_H_
0011 #define INCLUDE_EICSMEAR_SMEAR_BREMSSTRAHLUNG_H_
0012 
0013 #include <memory>
0014 
0015 #include <TF1.h>
0016 
0017 #include "eicsmear/smear/Device.h"
0018 #include "eicsmear/erhic/ParticleMC.h"
0019 #include "eicsmear/smear/ParticleMCS.h"
0020 
0021 namespace erhic {
0022 
0023 class VirtualParticle;
0024 
0025 }  // namespace erhic
0026 
0027 namespace Smear {
0028 
0029 /**
0030  \brief A specialized Device class for modelling radiative losses.
0031  */
0032 struct Bremsstrahlung : public Device {
0033   /**
0034    Constructor.
0035    Photon energies are randomly generated in the range
0036    [epsilon, E - epsilon] for particle energy E.
0037    traversed is the distance of material through with the particle passes
0038    and radLength is the radiation length of that material (both in cm).
0039    */
0040   Bremsstrahlung(double epsilon = 0.01,
0041                  double traversed = 10.,
0042                  double radLength = 47.1);
0043 
0044   /**
0045    Copy constructor
0046    */
0047   Bremsstrahlung(const Bremsstrahlung&);
0048 
0049   /**
0050    Returns a pointer to a duplicate of this object.
0051    */
0052   virtual Bremsstrahlung* Clone(Option_t* option = "not used") const;
0053 
0054   /**
0055    Smear the properties of a Particle and assign them to a ParticleS.
0056    */
0057   virtual void Smear(const erhic::VirtualParticle&, ParticleMCS&);
0058 
0059  protected:
0060 
0061   /**
0062    Returns dSigmga/dK at k = x[0].
0063    The arguments have this form to interface with ROOT::TF1.
0064    The second argument is unused.
0065    */
0066   double dSigmadK(double* x, double*);
0067 
0068   /**
0069    Compute the number of photons emitted.
0070    */
0071   int NGamma();
0072 
0073   void FixParticleKinematics(ParticleMCS&);
0074 
0075   /**
0076    Set the radiating particle type and configure the dSigma/dK
0077    function.
0078    */
0079   void SetParticle(const erhic::VirtualParticle&);
0080 
0081   /**
0082    Configure the dSigma/dK function, setting the energy range over
0083    which to generate photons.
0084    The energy range is computed from the energy of the current mParticle.
0085    If the resultant energy range is invalid (e.g. max < min) the range
0086    is not set and the function returns false.
0087    */
0088   bool SetupPDF();
0089 
0090   std::unique_ptr<erhic::ParticleMC> mParticle;  //! < Copy of the current particle
0091 
0092   double mKMin;
0093   double mKMax;
0094   double mEpsilon;
0095   double mTraversed;
0096   double mRadLength;
0097 
0098   TF1* mPdf;  //! < dSigma/dK function
0099 
0100   ClassDef(Smear::Bremsstrahlung, 1)
0101 };
0102 
0103 }  // namespace Smear
0104 
0105 #endif  // INCLUDE_EICSMEAR_SMEAR_BREMSSTRAHLUNG_H_