]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMC.h
Information about trigger jets added.
[u/mrichter/AliRoot.git] / EVGEN / AliGenMC.h
index 9019a35d060d1ae1a2539830f7002466b344da62..7c2fed57871c53fd89794b4bb6a48218c40a4cad 100644 (file)
@@ -6,9 +6,17 @@
 /* $Id$ */
 
 
+// Base class for generators using external MC generators.
+// For example AliGenPythia using Pythia.
+// Provides basic functionality: setting of kinematic cuts on 
+// decay products and particle selection.
+// andreas.morsch@cern.ch
+
 #include "AliGenerator.h"
 #include "AliDecayer.h"
+#include "AliGeometry.h"
 #include <TArrayI.h>    
+#include <TClonesArray.h>
 
 class TParticle;
 
@@ -19,7 +27,7 @@ class AliGenMC : public AliGenerator
     AliGenMC(Int_t npart);
     AliGenMC(const AliGenMC &MC);
     virtual ~AliGenMC();
-    void Init();
+    virtual void Init();
     virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
     AliGenMC & operator=(const AliGenMC & rhs);
         virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
@@ -36,21 +44,28 @@ class AliGenMC : public AliGenerator
     virtual void SetChildYRange(Float_t ymin = -12, Float_t ymax = 12)
        {fChildYMin = ymin;
        fChildYMax  = ymax;}
-    virtual void    SetCutVertexZ(Float_t cut=999999.) {fCutVertexZ = cut;}
+    virtual void SetMaximumLifetime(Float_t time = 1.e-15) {fMaxLifeTime = time;}
+   
+    virtual void SetGeometryAcceptance(AliGeometry * GeometryAcceptance=0) {fGeometryAcceptance = GeometryAcceptance;}
+
+    virtual void SetPdgCodeParticleforAcceptanceCut(Int_t PdgCodeParticleforAcceptanceCut=0) {fPdgCodeParticleforAcceptanceCut = PdgCodeParticleforAcceptanceCut;}
+
+    virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;}
 
+    virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles);
 
  protected:
     // check if particle is selected as parent particle
-    Bool_t ParentSelected(Int_t ip);
+    Bool_t ParentSelected(Int_t ip) const;
     // check if particle is selected as child particle
-    Bool_t ChildSelected(Int_t ip);
+    Bool_t ChildSelected(Int_t ip) const;
     // all kinematic selection cuts go here 
-    Bool_t KinematicSelection(TParticle *particle, Int_t flag);
-    Int_t  CheckPDGCode(Int_t pdgcode);
+    Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
+    Int_t  CheckPDGCode(Int_t pdgcode) const;
 
  protected:
-    TArrayI     fParentSelect;  // Parent particles to be selected 
-    TArrayI     fChildSelect;   // Decay products to be selected
+    TArrayI     fParentSelect;  //!Parent particles to be selected 
+    TArrayI     fChildSelect;   //!Decay products to be selected
     Int_t       fCutOnChild;    // Cuts on decay products (children)  are enabled/disabled
     Float_t     fChildPtMin;    // Children minimum pT
     Float_t     fChildPtMax;    // Children maximum pT
@@ -63,10 +78,12 @@ class AliGenMC : public AliGenerator
     Float_t     fChildYMin;     // Children minimum y
     Float_t     fChildYMax;     // Children maximum y
     Decay_t     fForceDecay;    // Decay channel forced
-    TArrayF     fEventVertex;   //!The current event vertex
-    Float_t     fCutVertexZ;    // Vertex cut in units of sigma_z
-       
-    ClassDef(AliGenMC,1)       // AliGenerator implementation for generators using MC methods
+    Float_t     fMaxLifeTime;   // Maximum lifetime for unstable particles
+    AliGeometry * fGeometryAcceptance; // Geometry to which particles must be simulated
+    Int_t       fPdgCodeParticleforAcceptanceCut;  // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
+    Int_t       fNumberOfAcceptedParticles;  // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode) 
+    
+    ClassDef(AliGenMC,5)       // AliGenerator implementation for generators using MC methods
 };
 #endif