Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:19

0001 /**
0002  * @file G4muDarkBremsstrahlungModel.h
0003  * @brief Class provided to simulate the dark brem cross section and interaction.
0004  * @author Michael Revering, University of Minnesota
0005  */
0006 
0007 #ifndef G4muDarkBremsstrahlungModel_h
0008 #define G4muDarkBremsstrahlungModel_h
0009 
0010 // Geant
0011 #include "G4VEmModel.hh"
0012 #include "G4Material.hh"
0013 #include "G4Element.hh"
0014 #include "G4DataVector.hh"
0015 #include "G4ParticleChangeForLoss.hh"
0016 
0017 // ROOT
0018 #include "TLorentzVector.h"
0019 
0020 struct ParamsForChi {
0021   double AA;
0022   double ZZ;
0023   double MMA;
0024   double MMu;
0025   double EE0;
0026 };
0027 struct frame {
0028   TLorentzVector* fEl;
0029   TLorentzVector* cm;
0030   G4double E;
0031 };
0032 
0033 class G4Element;
0034 class G4ParticleChangeForLoss;
0035 
0036 class G4muDarkBremsstrahlungModel : public G4VEmModel {
0037 public:
0038   G4muDarkBremsstrahlungModel(const G4String& scalefile,
0039                               const G4double biasFactor,
0040                               const G4ParticleDefinition* p = nullptr,
0041                               const G4String& nam = "eDBrem");
0042 
0043   ~G4muDarkBremsstrahlungModel() override;
0044 
0045   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0046 
0047   G4double ComputeCrossSectionPerAtom(
0048       const G4ParticleDefinition*, G4double tkin, G4double Z, G4double, G4double cut, G4double maxE = DBL_MAX) override;
0049 
0050   G4DataVector* ComputePartialSumSigma(const G4Material* material, G4double tkin, G4double cut);
0051 
0052   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0053                          const G4MaterialCutsCouple*,
0054                          const G4DynamicParticle*,
0055                          G4double tmin,
0056                          G4double maxEnergy) override;
0057 
0058   void LoadMG();
0059 
0060   void MakePlaceholders();
0061 
0062   void SetMethod(std::string);
0063 
0064   frame GetMadgraphData(double E0);
0065   G4muDarkBremsstrahlungModel& operator=(const G4muDarkBremsstrahlungModel& right) = delete;
0066   G4muDarkBremsstrahlungModel(const G4muDarkBremsstrahlungModel&) = delete;
0067 
0068 protected:
0069   const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple);
0070 
0071 private:
0072   void SetParticle(const G4ParticleDefinition* p);
0073 
0074   static G4double chi(double t, void* pp);
0075 
0076   static G4double DsigmaDx(double x, void* pp);
0077 
0078 protected:
0079   const G4String& mgfile;
0080   const G4double cxBias;
0081   const G4ParticleDefinition* particle;
0082   G4ParticleDefinition* theAPrime;
0083   G4ParticleChangeForLoss* fParticleChange;
0084   G4double MA;
0085   G4double muonMass;
0086   G4bool isMuon;
0087 
0088 private:
0089   G4double highKinEnergy;
0090   G4double lowKinEnergy;
0091   G4double probsup;
0092   G4bool isInitialised;
0093   std::string method;
0094   G4bool mg_loaded;
0095   std::map<double, std::vector<frame> > mgdata;
0096   std::vector<std::pair<double, int> > energies;
0097   std::vector<G4DataVector*> partialSumSigma;
0098 };
0099 
0100 #endif