Boost for assymmetric systems 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"
e36044d6 18#include <TArrayI.h>
65de9f86 19#include <TClonesArray.h>
e36044d6 20
21class TParticle;
22
23class AliGenMC : public AliGenerator
24{
25 public:
26 AliGenMC();
27 AliGenMC(Int_t npart);
28 AliGenMC(const AliGenMC &MC);
29 virtual ~AliGenMC();
7a5ebd8f 30 virtual void Init();
a0609231 31 virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
e36044d6 32 AliGenMC & operator=(const AliGenMC & rhs);
33 virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
34 virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10)
35 {fChildPMin = pmin; fChildPMax = pmax;}
36 virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.)
37 {fChildPtMin = ptmin; fChildPtMax = ptmax;}
38 virtual void SetChildPhiRange(Float_t phimin = -180., Float_t phimax = 180)
39 {fChildPhiMin = TMath::Pi()*phimin/180;
40 fChildPhiMax = TMath::Pi()*phimax/180;}
41 virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180)
42 {fChildThetaMin = TMath::Pi()*thetamin/180;
43 fChildThetaMax = TMath::Pi()*thetamax/180;}
44 virtual void SetChildYRange(Float_t ymin = -12, Float_t ymax = 12)
45 {fChildYMin = ymin;
46 fChildYMax = ymax;}
65de9f86 47 virtual void SetMaximumLifetime(Float_t time = 1.e-15) {fMaxLifeTime = time;}
48
49 virtual void SetGeometryAcceptance(AliGeometry * GeometryAcceptance=0) {fGeometryAcceptance = GeometryAcceptance;}
50
51 virtual void SetPdgCodeParticleforAcceptanceCut(Int_t PdgCodeParticleforAcceptanceCut=0) {fPdgCodeParticleforAcceptanceCut = PdgCodeParticleforAcceptanceCut;}
52
53 virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;}
54
55 virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles);
56
e36044d6 57 protected:
58 // check if particle is selected as parent particle
62d0ae06 59 Bool_t ParentSelected(Int_t ip) const;
e36044d6 60 // check if particle is selected as child particle
62d0ae06 61 Bool_t ChildSelected(Int_t ip) const;
e36044d6 62 // all kinematic selection cuts go here
62d0ae06 63 Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
64 Int_t CheckPDGCode(Int_t pdgcode) const;
e36044d6 65
66 protected:
fbfe101a 67 TArrayI fParentSelect; //!Parent particles to be selected
68 TArrayI fChildSelect; //!Decay products to be selected
e36044d6 69 Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled
70 Float_t fChildPtMin; // Children minimum pT
71 Float_t fChildPtMax; // Children maximum pT
72 Float_t fChildPMin; // Children minimum p
73 Float_t fChildPMax; // Children maximum p
74 Float_t fChildPhiMin; // Children minimum phi
75 Float_t fChildPhiMax; // Children maximum phi
76 Float_t fChildThetaMin; // Children minimum theta
77 Float_t fChildThetaMax; // Children maximum theta
78 Float_t fChildYMin; // Children minimum y
79 Float_t fChildYMax; // Children maximum y
80 Decay_t fForceDecay; // Decay channel forced
47fc6bd5 81 Float_t fMaxLifeTime; // Maximum lifetime for unstable particles
65de9f86 82 AliGeometry * fGeometryAcceptance; // Geometry to which particles must be simulated
83 Int_t fPdgCodeParticleforAcceptanceCut; // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
84 Int_t fNumberOfAcceptedParticles; // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode)
47fc6bd5 85
25c92a35 86 ClassDef(AliGenMC,5) // AliGenerator implementation for generators using MC methods
e36044d6 87};
88#endif
89
90
91
92
93