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 **************************************************************************/
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 ////////////////////////////////////////////////////
24 #include "AliITSgeom.h"
25 #include "AliITStrackSA.h"
28 ClassImp(AliITStrackSA)
30 //_____________________________________
31 AliITStrackSA:: AliITStrackSA() : AliITStrackV2(){
32 // Default constructor
33 SetNumberOfClusters(0);
34 SetNumberOfClustersSA(0);
39 //___________________________________________________
40 AliITStrackSA::AliITStrackSA(const AliITStrackV2& t) :
42 // Copy a V2 track into a SA track
43 SetNumberOfClustersSA(0);
46 //___________________________________________________
47 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) :
52 Int_t number = t.GetNumberOfClustersSA();
53 SetNumberOfClustersSA(number);
54 for(Int_t i=0;i<number;i++){
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");
64 Fatal("AliITStrackSA","ITS object not found - Abort\n");
67 AliITSgeom *geom = iTS->GetITSgeom();
69 Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
72 // get the azimuthal angle of the detector containing the innermost
73 // cluster of this track (data member fAlpha)
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();
81 // get the radius of this detector. Procedure taken from the
82 // AliITStrackerV2 constructor
84 geom->GetTrans(layer,ladder,detector,x,y,z);
86 Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
88 if (layer==1) fi+=TMath::Pi();
89 Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
95 fC00 = 0.000009; // 0.000009
97 fC11 = 0.000003; //0.000030
100 fC22 = 0.000001; //0.000001
104 fC33 = 0.000002; //0.000002
109 fC44 = 0.000001; //0.0000001
114 fP2 = TMath::Sin(phi-fAlpha);
117 for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely
119 for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0;
121 SetNumberOfClusters(0);
122 SetNumberOfClustersSA(0);
125 SetMass(0.139); // pion mass
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");
139 fSain[presnum] = (layer<<28)+clnumb;
141 SetNumberOfClustersSA(presnum);
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");
153 fIndex[presnum] = (layer<<28)+clnumb;
155 SetNumberOfClusters(presnum);