]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITStrackSA.cxx
Removing warnings (alpha)
[u/mrichter/AliRoot.git] / ITS / AliITStrackSA.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2003, 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 ////////////////////////////////////////////////////
16 //  Stand alone track class                       //
17 //  Origin:  Elisabetta Crescio                   //
18 //  e-mail:  crescio@to.infn.it                   //
19 //  it is a V2 track with a possible number       //
20 //  of cluster equal to fgkMaxNumberOfClusters    //
21 ////////////////////////////////////////////////////
22
23 #include "AliITS.h"
24 #include "AliITSgeom.h"
25 #include "AliITStrackSA.h"
26
27
28 ClassImp(AliITStrackSA)
29
30 //_____________________________________
31 AliITStrackSA:: AliITStrackSA() : AliITStrackV2(){
32 // Default constructor  
33   SetNumberOfClusters(0);
34   SetNumberOfClustersSA(0);
35   ResetIndexSA();
36 }
37
38
39 //___________________________________________________
40 AliITStrackSA::AliITStrackSA(const AliITStrackV2& t) : 
41 AliITStrackV2(t){
42 // Copy a V2 track into a SA track
43   SetNumberOfClustersSA(0);
44   ResetIndexSA();
45 }
46 //___________________________________________________
47 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) : 
48 AliITStrackV2(t){
49 // Copy constructor
50
51   ResetIndexSA();
52   Int_t number = t.GetNumberOfClustersSA();
53   SetNumberOfClustersSA(number);
54   for(Int_t i=0;i<number;i++){
55     fSain[i]=t.fSain[i];
56   }
57
58 }
59 //____________________________________________________
60 AliITStrackSA::AliITStrackSA(Int_t layer, Int_t ladder, Int_t detector, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ) {
61   // standard constructor. Used for ITS standalone tracking
62   AliITS* iTS = (AliITS*)gAlice->GetDetector("ITS");
63   if(!iTS){
64     Fatal("AliITStrackSA","ITS object not found - Abort\n");
65     return;
66   }
67   AliITSgeom *geom = iTS->GetITSgeom();
68   if(!geom){
69     Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
70     return;
71   }
72   // get the azimuthal angle of the detector containing the innermost
73   // cluster of this track (data member fAlpha)
74   Float_t rotmatr[9];
75   geom->GetRotMatrix(layer,ladder,detector,rotmatr);
76   fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
77   fAlpha+=TMath::Pi()/2.;
78   if(layer==1) fAlpha+=TMath::Pi();
79
80
81   // get the radius of this detector. Procedure taken from the 
82   // AliITStrackerV2 constructor
83   Float_t x=0,y=0,z=0;
84   geom->GetTrans(layer,ladder,detector,x,y,z);
85
86   Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
87   fi+=TMath::Pi()/2;
88   if (layer==1) fi+=TMath::Pi();
89   Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
90   fX=x*cp+y*sp;
91
92
93   fdEdx = 0;
94
95   fC00 = 0.000009; // 0.000009
96   fC10 = 0.;
97   fC11 = 0.000003; //0.000030
98   fC20 = 0.;
99   fC21 = 0.;
100   fC22 = 0.000001; //0.000001
101   fC30 = 0.;
102   fC31 = 0.;
103   fC32 = 0.;
104   fC33 = 0.000002; //0.000002
105   fC40 = 0.;
106   fC41 = 0.;
107   fC42 = 0.;
108   fC43 = 0.;
109   fC44 = 0.000001; //0.0000001
110
111   fP0 = Ycoor;
112   fP1 = Zcoor;
113   
114   fP2 = TMath::Sin(phi-fAlpha);
115   fP3 = tanlambda;
116   fP4 = curv;
117   for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0;  // to be set explicitely
118
119   for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0; 
120
121   SetNumberOfClusters(0);
122   SetNumberOfClustersSA(0);
123   ResetIndexSA();
124   SetChi2(0);
125   SetMass(0.139);    // pion mass
126   SetLabel(lab); 
127   
128 }
129
130 //____________________________________________________________
131 void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) {
132   // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
133   Int_t presnum = GetNumberOfClustersSA();
134   if(presnum>=fgkMaxNumberOfClusters){
135     Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n");
136     return;
137   }
138
139   fSain[presnum] = (layer<<28)+clnumb;  
140   presnum++;
141   SetNumberOfClustersSA(presnum);
142 }
143
144 //____________________________________________________________
145 void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) {
146   // add one clusters to the list (maximum number=6)
147   Int_t presnum = GetNumberOfClusters();
148   if(presnum>=kMaxLayer){
149     Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
150     return;
151    }    
152
153   fIndex[presnum] = (layer<<28)+clnumb;  
154   presnum++;
155   SetNumberOfClusters(presnum);
156 }
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174