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 ////////////////////////////////////////////////////
25 #include "AliITSgeom.h"
26 #include "AliITStrackSA.h"
29 ClassImp(AliITStrackSA)
31 //_____________________________________
32 AliITStrackSA:: AliITStrackSA() : AliITStrackV2(){
33 // Default constructor
34 SetNumberOfClusters(0);
35 SetNumberOfClustersSA(0);
40 //___________________________________________________
41 AliITStrackSA::AliITStrackSA(const AliITStrackV2& t) :
43 // Copy a V2 track into a SA track
44 SetNumberOfClustersSA(0);
47 //___________________________________________________
48 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) :
53 Int_t number = t.GetNumberOfClustersSA();
54 SetNumberOfClustersSA(number);
55 for(Int_t i=0;i<number;i++){
60 //____________________________________________________
61 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 ) {
62 // standard constructor. Used for ITS standalone tracking
63 AliITS* iTS = (AliITS*)gAlice->GetDetector("ITS");
65 Fatal("AliITStrackSA","ITS object not found - Abort\n");
68 AliITSgeom *geom = iTS->GetITSgeom();
70 Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
73 // get the azimuthal angle of the detector containing the innermost
74 // cluster of this track (data member fAlpha)
76 geom->GetRotMatrix(layer,ladder,detector,rotmatr);
77 fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
78 fAlpha+=TMath::Pi()/2.;
79 if(layer==1) fAlpha+=TMath::Pi();
82 // get the radius of this detector. Procedure taken from the
83 // AliITStrackerV2 constructor
85 geom->GetTrans(layer,ladder,detector,x,y,z);
87 Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
89 if (layer==1) fi+=TMath::Pi();
90 Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
96 fC00 = 0.000009; // 0.000009
98 fC11 = 0.000003; //0.000030
101 fC22 = 0.000001; //0.000001
105 fC33 = 0.000002; //0.000002
110 fC44 = 0.000001; //0.0000001
115 fP2 = TMath::Sin(phi-fAlpha);
118 for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely
120 for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0;
122 SetNumberOfClusters(0);
123 SetNumberOfClustersSA(0);
126 SetMass(0.139); // pion mass
131 //____________________________________________________________
132 void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) {
133 // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
134 Int_t presnum = GetNumberOfClustersSA();
135 if(presnum>=fgkMaxNumberOfClusters){
136 Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n");
140 fSain[presnum] = (layer<<28)+clnumb;
142 SetNumberOfClustersSA(presnum);
145 //____________________________________________________________
146 void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) {
147 // add one clusters to the list (maximum number=6)
148 Int_t presnum = GetNumberOfClusters();
149 if(presnum>=kMaxLayer){
150 Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
154 fIndex[presnum] = (layer<<28)+clnumb;
156 SetNumberOfClusters(presnum);