]>
Commit | Line | Data |
---|---|---|
ee84ac37 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
88cb7938 | 16 | /* $Id$ */ |
d9f43611 | 17 | |
00a7cc50 | 18 | /////////////////////////////////////////////////////////////////////////////// |
19 | // Reconstructed space point class for set:ITS | |
20 | // Reconstructed points are expressed simultaneously in two different | |
21 | // reference frames, both differing from the global system. | |
22 | // The first is referred to the sensor (see AliITSsegmentation for the | |
23 | // definition) and each point is represented by two coordinates: fXloc and | |
24 | // fZloc. This system in the code is referred to as "local" | |
25 | // The second is used for tracking (V2, SA and MI versions) and the X axis | |
26 | // represents the radial coordinate (this system is, in the bending plane, | |
27 | // a rotated system w.r.t. the global reference system). | |
28 | // Each reaconstructed point is represented by two coordinates: fY and fZ, | |
29 | // inherited from AliCluster. This system in the code is referred to as | |
30 | // "trackingV2". | |
31 | /////////////////////////////////////////////////////////////////////////////// | |
e8189707 | 32 | |
33 | ||
34 | #include "AliITSRecPoint.h" | |
00a7cc50 | 35 | #include "AliITSgeom.h" |
e8189707 | 36 | ClassImp(AliITSRecPoint) |
9671cc24 | 37 | |
00a7cc50 | 38 | //_____________________________________________________________ |
e56160b8 | 39 | AliITSRecPoint::AliITSRecPoint(): AliCluster(), |
40 | fXloc(0), | |
41 | fZloc(0), | |
42 | fdEdX(0), | |
43 | fIndex(0), | |
44 | fQ(0), | |
45 | fLayer(0), | |
46 | fNz(0), | |
47 | fNy(0), | |
48 | fChargeRatio(0), | |
49 | fType(0), | |
50 | fDeltaProb(0), | |
51 | fGeom(0){ | |
9671cc24 | 52 | // default creator |
ee84ac37 | 53 | } |
00a7cc50 | 54 | |
55 | //_____________________________________________________________ | |
e56160b8 | 56 | AliITSRecPoint::AliITSRecPoint(AliITSgeom* geom): AliCluster(), |
57 | fXloc(0), | |
58 | fZloc(0), | |
59 | fdEdX(0), | |
60 | fIndex(0), | |
61 | fQ(0), | |
62 | fLayer(0), | |
63 | fNz(0), | |
64 | fNy(0), | |
65 | fChargeRatio(0), | |
66 | fType(0), | |
67 | fDeltaProb(0), | |
68 | fGeom(geom) { | |
00a7cc50 | 69 | // default creator |
e56160b8 | 70 | |
00a7cc50 | 71 | } |
72 | ||
73 | //________________________________________________________________________ | |
e56160b8 | 74 | AliITSRecPoint::AliITSRecPoint(Int_t module,AliITSgeom* geom,Int_t *lab,Float_t *hit, Int_t *info):AliCluster(lab,hit), |
75 | fXloc(0), | |
76 | fZloc(0), | |
77 | fdEdX(0), | |
78 | fIndex(lab[3]), | |
79 | fQ(hit[4]), | |
80 | fLayer(info[2]), | |
81 | fNz(info[1]), | |
82 | fNy(info[0]), | |
83 | fChargeRatio(0), | |
84 | fType(0), | |
85 | fDeltaProb(0), | |
86 | fGeom(geom) | |
87 | { | |
00a7cc50 | 88 | //standard constructor used in AliITSClusterFinderV2 |
e56160b8 | 89 | |
90 | ||
00a7cc50 | 91 | fType=0; |
92 | fDeltaProb=0.; | |
93 | ||
94 | fGeom = geom; | |
95 | fGeom->TrackingV2ToDetL(module,fY,fZ,fXloc,fZloc); | |
96 | if(module<fGeom->GetStartSDD()) fdEdX=0.; | |
97 | if(module>=fGeom->GetStartSDD() && module<fGeom->GetStartSSD()){ | |
98 | fdEdX=fQ*1e-6; | |
99 | } | |
100 | if(module>=fGeom->GetStartSSD()) fdEdX=fQ*2.16; | |
101 | ||
102 | ||
103 | } | |
104 | //_______________________________________________________________________ | |
e56160b8 | 105 | AliITSRecPoint::AliITSRecPoint(const AliITSRecPoint& pt):AliCluster(pt), |
106 | fXloc(pt.fXloc), | |
107 | fZloc(pt.fZloc), | |
108 | fdEdX(pt.fdEdX), | |
109 | fIndex(pt.fIndex), | |
110 | fQ(pt.fQ), | |
111 | fLayer(pt.fLayer), | |
112 | fNz(pt.fNz), | |
113 | fNy(pt.fNy), | |
114 | fChargeRatio(pt.fChargeRatio), | |
115 | fType(pt.fType), | |
116 | fDeltaProb(pt.fDeltaProb), | |
117 | fGeom(pt.fGeom){ | |
00a7cc50 | 118 | //Copy constructor |
00a7cc50 | 119 | |
120 | } | |
121 | ||
122 | //______________________________________________________________________ | |
e56160b8 | 123 | AliITSRecPoint& AliITSRecPoint::operator=(const AliITSRecPoint& source){ |
00a7cc50 | 124 | // Assignment operator |
e56160b8 | 125 | |
126 | this->~AliITSRecPoint(); | |
127 | new(this) AliITSRecPoint(source); | |
00a7cc50 | 128 | return *this; |
e56160b8 | 129 | |
00a7cc50 | 130 | } |
131 | ||
132 | //________________________________________________________________________ | |
e56160b8 | 133 | AliITSRecPoint::AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info):AliCluster(lab,hit), |
134 | fXloc(0), | |
135 | fZloc(0), | |
136 | fdEdX(0), | |
137 | fIndex(lab[3]), | |
138 | fQ(hit[4]), | |
139 | fLayer(info[2]), | |
140 | fNz(info[1]), | |
141 | fNy(info[0]), | |
142 | fChargeRatio(0), | |
143 | fType(0), | |
144 | fDeltaProb(0), | |
145 | fGeom(0){ | |
00a7cc50 | 146 | //standard constructor used in AliITSClusterFinderV2 |
00a7cc50 | 147 | } |
148 | ||
ee84ac37 | 149 | //---------------------------------------------------------------------- |
150 | void AliITSRecPoint::Print(ostream *os){ | |
151 | //////////////////////////////////////////////////////////////////////// | |
152 | // Standard output format for this class. | |
153 | //////////////////////////////////////////////////////////////////////// | |
154 | #if defined __GNUC__ | |
155 | #if __GNUC__ > 2 | |
156 | ios::fmtflags fmt; | |
157 | #else | |
158 | Int_t fmt; | |
159 | #endif | |
160 | #else | |
9f69211c | 161 | #if defined __ICC || defined __ECC || defined __xlC__ |
ee84ac37 | 162 | ios::fmtflags fmt; |
163 | #else | |
164 | Int_t fmt; | |
165 | #endif | |
166 | #endif | |
167 | ||
168 | fmt = os->setf(ios::fixed); // set fixed floating point output | |
169 | *os << fTracks[0]<< " " << fTracks[1] << " " << fTracks[2] << " "; | |
00a7cc50 | 170 | *os << fXloc << " " << fZloc << " " << fQ << " "; |
ee84ac37 | 171 | fmt = os->setf(ios::scientific); // set scientific for dEdX. |
172 | *os << fdEdX << " "; | |
173 | fmt = os->setf(ios::fixed); // every fixed | |
00a7cc50 | 174 | *os << fSigmaY2 << " " << fSigmaZ2; |
ee84ac37 | 175 | os->flags(fmt); // reset back to old formating. |
176 | return; | |
177 | } | |
178 | //---------------------------------------------------------------------- | |
179 | void AliITSRecPoint::Read(istream *is){ | |
180 | //////////////////////////////////////////////////////////////////////// | |
181 | // Standard input format for this class. | |
182 | //////////////////////////////////////////////////////////////////////// | |
183 | ||
9671cc24 | 184 | |
00a7cc50 | 185 | *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fXloc >> fZloc >> fQ; |
186 | *is >> fdEdX >> fSigmaY2 >> fSigmaZ2; | |
ee84ac37 | 187 | return; |
188 | } | |
189 | //---------------------------------------------------------------------- | |
190 | ostream &operator<<(ostream &os,AliITSRecPoint &p){ | |
191 | //////////////////////////////////////////////////////////////////////// | |
192 | // Standard output streaming function. | |
193 | //////////////////////////////////////////////////////////////////////// | |
194 | ||
195 | p.Print(&os); | |
196 | return os; | |
197 | } | |
198 | //---------------------------------------------------------------------- | |
199 | istream &operator>>(istream &is,AliITSRecPoint &r){ | |
200 | //////////////////////////////////////////////////////////////////////// | |
201 | // Standard input streaming function. | |
202 | //////////////////////////////////////////////////////////////////////// | |
203 | ||
204 | r.Read(&is); | |
205 | return is; | |
206 | } | |
207 | //---------------------------------------------------------------------- |