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>
27 /** Simulation of the FMD.
28 This class builds the geometry, and processes hits in the FMD */
29 class AliFMDSimulator : public TTask
34 AliFMDSimulator(AliFMD* fmd, Bool_t detailed=kTRUE);
35 virtual ~AliFMDSimulator() {}
37 virtual void DefineMaterials();
39 virtual void DefineGeometry() = 0;
40 /** Deal with a hit in the FMD */
41 virtual void Exec(Option_t* option="");
42 virtual void UseDivided(Bool_t use=kTRUE) { fUseDivided = use; }
43 virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
45 AliFMD* fFMD; //! Pointer to module
46 Bool_t fDetailed; // Whether to make a detailed simulation
47 Int_t fInnerId; //! ID of inner ring strips
48 Int_t fOuterId; //! ID of outer ring strips
49 TLorentzVector fCurrentV; //! Current hit postition
50 TLorentzVector fCurrentP; //! Current hit momentum
51 TArrayI fActiveId; //! Active volume ID's
52 Int_t fCurrentPdg; //! Current hit particle code
53 Double_t fCurrentDeltaE; //! Current hit energy loss
54 Bool_t fUseDivided; // Divided volumes
55 Bool_t fUseAssembly; // Assembly volumes
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);
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
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
90 kCarbonId, // ID index of Carbon medium
91 kCopperId, // ID index of Copper Medium
92 kKaptonId // ID index of Kapton Medium
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
100 ClassDef(AliFMDSimulator,0) // Simulation class for the FMD
106 //____________________________________________________________________