X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITStrackSA.cxx;h=101b597f7dcc86eb0721a570e6af93ec2291a7c0;hb=fcb289102b9b5323c24bf4ec175fb97fcc0260b8;hp=52eb40ba5ec9b27d7fb9ae01799a7304c0ba6341;hpb=7d62fb642e8e534a0745ecf2706ee54afa6ffa5c;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITStrackSA.cxx b/ITS/AliITStrackSA.cxx index 52eb40ba5ec..101b597f7dc 100755 --- a/ITS/AliITStrackSA.cxx +++ b/ITS/AliITStrackSA.cxx @@ -20,117 +20,162 @@ // 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 "AliITSgeom.h" +#include "AliITSgeomTGeo.h" #include "AliITStrackSA.h" ClassImp(AliITStrackSA) //_____________________________________ -AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){ +AliITStrackSA:: AliITStrackSA() : AliITStrackMI(), +fNSA(0) +{ // Default constructor SetNumberOfClusters(0); SetNumberOfClustersSA(0); ResetIndexSA(); + for(Int_t nlay=0;nlayGetRotMatrix(layer,ladder,detector,rotmatr); - fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); - fAlpha+=TMath::Pi()/2.; - if(layer==1) fAlpha+=TMath::Pi(); + TGeoHMatrix m; AliITSgeomTGeo::GetOrigMatrix(layer,ladder,detector,m); + const TGeoHMatrix *tm=AliITSgeomTGeo::GetTracking2LocalMatrix(layer,ladder,detector); + m.Multiply(tm); + Double_t txyz[3]={0.}, xyz[3]={0.}; + m.LocalToMaster(txyz,xyz); + Double_t sAlpha=TMath::ATan2(xyz[1],xyz[0]); + + if (sAlpha<0) sAlpha+=TMath::TwoPi(); + else if (sAlpha>=TMath::TwoPi()) sAlpha-=TMath::TwoPi(); + + Double_t sX=TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]); + + Init(sAlpha,sX,Ycoor,Zcoor,phi,tanlambda,curv,lab); - // get the radius of this detector. Procedure taken from the - // AliITStrackerV2 constructor - Float_t x=0,y=0,z=0; - geom->GetTrans(layer,ladder,detector,x,y,z); +} +//____________________________________________________ +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 - 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); - fX=x*cp+y*sp; + // 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; - fC00 = 0.000009; // 0.000009 - fC10 = 0.; - fC11 = 0.000003; //0.000030 - fC20 = 0.; - fC21 = 0.; - fC22 = 0.000001; //0.000001 - fC30 = 0.; - fC31 = 0.; - fC32 = 0.; - fC33 = 0.000002; //0.000002 - fC40 = 0.; - fC41 = 0.; - fC42 = 0.; - fC43 = 0.; - fC44 = 0.000001; //0.0000001 - - fP0 = Ycoor; - fP1 = Zcoor; - - fP2 = TMath::Sin(phi-fAlpha); - fP3 = tanlambda; - fP4 = curv; - for(Int_t i=0; i=fgkMaxNumberOfClusters){ + if(presnum>=kMaxNumberOfClusters){ Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n"); return; } @@ -140,11 +185,26 @@ void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) { SetNumberOfClustersSA(presnum); } +//____________________________________________________________ +void AliITStrackSA::AddClusterMark(Int_t layer, Int_t clnumb) { + // add one clusters to the list (maximum number=kMaxNumberOfClusters) + Int_t presnum = GetNumberOfMarked(layer); + // printf("presnum=%d\n",presnum); + if(presnum>=kMaxNumberOfClustersL){ + Warning("AddClusterMark","Maximum number of clusters already reached. Nothing is done\n"); + return; + } + + fCluMark[layer][presnum] = clnumb; + presnum++; + SetNumberOfMarked(layer,presnum); +} + //____________________________________________________________ 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; } @@ -154,20 +214,12 @@ void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) { SetNumberOfClusters(presnum); } +//_____________________________________________________________ +void AliITStrackSA::ResetMarked(){ - - - - - - - - - - - - - - - + //Reset array of marked clusters + for(Int_t nlay=0;nlay