Fix in documentation
[u/mrichter/AliRoot.git] / EVGEN / AliGenMC.h
CommitLineData
e36044d6 1#ifndef ALIGENMC_H
2#define ALIGENMC_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8
62d0ae06 9// Base class for generators using external MC generators.
10// For example AliGenPythia using Pythia.
11// Provides basic functionality: setting of kinematic cuts on
12// decay products and particle selection.
13// andreas.morsch@cern.ch
14
ac3faee4 15class TClonesArray;
16class TParticle;
3b945a60 17#include <TArrayI.h>
3b945a60 18#include <TString.h>
e36044d6 19
ac3faee4 20class AliGeometry;
d97fb2bb 21class AliGenEventHeader;
22
ac3faee4 23#include "AliDecayer.h"
24#include "AliGenerator.h"
e36044d6 25
26class AliGenMC : public AliGenerator
27{
28 public:
29 AliGenMC();
30 AliGenMC(Int_t npart);
e36044d6 31 virtual ~AliGenMC();
7a5ebd8f 32 virtual void Init();
a0609231 33 virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
93a2041b 34 virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
e36044d6 35 virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10)
36 {fChildPMin = pmin; fChildPMax = pmax;}
37 virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.)
38 {fChildPtMin = ptmin; fChildPtMax = ptmax;}
ab456baa 39 virtual void SetChildPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
e36044d6 40 {fChildPhiMin = TMath::Pi()*phimin/180;
41 fChildPhiMax = TMath::Pi()*phimax/180;}
42 virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180)
43 {fChildThetaMin = TMath::Pi()*thetamin/180;
44 fChildThetaMax = TMath::Pi()*thetamax/180;}
45 virtual void SetChildYRange(Float_t ymin = -12, Float_t ymax = 12)
46 {fChildYMin = ymin;
47 fChildYMax = ymax;}
65de9f86 48 virtual void SetMaximumLifetime(Float_t time = 1.e-15) {fMaxLifeTime = time;}
49
50 virtual void SetGeometryAcceptance(AliGeometry * GeometryAcceptance=0) {fGeometryAcceptance = GeometryAcceptance;}
51
52 virtual void SetPdgCodeParticleforAcceptanceCut(Int_t PdgCodeParticleforAcceptanceCut=0) {fPdgCodeParticleforAcceptanceCut = PdgCodeParticleforAcceptanceCut;}
53
54 virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;}
3b945a60 55
65de9f86 56 virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles);
36d770d9 57 virtual void SetProjectile(TString proj="P", Int_t a = 1, Int_t z = 1)
3b945a60 58 {fProjectile = proj; fAProjectile = a; fZProjectile = z;}
36d770d9 59 virtual void SetTarget(TString tar="P", Int_t a = 1, Int_t z = 1)
1c56e311 60 {fTarget = tar; fATarget = a; fZTarget = z;}
61 virtual void SetCrossingAngle(Float_t phiX, Float_t phiY) {fXingAngleX = phiX; fXingAngleY = phiY;}
36d770d9 62 virtual void Boost();
d97fb2bb 63 virtual void AddHeader(AliGenEventHeader* header);
e36044d6 64 protected:
65 // check if particle is selected as parent particle
62d0ae06 66 Bool_t ParentSelected(Int_t ip) const;
e36044d6 67 // check if particle is selected as child particle
62d0ae06 68 Bool_t ChildSelected(Int_t ip) const;
e36044d6 69 // all kinematic selection cuts go here
62d0ae06 70 Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
71 Int_t CheckPDGCode(Int_t pdgcode) const;
93a2041b 72
e36044d6 73 protected:
3b945a60 74 TClonesArray* fParticles; //!Particle List
fbfe101a 75 TArrayI fParentSelect; //!Parent particles to be selected
76 TArrayI fChildSelect; //!Decay products to be selected
e36044d6 77 Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled
78 Float_t fChildPtMin; // Children minimum pT
79 Float_t fChildPtMax; // Children maximum pT
80 Float_t fChildPMin; // Children minimum p
81 Float_t fChildPMax; // Children maximum p
82 Float_t fChildPhiMin; // Children minimum phi
83 Float_t fChildPhiMax; // Children maximum phi
84 Float_t fChildThetaMin; // Children minimum theta
85 Float_t fChildThetaMax; // Children maximum theta
86 Float_t fChildYMin; // Children minimum y
87 Float_t fChildYMax; // Children maximum y
1c56e311 88 Float_t fXingAngleX; // Crossing angle X
89 Float_t fXingAngleY; // Crossing angle Y
e36044d6 90 Decay_t fForceDecay; // Decay channel forced
47fc6bd5 91 Float_t fMaxLifeTime; // Maximum lifetime for unstable particles
3b945a60 92 Int_t fAProjectile; // Projectile A
93 Int_t fZProjectile; // Projectile Z
94 Int_t fATarget; // Target A
95 Int_t fZTarget; // Target Z
96 TString fProjectile; // Projectile
97 TString fTarget; // Target
36d770d9 98 Double_t fDyBoost; // dy for boost into lab frame
65de9f86 99 AliGeometry * fGeometryAcceptance; // Geometry to which particles must be simulated
100 Int_t fPdgCodeParticleforAcceptanceCut; // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
101 Int_t fNumberOfAcceptedParticles; // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode)
d97fb2bb 102 Int_t fNprimaries; // Number of produced and stored particles
103
93a2041b 104 private:
105 AliGenMC(const AliGenMC &MC);
106 AliGenMC & operator=(const AliGenMC & rhs);
47fc6bd5 107
25c92a35 108 ClassDef(AliGenMC,5) // AliGenerator implementation for generators using MC methods
e36044d6 109};
110#endif
111
112
113
114
115