1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
31 ///////////////////////////////////////////////////////////////////////////////
33 #include <TGeoMatrix.h>
34 #include "AliITSRecPoint.h"
35 #include "AliAlignObj.h"
37 ClassImp(AliITSRecPoint)
39 //_____________________________________________________________
40 AliITSRecPoint::AliITSRecPoint(): AliCluster(),
54 // default constructor
57 //________________________________________________________________________
58 AliITSRecPoint::AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info, Bool_t local):
59 AliCluster(AliGeomManager::LayerToVolUID((info[2]+AliGeomManager::kSPD1),lab[3]&0x3FF),hit,0,0,lab),
73 //standard constructor used in AliITSClusterFinderV2
75 if (!local) { // Cluster V2
76 Double_t txyz[3] = {GetX(), GetY(), GetZ()};
77 Double_t lxyz[3] = {0, 0, 0};
78 GetTracking2LocalMatrix()->LocalToMaster(txyz,lxyz);
79 fXloc = lxyz[0]; fZloc = lxyz[2];
80 if(fLayer==5) hit[5]=-hit[5];
81 if( (fLayer==4) || (fLayer==5) ) SetSigmaYZ(hit[5]);
102 AliError(Form("Wrong ITS layer %d (0 -> 5)",fLayer));
107 Double_t lxyz[3] = {fXloc, 0, fZloc};
108 Double_t txyz[3] = {0, 0, 0};
109 GetTracking2LocalMatrix()->MasterToLocal(lxyz,txyz);
111 SetX(0.); SetY(txyz[1]); SetZ(txyz[2]);
117 //_______________________________________________________________________
118 AliITSRecPoint::AliITSRecPoint(const AliITSRecPoint& pt):AliCluster(pt),
127 fChargeRatio(pt.fChargeRatio),
129 fDeltaProb(pt.fDeltaProb),
130 fDriftTime(pt.fDriftTime)
136 //______________________________________________________________________
137 AliITSRecPoint& AliITSRecPoint::operator=(const AliITSRecPoint& source){
138 // Assignment operator
140 this->~AliITSRecPoint();
141 new(this) AliITSRecPoint(source);
146 //----------------------------------------------------------------------
147 void AliITSRecPoint::Print(ostream *os){
148 ////////////////////////////////////////////////////////////////////////
149 // Standard output format for this class.
150 ////////////////////////////////////////////////////////////////////////
158 #if defined __ICC || defined __ECC || defined __xlC__
165 fmt = os->setf(ios::fixed); // set fixed floating point output
166 *os << GetLabel(0) << " " << GetLabel(1) << " " << GetLabel(2) << " ";
167 fmt = os->setf(ios::scientific); // set scientific for dEdX.
168 *os << GetX() <<" " << GetY() << " " << GetZ() << " " ;
169 *os << GetSigmaY2() << " " << GetSigmaZ2() << " " << GetSigmaYZ() << " ";
170 fmt = os->setf(ios::fixed);
171 *os << GetVolumeId() << " "<< Misalign() /*fIsMisaligned*/ << " ";
172 fmt = os->setf(ios::scientific); // set scientific for dEdX.
173 *os << fXloc << " " << fZloc << " " << fdEdX << " ";
174 fmt = os->setf(ios::fixed); // every fixed
175 *os << fIndex <<" " << fQ << " "<<fLayer <<" "<<fNz<<" "<<fNy<<" ";
176 *os << fChargeRatio<<" " << fType << " " << fDeltaProb << " " << fDriftTime;
177 os->flags(fmt); // reset back to old formating.
180 //----------------------------------------------------------------------
181 void AliITSRecPoint::Read(istream *is){
182 ////////////////////////////////////////////////////////////////////////
183 // Standard input format for this class.
184 ////////////////////////////////////////////////////////////////////////
189 *is >> lab[0] >> lab[1] >> lab[2];
190 SetLabel(lab[0],0); SetLabel(lab[1],1); SetLabel(lab[2],2);
191 *is >> hit[0] >> hit[1] >> hit[2] >> hit[3] >> hit[4] >> hit[5];
192 SetX(hit[0]);SetY(hit[1]);SetZ(hit[2]);SetSigmaY2(hit[3]);
193 SetSigmaZ2(hit[4]);//fSigmaYZ=hit[5];
194 *is >> lab[0] >> mis;
195 SetVolumeId(lab[0]);// fIsMisalinged = mis;
196 *is >> fXloc >> fZloc >> fdEdX;
197 *is >> fIndex >> fQ >> fLayer >> fNz >> fNy >> fChargeRatio >> fType;
198 *is >> fDeltaProb >> fDriftTime;
202 //----------------------------------------------------------------------
203 ostream &operator<<(ostream &os,AliITSRecPoint &p){
204 ////////////////////////////////////////////////////////////////////////
205 // Standard output streaming function.
206 ////////////////////////////////////////////////////////////////////////
211 //----------------------------------------------------------------------
212 istream &operator>>(istream &is,AliITSRecPoint &r){
213 ////////////////////////////////////////////////////////////////////////
214 // Standard input streaming function.
215 ////////////////////////////////////////////////////////////////////////
220 //----------------------------------------------------------------------