X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITStrackSA.cxx;h=101b597f7dcc86eb0721a570e6af93ec2291a7c0;hb=07c5eeac37c8fb5b201b845f538daf3941b1a08e;hp=d8ccd60607db41e68238aee54e70c23706c7c965;hpb=cc0886606811c567e78d51692d932366041fbc26;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITStrackSA.cxx b/ITS/AliITStrackSA.cxx index d8ccd60607d..101b597f7dc 100755 --- a/ITS/AliITStrackSA.cxx +++ b/ITS/AliITStrackSA.cxx @@ -20,7 +20,7 @@ // Origin: Elisabetta Crescio // // e-mail: crescio@to.infn.it // // it is a V2 track with a possible number // -// of cluster equal to fgkMaxNumberOfClusters // +// of cluster equal to kMaxNumberOfClusters // //////////////////////////////////////////////////// #include "AliITSgeomTGeo.h" @@ -37,7 +37,7 @@ fNSA(0) SetNumberOfClusters(0); SetNumberOfClustersSA(0); ResetIndexSA(); - for(Int_t nlay=0;nlay=TMath::TwoPi()) sAlpha-=TMath::TwoPi(); - Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); - fi+=TMath::Pi()/2; - if (layer==1) fi+=TMath::Pi(); - Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi); - Double_t sX=x*cp+y*sp; + Double_t sX=TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]); + Init(sAlpha,sX,Ycoor,Zcoor,phi,tanlambda,curv,lab); + +} +//____________________________________________________ +AliITStrackSA::AliITStrackSA(Double_t alpha, Double_t radius, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ): +fNSA(0) +{ + // standard constructor. Used for ITS standalone tracking + + // get the azimuthal angle of the detector containing the innermost + // cluster of this track (data member fAlpha) + + if (alpha<0) alpha+=TMath::TwoPi(); + else if (alpha>=TMath::TwoPi()) alpha-=TMath::TwoPi(); + Init(alpha,radius,Ycoor,Zcoor,phi,tanlambda,curv,lab); +} +//____________________________________________________ + void AliITStrackSA::Init(Double_t alpha, Double_t radius, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ){ + // initialize parameters fdEdx = 0; @@ -132,19 +142,27 @@ fNSA(0) Double_t sP[] = {Ycoor, Zcoor, - TMath::Sin(phi-sAlpha), + TMath::Sin(phi-alpha), tanlambda, curv/conv}; - Set(sX,sAlpha,sP,sC); - for(Int_t i=0; i=fgkMaxNumberOfClusters){ + if(presnum>=kMaxNumberOfClusters){ Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n"); return; } @@ -169,10 +187,10 @@ void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) { //____________________________________________________________ void AliITStrackSA::AddClusterMark(Int_t layer, Int_t clnumb) { - // add one clusters to the list (maximum number=fgkMaxNumberOfClusters) + // add one clusters to the list (maximum number=kMaxNumberOfClusters) Int_t presnum = GetNumberOfMarked(layer); // printf("presnum=%d\n",presnum); - if(presnum>=fgkMaxNumberOfClustersL){ + if(presnum>=kMaxNumberOfClustersL){ Warning("AddClusterMark","Maximum number of clusters already reached. Nothing is done\n"); return; } @@ -186,7 +204,7 @@ void AliITStrackSA::AddClusterMark(Int_t layer, Int_t clnumb) { void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) { // add one clusters to the list (maximum number=6) Int_t presnum = GetNumberOfClusters(); - if(presnum>=kMaxLayer){ + if(presnum>=AliITSgeomTGeo::GetNLayers()){ Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n"); return; } @@ -200,21 +218,8 @@ void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) { void AliITStrackSA::ResetMarked(){ //Reset array of marked clusters - for(Int_t nlay=0;nlay