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
11 //____________________________________________________________________
13 // Manager class for the FMD - Detailed version.
14 // Implements the full geometry,
20 #ifndef ROOT_TLorentzVector
21 # include <TLorentzVector.h>
24 //____________________________________________________________________
25 /** Forward Multiplicity Detector based on Silicon wafers. This class
26 contains the base procedures for the Forward Multiplicity detector
27 Detector consists of 3 sub-detectors FMD1, FMD2, and FMD3, each of
28 which has 1 or 2 rings of silicon sensors.
30 This class contains the detailed version of the FMD - that is,
31 hits are produced during simulation.
34 class AliFMDv1 : public AliFMD
43 fCurrentPdg(0) { fDetailed = kTRUE; }
47 AliFMDv1(const char *name, const char *title="Detailed geometry")
48 : AliFMD(name, title),
52 fCurrentPdg(0) { fDetailed = kTRUE; }
54 virtual ~AliFMDv1() {}
56 // Required member functions
57 /** Get version number
59 virtual Int_t IsVersion() const {return 1;}
60 /** Member function that is executed each time a hit is made in the
61 FMD. None-charged particles are ignored. Dead tracks are
64 The procedure is as follows:
65 - IF NOT track is alive THEN RETURN ENDIF
66 - IF NOT particle is charged THEN RETURN ENDIF
67 - IF NOT volume name is "STRI" or "STRO" THEN RETURN ENDIF
68 - Get strip number (volume copy # minus 1)
69 - Get phi division number (mother volume copy #)
70 - Get module number (grand-mother volume copy #)
71 - section # = 2 * module # + phi division # - 1
72 - Get ring Id from volume name
73 - Get detector # from grand-grand-grand-mother volume name
74 - Get pointer to sub-detector object.
76 - IF track is entering volume AND track is inside real shape THEN
77 - Reset energy deposited
81 - IF track is inside volume AND inside real shape THEN
82 - Update energy deposited
84 - IF track is inside real shape AND (track is leaving volume,
85 or it died, or it is stopped THEN
89 virtual void StepManager();
91 /** Translate VMC coordinates to detector coordinates
92 @param v On output, Current position
93 @param detector On output, detector #
94 @param ring On output, ring id
95 @param sector On output, sector #
96 @param strip On output, strip #
97 @return @c true on success */
98 Bool_t VMC2FMD(TLorentzVector& v, UShort_t& detector,
99 Char_t& ring, UShort_t& sector, UShort_t& strip) const;
100 /** Translate VMC coordinates to detector coordinates
101 @param copy Volume copy number
102 @param v On output, Current position
103 @param detector On output, detector #
104 @param ring On output, ring id
105 @param sector On output, sector #
106 @param strip On output, strip #
107 @return @c true on success */
108 Bool_t VMC2FMD(Int_t copy, TLorentzVector& v,
109 UShort_t& detector, Char_t& ring,
110 UShort_t& sector, UShort_t& strip) const;
111 /** Check if hit is bad. A hit is bad if
113 \Delta E > |Q|^2 p / m > 1
115 holds, where @f$ \Delta E@f$ is the energy loss in this step,
116 @f$ Q@f$ is the particle charge, @f$ p@f$ is the track momentum,
117 and @f$ m@f$ is the particle mass. If a track is marked as
118 bad, it's kept in a cache, and can be printed at the end of the
120 @param trackno Track number
121 @param pdg PDG particle type ID
122 @param absQ Absolute value of particle charge
123 @param p Track momentum
124 @param edep Energy loss in this step.
125 @return @c true if hit is `bad' */
126 Bool_t CheckHit(Int_t trackno, Int_t pdg, Float_t absQ,
127 const TLorentzVector& p, Float_t edep) const;
129 Double_t fCurrentDeltaE; // The current accumulated energy loss
130 TLorentzVector fCurrentV; // Current production vertex
131 TLorentzVector fCurrentP; // Current momentum vector
132 Int_t fCurrentPdg; // Current PDG code
134 ClassDef(AliFMDv1,5) // Detailed FMD geometry
138 //____________________________________________________________________