]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenDeuteron.h
Adding histos for the LEGO train
[u/mrichter/AliRoot.git] / EVGEN / AliGenDeuteron.h
index 4266ac2536f6d5923c80efd6c34ab17fcf097130..9d974bfe1fedc4e806288c525867a27150ace4f6 100644 (file)
@@ -1,61 +1,78 @@
-#ifndef _ALIGENDEUTERON_H_\r
-#define _ALIGENDEUTERON_H_\r
-\r
-/* Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *\r
- * See cxx source for full Copyright notice                               */\r
-\r
-// Afterburner to simulate coalescence of nucleons\r
-// Author: Eulogio Serradilla <eulogio.serradilla@ciemat.es>\r
-//         Arturo Menchaca <menchaca@fisica.unam.mx>\r
-\r
-#include "AliGenerator.h"\r
-\r
-class AliGenDeuteron: public AliGenerator\r
-{\r
-\r
- public:\r
-\r
-       AliGenDeuteron(Int_t sign=1, Double_t pmax=0.3, Double_t rmax=2.1, Double_t rsrc=1.5, Int_t model=1);\r
-       virtual ~AliGenDeuteron();\r
-\r
-       virtual void Init();\r
-       virtual void Generate();\r
-       \r
-       Double_t GetCoalescenceDistance() const { return fRmax*1.e+13; }\r
-       Double_t GetCoalescenceMomentum() const { return fPmax; }\r
-       Double_t GetSourceRadius() const { return fRsrc*1.e+13; }\r
-       Double_t GetSpinProbability() const { return fSpinProb; }\r
-       Int_t GetFreezeOutModel() const { return fModel; }\r
-       Int_t GetSign() const { return fSign;}\r
-       \r
-       void SetCoalescenceDistance(Double_t r=2.1) { fRmax = r*1.e-13; }\r
-       void SetCoalescenceMomentum(Double_t p=0.3) { fPmax = p; }\r
-       void SetSourceRadius(Double_t r=1.5) { fRsrc = r*1.e-13; }\r
-       void SetSpinProbability(Double_t s=0.75) { fSpinProb = s; }\r
-       void SetFreezeOutModel(Int_t model = kThermal) { fModel = model; }\r
-       void SetSign(Int_t sign) {  fSign = sign > 0 ? 1 : -1;}\r
-       \r
- public:\r
-       enum { kExpansion, kThermal };\r
-       \r
- private:\r
\r
-       AliGenDeuteron(const AliGenDeuteron &other);\r
-       AliGenDeuteron& operator=(const AliGenDeuteron &other);\r
-       \r
-       void FixProductionVertex(class TParticle* i);\r
-       \r
- private:\r
-       \r
-       const Double_t fDeuteronMass; // Deuteron mass\r
-       Double_t fPmax; // Maximum p-n momentum difference (GeV/c)\r
-       Double_t fRmax; // Maximum p-n distance (cm)\r
-       Double_t fRsrc; // Emitting source radius (cm)\r
-       Double_t fSpinProb; // cluster formation probability due to spin\r
-       Int_t fModel;   // How to place the nucleons at freeze-out stage\r
-       Int_t fSign; // +1 for deuteron, -1 for antideuterons\r
-       \r
-       ClassDef(AliGenDeuteron,1)\r
-};\r
-\r
-#endif // _ALIGENDEUTERON_H_\r
+#ifndef ALIGENDEUTERON_H
+#define ALIGENDEUTERON_H
+
+
+/* Copyright(c) 2009-2010, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Afterburner to simulate coalescence of (anti)nucleons
+// Author: Eulogio Serradilla <eulogio.serradilla@ciemat.es>
+//         Arturo Menchaca <menchaca@fisica.unam.mx>
+
+#include "AliGenerator.h"
+
+
+class AliGenDeuteron: public AliGenerator
+{
+
+ public:
+
+       AliGenDeuteron(Int_t sign=1, Double_t pmax=0.3, Double_t rmax=2.1, Int_t cluster=0 );
+       virtual ~AliGenDeuteron();
+
+       virtual void Init();
+       virtual void Generate();
+       
+       Int_t GetSign() const { return fSign;}
+       Double_t GetCoalescenceMomentum() const { return fPmax; }
+       Double_t GetCoalescenceDistance() const { return fRmax; }
+       Double_t GetSpinProbability() const { return fSpinProb; }
+       Double_t GetFreezeOutRadius() const { return fMaxRadius; }
+       Double_t GetCoalescenceProbability(const TParticle* nucleon1, const TParticle* nucleon2) const;
+       Int_t GetClusterType() const { return fClusterType; }
+       Int_t GetFreezeOutModel() const { return fModel; }
+       Double_t GetFreezeOutTime() const { return fTimeLength; }
+       
+       void SetSign(Int_t sign) {  fSign = sign > 0 ? 1 : -1;}
+       void SetCoalescenceMomentum(Double_t p) { fPmax = p; }
+       void SetCoalescenceDistance(Double_t r) { fRmax = r; }
+       void SetSpinProbability(Double_t s) { fSpinProb = s; }
+       void SetFreezeOutRadius(Double_t r) { fMaxRadius = r; }
+       void SetClusterType(Int_t cluster) { fClusterType = cluster; }
+       void SetFreezeOutModel(Int_t model, Double_t timeLength=2.5) { fModel = model; fTimeLength=timeLength;}
+       
+ public:
+
+       enum { kFirstPartner, kLowestMomentum, kLowestDistance, kBoth };
+       enum { kNone, kThermal, kExpansion };
+       
+ private:
+       AliGenDeuteron(const AliGenDeuteron &other);
+       AliGenDeuteron& operator=(const AliGenDeuteron &other);
+       
+       void FixProductionVertex(class TParticle* i);
+       void FirstPartner(const TList* protons, TList* neutrons);
+       void WeightMatrix(const TList* protons, const TList* neutrons);
+       void PushDeuteron(TParticle* parent1, TParticle* parent2);
+       
+ private:
+       
+       Int_t fSign;          // +1 for deuterons, -1 for antideuterons
+       Double_t fPmax;       // Maximum p-n momentum difference (GeV/c)
+       Double_t fRmax;       // Maximum p-n distance (fm)
+       Double_t fSpinProb;   // cluster formation probability due to spin
+       Double_t fMaxRadius;  // Maximum freeze-out radius (fm)
+       Int_t fClusterType;   // Probability criteria to find clusters
+       Int_t fModel;         // Model to override generator source
+       Double_t fTimeLength; // Thermal and chemical freeze-out time (fm/c)
+       Double_t fB;          // Impact parameter (fm)
+       Double_t fR;          // Projectile/Target nuclear radius (fm)
+       Double_t fPsiR;       // Reaction plane angle
+       AliStack* fCurStack;  //! current event stack
+       Int_t fNtrk;          //! number of the stored track
+       
+       ClassDef(AliGenDeuteron,1)
+};
+
+#endif // ALIGENDEUTERON_H