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);
41 //___________________________________________________
42 AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) :
44 // Copy a V2 track into a SA track
45 SetNumberOfClustersSA(0);
48 //___________________________________________________
49 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) :
55 Int_t number = t.GetNumberOfClustersSA();
56 SetNumberOfClustersSA(number);
57 for(Int_t i=0;i<number;i++){
62 //____________________________________________________
63 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 ) {
64 // standard constructor. Used for ITS standalone tracking
67 Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
70 // get the azimuthal angle of the detector containing the innermost
71 // cluster of this track (data member fAlpha)
73 geom->GetRotMatrix(layer,ladder,detector,rotmatr);
74 fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
75 fAlpha+=TMath::Pi()/2.;
76 if(layer==1) fAlpha+=TMath::Pi();
79 // get the radius of this detector. Procedure taken from the
80 // AliITStrackerV2 constructor
82 geom->GetTrans(layer,ladder,detector,x,y,z);
84 Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
86 if (layer==1) fi+=TMath::Pi();
87 Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi);
93 fC00 = 0.000009; // 0.000009
95 fC11 = 0.000003; //0.000030
98 fC22 = 0.000001; //0.000001
102 fC33 = 0.000002; //0.000002
107 fC44 = 0.000001; //0.0000001
112 fP2 = TMath::Sin(phi-fAlpha);
115 for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely
117 for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0;
119 SetNumberOfClusters(0);
120 SetNumberOfClustersSA(0);
123 SetMass(0.139); // pion mass
129 //____________________________________________________________
130 void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) {
131 // add one clusters to the list (maximum number=fgkMaxNumberOfClusters)
132 Int_t presnum = GetNumberOfClustersSA();
133 if(presnum>=fgkMaxNumberOfClusters){
134 Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n");
138 fSain[presnum] = (layer<<28)+clnumb;
140 SetNumberOfClustersSA(presnum);
143 //____________________________________________________________
144 void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) {
145 // add one clusters to the list (maximum number=6)
146 Int_t presnum = GetNumberOfClusters();
147 if(presnum>=kMaxLayer){
148 Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
152 fIndex[presnum] = (layer<<28)+clnumb;
154 SetNumberOfClusters(presnum);