1 #ifndef ALIFMDSIMULATOR_H
2 #define ALIFMDSIMULATOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
13 #ifndef TLorentzVector
14 # include <TLorentzVector.h>
28 /** Simulation of the FMD.
29 This class builds the geometry, and processes hits in the FMD */
30 class AliFMDSimulator : public TTask
35 AliFMDSimulator(AliFMD* fmd, Bool_t detailed=kTRUE);
36 virtual ~AliFMDSimulator() {}
38 virtual void DefineMaterials();
40 virtual void DefineGeometry() = 0;
41 /** Deal with a hit in the FMD */
42 virtual void Exec(Option_t* option="");
43 virtual void EndEvent();
44 virtual void UseDivided(Bool_t use=kTRUE) { fUseDivided = use; }
45 virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
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
53 TArrayI fActiveId; //! Active volume ID's
54 Int_t fCurrentPdg; //! Current hit particle code
55 Double_t fCurrentDeltaE; //! Current hit energy loss
56 Bool_t fUseDivided; // Divided volumes
57 Bool_t fUseAssembly; // Assembly volumes
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);
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
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
92 kCarbonId, // ID index of Carbon medium
93 kCopperId, // ID index of Copper Medium
94 kKaptonId // ID index of Kapton Medium
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
101 TObjArray* fBad; //! List of bad hits
103 ClassDef(AliFMDSimulator,0) // Simulation class for the FMD
109 //____________________________________________________________________