1 /**************************************************************************
2 * Copyright(c) 1998-2003, 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 // Stand alone track class //
20 // Origin: Elisabetta Crescio //
21 // e-mail: crescio@to.infn.it //
22 // it is a V2 track with a possible number //
23 // of cluster equal to fgkMaxNumberOfClusters //
24 ////////////////////////////////////////////////////
26 #include "AliITSgeom.h"
27 #include "AliITStrackSA.h"
30 ClassImp(AliITStrackSA)
32 //_____________________________________
33 AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){
34 // Default constructor
35 SetNumberOfClusters(0);
36 SetNumberOfClustersSA(0);
38 for(Int_t nlay=0;nlay<fgkLayers;nlay++){
39 SetNumberOfMarked(nlay,0);
45 //___________________________________________________
46 AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) :
48 // Copy a V2 track into a SA track
49 SetNumberOfClustersSA(0);
51 for(Int_t nlay=0;nlay<fgkLayers;nlay++){
52 SetNumberOfMarked(nlay,0);
57 //___________________________________________________
58 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) :
65 Int_t number = t.GetNumberOfClustersSA();
66 SetNumberOfClustersSA(number);
67 for(Int_t nlay=0;nlay<fgkLayers;nlay++){
68 SetNumberOfMarked(nlay,t.GetNumberOfMarked(nlay));
70 for(Int_t i=0;i<number;i++){
73 for(Int_t nlay=0;nlay<fgkLayers;nlay++){
74 for(Int_t i=0;i<t.GetNumberOfMarked(nlay);i++){
75 fCluMark[nlay][i]=t.fCluMark[nlay][i];
79 //____________________________________________________
80 AliITStrackSA::AliITStrackSA(AliITSgeom* geom,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 ) {
81 // standard constructor. Used for ITS standalone tracking
84 Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
87 // get the azimuthal angle of the detector containing the innermost
88 // cluster of this track (data member fAlpha)
90 geom->GetRotMatrix(layer,ladder,detector,rotmatr);
91 fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
92 fAlpha+=TMath::Pi()/2.;
93 if(layer==1) fAlpha+=TMath::Pi();
96 // get the radius of this detector. Procedure taken from the
97 // AliITStrackerV2 constructor
99 geom->GetTrans(layer,ladder,detector,x,y,z);
101 Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
103 if (layer==1) fi+=TMath::Pi();
104 Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
110 fC00 = 0.000009; // 0.000009
112 fC11 = 0.000003; //0.000030
115 fC22 = 0.000001; //0.000001
119 fC33 = 0.000002; //0.000002
124 fC44 = 0.000001; //0.0000001
129 fP2 = TMath::Sin(phi-fAlpha);
132 for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely
134 for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0;
136 SetNumberOfClusters(0);
137 SetNumberOfClustersSA(0);
138 for(Int_t nlay=0;nlay<fgkLayers;nlay++) SetNumberOfMarked(nlay,0);
142 SetMass(0.139); // pion mass
148 //____________________________________________________________
149 void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) {
150 // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
151 Int_t presnum = GetNumberOfClustersSA();
152 if(presnum>=fgkMaxNumberOfClusters){
153 Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n");
157 fSain[presnum] = (layer<<28)+clnumb;
159 SetNumberOfClustersSA(presnum);
162 //____________________________________________________________
163 void AliITStrackSA::AddClusterMark(Int_t layer, Int_t clnumb) {
164 // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
165 Int_t presnum = GetNumberOfMarked(layer);
166 // printf("presnum=%d\n",presnum);
167 if(presnum>=fgkMaxNumberOfClustersL){
168 Warning("AddClusterMark","Maximum number of clusters already reached. Nothing is done\n");
172 fCluMark[layer][presnum] = clnumb;
174 SetNumberOfMarked(layer,presnum);
177 //____________________________________________________________
178 void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) {
179 // add one clusters to the list (maximum number=6)
180 Int_t presnum = GetNumberOfClusters();
181 if(presnum>=kMaxLayer){
182 Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
186 fIndex[presnum] = (layer<<28)+clnumb;
188 SetNumberOfClusters(presnum);
191 //_____________________________________________________________
192 void AliITStrackSA::ResetMarked(){
194 //Reset array of marked clusters
195 for(Int_t nlay=0;nlay<fgkLayers;nlay++){
196 for(Int_t k=0; k<fgkMaxNumberOfClustersL; k++) fCluMark[nlay][k]=0;