Support for Cerenkov and process list in Virtual MC
[u/mrichter/AliRoot.git] / STEER / AliMC.h
CommitLineData
aee8290b 1#ifndef ALIMC_H
2#define ALIMC_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
fe4da5cc 8///////////////////////////////////////////////////////////////////////////////
9// //
10// //
875c717b 11// Abstract Monte Carlo interface //
fe4da5cc 12// //
13// //
14///////////////////////////////////////////////////////////////////////////////
15
16#include <TNamed.h>
65fb704d 17#include <AliRndm.h>
18#include "AliMCProcess.h"
fe4da5cc 19
65fb704d 20class TLorentzVector;
80762cb1 21class AliMC;
d0daec3c 22class AliDecayer;
27f3d82e 23class TArrayI;
d0daec3c 24
80762cb1 25R__EXTERN AliMC *gMC;
26
65fb704d 27class AliMC : public TNamed, public AliRndm
fe4da5cc 28{
229004c4 29 public:
30 AliMC(const char *name, const char *title);
65fb704d 31 AliMC() {fRandom=0;}
32 virtual ~AliMC() {fgMC=gMC=0;fRandom=0;}
229004c4 33
34 // static access method
80762cb1 35 static AliMC* GetMC() { return fgMC; }
fe4da5cc 36
229004c4 37 //
38 // methods for building/management of geometry
39 // ------------------------------------------------
40 //
fe4da5cc 41
229004c4 42 // functions from GCONS
43 virtual void Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
44 Float_t &dens, Float_t &radl, Float_t &absl,
45 Float_t* ubuf, Int_t& nbuf) = 0;
46
47 // detector composition
48 virtual void Material(Int_t& kmat, const char* name, Float_t a,
49 Float_t z, Float_t dens, Float_t radl, Float_t absl,
50 Float_t* buf, Int_t nwbuf) = 0;
51 virtual void Mixture(Int_t& kmat, const char *name, Float_t *a,
52 Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat) = 0;
53 virtual void Medium(Int_t& kmed, const char *name, Int_t nmat,
54 Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd,
55 Float_t stemax, Float_t deemax, Float_t epsil,
56 Float_t stmin, Float_t* ubuf, Int_t nbuf) = 0;
57 virtual void Matrix(Int_t& krot, Float_t thetaX, Float_t phiX,
58 Float_t thetaY, Float_t phiY, Float_t thetaZ,
59 Float_t phiZ) = 0;
60 virtual void Gstpar(Int_t itmed, const char *param, Float_t parval) = 0;
61
62 // functions from GGEOM
63 virtual Int_t Gsvolu(const char *name, const char *shape, Int_t nmed,
64 Float_t *upar, Int_t np) = 0;
65 virtual void Gsdvn(const char *name, const char *mother, Int_t ndiv,
66 Int_t iaxis) = 0;
67 virtual void Gsdvn2(const char *name, const char *mother, Int_t ndiv,
68 Int_t iaxis, Float_t c0i, Int_t numed) = 0;
69 virtual void Gsdvt(const char *name, const char *mother, Float_t step,
70 Int_t iaxis, Int_t numed, Int_t ndvmx) = 0;
71 virtual void Gsdvt2(const char *name, const char *mother, Float_t step,
72 Int_t iaxis, Float_t c0, Int_t numed, Int_t ndvmx) = 0;
73 virtual void Gsord(const char *name, Int_t iax) = 0;
74 virtual void Gspos(const char *name, Int_t nr, const char *mother,
75 Float_t x, Float_t y, Float_t z, Int_t irot,
76 const char *konly="ONLY") = 0;
77 virtual void Gsposp(const char *name, Int_t nr, const char *mother,
78 Float_t x, Float_t y, Float_t z, Int_t irot,
27f3d82e 79 const char *konly, Float_t *upar, Int_t np) = 0;
80
81 virtual void SetCerenkov(Int_t itmed, Int_t npckov, Float_t *ppckov,
82 Float_t *absco, Float_t *effic, Float_t *rindex) = 0;
83
229004c4 84
85 // functions for drawing
86 virtual void DrawOneSpec(const char* name) = 0;
87 virtual void Gsatt(const char* name, const char* att, Int_t val) = 0;
88 virtual void Gdraw(const char*,Float_t theta = 30, Float_t phi = 30,
89 Float_t psi = 0, Float_t u0 = 10, Float_t v0 = 10,
90 Float_t ul = 0.01, Float_t vl = 0.01) = 0;
91
92 // Euclid
93 virtual void WriteEuclid(const char*, const char*, Int_t, Int_t) = 0;
94
95 // get methods
96 virtual Int_t VolId(const Text_t* volName) const = 0;
97 virtual const char* VolName(Int_t id) const = 0;
98 virtual Int_t NofVolumes() const = 0;
8409d8c9 99 virtual Int_t VolId2Mate(Int_t id) const = 0;
229004c4 100
101 //
102 // methods for physics management
103 // ------------------------------------------------
104 //
105
106 // set methods
107 virtual void SetCut(const char* cutName, Float_t cutValue) = 0;
108 virtual void SetProcess(const char* flagName, Int_t flagValue) = 0;
109 virtual Float_t Xsec(char*, Float_t, Int_t, Int_t) = 0;
110
111 // particle table usage
112 virtual Int_t IdFromPDG(Int_t id) const =0;
113 virtual Int_t PDGFromId(Int_t pdg) const =0;
114 virtual void DefineParticles() = 0;
115
116 //
117 // methods for step management
118 // ------------------------------------------------
119 //
120
121 // action methods
122 virtual void StopTrack() =0;
123 virtual void StopEvent() =0;
124
125 // set methods
126 virtual void SetMaxStep(Float_t) = 0;
127 virtual void SetMaxNStep(Int_t) = 0;
128 virtual void SetUserDecay(Int_t) =0;
129
130 // get methods
131 // tracking volume(s)
132 virtual Int_t CurrentVolID(Int_t& copyNo) const =0;
133 virtual Int_t CurrentVolOffID(Int_t off, Int_t& copyNo) const =0;
134 virtual const char* CurrentVolName() const =0;
135 virtual const char* CurrentVolOffName(Int_t off) const =0;
136 virtual Int_t CurrentMaterial(Float_t &a, Float_t &z,
137 Float_t &dens, Float_t &radl, Float_t &absl) const =0;
138 virtual Int_t CurrentEvent() const =0;
139 virtual void Gmtod(Float_t* xm, Float_t* xd, Int_t iflag) = 0;
140 virtual void Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)= 0 ;
141 virtual Float_t MaxStep() const =0;
142 virtual Int_t GetMaxNStep() const = 0;
143 virtual Int_t GetMedium() const =0;
144
145 // tracking particle
146 // dynamic properties
147 virtual void TrackPosition(TLorentzVector& position) const =0;
148 virtual void TrackMomentum(TLorentzVector& momentum) const =0;
149 virtual Float_t TrackStep() const =0;
150 virtual Float_t TrackLength() const =0;
151 virtual Float_t TrackTime() const =0;
152 virtual Float_t Edep() const =0;
153 // static properties
154 virtual Int_t TrackPid() const =0;
155 virtual Float_t TrackCharge() const =0;
156 virtual Float_t TrackMass() const =0;
157 virtual Float_t Etot() const =0;
158
159 // track status
a01a8b12 160 virtual Bool_t IsNewTrack() const =0;
229004c4 161 virtual Bool_t IsTrackInside() const =0;
162 virtual Bool_t IsTrackEntering() const =0;
163 virtual Bool_t IsTrackExiting() const =0;
164 virtual Bool_t IsTrackOut() const =0;
165 virtual Bool_t IsTrackDisappeared() const =0;
166 virtual Bool_t IsTrackStop() const =0;
167 virtual Bool_t IsTrackAlive() const=0;
168
169 // secondaries
170 virtual Int_t NSecondaries() const=0;
171 virtual void GetSecondary(Int_t isec, Int_t& particleId,
172 TLorentzVector& position, TLorentzVector& momentum) =0;
27f3d82e 173 virtual AliMCProcess ProdProcess(Int_t isec) const =0;
174 virtual Int_t StepProcesses(TArrayI &proc) const = 0;
229004c4 175
176 //
177 // other (then geometry/step/run management) methods
178 // ----------------------------------------------
179 //
229004c4 180
181 //
182 // Geant3 specific methods
183 // !!! need to be transformed to common interface
184 //
185 virtual void Gdopt(const char*,const char*) = 0;
186 virtual void SetClipBox(const char*,Float_t=-9999,Float_t=0, Float_t=-9999,Float_t=0,Float_t=-9999,Float_t=0) = 0;
187 virtual void DefaultRange() = 0;
188 virtual void Gdhead(Int_t, const char*, Float_t=0) = 0;
189 virtual void Gdman(Float_t, Float_t, const char*) = 0;
190 virtual void SetColors() = 0;
191 virtual void Gtreve() = 0;
aee8290b 192 virtual void GtreveRoot() = 0;
229004c4 193 virtual void Gckmat(Int_t, char*) = 0;
194 virtual void InitLego() = 0;
195 virtual void Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&) = 0;
196 virtual void Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) = 0;
197
875c717b 198 // Control Methods
199
200 virtual void Init() = 0;
201 virtual void FinishGeometry() = 0;
202 virtual void BuildPhysics() = 0;
203 virtual void ProcessEvent() = 0;
204 virtual void ProcessRun(Int_t nevent) = 0;
d0daec3c 205 // External Decayer
206 virtual void SetExternalDecayer(AliDecayer* decayer) =0;
207 virtual AliDecayer* Decayer() const =0;
875c717b 208
229004c4 209 private:
aee8290b 210 static AliMC* fgMC; // Pointer to the virtual MonteCarlo object
ef42d733 211 AliMC(const AliMC &) {}
212 AliMC & operator=(const AliMC &) {return (*this);}
229004c4 213
94de3818 214 ClassDef(AliMC,1) //Virtual MonteCarlo Interface
fe4da5cc 215};
216
aee8290b 217#endif
fe4da5cc 218