]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TUHKMgen/TUHKMgen.h
added efficiency task for Balance Function (ESD-MC analyis), added V0 analysis for...
[u/mrichter/AliRoot.git] / TUHKMgen / TUHKMgen.h
index 503daf0aa4bf5bc6285acd1dbd416339e943f8bd..0d6405f41217b797a31eb2862bb7c231e75efb9a 100755 (executable)
@@ -1,60 +1,41 @@
-// This class implements the FASTMC generator model into AliROOT.
-// For the aliroot implementation we make use only of the Bjorken-like
-// initial state.
+// This class provides an interface between the HYDJET++ Monte-Carlo model
+// and ROOT (by inheriting from the TGenerator class).
 // Please look into the FASTMC articles for more documentation on the 
 // needed parameters.
 
-#ifndef TUHKMgen_H
-#define TUHKMgen_H
+#ifndef TUHKMGEN_H
+#define TUHKMGEN_H
 
 #ifndef ROOT_TGenerator
 #include "TGenerator.h"
 #endif
 
-#ifndef INITIALSTATEHYDJET_INCLUDED
-#include "InitialStateHydjet.h"
+#ifndef INITIALSTATEHYDJET_H
+#include "UHKM/InitialStateHydjet.h"
 #endif
 
 #ifndef DATABASE_PDG
-#include "DatabasePDG.h"
+#include "UHKM/DatabasePDG.h"
 #endif
 
 #include <string>
 using namespace std;
 
