]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenDeuteron.h
Update z position of ADA (Z=1699.7)
[u/mrichter/AliRoot.git] / EVGEN / AliGenDeuteron.h
1 #ifndef ALIGENDEUTERON_H
2 #define ALIGENDEUTERON_H
3
4
5 /* Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 // Afterburner to simulate coalescence of (anti)nucleons
9 // Author: Eulogio Serradilla <eulogio.serradilla@ciemat.es>
10 //         Arturo Menchaca <menchaca@fisica.unam.mx>
11
12 #include "AliGenerator.h"
13
14
15 class AliGenDeuteron: public AliGenerator
16 {
17
18  public:
19
20         AliGenDeuteron(Int_t sign=1, Double_t pmax=0.1, Double_t rmax=2.1, Int_t cluster=0 );
21         virtual ~AliGenDeuteron();
22
23         virtual void Init();
24         virtual void Generate();
25         
26         Int_t GetSign() const { return fSign;}
27         Double_t GetCoalescenceMomentum() const { return fPmax; }
28         Double_t GetCoalescenceDistance() const { return fRmax; }
29         Double_t GetSpinProbability() const { return fSpinProb; }
30         Double_t GetCoalescenceProbability(const TParticle* nucleon1, const TParticle* nucleon2) const;
31         Int_t GetClusterType() const { return fClusterType; }
32         Int_t GetFreezeOutModel() const { return fModel; }
33         Double_t GetFreezeOutTime() const { return fTimeLength; }
34         
35         void SetSign(Int_t sign) {  fSign = sign > 0 ? 1 : -1;}
36         void SetCoalescenceMomentum(Double_t p) { fPmax = p; }
37         void SetCoalescenceDistance(Double_t r) { fRmax = r; }
38         void SetSpinProbability(Double_t s) { fSpinProb = s; }
39         void SetClusterType(Int_t cluster) { fClusterType = cluster; }
40         void SetFreezeOutModel(Int_t model, Double_t timeLength=2.5) { fModel = model; fTimeLength=timeLength;}
41         
42  public:
43
44         enum { kFirstPartner=0, kLowestMomentum, kLowestDistance, kBoth };
45         enum { kNone=0, kThermal, kExpansion };
46         enum { kCluster=77 };
47         
48  private:
49  
50         AliGenDeuteron(const AliGenDeuteron &other);
51         AliGenDeuteron& operator=(const AliGenDeuteron &other);
52         
53         void FixProductionVertex(class TParticle* i);
54         void FirstPartner(const TList* protons, TList* neutrons);
55         void WeightMatrix(const TList* protons, const TList* neutrons);
56         void PushDeuteron(TParticle* parent1, TParticle* parent2);
57         
58         Double_t GetS(Double_t p1x, Double_t p1y, Double_t p1z, Double_t m1, Double_t p2x, Double_t p2y, Double_t p2z, Double_t m2) const;
59         Double_t GetPcm(Double_t p1x, Double_t p1y, Double_t p1z, Double_t m1, Double_t p2x, Double_t p2y, Double_t p2z, Double_t m2) const;
60         Double_t GetPcm(const TVector3& p1, Double_t m1, const TVector3& p2, Double_t m2) const;
61         
62  private:
63         
64         Int_t fSign;          // +1 for deuterons, -1 for antideuterons
65         Double_t fPmax;       // Maximum p-n momentum difference (GeV/c)
66         Double_t fRmax;       // Maximum p-n distance (fm)
67         Double_t fSpinProb;   // cluster formation probability due to spin
68         Int_t fClusterType;   // Probability criteria to find clusters
69         Int_t fModel;         // Model to override generator source
70         Double_t fTimeLength; // Thermal and chemical freeze-out time (fm/c)
71         Double_t fB;          // Impact parameter (fm)
72         Double_t fR;          // Projectile/Target nuclear radius (fm)
73         Double_t fPsiR;       // Reaction plane angle
74         AliStack* fCurStack;  //! current event stack
75         
76         ClassDef(AliGenDeuteron,2)
77 };
78
79 #endif // ALIGENDEUTERON_H