Commiting before moving code from `AliFMDSimulator' to `AliFMD' (and
[u/mrichter/AliRoot.git] / FMD / AliFMDSimulator.h
CommitLineData
1a1fdef7 1#ifndef ALIFMDSIMULATOR_H
2#define ALIFMDSIMULATOR_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7 *
8 * See cxx source for full Copyright notice
9 */
10#ifndef TTask
11# include <TTask.h>
12#endif
13#ifndef TLorentzVector
14# include <TLorentzVector.h>
15#endif
4ac75127 16#ifndef TArrayI
17# include <TArrayI.h>
18#endif
1a1fdef7 19class TVector3;
20class AliFMD;
21class AliFMDRing;
22class AliFMDDetector;
23class AliFMD1;
24class AliFMD2;
25class AliFMD3;
54240c8d 26class TObjArray;
1a1fdef7 27
28/** Simulation of the FMD.
29 This class builds the geometry, and processes hits in the FMD */
30class AliFMDSimulator : public TTask
31{
32public:
33 AliFMDSimulator();
34 /** CTOR */
35 AliFMDSimulator(AliFMD* fmd, Bool_t detailed=kTRUE);
36 virtual ~AliFMDSimulator() {}
37 /** Initialize */
38 virtual void DefineMaterials();
39 /** Register */
40 virtual void DefineGeometry() = 0;
41 /** Deal with a hit in the FMD */
42 virtual void Exec(Option_t* option="");
54240c8d 43 virtual void EndEvent();
4ac75127 44 virtual void UseDivided(Bool_t use=kTRUE) { fUseDivided = use; }
45 virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
1a1fdef7 46protected:
47 AliFMD* fFMD; //! Pointer to module
48 Bool_t fDetailed; // Whether to make a detailed simulation
1a1fdef7 49 TLorentzVector fCurrentV; //! Current hit postition
50 TLorentzVector fCurrentP; //! Current hit momentum
4ac75127 51 TArrayI fActiveId; //! Active volume ID's
1a1fdef7 52 Int_t fCurrentPdg; //! Current hit particle code
53 Double_t fCurrentDeltaE; //! Current hit energy loss
4ac75127 54 Bool_t fUseDivided; // Divided volumes
55 Bool_t fUseAssembly; // Assembly volumes
56
57 Bool_t IsActive(Int_t volId) const;
58 Bool_t VMC2FMD(Int_t copy, TLorentzVector& v,
59 UShort_t& detector, Char_t& ring,
60 UShort_t& sector, UShort_t& stripe);
61 Bool_t VMC2FMD(TLorentzVector& v, UShort_t& detector,
62 Char_t& ring, UShort_t& sector, UShort_t& strip);
1a1fdef7 63
64 static const Char_t* fgkActiveName; // Name of Active volumes
65 static const Char_t* fgkSectorName; // Name of Sector volumes
66 static const Char_t* fgkStripName; // Name of Strip volumes
67 static const Char_t* fgkModuleName; // Name of Module volumes
68 static const Char_t* fgkPCBName; // Name of PCB volumes
69 static const Char_t* fgkLongLegName; // Name of LongLeg volumes
70 static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
71 static const Char_t* fgkFrontVName; // Name of Front volumes
72 static const Char_t* fgkBackVName; // Name of Back volumes
73 static const Char_t* fgkRingName; // Name of Ring volumes
74 static const Char_t* fgkTopHCName; // Name of TopHC volumes
75 static const Char_t* fgkBotHCName; // Name of BotHC volumes
76 static const Char_t* fgkTopIHCName; // Name of TopIHC volumes
77 static const Char_t* fgkBotIHCName; // Name of BotIHC volumes
78 static const Char_t* fgkNoseName; // Name of Nose volumes
79 static const Char_t* fgkBackName; // Name of Back volumes
80 static const Char_t* fgkBeamName; // Name of Beam volumes
81 static const Char_t* fgkFlangeName; // Name of Flange volumes
82
83 enum {
84 kSiId, // ID index of Si medium
85 kAirId, // ID index of Air medium
86 kPlasticId, // ID index of Plastic medium
87 kPcbId, // ID index of PCB medium
88 kSiChipId, // ID index of Si Chip medium
89 kAlId, // ID index of Al medium
4ac75127 90 kCarbonId, // ID index of Carbon medium
91 kCopperId, // ID index of Copper Medium
92 kKaptonId // ID index of Kapton Medium
1a1fdef7 93 };
94
95 Int_t fSectorOff; // Sector offset in volume tree
96 Int_t fModuleOff; // Module offset in volume tree
97 Int_t fRingOff; // Ring offset in the volume tree
98 Int_t fDetectorOff; // Detector offfset in the volume tree
54240c8d 99 TObjArray* fBad; //! List of bad hits
1a1fdef7 100
101 ClassDef(AliFMDSimulator,0) // Simulation class for the FMD
102};
103
104
105
106#endif
107//____________________________________________________________________
108//
109// Local Variables:
110// mode: C++
111// End:
112//
113// EOF
114//