-class TUHKMgen : public TGenerator {
- protected:
-  InitialStateHydjet *fInitialState;
-  ParticleAllocator fAllocator;
-  List_t fSourceList;
-  List_t fSecondariesList;
-  Int_t  fNPprim;
-  Int_t  fNPsec;
-  InitialParamsHydjet_t fHydjetParams;       // list of parameters for the initial state
-  // details for the PDG database
-  Char_t fParticleFilename[256];               // particle list filename
-  Char_t fDecayFilename[256];                  // decay table filename
-  Int_t fStableFlagPDG[500];                   // array of PDG codes flagged to be stable
-  Bool_t fStableFlagStatus[500];               // array of decay flag status
-  Int_t fStableFlagged;                        // number of toggled decay flags
-  Bool_t fUseCharmParticles;                   // flag to turn on/off the use of charm particles
-  Double_t fMinWidth;                          // minimum decay width for the particles to be used from the PDG database
-  Double_t fMaxWidth;                          // maximum ----
-  Double_t fMinMass;                           // minimum mass for the particles to be used from the PDG database
-  Double_t fMaxMass;                           // maximum ----
-
-  void SetAllParameters();
+//class DatabasePDG;
 
+class TUHKMgen : public TGenerator {
  public:   
   TUHKMgen();
   virtual      ~TUHKMgen();
   virtual void  Initialize();
   virtual void  GenerateEvent();
-  virtual Int_t ImportParticles(TClonesArray *particles,Option_t* option="prim");
-  virtual TObjArray* ImportParticles(Option_t* option="prim");
+  virtual Int_t ImportParticles(TClonesArray *particles, const Option_t* option="prim");
+  virtual TObjArray* ImportParticles(const Option_t* option="prim");
   // this function makes available the PDG info in our database 
   virtual DatabasePDG* PDGInfo() const {return fInitialState->PDGInfo();}
-
+  virtual void GetCentrality(Double_t& b, Double_t & npart, Double_t & nbin)
+      {fInitialState->GetCentrality(b, npart, nbin);}
   // Setters
   // set reasonable default parameters suited for central Au+Au collisions at RHIC(200GeV)
   void SetAllParametersRHIC();
@@ -91,7 +72,7 @@ class TUHKMgen : public TGenerator {
   void SetCoordAsymmPar(Double_t value)    {fHydjetParams.fEpsilon = value;}        // Coordinate asymmetry parameter
 
 
-  void SetFlagWeakDecay(Int_t value)    {fHydjetParams.fWeakDecay = value;} //flag to switch on/off weak hadron decays <0: decays off, >0: decays on, (default: 0)
+  void SetFlagWeakDecay(Double_t value)    {fHydjetParams.fWeakDecay = value;} //flag to switch on/off weak hadron decays <0: decays off, >0: decays on, (default: 0)
 
 
   void SetEtaType(Int_t value)    {fHydjetParams.fEtaType = value;}     // flag to choose rapidity distribution, if fEtaType<=0, 
@@ -126,62 +107,87 @@ class TUHKMgen : public TGenerator {
                                   // gluons (0: small-angular, 1: wide-angular, 2:collinear) (default: 0).
   
  
-  void SetPDGParticleFile(Char_t *name)              {strcpy(fParticleFilename, name);}     // Set the filename containing the particle PDG info
-  void SetPDGDecayFile(Char_t *name)                 {strcpy(fDecayFilename, name);}        // Set the filename containing the PDG decay channels info
+  void SetPDGParticleFile(const Char_t *name)   {strncpy(fParticleFilename, name, 255);}     // Set the filename containing the particle PDG info
+  void SetPDGDecayFile(const Char_t *name) {strncpy(fDecayFilename, name, 255);}        // Set the filename containing the PDG decay channels info
   void SetPDGParticleStable(Int_t pdg, Bool_t value) {                                      // Turn on/off the decay flag for a PDG particle
     fStableFlagPDG[fStableFlagged] = pdg;
     fStableFlagStatus[fStableFlagged++] = value;
   } 
-  void SetUseCharmParticles(Bool_t flag) {fUseCharmParticles = flag;}
-  void SetMinimumWidth(Double_t value) {fMinWidth = value;}
-  void SetMaximumWidth(Double_t value) {fMaxWidth = value;}
-  void SetMinimumMass(Double_t value) {fMinMass = value;}
-  void SetMaximumMass(Double_t value) {fMaxMass = value;}
+  //  void SetUseCharmParticles(Bool_t flag) {fUseCharmParticles = flag;}
+  //  void SetMinimumWidth(Double_t value) {fMinWidth = value;}
+  //  void SetMaximumWidth(Double_t value) {fMaxWidth = value;}
+  //  void SetMinimumMass(Double_t value) {fMinMass = value;}
+  //  void SetMaximumMass(Double_t value) {fMaxMass = value;}
 
   //Getters
    
-  Double_t GetEcms()             {return fHydjetParams.fSqrtS;}          
-  Double_t GetAw()               {return fHydjetParams.fAw;}        
-  Double_t GetIfb()              {return fHydjetParams.fIfb;}
-  Double_t GetBfix()             {return fHydjetParams.fBfix;}       
-  Double_t GetBmin()             {return fHydjetParams.fBmin;}       
-  Double_t GetBmax()             {return fHydjetParams.fBmax;}       
-  Double_t GetChFrzTemperature() {return fHydjetParams.fT;} 
-  Double_t GetMuB()              {return fHydjetParams.fMuB;}
-  Double_t GetMuS()              {return fHydjetParams.fMuS;}
-  Double_t GetMuQ()              {return fHydjetParams.fMuI3;}
-  Double_t GetThFrzTemperature() {return fHydjetParams.fThFO;}
-  Double_t GetMuPionThermal()    {return fHydjetParams.fMu_th_pip;}
-  Int_t    GetSeed()             {return fHydjetParams.fSeed;}  
-  Double_t GetTauB()             {return fHydjetParams.fTau;}
-  Double_t GetSigmaTau()         {return fHydjetParams.fSigmaTau;}
-  Double_t GetRmaxB()            {return fHydjetParams.fR;}
-  Double_t GetYlMax()            {return fHydjetParams.fYlmax;}
-  Double_t GetEtaRMax()          {return fHydjetParams.fUmax;}
-  Double_t GetMomAsymmPar()      {return fHydjetParams.fDelta;}
-  Double_t GetCoordAsymmPar()    {return fHydjetParams.fEpsilon;}
-  Int_t GetFlagWeakDecay()       {return fHydjetParams.fWeakDecay;} 
-  Int_t GetEtaType()          {return fHydjetParams.fEtaType;}
-  Double_t GetGammaS()           {return fHydjetParams.fCorrS;}  
-  Int_t    GetPyquenNhsel()      {return fHydjetParams.fNhsel;}
-  Int_t    GetPyquenShad()       {return fHydjetParams.fIshad;}
-  Double_t GetPyquenPtmin()      {return fHydjetParams.fPtmin;}
-  Double_t GetPyquenT0()         {return fHydjetParams.fT0;}
-  Double_t GetPyquenTau0()       {return fHydjetParams.fTau0;}
-  Double_t GetPyquenNf()         {return fHydjetParams.fNf;}      
-  Double_t GetPyquenIenglu()     {return fHydjetParams.fIenglu;}     
-  Double_t GetPyquenIanglu()     {return fHydjetParams.fIanglu;}  
+  Double_t GetEcms() const             {return fHydjetParams.fSqrtS;}          
+  Double_t GetAw() const               {return fHydjetParams.fAw;}        
+  Double_t GetIfb() const              {return fHydjetParams.fIfb;}
+  Double_t GetBfix() const             {return fHydjetParams.fBfix;}       
+  Double_t GetBmin() const             {return fHydjetParams.fBmin;}       
+  Double_t GetBmax() const             {return fHydjetParams.fBmax;}       
+  Double_t GetChFrzTemperature() const {return fHydjetParams.fT;} 
+  Double_t GetMuB() const              {return fHydjetParams.fMuB;}
+  Double_t GetMuS() const              {return fHydjetParams.fMuS;}
+  Double_t GetMuQ() const              {return fHydjetParams.fMuI3;}
+  Double_t GetThFrzTemperature() const {return fHydjetParams.fThFO;}
+  Double_t GetMuPionThermal() const    {return fHydjetParams.fMu_th_pip;}
+  Int_t    GetSeed() const             {return fHydjetParams.fSeed;}  
+  Double_t GetTauB() const             {return fHydjetParams.fTau;}
+  Double_t GetSigmaTau() const         {return fHydjetParams.fSigmaTau;}
+  Double_t GetRmaxB() const            {return fHydjetParams.fR;}
+  Double_t GetYlMax() const            {return fHydjetParams.fYlmax;}
+  Double_t GetEtaRMax() const          {return fHydjetParams.fUmax;}
+  Double_t GetMomAsymmPar() const      {return fHydjetParams.fDelta;}
+  Double_t GetCoordAsymmPar() const    {return fHydjetParams.fEpsilon;}
+  Double_t GetFlagWeakDecay() const    {return fHydjetParams.fWeakDecay;} 
+  Int_t GetEtaType() const             {return fHydjetParams.fEtaType;}
+  Double_t GetGammaS() const           {return fHydjetParams.fCorrS;}  
+  Int_t    GetPyquenNhsel() const      {return fHydjetParams.fNhsel;}
+  Int_t    GetPyquenShad() const       {return fHydjetParams.fIshad;}
+  Double_t GetPyquenPtmin() const      {return fHydjetParams.fPtmin;}
+  Double_t GetPyquenT0() const         {return fHydjetParams.fT0;}
+  Double_t GetPyquenTau0() const       {return fHydjetParams.fTau0;}
+  Double_t GetPyquenNf() const         {return fHydjetParams.fNf;}      
+  Double_t GetPyquenIenglu() const     {return fHydjetParams.fIenglu;}     
+  Double_t GetPyquenIanglu() const     {return fHydjetParams.fIanglu;}  
   
-  Char_t*  GetPDGParticleFile()  {return fParticleFilename;}
-  Char_t*  GetPDGDecayFile()     {return fDecayFilename;}
-  Bool_t   GetUseCharmParticles(){return fUseCharmParticles;}
-  Double_t GetMinimumWidth()     {return fMinWidth;}
-  Double_t GetMaximumWidth()     {return fMaxWidth;}
-  Double_t GetMinimumMass()      {return fMinMass;}
-  Double_t GetMaximumMass()      {return fMaxMass;}
+  const Char_t*  GetPDGParticleFile() const  {return fParticleFilename;}
+  const Char_t*  GetPDGDecayFile() const     {return fDecayFilename;}
+  //  Bool_t   GetUseCharmParticles(){return fUseCharmParticles;}
+  //  Double_t GetMinimumWidth()     {return fMinWidth;}
+  //  Double_t GetMaximumWidth()     {return fMaxWidth;}
+  //  Double_t GetMinimumMass()      {return fMinMass;}
+  //  Double_t GetMaximumMass()      {return fMaxMass;}
   
-  void Print();
+  void Print(const Option_t* opt="") const;
+
+ protected:
+  InitialStateHydjet *fInitialState;     // HYDJET++ main class which handles the entire Monte-Carlo simulation
+  ParticleAllocator fAllocator;       // object which allocates/deallocates memory for the lists of particles
+  List_t fSecondariesList; // list holding the initial particles and the final state particles generated in resonance decays
+  Int_t  fNPprim;          // number of primary particles
+  Int_t  fNPsec;           // secondary particles
+  InitialParamsHydjet_t fHydjetParams;  // struct holding the list of parameters for the initial state
+  // details for the PDG database
+  Char_t fParticleFilename[256];               // particle list filename
+  Char_t fDecayFilename[256];                  // decay table filename
+  Int_t fStableFlagPDG[500];                   // array of PDG codes flagged to be stable
+  Bool_t fStableFlagStatus[500];               // array of decay flag status
+  Int_t fStableFlagged;                        // number of toggled decay flags
+  //  Bool_t fUseCharmParticles;               // flag to turn on/off the use of charm particles
+  //  Double_t fMinWidth;                      // minimum decay width for the particles to be used from the PDG database
+  //  Double_t fMaxWidth;                          // maximum ----
+  //  Double_t fMinMass;                           // minimum mass for the particles to be used from the PDG database
+  //  Double_t fMaxMass;                           // maximum ----
 
+  void SetAllParameters();
+
+ private:
+  TUHKMgen(const TUHKMgen&);
+  TUHKMgen& operator=(const TUHKMgen&);
+  
   ClassDef(TUHKMgen, 3)  //Interface to FASTMC Event Generator
 };
 #endif