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 |
19 | class TVector3; |
20 | class AliFMD; |
21 | class AliFMDRing; |
22 | class AliFMDDetector; |
23 | class AliFMD1; |
24 | class AliFMD2; |
25 | class AliFMD3; |
54240c8d |
26 | class TObjArray; |
1a1fdef7 |
27 | |
28 | /** Simulation of the FMD. |
29 | This class builds the geometry, and processes hits in the FMD */ |
30 | class AliFMDSimulator : public TTask |
31 | { |
32 | public: |
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 |
46 | protected: |
47 | AliFMD* fFMD; //! Pointer to module |
48 | Bool_t fDetailed; // Whether to make a detailed simulation |
49 | Int_t fInnerId; //! ID of inner ring strips |
50 | Int_t fOuterId; //! ID of outer ring strips |
51 | TLorentzVector fCurrentV; //! Current hit postition |
52 | TLorentzVector fCurrentP; //! Current hit momentum |
4ac75127 |
53 | TArrayI fActiveId; //! Active volume ID's |
1a1fdef7 |
54 | Int_t fCurrentPdg; //! Current hit particle code |
55 | Double_t fCurrentDeltaE; //! Current hit energy loss |
4ac75127 |
56 | Bool_t fUseDivided; // Divided volumes |
57 | Bool_t fUseAssembly; // Assembly volumes |
58 | |
59 | Bool_t IsActive(Int_t volId) const; |
60 | Bool_t VMC2FMD(Int_t copy, TLorentzVector& v, |
61 | UShort_t& detector, Char_t& ring, |
62 | UShort_t& sector, UShort_t& stripe); |
63 | Bool_t VMC2FMD(TLorentzVector& v, UShort_t& detector, |
64 | Char_t& ring, UShort_t& sector, UShort_t& strip); |
1a1fdef7 |
65 | |
66 | static const Char_t* fgkActiveName; // Name of Active volumes |
67 | static const Char_t* fgkSectorName; // Name of Sector volumes |
68 | static const Char_t* fgkStripName; // Name of Strip volumes |
69 | static const Char_t* fgkModuleName; // Name of Module volumes |
70 | static const Char_t* fgkPCBName; // Name of PCB volumes |
71 | static const Char_t* fgkLongLegName; // Name of LongLeg volumes |
72 | static const Char_t* fgkShortLegName; // Name of ShortLeg volumes |
73 | static const Char_t* fgkFrontVName; // Name of Front volumes |
74 | static const Char_t* fgkBackVName; // Name of Back volumes |
75 | static const Char_t* fgkRingName; // Name of Ring volumes |
76 | static const Char_t* fgkTopHCName; // Name of TopHC volumes |
77 | static const Char_t* fgkBotHCName; // Name of BotHC volumes |
78 | static const Char_t* fgkTopIHCName; // Name of TopIHC volumes |
79 | static const Char_t* fgkBotIHCName; // Name of BotIHC volumes |
80 | static const Char_t* fgkNoseName; // Name of Nose volumes |
81 | static const Char_t* fgkBackName; // Name of Back volumes |
82 | static const Char_t* fgkBeamName; // Name of Beam volumes |
83 | static const Char_t* fgkFlangeName; // Name of Flange volumes |
84 | |
85 | enum { |
86 | kSiId, // ID index of Si medium |
87 | kAirId, // ID index of Air medium |
88 | kPlasticId, // ID index of Plastic medium |
89 | kPcbId, // ID index of PCB medium |
90 | kSiChipId, // ID index of Si Chip medium |
91 | kAlId, // ID index of Al medium |
4ac75127 |
92 | kCarbonId, // ID index of Carbon medium |
93 | kCopperId, // ID index of Copper Medium |
94 | kKaptonId // ID index of Kapton Medium |
1a1fdef7 |
95 | }; |
96 | |
97 | Int_t fSectorOff; // Sector offset in volume tree |
98 | Int_t fModuleOff; // Module offset in volume tree |
99 | Int_t fRingOff; // Ring offset in the volume tree |
100 | Int_t fDetectorOff; // Detector offfset in the volume tree |
54240c8d |
101 | TObjArray* fBad; //! List of bad hits |
1a1fdef7 |
102 | |
103 | ClassDef(AliFMDSimulator,0) // Simulation class for the FMD |
104 | }; |
105 | |
106 | |
107 | |
108 | #endif |
109 | //____________________________________________________________________ |
110 | // |
111 | // Local Variables: |
112 | // mode: C++ |
113 | // End: |
114 | // |
115 | // EOF |
116 | // |