]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenParam.h
Adding histos for the LEGO train
[u/mrichter/AliRoot.git] / EVGEN / AliGenParam.h
index 8dc757f34b560fb6a83482a526d573e79bfb7954..37a42ad308e75ffadd60bb8ca2f64634ee46fd25 100644 (file)
@@ -6,7 +6,7 @@
 /* $Id$ */
 
 //
-// Class to generate particles from using paramtrized pT and y distributions.
+// Class to generate particles from using parametrized pT and y distributions.
 // Distributions are obtained from pointer to object of type AliGenLib.
 // (For example AliGenMUONlib)
 //
@@ -26,27 +26,32 @@ class AliGenParam : public AliGenMC
 {
  public:
     AliGenParam();
-    AliGenParam(Int_t npart, AliGenLib * Library, Int_t param, char* tname = 0);
-    AliGenParam(Int_t npart, Int_t param, char* tname = 0);
+    AliGenParam(Int_t npart, const AliGenLib * Library, Int_t param,   const char*  tname = 0);
+    AliGenParam(Int_t npart, Int_t param, const char* tname = 0, const char*  name  = 0);
     AliGenParam(Int_t npart, Int_t param,
-               Double_t (*PtPara)(Double_t*, Double_t*),
-               Double_t (*YPara )(Double_t*, Double_t*),
+               Double_t (*PtPara)(const Double_t*, const Double_t*),
+               Double_t (*YPara )(const Double_t*, const Double_t*),
                Int_t    (*IpPara)(TRandom*)           );
-    AliGenParam(const AliGenParam &Param);
      
     virtual ~AliGenParam();
     virtual void Generate();
     virtual void Init();
     // select particle type
     virtual void SetParam(Int_t param) {fParam = param;}
+    //Setting the flag for Background transportation while using SetForceDecay()
+    void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;}
     // force decay type
     virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;}    
     virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;}
-    virtual void Draw();
-    AliGenParam & operator=(const AliGenParam & rhs);
+    virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;}
+    virtual void Draw(const char * opt);
+    TF1 *  GetPt() { return fPtPara;}
+    TF1 *  GetY() {return fYPara;}
+    Float_t GetRelativeArea(Float_t ptMin, Float_t ptMax, Float_t yMin, Float_t yMax, Float_t phiMin, Float_t phiMax);
+
  protected:
-    Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function
-    Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function
+    Double_t (*fPtParaFunc)(const Double_t*, const Double_t*); //! Pointer to Pt parametrisation function
+    Double_t (*fYParaFunc )(const Double_t*, const Double_t*); //! Pointer to Y parametrisation function
     Int_t    (*fIpParaFunc )(TRandom*);    //! Pointer to particle type parametrisation function
     TF1* fPtPara;              // Transverse momentum parameterisation
     TF1* fYPara;               // Rapidity parameterisation
@@ -57,8 +62,14 @@ class AliGenParam : public AliGenMC
     Float_t     fBias;         // Biasing factor
     Int_t       fTrials;       // Number of trials
     Float_t     fDeltaPt;      // pT sampling in steps of fDeltaPt
+    Bool_t      fSelectAll;    // Flag for transportation of Background while using SetForceDecay()
     AliDecayer  *fDecayer;     // ! Pointer to pythia object for decays
-  ClassDef(AliGenParam,1) // Generator using parameterised pt- and y-distribution
+
+ private:
+    AliGenParam(const AliGenParam &Param);
+    AliGenParam & operator=(const AliGenParam & rhs);
+
+    ClassDef(AliGenParam, 2) // Generator using parameterised pt- and y-distribution
 };
 #endif