]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TUHKMgen/TUHKMgen.h
Adding the possibility not to follow particle mothers during StepManager (default...
[u/mrichter/AliRoot.git] / TUHKMgen / TUHKMgen.h
index 4f84384c19d62c532c50b468b8799cb3364f3130..0d6405f41217b797a31eb2862bb7c231e75efb9a 100755 (executable)
@@ -10,7 +10,7 @@
 #include "TGenerator.h"
 #endif
 
-#ifndef INITIALSTATEHYDJET_INCLUDED
+#ifndef INITIALSTATEHYDJET_H
 #include "UHKM/InitialStateHydjet.h"
 #endif
 
@@ -24,32 +24,7 @@ using namespace std;
 //class DatabasePDG;
 
 class TUHKMgen : public TGenerator {
- 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 fSourceList;             // list holding the initial particles generated by both soft and hard model components  
-  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&);
-
  public:   
   TUHKMgen();
   virtual      ~TUHKMgen();
@@ -59,7 +34,8 @@ class TUHKMgen : public TGenerator {
   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();
@@ -131,8 +107,8 @@ class TUHKMgen : public TGenerator {
                                   // gluons (0: small-angular, 1: wide-angular, 2:collinear) (default: 0).
   
  
-  void SetPDGParticleFile(const Char_t *name)              {strcpy(fParticleFilename, name);}     // Set the filename containing the particle PDG info
-  void SetPDGDecayFile(const 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;
@@ -187,6 +163,31 @@ class TUHKMgen : public TGenerator {
   
   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