er  dev
ERDecay.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef ERDECAYER_H
9 #define ERDECAYER_H
10 
11 #include "TRandom3.h"
12 #include "TString.h"
13 #include "TGenPhaseSpace.h"
14 #include "TDatabasePDG.h" //for TDatabasePDG
15 #include "TVector3.h"
16 
17 class ERDecay{
18 public:
19  ERDecay(TString name);
20  ~ERDecay();
21  /*Accessors*/
22  TString GetName() const {return fName;}
23 
24  /*Modifiers*/
25 
29  void SetInteractionVolumeName(TString name) {fInteractionVolumeName = name;}
30 
34  void SetNuclearInteractionLength(Double_t lambda) {fNuclearInteractionLength = lambda;}
35 
41  void SetMaxPathLength(Double_t pathLength);
42 
45  TString GetInteractionVolumeName() {return fInteractionVolumeName;}
46 
47  virtual Bool_t Stepping() = 0;
48  virtual void BeginEvent();
49  virtual void FinishEvent();
50  virtual Bool_t Init() = 0;
51 
52 protected:
57  Bool_t FindInteractionPoint();
58  void CalculateTargetParameters();
59 
60  Bool_t fIsInterationPointFound;
61  Double_t fDistanceToInteractPoint;
62  Double_t fDistanceFromEntrance;
63 
64 private:
65  TString fInteractionVolumeName;
66  Double_t fNuclearInteractionLength;
67  Double_t fInteractionProbability;
68  // Double_t fTargetBoundBoxDiagonal;
69  Double_t fNormalizingProbability;
70  TRandom3 *fRnd1;
71  TRandom3 *fRnd2;
72  // ----Old variables and methods ------------------------------------------------
73 protected:
74  TString fName;
75 
76  TRandom3 *fRnd;
77 
78  Bool_t fUniform;
79  Float_t fUniformA;
80  Float_t fUniformB;
81 
82  Bool_t fExponential;
83  Float_t fExponentialStart;
84  Float_t fExponentialTau;
85 
86  TString fVolumeName;
87  Double_t fStep;
88 
89  Double_t fTargetMass;
90 
91  TString fInputIonName;
92  TParticlePDG* fInputIonPDG;
93 
94  Double_t fDecayPosZ;
95  TLorentzVector fDecayPos;
96  Bool_t fDecayFinish;
97 
98  void AddParticleToStack(Int_t pdg, TLorentzVector pos, TLorentzVector state);
99 
100 public:
101 
102  void SetDecayPosZ(Double_t pos) {fDecayPosZ = pos;}
103  void SetInputIon(Int_t A, Int_t Z, Int_t Q);
104  void SetUniformPos(Double_t a, Double_t b);
105  void SetExponentialPos(Double_t start, Double_t tau);
106  void SetDecayVolume(TString name){fVolumeName = name;}
107  void SetStep(Double_t step){fStep = step;}
108  void SetTargetMass(Double_t targetMass){fTargetMass = targetMass;}
109  TString GetName() {return fName;}
110  // ------------------------------------------------------------------------------
111 
112  ClassDef(ERDecay,1)
113 };
114 
115 #endif
TString GetInteractionVolumeName()
Method returns interaction volume name.
Definition: ERDecay.h:45
void SetNuclearInteractionLength(Double_t lambda)
Defines nuclear interaction length.
Definition: ERDecay.h:34
void SetMaxPathLength(Double_t pathLength)
Defines maximum path length for particles in the volume that is defined in SetInteractionVolumeName()...
Definition: ERDecay.cxx:102
void SetInteractionVolumeName(TString name)
Defines name of volume where occures interaction of ion.
Definition: ERDecay.h:29
Bool_t FindInteractionPoint()
Definition: ERDecay.cxx:122