]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMC.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / EVGEN / AliGenMC.h
index a2dd7069db6d8a91a957632f3d43bca02dc3e412..4d147a74eb7ee83b7170f0c920956b7d78f25eb7 100644 (file)
 // decay products and particle selection.
 // andreas.morsch@cern.ch
 
-#include "AliGenerator.h"
-#include "AliDecayer.h"
-#include "AliGeometry.h"
+#include<TClonesArray.h>
 #include <TArrayI.h>   
-#include <TClonesArray.h>
 #include <TString.h>
-
 class TParticle;
 
+class AliGeometry;
+class AliGenEventHeader;
+#include "AliGenerator.h"
+#include "AliDecayer.h"
+
 class AliGenMC : public AliGenerator
 {
  public:
     AliGenMC();
     AliGenMC(Int_t npart);
-    AliGenMC(const AliGenMC &MC);
     virtual ~AliGenMC();
     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;}
+    virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
     virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10)
        {fChildPMin = pmin; fChildPMax = pmax;}
     virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.)
        {fChildPtMin = ptmin; fChildPtMax = ptmax;}
-    virtual void SetChildPhiRange(Float_t phimin = -180., Float_t phimax = 180)
+    virtual void SetChildPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
        {fChildPhiMin = TMath::Pi()*phimin/180;
        fChildPhiMax  = TMath::Pi()*phimax/180;}
     virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180)
@@ -54,11 +53,15 @@ class AliGenMC : public AliGenerator
     virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;}
     
     virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles);
-    virtual void   SetProjectile(TString proj="A", Int_t a=208, Int_t z=82)
+    virtual void   SetProjectile(TString proj="P", Int_t a = 1, Int_t z = 1)
        {fProjectile = proj; fAProjectile = a; fZProjectile = z;}    
-    virtual void   SetTarget(TString tar="A", Int_t a=208, Int_t z=82)
-       {fTarget = tar; fATarget = a; fZTarget = z;}    
-    virtual void Boost(Float_t dy);
+    virtual void   SetTarget(TString tar="P", Int_t a = 1, Int_t z = 1)
+       {fTarget = tar; fATarget = a; fZTarget = z;}
+    virtual void   SetCrossingAngle(Float_t phiX, Float_t phiY) {fXingAngleX = phiX; fXingAngleY = phiY;}
+    virtual void Boost();
+    virtual void SetDyBoost(Double_t dyBoost = 0.) {fDyBoost = dyBoost;}
+    virtual void BeamCrossAngle();
+    virtual void AddHeader(AliGenEventHeader* header);
 
  protected:
     // check if particle is selected as parent particle
@@ -66,38 +69,39 @@ class AliGenMC : public AliGenerator
     // check if particle is selected as child particle
     Bool_t ChildSelected(Int_t ip) const;
     // all kinematic selection cuts go here 
-    Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
+    Bool_t KinematicSelection(const TParticle *particle, Int_t flag) const;
     Int_t  CheckPDGCode(Int_t pdgcode) const;
 
  protected:
-    TClonesArray* fParticles;   //!Particle  List
-    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
-    Float_t     fChildPMin;     // Children minimum p
-    Float_t     fChildPMax;     // Children maximum p
-    Float_t     fChildPhiMin;   // Children minimum phi
-    Float_t     fChildPhiMax;   // Children maximum phi
-    Float_t     fChildThetaMin; // Children minimum theta
-    Float_t     fChildThetaMax; // Children maximum theta
-    Float_t     fChildYMin;     // Children minimum y
-    Float_t     fChildYMax;     // Children maximum y
-    Decay_t     fForceDecay;    // Decay channel forced
-    Float_t     fMaxLifeTime;   // Maximum lifetime for unstable particles
-    Int_t       fAProjectile;   // Projectile A
-    Int_t       fZProjectile;   // Projectile Z
-    Int_t       fATarget;       // Target A
-    Int_t       fZTarget;       // Target Z
-    TString     fProjectile;    // Projectile
-    TString     fTarget;        // Target
-
-    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) 
+    TClonesArray fParticles;     //!Particle  List
+    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
+    Float_t      fChildPMin;     // Children minimum p
+    Float_t      fChildPMax;     // Children maximum p
+    Float_t      fChildPhiMin;   // Children minimum phi
+    Float_t      fChildPhiMax;   // Children maximum phi
+    Float_t      fChildThetaMin; // Children minimum theta
+    Float_t      fChildThetaMax; // Children maximum theta
+    Float_t      fChildYMin;     // Children minimum y
+    Float_t      fChildYMax;     // Children maximum y
+    Float_t      fXingAngleX;    // Crossing angle X
+    Float_t      fXingAngleY;    // Crossing angle Y    
+    Decay_t      fForceDecay;    // Decay channel forced
+    Float_t      fMaxLifeTime;   // Maximum lifetime for unstable particles
+    Double_t     fDyBoost;       // dy for boost into lab frame
+    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) 
+    Int_t        fNprimaries;                 // Number of produced and stored particles
+ private:
+    AliGenMC(const AliGenMC &MC);
+    AliGenMC & operator=(const AliGenMC & rhs);
     
-    ClassDef(AliGenMC,5)       // AliGenerator implementation for generators using MC methods
+    ClassDef(AliGenMC,7)       // AliGenerator implementation for generators using MC methods
 };
 #endif