CMS 3D CMS Logo

G4muDarkBremsstrahlungModel.h
Go to the documentation of this file.
1 
7 #ifndef G4muDarkBremsstrahlungModel_h
8 #define G4muDarkBremsstrahlungModel_h
9 
10 // Geant
11 #include "G4VEmModel.hh"
12 #include "G4Material.hh"
13 #include "G4Element.hh"
14 #include "G4DataVector.hh"
15 #include "G4ParticleChangeForLoss.hh"
16 
17 // ROOT
18 #include "TLorentzVector.h"
19 
20 struct ParamsForChi {
21  double AA;
22  double ZZ;
23  double MMA;
24  double MMu;
25  double EE0;
26 };
27 struct frame {
28  TLorentzVector* fEl;
29  TLorentzVector* cm;
30  G4double E;
31 };
32 
33 class G4Element;
34 class G4ParticleChangeForLoss;
35 
36 class G4muDarkBremsstrahlungModel : public G4VEmModel {
37 public:
38  G4muDarkBremsstrahlungModel(const G4String& scalefile,
39  const G4double biasFactor,
40  const G4ParticleDefinition* p = nullptr,
41  const G4String& nam = "eDBrem");
42 
43  ~G4muDarkBremsstrahlungModel() override;
44 
45  void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
46 
47  G4double ComputeCrossSectionPerAtom(
48  const G4ParticleDefinition*, G4double tkin, G4double Z, G4double, G4double cut, G4double maxE = DBL_MAX) override;
49 
50  G4DataVector* ComputePartialSumSigma(const G4Material* material, G4double tkin, G4double cut);
51 
52  void SampleSecondaries(std::vector<G4DynamicParticle*>*,
53  const G4MaterialCutsCouple*,
54  const G4DynamicParticle*,
55  G4double tmin,
56  G4double maxEnergy) override;
57 
58  void LoadMG();
59 
60  void MakePlaceholders();
61 
62  void SetMethod(std::string);
63 
64  frame GetMadgraphData(double E0);
65  G4muDarkBremsstrahlungModel& operator=(const G4muDarkBremsstrahlungModel& right) = delete;
67 
68 protected:
69  const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple);
70 
71 private:
72  void SetParticle(const G4ParticleDefinition* p);
73 
74  static G4double chi(double t, void* pp);
75 
76  static G4double DsigmaDx(double x, void* pp);
77 
78 protected:
79  const G4String& mgfile;
80  const G4double cxBias;
81  const G4ParticleDefinition* particle;
82  G4ParticleDefinition* theAPrime;
83  G4ParticleChangeForLoss* fParticleChange;
84  G4double MA;
85  G4double muonMass;
86  G4bool isMuon;
87 
88 private:
89  G4double highKinEnergy;
90  G4double lowKinEnergy;
91  G4double probsup;
92  G4bool isInitialised;
94  G4bool mg_loaded;
95  std::map<double, std::vector<frame> > mgdata;
96  std::vector<std::pair<double, int> > energies;
97  std::vector<G4DataVector*> partialSumSigma;
98 };
99 
100 #endif
std::map< double, std::vector< frame > > mgdata
std::vector< std::pair< double, int > > energies
G4ParticleChangeForLoss * fParticleChange
TLorentzVector * cm
TLorentzVector * fEl
std::vector< G4DataVector * > partialSumSigma
const G4ParticleDefinition * particle