CbmRoot
CbmLitPolarizedGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmLitPolarizedGenerator header file -----
3 // ----- Created 11/09/09 by E. Kryshen -----
4 // -------------------------------------------------------------------------
5 
24 #ifndef CBMLITPOLARIZEDGENERATOR_H
25 #define CBMLITPOLARIZEDGENERATOR_H
26 
27 #include "FairGenerator.h"
28 #include "TF1.h"
29 #include "TVector3.h"
30 
31 class FairPrimaryGenerator;
32 
33 class CbmLitPolarizedGenerator : public FairGenerator {
34 public:
35  typedef enum { kNoPol = 0, kColSop = 1, kHelicity = 2 } Frame_t;
36  typedef enum { kDiElectron = 1, kDiMuon = 2 } DecayMode_t;
37 
40 
45  CbmLitPolarizedGenerator(Int_t pdgid, Int_t mult = 1);
46 
49 
50  Bool_t GenerateDaughters(const TVector3 p, FairPrimaryGenerator* primGen);
51 
53  inline void SetPDGType(Int_t pdg) { fPDGType = pdg; };
54  inline void SetMultiplicity(Int_t mult) { fMult = mult; };
55 
56  // Set temperature for transverse momentum distribution in GeV
57  inline void SetDistributionPt(Double_t T = 0.154319, Double_t mass = -1.) {
58  fT = T;
59  fPtDistMass = mass;
60  };
61 
62  // Set rapidity distribution parameters (y0 - mid rapidity, sigma - Gaussian width)
63  inline void SetDistributionY(Double_t y0 = 1.98604,
64  Double_t sigma = 0.617173) {
65  fY0 = y0;
66  fSigma = sigma;
67  };
68 
69  // Set range
70  inline void SetRangePt(Double_t ptMin = 0, Double_t ptMax = 3) {
71  fPtMin = ptMin;
72  fPtMax = ptMax;
73  };
74  inline void SetRangeY(Double_t yMin = 0, Double_t yMax = 4) {
75  fYMin = yMin;
76  fYMax = yMax;
77  };
78 
79  // Set polarization parameter
80  inline void SetAlpha(Double_t alpha = 0) { fAlpha = alpha; }
81 
85  inline void SetRefFrame(Frame_t frame = kColSop) { fFrame = frame; }
86 
88  inline void SetDecayMode(DecayMode_t decayMode = kDiMuon) {
89  fDecayMode = decayMode;
90  }
91 
95  inline void SetBeamMomentum(Double_t mom) { fBeamMomentum = mom; }
96 
100  inline void SetBox(Bool_t box) { fBox = box; }
101 
103  Bool_t Init();
104 
108  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
109 
110 private:
111  Int_t fPDGType;
112  Int_t fMult;
113  Double_t fT;
114  Double_t fPtDistMass;
115  Double_t fY0;
116  Double_t fSigma;
117  Double_t fPtMin;
118  Double_t fPtMax;
119  Double_t fYMin;
120  Double_t fYMax;
121  Double_t fPDGMass;
122  TF1* fDistPt;
123  Double_t fAlpha; //< Polarization parameter in the helicity frame
124  Frame_t fFrame; //< Choice of decay products
125  DecayMode_t fDecayMode; //< Reference system for polarization
126  Double_t fBeamMomentum; //< Beam momentum in lab frame
127  TF1* fPol;
128  Bool_t fBox; // fBox = 1 Box generator, fBox = 0 - termal pt and gaussian y
129 
132 
134 };
135 
136 #endif
CbmLitPolarizedGenerator::fYMin
Double_t fYMin
Max value of Pt.
Definition: CbmLitPolarizedGenerator.h:119
CbmLitPolarizedGenerator::SetDistributionY
void SetDistributionY(Double_t y0=1.98604, Double_t sigma=0.617173)
Definition: CbmLitPolarizedGenerator.h:63
CbmLitPolarizedGenerator::fBeamMomentum
Double_t fBeamMomentum
Definition: CbmLitPolarizedGenerator.h:126
CbmLitPolarizedGenerator::SetPDGType
void SetPDGType(Int_t pdg)
Definition: CbmLitPolarizedGenerator.h:53
CbmLitPolarizedGenerator::fSigma
Double_t fSigma
Simga in the rapidity distribution.
Definition: CbmLitPolarizedGenerator.h:116
CbmLitPolarizedGenerator::GenerateDaughters
Bool_t GenerateDaughters(const TVector3 p, FairPrimaryGenerator *primGen)
Definition: CbmLitPolarizedGenerator.cxx:107
CbmLitPolarizedGenerator::fPDGType
Int_t fPDGType
Particle type (PDG encoding)
Definition: CbmLitPolarizedGenerator.h:111
CbmLitPolarizedGenerator::SetRangeY
void SetRangeY(Double_t yMin=0, Double_t yMax=4)
Definition: CbmLitPolarizedGenerator.h:74
CbmLitPolarizedGenerator::fFrame
Frame_t fFrame
Definition: CbmLitPolarizedGenerator.h:124
CbmLitPolarizedGenerator::fT
Double_t fT
Temperature in the Pt distribution.
Definition: CbmLitPolarizedGenerator.h:113
CbmLitPolarizedGenerator::SetRangePt
void SetRangePt(Double_t ptMin=0, Double_t ptMax=3)
Definition: CbmLitPolarizedGenerator.h:70
CbmLitPolarizedGenerator::fDistPt
TF1 * fDistPt
Definition: CbmLitPolarizedGenerator.h:122
CbmLitPolarizedGenerator::SetDistributionPt
void SetDistributionPt(Double_t T=0.154319, Double_t mass=-1.)
Definition: CbmLitPolarizedGenerator.h:57
CbmLitPolarizedGenerator::fPtMax
Double_t fPtMax
Min value of Pt.
Definition: CbmLitPolarizedGenerator.h:118
CbmLitPolarizedGenerator::SetBeamMomentum
void SetBeamMomentum(Double_t mom)
Definition: CbmLitPolarizedGenerator.h:95
CbmLitPolarizedGenerator::SetAlpha
void SetAlpha(Double_t alpha=0)
Definition: CbmLitPolarizedGenerator.h:80
CbmLitPolarizedGenerator::fMult
Int_t fMult
Multiplicity.
Definition: CbmLitPolarizedGenerator.h:112
CbmLitPolarizedGenerator::fPtDistMass
Double_t fPtDistMass
Mass in Pt distribution.
Definition: CbmLitPolarizedGenerator.h:114
CbmLitPolarizedGenerator::kDiElectron
@ kDiElectron
Definition: CbmLitPolarizedGenerator.h:36
CbmLitPolarizedGenerator::Init
Bool_t Init()
Definition: CbmLitPolarizedGenerator.cxx:51
CbmLitPolarizedGenerator::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: CbmLitPolarizedGenerator.cxx:77
CbmLitPolarizedGenerator::~CbmLitPolarizedGenerator
virtual ~CbmLitPolarizedGenerator()
Definition: CbmLitPolarizedGenerator.h:48
CbmLitPolarizedGenerator::fPtMin
Double_t fPtMin
Max value of Pt.
Definition: CbmLitPolarizedGenerator.h:117
CbmLitPolarizedGenerator::operator=
CbmLitPolarizedGenerator & operator=(const CbmLitPolarizedGenerator &)
CbmLitPolarizedGenerator::SetDecayMode
void SetDecayMode(DecayMode_t decayMode=kDiMuon)
Definition: CbmLitPolarizedGenerator.h:88
CbmLitPolarizedGenerator::kHelicity
@ kHelicity
Definition: CbmLitPolarizedGenerator.h:35
CbmLitPolarizedGenerator::DecayMode_t
DecayMode_t
Definition: CbmLitPolarizedGenerator.h:36
CbmLitPolarizedGenerator::kNoPol
@ kNoPol
Definition: CbmLitPolarizedGenerator.h:35
CbmLitPolarizedGenerator::fPol
TF1 * fPol
Definition: CbmLitPolarizedGenerator.h:127
CbmLitPolarizedGenerator::ClassDef
ClassDef(CbmLitPolarizedGenerator, 1)
CbmLitPolarizedGenerator::fBox
Bool_t fBox
Polarization function.
Definition: CbmLitPolarizedGenerator.h:128
CbmLitPolarizedGenerator
Definition: CbmLitPolarizedGenerator.h:33
CbmLitPolarizedGenerator::SetBox
void SetBox(Bool_t box)
Definition: CbmLitPolarizedGenerator.h:100
CbmLitPolarizedGenerator::kColSop
@ kColSop
Definition: CbmLitPolarizedGenerator.h:35
CbmLitPolarizedGenerator::CbmLitPolarizedGenerator
CbmLitPolarizedGenerator(const CbmLitPolarizedGenerator &)
CbmLitPolarizedGenerator::fPDGMass
Double_t fPDGMass
Particle mass [GeV].
Definition: CbmLitPolarizedGenerator.h:121
CbmLitPolarizedGenerator::fYMax
Double_t fYMax
Min value of Pt.
Definition: CbmLitPolarizedGenerator.h:120
CbmLitPolarizedGenerator::kDiMuon
@ kDiMuon
Definition: CbmLitPolarizedGenerator.h:36
CbmLitPolarizedGenerator::Frame_t
Frame_t
Definition: CbmLitPolarizedGenerator.h:35
CbmLitPolarizedGenerator::fDecayMode
DecayMode_t fDecayMode
Definition: CbmLitPolarizedGenerator.h:125
CbmLitPolarizedGenerator::CbmLitPolarizedGenerator
CbmLitPolarizedGenerator()
Definition: CbmLitPolarizedGenerator.cxx:16
CbmLitPolarizedGenerator::SetMultiplicity
void SetMultiplicity(Int_t mult)
Definition: CbmLitPolarizedGenerator.h:54
CbmLitPolarizedGenerator::fY0
Double_t fY0
Mean rapidity.
Definition: CbmLitPolarizedGenerator.h:115
CbmLitPolarizedGenerator::SetRefFrame
void SetRefFrame(Frame_t frame=kColSop)
Definition: CbmLitPolarizedGenerator.h:85
CbmLitPolarizedGenerator::fAlpha
Double_t fAlpha
Pointer to the Pt function.
Definition: CbmLitPolarizedGenerator.h:123