Fixing Coding violations
[u/mrichter/AliRoot.git] / STEER / AliMC.h
CommitLineData
5d12ce38 1#ifndef ALIMC_H
2#define ALIMC_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#include <TArrayF.h>
9#include <TArrayI.h>
024a7e64 10#include <TMCProcess.h>
5d12ce38 11#include <TVirtualMCApplication.h>
12
13class AliGenerator;
14class AliMCQA;
15
16class AliMC : public TVirtualMCApplication {
17public:
18 AliMC();
19 AliMC(const char *name, const char *title);
20 AliMC(const AliMC &mc);
21 virtual ~AliMC();
22
d0d4a6b3 23 AliMC& operator= (const AliMC &mc) {
24 // Assignment operator
25 mc.Copy(*this);
26 return *this;
27 }
5d12ce38 28
29//
30// MC Application
31//
32 virtual void ConstructGeometry();
33 virtual void InitGeometry();
34 virtual void GeneratePrimaries();
35 virtual void BeginEvent();
36 virtual void BeginPrimary();
37 virtual void PreTrack();
38 virtual void Stepping();
39 virtual void PostTrack();
40 virtual void FinishPrimary();
41 virtual void FinishEvent();
42 virtual Double_t TrackingZmax() const {return fTrZmax;}
43 virtual Double_t TrackingRmax() const {return fTrRmax;}
44 virtual void Field(const Double_t* x, Double_t* b) const;
45 virtual Int_t DetFromMate(Int_t i) const { return (*fImedia)[i];}
46//
47
48 virtual AliGenerator* Generator() const {return fGenerator;}
49 virtual void SetGenerator(AliGenerator *generator);
50 virtual void ResetGenerator(AliGenerator *generator);
51
52//
53 virtual void ReadTransPar();
54 virtual void MediaTable();
55 virtual void EnergySummary();
56 virtual void FinishRun();
57 void AddEnergyDeposit(Int_t id, Float_t edep)
58 {fEventEnergy[id]+=edep;}
59 virtual void ResetHits();
60 virtual void TrackingLimits( Float_t rmax=1.e10, Float_t zmax=1.e10)
61 {fTrRmax=rmax; fTrZmax=zmax;}
62 Int_t GetDebug() const {return fDebug;}
d0f1ee3b 63 virtual void SetDebug(Int_t level=0) {fDebug = level;}
5d12ce38 64 virtual void Init();
65 virtual void SetTransPar(const char *filename="$(ALICE_ROOT)/data/galice.cuts");
66 virtual void Browse(TBrowser *b);
67 AliMCQA *GetMCQA() const {return fMCQA;}
68 //PH
69 virtual void AddHit(Int_t id, Int_t track, Int_t *vol, Float_t *hits) const;
70 virtual void AddDigit(Int_t id, Int_t *tracks, Int_t *digits) const;
4fc0efd3 71 virtual void AddHitList(TCollection *hitList) {if (hitList) fHitLists->Add(hitList);}
5d12ce38 72 Int_t GetCurrentTrackNumber() const;
73 virtual void DumpPart (Int_t i) const;
74 virtual void DumpPStack () const;
75 TList* GetHitLists() const {return fHitLists ;}
76 Int_t GetNtrack() const;
77 virtual Int_t GetPrimary(Int_t track) const;
78 TObjArray *Particles() const;
79 TParticle *Particle(Int_t i) const;
80 virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
81 Float_t *pmom, Float_t *vpos, Float_t *polar,
82 Float_t tof, TMCProcess mech, Int_t &ntr,
83 Float_t weight = 1, Int_t is = 0);
84 virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
85 Double_t px, Double_t py, Double_t pz, Double_t e,
86 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
87 Double_t polx, Double_t poly, Double_t polz,
88 TMCProcess mech, Int_t &ntr, Float_t weight=1,
89 Int_t is = 0);
d0f1ee3b 90 virtual void SetHighWaterMark(Int_t nt);
5d12ce38 91
d0f1ee3b 92 virtual void KeepTrack(Int_t itra);
5d12ce38 93 virtual void FlagTrack(Int_t track);
94 virtual void SetCurrentTrack(Int_t track);
95// Track reference related
96 virtual void AddTrackReference(Int_t label);
97 TClonesArray *TrackReferences() const {return fTrackReferences;}
98 virtual void RemapTrackReferencesIDs(Int_t *map); //remaping track references MI
99 virtual void ResetTrackReferences();
100
101
102
103private:
6c4904c2 104 void Copy (TObject &mc) const;
5d12ce38 105 AliGenerator *fGenerator; // Generator used in the MC
106 TArrayF fEventEnergy; //! Energy deposit for current event
107 TArrayF fSummEnergy; //! Energy per event in each volume
108 TArrayF fSum2Energy; //! Energy squared per event in each volume
109 Float_t fTrRmax; // Maximum radius for tracking
110 Float_t fTrZmax; // Maximu z for tracking
111 Int_t fDebug; // Debug flag
112 TArrayI *fImedia; //! Array of correspondence between media and detectors
113 TString fTransParName; // Name of the transport parameters file
114 AliMCQA *fMCQA; // Pointer to MC Quality assurance class
115 //PH
116 TList *fHitLists; //! Lists of hits to be remapped by PurifyKine
117 TClonesArray *fTrackReferences; //!list of track references - for one primary track only -MI
118
119 ClassDef(AliMC,1)
120};
121
122
123#endif