Improved the mechanism to divert SDigits into a separate file.
[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"
17#include <TArrayI.h>
18
19class TParticle;
20
21class AliGenMC : public AliGenerator
22{
23 public:
24 AliGenMC();
25 AliGenMC(Int_t npart);
26 AliGenMC(const AliGenMC &MC);
27 virtual ~AliGenMC();
7a5ebd8f 28 virtual void Init();
a0609231 29 virtual void SetForceDecay(Decay_t decay = kAll) {fForceDecay = decay;}
e36044d6 30 AliGenMC & operator=(const AliGenMC & rhs);
31 virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;}
32 virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10)
33 {fChildPMin = pmin; fChildPMax = pmax;}
34 virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.)
35 {fChildPtMin = ptmin; fChildPtMax = ptmax;}
36 virtual void SetChildPhiRange(Float_t phimin = -180., Float_t phimax = 180)
37 {fChildPhiMin = TMath::Pi()*phimin/180;
38 fChildPhiMax = TMath::Pi()*phimax/180;}
39 virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180)
40 {fChildThetaMin = TMath::Pi()*thetamin/180;
41 fChildThetaMax = TMath::Pi()*thetamax/180;}
42 virtual void SetChildYRange(Float_t ymin = -12, Float_t ymax = 12)
43 {fChildYMin = ymin;
44 fChildYMax = ymax;}
47fc6bd5 45 virtual void SetMaximumLifetime(Float_t time = 1.e-15) {fMaxLifeTime = time;}
e36044d6 46 protected:
47 // check if particle is selected as parent particle
62d0ae06 48 Bool_t ParentSelected(Int_t ip) const;
e36044d6 49 // check if particle is selected as child particle
62d0ae06 50 Bool_t ChildSelected(Int_t ip) const;
e36044d6 51 // all kinematic selection cuts go here
62d0ae06 52 Bool_t KinematicSelection(TParticle *particle, Int_t flag) const;
53 Int_t CheckPDGCode(Int_t pdgcode) const;
e36044d6 54
55 protected:
fbfe101a 56 TArrayI fParentSelect; //!Parent particles to be selected
57 TArrayI fChildSelect; //!Decay products to be selected
e36044d6 58 Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled
59 Float_t fChildPtMin; // Children minimum pT
60 Float_t fChildPtMax; // Children maximum pT
61 Float_t fChildPMin; // Children minimum p
62 Float_t fChildPMax; // Children maximum p
63 Float_t fChildPhiMin; // Children minimum phi
64 Float_t fChildPhiMax; // Children maximum phi
65 Float_t fChildThetaMin; // Children minimum theta
66 Float_t fChildThetaMax; // Children maximum theta
67 Float_t fChildYMin; // Children minimum y
68 Float_t fChildYMax; // Children maximum y
69 Decay_t fForceDecay; // Decay channel forced
47fc6bd5 70 Float_t fMaxLifeTime; // Maximum lifetime for unstable particles
71
fbfe101a 72 ClassDef(AliGenMC,4) // AliGenerator implementation for generators using MC methods
e36044d6 73};
74#endif
75
76
77
78
79