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 ////////////////////////////////////////////////////
28 #include "AliITSgeom.h"
29 #include "AliITStrackSA.h"
32 ClassImp(AliITStrackSA)
34 //_____________________________________
35 AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){
36 // Default constructor
37 SetNumberOfClusters(0);
38 SetNumberOfClustersSA(0);
43 //___________________________________________________
44 AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) :
46 // Copy a V2 track into a SA track
47 SetNumberOfClustersSA(0);
50 //___________________________________________________
51 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) :
56 Int_t number = t.GetNumberOfClustersSA();
57 SetNumberOfClustersSA(number);
58 for(Int_t i=0;i<number;i++){
63 //____________________________________________________
64 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 ) {
65 // standard constructor. Used for ITS standalone tracking
66 AliITS* iTS = (AliITS*)gAlice->GetDetector("ITS");
68 Fatal("AliITStrackSA","ITS object not found - Abort\n");
71 AliITSgeom *geom = iTS->GetITSgeom();
73 Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
76 // get the azimuthal angle of the detector containing the innermost
77 // cluster of this track (data member fAlpha)
79 geom->GetRotMatrix(layer,ladder,detector,rotmatr);
80 fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
81 fAlpha+=TMath::Pi()/2.;
82 if(layer==1) fAlpha+=TMath::Pi();
85 // get the radius of this detector. Procedure taken from the
86 // AliITStrackerV2 constructor
88 geom->GetTrans(layer,ladder,detector,x,y,z);
90 Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
92 if (layer==1) fi+=TMath::Pi();
93 Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
99 fC00 = 0.000009; // 0.000009
101 fC11 = 0.000003; //0.000030
104 fC22 = 0.000001; //0.000001
108 fC33 = 0.000002; //0.000002
113 fC44 = 0.000001; //0.0000001
118 fP2 = TMath::Sin(phi-fAlpha);
121 for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely
123 for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0;
125 SetNumberOfClusters(0);
126 SetNumberOfClustersSA(0);
129 SetMass(0.139); // pion mass
134 //____________________________________________________________
135 void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) {
136 // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
137 Int_t presnum = GetNumberOfClustersSA();
138 if(presnum>=fgkMaxNumberOfClusters){
139 Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n");
143 fSain[presnum] = (layer<<28)+clnumb;
145 SetNumberOfClustersSA(presnum);
148 //____________________________________________________________
149 void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) {
150 // add one clusters to the list (maximum number=6)
151 Int_t presnum = GetNumberOfClusters();
152 if(presnum>=kMaxLayer){
153 Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
157 fIndex[presnum] = (layer<<28)+clnumb;
159 SetNumberOfClusters(presnum);