fRefVolumeId for reference volume identification added.
[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
e36044d6 15#include "AliGenerator.h"
16#include "AliDecayer.h"
65de9f86 17#include "AliGeometry.h"
3b945a60 18#include <TArrayI.h>
65de9f86 19#include <TClonesArray.h>
3b945a60 20#include <TString.h>
e36044d6 21
22class TParticle;
23
24class AliGenMC : public AliGenerator
25{
26 public:
27 AliGenMC();
28 AliGenMC(Int_t npart);
29 AliGenMC(const AliGenMC &MC);
30 virtual ~AliGenMC();
7a5ebd8f 31 virtual void Init();
a0609231 32 virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
e36044d6 33 AliGenMC & operator=(const AliGenMC & rhs);
34 virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
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;}
39 virtual void SetChildPhiRange(Float_t phimin = -180., Float_t phimax = 180)
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);
3b945a60 57 virtual void SetProjectile(TString proj="A", Int_t a=208, Int_t z=82)
58 {fProjectile = proj; fAProjectile = a; fZProjectile = z;}
59 virtual void SetTarget(TString tar="A", Int_t a=208, Int_t z=82)
60 {fTarget = tar; fATarget = a; fZTarget = z;}
61 virtual void Boost(Float_t dy);
65de9f86 62
e36044d6 63 protected:
64 // check if particle is selected as parent particle
62d0ae06 65 Bool_t ParentSelected(Int_t ip) const;
e36044d6 66 // check if particle is selected as child particle
62d0ae06 67 Bool_t ChildSelected(Int_t ip) const;
e36044d6 68 // all kinematic selection cuts go here
62d0ae06 69 Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
70 Int_t CheckPDGCode(Int_t pdgcode) const;
e36044d6 71
72 protected:
3b945a60 73 TClonesArray* fParticles; //!Particle List
fbfe101a 74 TArrayI fParentSelect; //!Parent particles to be selected
75 TArrayI fChildSelect; //!Decay products to be selected
e36044d6 76 Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled
77 Float_t fChildPtMin; // Children minimum pT
78 Float_t fChildPtMax; // Children maximum pT
79 Float_t fChildPMin; // Children minimum p
80 Float_t fChildPMax; // Children maximum p
81 Float_t fChildPhiMin; // Children minimum phi
82 Float_t fChildPhiMax; // Children maximum phi
83 Float_t fChildThetaMin; // Children minimum theta
84 Float_t fChildThetaMax; // Children maximum theta
85 Float_t fChildYMin; // Children minimum y
86 Float_t fChildYMax; // Children maximum y
87 Decay_t fForceDecay; // Decay channel forced
47fc6bd5 88 Float_t fMaxLifeTime; // Maximum lifetime for unstable particles
3b945a60 89 Int_t fAProjectile; // Projectile A
90 Int_t fZProjectile; // Projectile Z
91 Int_t fATarget; // Target A
92 Int_t fZTarget; // Target Z
93 TString fProjectile; // Projectile
94 TString fTarget; // Target
95
65de9f86 96 AliGeometry * fGeometryAcceptance; // Geometry to which particles must be simulated
97 Int_t fPdgCodeParticleforAcceptanceCut; // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
98 Int_t fNumberOfAcceptedParticles; // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode)
47fc6bd5 99
25c92a35 100 ClassDef(AliGenMC,5) // AliGenerator implementation for generators using MC methods
e36044d6 101};
102#endif
103
104
105
106
107