Additiona TOF data members (S.Arcelli)
[u/mrichter/AliRoot.git] / FMD / AliFMDv1.h
CommitLineData
37c4363a 1#ifndef ALIFMDV1_H
2#define ALIFMDV1_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
11//____________________________________________________________________
12//
13// Manager class for the FMD - Detailed version.
088f8e79 14// Implements the full geometry,
15// And does stepping
16//
37c4363a 17#ifndef ALIFMD_H
97961cbd 18# include "AliFMD.h"
37c4363a 19#endif
20#ifndef ROOT_TLorentzVector
21# include <TLorentzVector.h>
22#endif
23
24//____________________________________________________________________
9f662337 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.
29
30 This class contains the detailed version of the FMD - that is,
31 hits are produced during simulation.
32 @ingroup FMD_sim
33*/
37c4363a 34class AliFMDv1 : public AliFMD
35{
36public:
9f662337 37 /** CTOR */
90da4514 38 AliFMDv1()
39 : AliFMD(),
40 fCurrentDeltaE(0),
41 fCurrentV(),
42 fCurrentP(),
43 fCurrentPdg(0) { fDetailed = kTRUE; }
9f662337 44 /** CTOR
45 @param name Name
46 @param title Title */
37c4363a 47 AliFMDv1(const char *name, const char *title="Detailed geometry")
90da4514 48 : AliFMD(name, title),
49 fCurrentDeltaE(0),
50 fCurrentV(),
51 fCurrentP(),
52 fCurrentPdg(0) { fDetailed = kTRUE; }
9f662337 53 /** DTOR */
37c4363a 54 virtual ~AliFMDv1() {}
55
56 // Required member functions
9f662337 57 /** Get version number
58 @return always 1 */
37c4363a 59 virtual Int_t IsVersion() const {return 1;}
9f662337 60 /** Member function that is executed each time a hit is made in the
61 FMD. None-charged particles are ignored. Dead tracks are
62 ignored.
63
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.
75 - Get track position
76 - IF track is entering volume AND track is inside real shape THEN
77 - Reset energy deposited
78 - Get track momentum
79 - Get particle ID #
80 - ENDIF
81 - IF track is inside volume AND inside real shape THEN
82 - Update energy deposited
83 - ENDIF
84 - IF track is inside real shape AND (track is leaving volume,
85 or it died, or it is stopped THEN
86 - Create a hit
87 - ENDIF
88 */
37c4363a 89 virtual void StepManager();
90protected:
9f662337 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 */
54e415a8 98 Bool_t VMC2FMD(TLorentzVector& v, UShort_t& detector,
99 Char_t& ring, UShort_t& sector, UShort_t& strip) const;
9f662337 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 */
54e415a8 108 Bool_t VMC2FMD(Int_t copy, TLorentzVector& v,
109 UShort_t& detector, Char_t& ring,
110 UShort_t& sector, UShort_t& strip) const;
9f662337 111 /** Check if hit is bad. A hit is bad if
112 @f[
113 \Delta E > |Q|^2 p / m > 1
114 @f]
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
119 event.
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' */
bf000c32 126 Bool_t CheckHit(Int_t trackno, Int_t pdg, Float_t absQ,
127 const TLorentzVector& p, Float_t edep) const;
54e415a8 128
129 Double_t fCurrentDeltaE; // The current accumulated energy loss
37c4363a 130 TLorentzVector fCurrentV; // Current production vertex
131 TLorentzVector fCurrentP; // Current momentum vector
132 Int_t fCurrentPdg; // Current PDG code
133
54e415a8 134 ClassDef(AliFMDv1,5) // Detailed FMD geometry
37c4363a 135};
136
137#endif
138//____________________________________________________________________
139//
140// Local Variables:
141// mode: C++
142// End:
143//
144// EOF
145//