From 00a7cc50a892d6950eb32c6eb20b2088fed1e164 Mon Sep 17 00:00:00 2001 From: masera Date: Fri, 3 Mar 2006 17:24:15 +0000 Subject: [PATCH] merging RecPoints and ClustersV2. All ClusterFinders produce AliITSRecPoints objects, with AliITSclusterV2 functionalities. Standard V2 reconstruction is used by default --- ITS/AliITS.cxx | 75 ++------- ITS/AliITS.h | 2 - ITS/AliITSClusterFinder.h | 2 +- ITS/AliITSClusterFinderSDD.cxx | 24 ++- ITS/AliITSClusterFinderSPD.cxx | 19 ++- ITS/AliITSClusterFinderSSD.cxx | 22 ++- ITS/AliITSClusterFinderV2.cxx | 7 +- ITS/AliITSClusterFinderV2.h | 6 +- ITS/AliITSClusterFinderV2SDD.cxx | 15 +- ITS/AliITSClusterFinderV2SPD.cxx | 12 +- ITS/AliITSClusterFinderV2SSD.cxx | 237 +++++++++++++++++---------- ITS/AliITSComparisonV2.C | 8 +- ITS/AliITSDetTypeRec.cxx | 104 ++++-------- ITS/AliITSDetTypeRec.h | 11 +- ITS/AliITSFindClustersV2.cxx | 4 +- ITS/AliITSGeoPlot.C | 19 +-- ITS/AliITSHits2FastRecPoints.C | 29 +++- ITS/AliITSL2GConvertPointsV2.C | 4 +- ITS/AliITSNeuralPoint.cxx | 20 +-- ITS/AliITSNeuralPoint.h | 4 +- ITS/AliITSRecPoint.cxx | 107 ++++++++++-- ITS/AliITSRecPoint.h | 144 +++++++++++----- ITS/AliITSReconstructor.cxx | 83 +++++----- ITS/AliITSRiemannFit.cxx | 12 +- ITS/AliITSVertexer.cxx | 26 +-- ITS/AliITSVertexer.h | 2 +- ITS/AliITSVertexerIons.cxx | 4 +- ITS/AliITSVertexerPPZ.cxx | 52 +++--- ITS/AliITSVertexerZ.cxx | 48 +++--- ITS/AliITSclustererV2.cxx | 4 +- ITS/AliITSgeom.cxx | 23 ++- ITS/AliITSgeom.h | 7 + ITS/AliITSsimulationFastPoints.cxx | 21 ++- ITS/AliITSsimulationFastPointsV0.cxx | 62 ++++--- ITS/AliITStrackerANN.cxx | 22 +-- ITS/AliITStrackerMI.cxx | 100 +++++------ ITS/AliITStrackerMI.h | 37 ++--- ITS/AliITStrackerSA.cxx | 56 ++++--- ITS/AliITStrackerSA.h | 6 +- ITS/AliITStrackerV2.cxx | 38 ++--- ITS/AliITStrackerV2.h | 14 +- 41 files changed, 837 insertions(+), 655 deletions(-) diff --git a/ITS/AliITS.cxx b/ITS/AliITS.cxx index b505d465b9a..36df1727d56 100644 --- a/ITS/AliITS.cxx +++ b/ITS/AliITS.cxx @@ -85,7 +85,6 @@ the AliITS class. #include "AliMC.h" #include "AliITSDigitizer.h" #include "AliITSRecPoint.h" -#include "AliITSclusterV2.h" #include "AliRun.h" #include "AliLog.h" @@ -837,6 +836,7 @@ void AliITS::HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, // none. + if(!GetITSgeom()){ Error("HitsToPreDigits","fGeom is null!"); return; // need transformations to do digitization. @@ -857,12 +857,14 @@ void AliITS::HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, Int_t id,module; TTree *lTR = pITSloader->TreeR(); - TBranch* branch = lTR->GetBranch("ITSRecPointsF"); + if(!lTR) { + pITSloader->MakeTree("R"); + lTR = pITSloader->TreeR(); + } + TClonesArray* ptarray = new TClonesArray("AliITSRecPoint",1000); - if(branch) branch->SetAddress(ptarray); - else lTR->Branch("ITSRecPointsF",&ptarray); - - + TBranch* branch = (TBranch*)lTR->Branch("ITSRecPointsF",&ptarray); + branch->SetAddress(&ptarray); //m.b. : this change is nothing but a nice way to make sure //the CPU goes up ! AliDebug(1,Form("N mod = %d",geom->GetIndexMax())); @@ -900,22 +902,18 @@ Int_t AliITS::Hits2Clusters(TTree *hTree, TTree *cTree) { InitModules(-1,mmax); FillModules(hTree,0); - TClonesArray *clusters=new TClonesArray("AliITSclusterV2",1000); - TBranch *branch=cTree->GetBranch("Clusters"); - if (!branch) cTree->Branch("Clusters",&clusters); - else branch->SetAddress(&clusters); - TClonesArray *points = new TClonesArray("AliITSRecPoint",1000); + TBranch *branch=cTree->GetBranch("ITSRecPoints"); + if (!branch) cTree->Branch("ITSRecPoints",&points); + else branch->SetAddress(&points); AliITSsimulationFastPoints sim; Int_t ncl=0; for (Int_t m=0; mGetEntriesFast(); + ncl+=points->GetEntriesFast(); cTree->Fill(); - clusters->Clear(); points->Clear(); } @@ -923,59 +921,10 @@ Int_t AliITS::Hits2Clusters(TTree *hTree, TTree *cTree) { //cTree->Write(); - delete clusters; delete points; return 0; } -//_____________________________________________________________________ -void AliITS::RecPoints2Clusters -(const TClonesArray *points, Int_t idx, TClonesArray *clusters) { - //------------------------------------------------------------ - // Conversion AliITSRecPoint -> AliITSclusterV2 for the ITS - // subdetector indexed by idx - //------------------------------------------------------------ - - if(!GetITSgeom()){ - Error("HitsToPreDigits","fGeom is null!"); - return; // need transformations to do digitization. - } - AliITSgeom *g=GetITSgeom(); - Int_t mmax = g->GetIndexMax(); - Float_t yshift[2200]; - Float_t zshift[2200]; - Int_t ndet[2200]; - for (Int_t m=0; mGetModuleId(m,lay,lad,det); - Float_t x,y,z; g->GetTrans(lay,lad,det,x,y,z); - Double_t rot[9]; g->GetRotMatrix(lay,lad,det,rot); - Double_t alpha=TMath::ATan2(rot[1],rot[0])+TMath::Pi(); - Double_t ca=TMath::Cos(alpha), sa=TMath::Sin(alpha); - yshift[m] = x*ca + y*sa; - zshift[m] = (Double_t)z; - ndet[m] = (lad-1)*g->GetNdetectors(lay) + (det-1); - } - //SPD geometry - Float_t lastSPD1=g->GetModuleIndex(2,1,1)-1; - - TClonesArray &cl=*clusters; - Int_t ncl=points->GetEntriesFast(); - for (Int_t i=0; iUncheckedAt(i); - Float_t lp[5]; - lp[0]=-(-p->GetX()+yshift[idx]); if (idx<=lastSPD1) lp[0]*=-1; //SPD1 - lp[1]= -p->GetZ()+zshift[idx]; - lp[2]=p->GetSigmaX2(); - lp[3]=p->GetSigmaZ2(); - lp[4]=p->GetQ()*36./23333.; //electrons -> ADC - Int_t lab[4]; - lab[0]=p->GetLabel(0); lab[1]=p->GetLabel(1); lab[2]=p->GetLabel(2); - lab[3]=ndet[idx]; - CheckLabels(lab); - Int_t dummy[3]={0,0,0}; - new (cl[i]) AliITSclusterV2(lab,lp, dummy); - } -} //_____________________________________________________________________ void AliITS::CheckLabels(Int_t lab[3]) const { //------------------------------------------------------------ diff --git a/ITS/AliITS.h b/ITS/AliITS.h index b8720559f71..14c6f326c54 100644 --- a/ITS/AliITS.h +++ b/ITS/AliITS.h @@ -139,8 +139,6 @@ class AliITS : public AliDetector { virtual void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, Option_t *add, Option_t *det, const char *filename); virtual Int_t Hits2Clusters(TTree *in, TTree *out); - virtual void RecPoints2Clusters - (const TClonesArray *points, Int_t idx, TClonesArray *clusters); virtual void CheckLabels(Int_t lab[3]) const; //===================== Raw Data IO ================================ diff --git a/ITS/AliITSClusterFinder.h b/ITS/AliITSClusterFinder.h index afb75b24627..adda6238925 100644 --- a/ITS/AliITSClusterFinder.h +++ b/ITS/AliITSClusterFinder.h @@ -71,7 +71,7 @@ class AliITSClusterFinder :public TObject{ FillCluster(cluster,1);} virtual void SetModule(Int_t module){fModule = module;}// Set module number - virtual Int_t GetModule()const{return fModule;}// Returns module number + virtual Int_t GetModule()const {return fModule;}// Returns module number // // RecPoints // Given a cluster of digits, creates the nessesary RecPoint. May also diff --git a/ITS/AliITSClusterFinderSDD.cxx b/ITS/AliITSClusterFinderSDD.cxx index fa263f53e2e..6430c48401d 100644 --- a/ITS/AliITSClusterFinderSDD.cxx +++ b/ITS/AliITSClusterFinderSDD.cxx @@ -28,7 +28,6 @@ #include "AliITSRecPoint.h" #include "AliITSdigitSDD.h" #include "AliITSDetTypeRec.h" -#include "AliITSresponseSDD.h" #include "AliITSCalibrationSDD.h" #include "AliITSsegmentationSDD.h" #include "AliLog.h" @@ -929,6 +928,13 @@ void AliITSClusterFinderSDD::GetRecPoints(){ Int_t ix, iz, idx=-1; AliITSdigitSDD *dig=0; Int_t ndigits=NDigits(); + + Int_t lay,lad,det; + fDetTypeRec->GetITSgeom()->GetModuleId(fModule,lay,lad,det); + Int_t ind=(lad-1)*fDetTypeRec->GetITSgeom()->GetNdetectors(lay)+(det-1); + Int_t lyr=(lay-1); + + for(i=0; iGetHit(iz-1,ix+1); if (!dig) printf("SDD: cannot assign the track number!\n"); } // end if !dig - AliITSRecPoint rnew; - rnew.SetX(clusterI->X()); - rnew.SetZ(clusterI->Z()); + AliITSRecPoint rnew(fDetTypeRec->GetITSgeom()); + rnew.SetXZ(fModule,clusterI->X(),clusterI->Z()); rnew.SetQ(clusterI->Q()); // in KeV - should be ADC rnew.SetdEdX(kconvGeV*clusterI->Q()); - rnew.SetSigmaX2(kRMSx*kRMSx); + rnew.SetSigmaDetLocX2(kRMSx*kRMSx); rnew.SetSigmaZ2(kRMSz*kRMSz); - if(dig) rnew.fTracks[0]=dig->GetTrack(0); - if(dig) rnew.fTracks[1]=dig->GetTrack(1); - if(dig) rnew.fTracks[2]=dig->GetTrack(2); - + if(dig) rnew.SetLabel(dig->GetTrack(0),0); + if(dig) rnew.SetLabel(dig->GetTrack(1),1); + if(dig) rnew.SetLabel(dig->GetTrack(2),2); + rnew.SetDetectorIndex(ind); + rnew.SetLayer(lyr); fDetTypeRec->AddRecPoint(rnew); } // I clusters // Map()->ClearMap(); diff --git a/ITS/AliITSClusterFinderSPD.cxx b/ITS/AliITSClusterFinderSPD.cxx index a56bf3cd2cc..f25750ecfd7 100644 --- a/ITS/AliITSClusterFinderSPD.cxx +++ b/ITS/AliITSClusterFinderSPD.cxx @@ -404,6 +404,10 @@ void AliITSClusterFinderSPD::DigitToPoint(Int_t nclus, Double_t l[3],xg,zg; const Double_t kconv = 1.0e-4; // micron -> cm + Int_t lay,lad,det; + fDetTypeRec->GetITSgeom()->GetModuleId(fModule,lay,lad,det); + Int_t ind=(lad-1)*fDetTypeRec->GetITSgeom()->GetNdetectors(lay)+(det-1); + Int_t lyr=(lay-1); // get rec points for (Int_t i=0; iGetITSgeom()); + rnew.SetXZ(fModule,xg,zg); rnew.SetQ(1.); rnew.SetdEdX(0.); - rnew.SetSigmaX2(sigma2x); + rnew.SetSigmaDetLocX2(sigma2x); rnew.SetSigmaZ2(sigma2z); - rnew.fTracks[0]=tr1clus[i]; - rnew.fTracks[1]=tr2clus[i]; - rnew.fTracks[2]=tr3clus[i]; + rnew.SetLabel(tr1clus[i],0); + rnew.SetLabel(tr2clus[i],1); + rnew.SetLabel(tr3clus[i],2); + rnew.SetDetectorIndex(ind); + rnew.SetLayer(lyr); fDetTypeRec->AddRecPoint(rnew); } // end for i } diff --git a/ITS/AliITSClusterFinderSSD.cxx b/ITS/AliITSClusterFinderSSD.cxx index c896b6954dd..d0572fffa3d 100644 --- a/ITS/AliITSClusterFinderSSD.cxx +++ b/ITS/AliITSClusterFinderSSD.cxx @@ -28,7 +28,6 @@ #include "AliITSRecPoint.h" #include "AliITSclusterSSD.h" #include "AliITSdigitSSD.h" -#include "AliITSgeom.h" #include "AliITSpackageSSD.h" #include "AliITSsegmentationSSD.h" #include "AliLog.h" @@ -624,6 +623,12 @@ Bool_t AliITSClusterFinderSSD::CreateNewRecPoint(Double_t P,Double_t dP, Int_t *tr; Int_t ntracks; + Int_t lay,lad,det; + fDetTypeRec->GetITSgeom()->GetModuleId(fModule,lay,lad,det); + Int_t ind=(lad-1)*fDetTypeRec->GetITSgeom()->GetNdetectors(lay)+(det-1); + Int_t lyr=(lay-1); + + if (GetCrossing(P,N)) { //GetCrossingError(dP,dN); dP = dN = prob = 0.0; // to remove unused variable warning. @@ -648,16 +653,17 @@ Bool_t AliITSClusterFinderSSD::CreateNewRecPoint(Double_t P,Double_t dP, cnew.SetQErr(TMath::Abs(SigP-SigN)); cnew.SetNTrack(ntracks); fDetTypeRec->AddCluster(2,&cnew); - AliITSRecPoint rnew; - rnew.SetX(P*kconv); - rnew.SetZ(N*kconv); + AliITSRecPoint rnew(fDetTypeRec->GetITSgeom()); + rnew.SetXZ(fModule,P*kconv,N*kconv); rnew.SetQ(signal); rnew.SetdEdX(dedx); - rnew.SetSigmaX2( kRMSx* kRMSx); + rnew.SetSigmaDetLocX2( kRMSx* kRMSx); rnew.SetSigmaZ2( kRMSz* kRMSz); - rnew.fTracks[0]=tr[0]; - rnew.fTracks[1]=tr[1]; - rnew.fTracks[2]=tr[2]; + rnew.SetLabel(tr[0],0); + rnew.SetLabel(tr[1],1); + rnew.SetLabel(tr[2],2); + rnew.SetDetectorIndex(ind); + rnew.SetLayer(lyr); fDetTypeRec->AddRecPoint(rnew); return kTRUE; diff --git a/ITS/AliITSClusterFinderV2.cxx b/ITS/AliITSClusterFinderV2.cxx index 2be96be3948..a6074d4e9ef 100644 --- a/ITS/AliITSClusterFinderV2.cxx +++ b/ITS/AliITSClusterFinderV2.cxx @@ -22,7 +22,7 @@ #include "AliRun.h" #include "AliITSClusterFinderV2.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSDetTypeRec.h" //#include "AliITSgeom.h" #include @@ -227,7 +227,7 @@ MarkPeak(Int_t k, Int_t max, AliBin *bins, UInt_t m) { //______________________________________________________________________ void AliITSClusterFinderV2:: -MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSclusterV2 &c) { +MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSRecPoint &c) { //------------------------------------------------------------ //make cluster using digits of this peak //------------------------------------------------------------ @@ -235,8 +235,7 @@ MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSclusterV2 &c) { Int_t i=k/max, j=k-i*max; c.SetQ(c.GetQ()+q); - c.SetY(c.GetY()+i*q); - c.SetZ(c.GetZ()+j*q); + c.SetYZ(GetModule(),c.GetY()+i*q,c.GetZ()+j*q); c.SetSigmaY2(c.GetSigmaY2()+i*i*q); c.SetSigmaZ2(c.GetSigmaZ2()+j*j*q); diff --git a/ITS/AliITSClusterFinderV2.h b/ITS/AliITSClusterFinderV2.h index 482ed64ede6..a41f9b00b97 100644 --- a/ITS/AliITSClusterFinderV2.h +++ b/ITS/AliITSClusterFinderV2.h @@ -9,7 +9,7 @@ //////////////////////////////////////////////////////////////////// #include "AliITSClusterFinder.h" -class AliITSclusterV2; +class AliITSRecPoint; class AliRawReader; class AliITSgeom; @@ -58,12 +58,10 @@ protected: UInt_t fMask; //peak mask UShort_t fQ; //signal }; + void MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSRecPoint &c); static Bool_t IsMaximum(Int_t k, Int_t max, const AliBin *bins); static void FindPeaks(Int_t k,Int_t m,AliBin*b,Int_t*idx,UInt_t*msk,Int_t&n); static void MarkPeak(Int_t k, Int_t max, AliBin *bins, UInt_t m); - static void MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m, - AliITSclusterV2 &c); - static void FindCluster(Int_t k,Int_t maxz,AliBin *bins,Int_t &n,Int_t *idx); protected: diff --git a/ITS/AliITSClusterFinderV2SDD.cxx b/ITS/AliITSClusterFinderV2SDD.cxx index 69451ef1a4d..7dea7a642fe 100644 --- a/ITS/AliITSClusterFinderV2SDD.cxx +++ b/ITS/AliITSClusterFinderV2SDD.cxx @@ -22,7 +22,7 @@ #include "AliITSClusterFinderV2SDD.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSDetTypeRec.h" #include "AliRawReader.h" #include "AliITSRawStreamSDD.h" @@ -140,7 +140,7 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins, for (k=0; kGetITSgeom()); MakeCluster(idx[k], nzBins, bins[s], msk[k], c); //mi change Int_t milab[10]; @@ -217,8 +217,9 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins, y=-(-y+fYshift[fModule]); z= -z+fZshift[fModule]; - c.SetY(y); - c.SetZ(z); + // c.SetY(y); + // c.SetZ(z); + c.SetYZ(fModule,y,z); c.SetNy(maxj-minj+1); c.SetNz(maxi-mini+1); c.SetType(npeaks); @@ -242,9 +243,9 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins, c.SetLayer(fNlayer[fModule]); } } - if(clusters) new (cl[ncl]) AliITSclusterV2(c); + if(clusters) new (cl[ncl]) AliITSRecPoint(c); else { - fDetTypeRec->AddClusterV2(c); + fDetTypeRec->AddRecPoint(c); } ncl++; } @@ -285,7 +286,7 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input, // when all data from a module was read, search for clusters if (bins[0]) { - clusters[iModule] = new TClonesArray("AliITSclusterV2"); + clusters[iModule] = new TClonesArray("AliITSRecPoint"); fModule = iModule; FindClustersSDD(bins, kMaxBin, kNzBins, NULL, clusters[iModule]); Int_t nClusters = clusters[iModule]->GetEntriesFast(); diff --git a/ITS/AliITSClusterFinderV2SPD.cxx b/ITS/AliITSClusterFinderV2SPD.cxx index 55b232e1644..f92dabfecc0 100644 --- a/ITS/AliITSClusterFinderV2SPD.cxx +++ b/ITS/AliITSClusterFinderV2SPD.cxx @@ -21,7 +21,7 @@ #include "AliITSClusterFinderV2SPD.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSDetTypeRec.h" #include "AliRawReader.h" #include "AliITSRawStreamSPD.h" @@ -192,17 +192,17 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T hit[1] = -z+fZshift[iModule]; hit[2] = fYpitchSPD*fYpitchSPD/12.; hit[3] = fZ1pitchSPD*fZ1pitchSPD/12.; - hit[4] = (zmax-zmin+1)*100 + (ymax-ymin+1); + hit[4] = 1.; if(!rawdata) milab[3]=fNdet[iModule]; Int_t info[3] = {ymax-ymin+1,zmax-zmin+1,fNlayer[iModule]}; if(!rawdata){ - AliITSclusterV2 cl(milab,hit,info); - fDetTypeRec->AddClusterV2(cl); + AliITSRecPoint cl(iModule,fDetTypeRec->GetITSgeom(),milab,hit,info); + fDetTypeRec->AddRecPoint(cl); } else{ Int_t label[4]={milab[0],milab[1],milab[2],milab[3]}; new (clusters->AddrAt(nclu)) - AliITSclusterV2(label, hit,info); + AliITSRecPoint(iModule,fDetTypeRec->GetITSgeom(),label, hit,info); } nclu++; }// for iiy @@ -237,7 +237,7 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input, // when all data from a module was read, search for clusters if (bins) { - clusters[iModule] = new TClonesArray("AliITSclusterV2"); + clusters[iModule] = new TClonesArray("AliITSRecPoint"); Int_t nClusters = ClustersSPD(bins,0,clusters[iModule],kMaxBin,kNzBins,iModule,kTRUE); nClustersSPD += nClusters; bins = NULL; diff --git a/ITS/AliITSClusterFinderV2SSD.cxx b/ITS/AliITSClusterFinderV2SSD.cxx index f9c121e3b20..873d0b8cbaf 100644 --- a/ITS/AliITSClusterFinderV2SSD.cxx +++ b/ITS/AliITSClusterFinderV2SSD.cxx @@ -21,7 +21,7 @@ #include "AliITSClusterFinderV2SSD.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSDetTypeRec.h" #include "AliRawReader.h" #include "AliITSRawStreamSSD.h" @@ -269,7 +269,7 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input, // when all data from a module was read, search for clusters if (prevFlag >= 0) { - clusters[iModule] = new TClonesArray("AliITSclusterV2"); + clusters[iModule] = new TClonesArray("AliITSRecPoint"); fModule = iModule; FindClustersSSD(&clusters1D[0][0], nClusters[0], &clusters1D[1][0], nClusters[1], clusters[iModule]); @@ -408,22 +408,34 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, CheckLabels2(milab); milab[3]=(((ip<<10) + j)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[ip].GetNd(),neg[j].GetNd(),fNlayer[fModule]}; - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(1); + pairs[ip][j]=1; + if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster + cl2->SetType(2); + pairs[ip][j]=2; + } + cused1[ip]++; + cused2[j]++; + + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(1); + pairs[ip][j]=1; + if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster + cl2->SetType(2); + pairs[ip][j]=2; + } + cused1[ip]++; + cused2[j]++; + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(1); - pairs[ip][j]=1; - if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster - cl2->SetType(2); - pairs[ip][j]=2; - } - cused1[ip]++; - cused2[j]++; } } @@ -465,25 +477,36 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, milab[3]=(((ip<<10) + in)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[ip].GetNd(),neg[in].GetNd(),fNlayer[fModule]}; - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(5); + pairs[ip][in] = 5; + if ((pos[ip].GetNd()+neg[in].GetNd())>6){ //multi cluster + cl2->SetType(6); + pairs[ip][in] = 6; + } + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(5); + pairs[ip][in] = 5; + if ((pos[ip].GetNd()+neg[in].GetNd())>6){ //multi cluster + cl2->SetType(6); + pairs[ip][in] = 6; + } + + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(5); - pairs[ip][in] = 5; - if ((pos[ip].GetNd()+neg[in].GetNd())>6){ //multi cluster - cl2->SetType(6); - pairs[ip][in] = 6; - } } + // // add second pair - // if (!(cused1[ip2] || cused2[in])){ // + // if (!(cused1[ip2] || cused2[in])){ // if (pairs[ip2][in]==100){ Float_t yp=pos[ip2].GetY()*fYpitchSSD; Float_t yn=neg[in].GetY()*fYpitchSSD; @@ -508,21 +531,31 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, ratio = (pos[ip2].GetQ()-neg[in].GetQ())/(pos[ip2].GetQ()+neg[in].GetQ()); milab[3]=(((ip2<<10) + in)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[ip2].GetNd(),neg[in].GetNd(),fNlayer[fModule]}; - - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); + + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(5); + pairs[ip2][in] =5; + if ((pos[ip2].GetNd()+neg[in].GetNd())>6){ //multi cluster + cl2->SetType(6); + pairs[ip2][in] =6; + } + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(5); + pairs[ip2][in] =5; + if ((pos[ip2].GetNd()+neg[in].GetNd())>6){ //multi cluster + cl2->SetType(6); + pairs[ip2][in] =6; + } + + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(5); - pairs[ip2][in] =5; - if ((pos[ip2].GetNd()+neg[in].GetNd())>6){ //multi cluster - cl2->SetType(6); - pairs[ip2][in] =6; - } } cused1[ip]++; cused1[ip2]++; @@ -530,7 +563,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, } } } - + // for (Int_t jn=0;jnGetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(7); + pairs[ip][jn] =7; + if ((pos[ip].GetNd()+neg[jn].GetNd())>6){ //multi cluster + cl2->SetType(8); + pairs[ip][jn]=8; + } + + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(7); + pairs[ip][jn] =7; + if ((pos[ip].GetNd()+neg[jn].GetNd())>6){ //multi cluster + cl2->SetType(8); + pairs[ip][jn]=8; + } + + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(7); - pairs[ip][jn] =7; - if ((pos[ip].GetNd()+neg[jn].GetNd())>6){ //multi cluster - cl2->SetType(8); - pairs[ip][jn]=8; - } } // // add second pair @@ -613,21 +657,32 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, ratio = (pos[ip].GetQ()-neg[jn2].GetQ())/(pos[ip].GetQ()+neg[jn2].GetQ()); milab[3]=(((ip<<10) + jn2)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[ip].GetNd(),neg[jn2].GetNd(),fNlayer[fModule]}; - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + pairs[ip][jn2]=7; + cl2->SetType(7); + if ((pos[ip].GetNd()+neg[jn2].GetNd())>6){ //multi cluster + cl2->SetType(8); + pairs[ip][jn2]=8; + } + + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + pairs[ip][jn2]=7; + cl2->SetType(7); + if ((pos[ip].GetNd()+neg[jn2].GetNd())>6){ //multi cluster + cl2->SetType(8); + pairs[ip][jn2]=8; + } + + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - pairs[ip][jn2]=7; - cl2->SetType(7); - if ((pos[ip].GetNd()+neg[jn2].GetNd())>6){ //multi cluster - cl2->SetType(8); - pairs[ip][jn2]=8; - } } cused1[ip]++; cused2[jn]++; @@ -703,24 +758,34 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, ratio = (pos[ip].GetQ()-neg[j].GetQ())/(pos[ip].GetQ()+neg[j].GetQ()); milab[3]=(((ip<<10) + j)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[ip].GetNd(),neg[j].GetNd(),fNlayer[fModule]}; - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); - else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(10); + pairs[ip][j]=10; + if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster + cl2->SetType(11); + pairs[ip][j]=11; + } + cused1[ip]++; + cused2[j]++; } - - + else{ + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(10); + pairs[ip][j]=10; + if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster + cl2->SetType(11); + pairs[ip][j]=11; + } + cused1[ip]++; + cused2[j]++; + + fDetTypeRec->AddRecPoint(*cl2); + } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(10); - pairs[ip][j]=10; - if ((pos[ip].GetNd()+neg[j].GetNd())>6){ //multi cluster - cl2->SetType(11); - pairs[ip][j]=11; - } - cused1[ip]++; - cused2[j]++; } } @@ -760,15 +825,19 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn, CheckLabels2(milab); milab[3]=(((i<<10) + j)<<10) + idet; // pos|neg|det Int_t info[3] = {pos[i].GetNd(),neg[j].GetNd(),fNlayer[fModule]}; - AliITSclusterV2 * cl2; - if(clusters) cl2 = new (cl[ncl]) AliITSclusterV2(milab,lp,info); + AliITSRecPoint * cl2; + if(clusters){ + cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(100+cpositive[j]+cnegative[i]); + } else{ - cl2 = new AliITSclusterV2(milab,lp,info); - fDetTypeRec->AddClusterV2(*cl2); + cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info); + cl2->SetChargeRatio(ratio); + cl2->SetType(100+cpositive[j]+cnegative[i]); + fDetTypeRec->AddRecPoint(*cl2); } ncl++; - cl2->SetChargeRatio(ratio); - cl2->SetType(100+cpositive[j]+cnegative[i]); //cl2->SetType(0); /* if (pairs[i][j]<100){ diff --git a/ITS/AliITSComparisonV2.C b/ITS/AliITSComparisonV2.C index 89f3e442976..e142816392b 100644 --- a/ITS/AliITSComparisonV2.C +++ b/ITS/AliITSComparisonV2.C @@ -33,7 +33,7 @@ #include "AliITS.h" #include "AliITSgeom.h" - #include "AliITSclusterV2.h" + #include "AliITSRecPoint.h" #include "AliITSLoader.h" #endif @@ -455,13 +455,13 @@ Int_t GoodTracksITS(const Char_t *dir) { delete rl; return 8; } - TBranch *branch=cTree->GetBranch("Clusters"); + TBranch *branch=cTree->GetBranch("ITSRecPoints"); if (!branch) { ::Error("GoodTracksITS","Can't get the clusters branch !"); delete rl; return 9; } - TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy; + TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy; branch->SetAddress(&clusters); Int_t entr=(Int_t)cTree->GetEntries(); @@ -475,7 +475,7 @@ Int_t GoodTracksITS(const Char_t *dir) { return 10; } while (ncl--) { - AliITSclusterV2 *pnt=(AliITSclusterV2*)clusters->UncheckedAt(ncl); + AliITSRecPoint *pnt=(AliITSRecPoint*)clusters->UncheckedAt(ncl); Int_t l0=pnt->GetLabel(0); if (l0>=np) { // cerr<<"Wrong label: "<Delete(); - delete fClustersV2; - fClustersV2=0; - } if(fCtype) { fCtype->Delete(); delete fCtype; @@ -557,13 +547,11 @@ void AliITSDetTypeRec::MakeBranch(Option_t* option){ //Creates branches for clusters and recpoints Bool_t cR = (strstr(option,"R")!=0); Bool_t cRF = (strstr(option,"RF")!=0); - Bool_t v2 = (strstr(option,"v2")!=0); if(cRF)cR = kFALSE; if(cR) MakeBranchR(0); if(cRF) MakeBranchRF(0); - if(v2) MakeBranchR(0,"v2"); } @@ -730,35 +718,23 @@ void AliITSDetTypeRec::MakeBranchR(const char *file, Option_t *opt){ // only one branch for rec points for all detector types Bool_t oFast= (strstr(opt,"Fast")!=0); - Bool_t v2 = (strstr(opt,"v2")!=0); Char_t detname[10] = "ITS"; if(oFast){ sprintf(branchname,"%sRecPointsF",detname); - } else if(v2){ - sprintf(branchname,"Clusters"); } else { sprintf(branchname,"%sRecPoints",detname); } - if(v2){ - - if(!fClustersV2)fClustersV2 = new TClonesArray("AliITSclusterV2",3000); - if(fLoader->TreeR()){ - if(fClustersV2==0x0) fClustersV2 = new TClonesArray("AliITSclusterV2",3000); - MakeBranchInTree(fLoader->TreeR(),branchname,0,&fClustersV2,buffsz,99,file); - - } - }else{ - if(!fRecPoints)fRecPoints = new TClonesArray("AliITSRecPoint",1000); - if (fLoader->TreeR()) { - if(fRecPoints==0x0) fRecPoints = new TClonesArray("AliITSRecPoint", - 1000); - MakeBranchInTree(fLoader->TreeR(),branchname,0,&fRecPoints,buffsz,99,file); - } // end if - } + if(!fRecPoints)fRecPoints = new TClonesArray("AliITSRecPoint",1000); + if (fLoader->TreeR()) { + if(fRecPoints==0x0) fRecPoints = new TClonesArray("AliITSRecPoint", + 1000); + MakeBranchInTree(fLoader->TreeR(),branchname,0,&fRecPoints,buffsz,99,file); + } // end if + } //______________________________________________________________________ @@ -775,26 +751,18 @@ void AliITSDetTypeRec::SetTreeAddressR(TTree *treeR){ if(!treeR) return; if(fRecPoints==0x0) fRecPoints = new TClonesArray("AliITSRecPoint",1000); - TBranch *branch1; - sprintf(branchname,"Clusters"); - branch1 = treeR->GetBranch(branchname); - if(branch1){ - if(fClustersV2==0x0) fClustersV2 = new TClonesArray("AliITSclusterV2",3000); - branch1->SetAddress(&fClustersV2); - } - else{ - TBranch *branch; - sprintf(branchname,"%sRecPoints",namedet); + TBranch *branch; + sprintf(branchname,"%sRecPoints",namedet); + branch = treeR->GetBranch(branchname); + if (branch) { + branch->SetAddress(&fRecPoints); + }else { + sprintf(branchname,"%sRecPointsF",namedet); branch = treeR->GetBranch(branchname); if (branch) { - branch->SetAddress(&fRecPoints); - }else { - sprintf(branchname,"%sRecPointsF",namedet); - branch = treeR->GetBranch(branchname); - if (branch) { - branch->SetAddress(&fRecPoints); - } + branch->SetAddress(&fRecPoints); } + } } //____________________________________________________________________ @@ -811,20 +779,6 @@ void AliITSDetTypeRec::AddRecPoint(const AliITSRecPoint &r){ TClonesArray &lrecp = *fRecPoints; new(lrecp[fNRecPoints++]) AliITSRecPoint(r); } -//______________________________________________________________________ -void AliITSDetTypeRec::AddClusterV2(const AliITSclusterV2 &r){ - // Add a reconstructed space point to the list - // Inputs: - // const AliITSClusterV2 &r class to be added to the tree - // of reconstructed points TreeR. - // Outputs: - // none. - // Return: - // none. - - TClonesArray &lrecp = *fClustersV2; - new(lrecp[fNClustersV2++]) AliITSclusterV2(r); - } //______________________________________________________________________ void AliITSDetTypeRec::DigitsToRecPoints(Int_t evNumber,Int_t lastentry,Option_t *opt, Bool_t v2){ @@ -852,9 +806,14 @@ void AliITSDetTypeRec::DigitsToRecPoints(Int_t evNumber,Int_t lastentry,Option_t const char *all = strstr(opt,"All"); const char *det[3] = {strstr(opt,"SPD"),strstr(opt,"SDD"), strstr(opt,"SSD")}; - if(!v2) SetDefaultClusterFinders(); - else SetDefaultClusterFindersV2(); - + if(!v2) { + SetDefaultClusterFinders(); + AliInfo("Original cluster finder has been selected\n"); + } + else { + SetDefaultClusterFindersV2(); + AliInfo("V2 cluster finder has been selected \n"); + } TTree *treeC=fLoader->TreeC(); if(!treeC){ @@ -891,7 +850,6 @@ void AliITSDetTypeRec::DigitsToRecPoints(Int_t evNumber,Int_t lastentry,Option_t } // end if fLoader->TreeR()->Fill(); ResetRecPoints(); - ResetClustersV2(); treeC->Fill(); ResetClusters(); } @@ -931,8 +889,8 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader){ if(!fLoader->TreeR()) fLoader->MakeTree("R"); TTree* cTree = fLoader->TreeR(); - TClonesArray *array=new TClonesArray("AliITSclusterV2",1000); - cTree->Branch("Clusters",&array); + TClonesArray *array=new TClonesArray("AliITSRecPoint",1000); + cTree->Branch("ITSRecPoints",&array); delete array; TClonesArray** clusters = new TClonesArray*[fGeom->GetIndexMax()]; @@ -954,9 +912,9 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader){ array = clusters[iModule]; if(!array){ Error("DigitsToRecPoints","data for module %d missing!",iModule); - array = new TClonesArray("AliITSclusterV2"); + array = new TClonesArray("AliITSRecPoint"); } - cTree->SetBranchAddress("Clusters",&array); + cTree->SetBranchAddress("ITSRecPoints",&array); cTree->Fill(); nClusters+=array->GetEntriesFast(); delete array; @@ -964,7 +922,7 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader){ fLoader->WriteRecPoints("OVERWRITE"); delete[] clusters; - Info("DigitsToRecPoints", "total number of found clustersV2 in ITS: %d\n", + Info("DigitsToRecPoints", "total number of found recpoints in ITS: %d\n", nClusters); } diff --git a/ITS/AliITSDetTypeRec.h b/ITS/AliITSDetTypeRec.h index 6a25759e3eb..1b5a6d5bcf0 100644 --- a/ITS/AliITSDetTypeRec.h +++ b/ITS/AliITSDetTypeRec.h @@ -23,7 +23,6 @@ class AliITSCalibration; class AliITSClusterFinder; class AliITSRawCluster; class AliITSRecPoint; -class AliITSclusterV2; class AliRawReader; class AliITSgeom; @@ -91,12 +90,6 @@ class AliITSDetTypeRec : public TObject { void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;}; // Return pointer to rec points TClonesArray *RecPoints() {return fRecPoints;} - void AddClusterV2(const AliITSclusterV2 &cl); - void ResetClustersV2(){if(fClustersV2) fClustersV2->Clear();fNClustersV2=0;} - Int_t GetNClustersV2()const {return fNClustersV2;} - - TClonesArray *ClustersV2() {return fClustersV2;} - void MakeBranchRF(const char *file){MakeBranchR(file,"Fast");} // void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, // Option_t *add, Option_t *det, const char *filename); @@ -134,13 +127,11 @@ class AliITSDetTypeRec : public TObject { TClonesArray *fRecPoints; //! List of reconstructed points Int_t fNRecPoints; // Number of rec points - TClonesArray *fClustersV2; //!List of reconstructed clusters v2 - Int_t fNClustersV2; //Number of clusters v2 TString fSelectedVertexer; // Vertexer selected in CreateVertexer AliITSLoader* fLoader; // ITS loader Int_t fRunNumber; //! run number (to access DB) - ClassDef(AliITSDetTypeRec,3) // ITS Reconstruction structure + ClassDef(AliITSDetTypeRec,4) // ITS Reconstruction structure }; #endif diff --git a/ITS/AliITSFindClustersV2.cxx b/ITS/AliITSFindClustersV2.cxx index 695cc148d21..3b980a113fc 100644 --- a/ITS/AliITSFindClustersV2.cxx +++ b/ITS/AliITSFindClustersV2.cxx @@ -367,10 +367,10 @@ void AliITSFindClustersV2::Exec(const Option_t *opt){ if(fGeom->GetModuleType(i)==kSSD) kmip = 38.0; for(j=0;jUncheckedAt(j)); - lp[0] = - (p->GetX() + yshift); + lp[0] = - (p->GetDetLocalX() + yshift); if(lay==1) lp[0] = -lp[0]; lp[1] = p->GetZ() + zshift; - lp[2] = p->GetSigmaX2(); + lp[2] = p->GetSigmaDetLocX2(); lp[3] = p->GetSigmaZ2(); lp[4] = p->GetQ()/kmip; lab[0] = p->GetLabel(0); diff --git a/ITS/AliITSGeoPlot.C b/ITS/AliITSGeoPlot.C index 45f6c19893f..b1c905ee1e0 100644 --- a/ITS/AliITSGeoPlot.C +++ b/ITS/AliITSGeoPlot.C @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -170,7 +170,6 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", char *filename= //RECPOINTS (V2 clusters) TTree *TR = ITSloader->TreeR(); TClonesArray *ITSrec = detTypeRec->RecPoints(); - TClonesArray *ITScl = detTypeRec->ClustersV2(); TBranch *branch = 0; if(userec && TR && ITSrec){ if(isfastpoints==1){ @@ -189,9 +188,9 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", char *filename= cout<<"WARNING: there are no RECPOINTS on this file ! \n"; cout<<"======================================================= \n \n"; } - if(useclustersv2 && TR && ITScl){ - branch = ITSloader->TreeR()->GetBranch("Clusters"); - if(branch)branch->SetAddress(&ITScl); + if(useclustersv2 && TR && ITSrec){ + branch = ITSloader->TreeR()->GetBranch("ITSRecPoints"); + if(branch)branch->SetAddress(&ITSrec); } if(useclustersv2 && (!TR || !ITSrec || !branch)){ @@ -360,11 +359,11 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", char *filename= nrecp=GetRecCoor(geom,ITSrec,mod,bidi,uni,verbose); } if(useclustersv2){ - detTypeRec->ResetClustersV2(); + detTypeRec->ResetRecPoints(); branch->GetEvent(mod); TH2F *bidi=(TH2F*)histos.At(6+subd*9); TH1F *uni=(TH1F*)histos.At(7+subd*9); - nrecp=GetClusCoor(geom,ITScl,mod,bidi,uni,verbose); + nrecp=GetClusCoor(geom,ITSrec,mod,bidi,uni,verbose); } @@ -495,7 +494,7 @@ Int_t GetClusCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F * cout<<"Number of CLUSTERS for module "<At(irec); + AliITSRecPoint *recp = (AliITSRecPoint*)ITSrec->At(irec); Double_t rot[9]; geom->GetRotMatrix(mod,rot); Int_t lay,lad,det; @@ -538,8 +537,8 @@ Int_t GetRecCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h } for(Int_t irec=0;irecAt(irec); - lc[0]=recp->GetX(); - lc[2]=recp->GetZ(); + lc[0]=recp->GetDetLocalX(); + lc[2]=recp->GetDetLocalZ(); geom->LtoG(mod,lc,gc); if(verb){ cout<<"recp # "<cd(); + if(!geom){ + Error("GetITSgeom","no ITS geometry available"); + return NULL; + } + + AliITS *ITS = (AliITS*) gAlice->GetModule("ITS"); if (!ITS) return; // Set the simulation model - for (Int_t i=0;i<3;i++) { - ITS->SetSimulationModel(i,new AliITSsimulationFastPoints()); - } // @@ -84,17 +92,24 @@ void AliITSHits2FastRecPoints (Int_t evNumber1=0,Int_t evNumber2=0, TString inFi TStopwatch timer; cout << "Creating fast reconstructed points from hits for the ITS..." << endl; + AliITSDetTypeSim* dettyp = new AliITSDetTypeSim(); + dettyp->SetITSgeom(geom); + dettyp->SetLoader(gime); + ITS->SetDetTypeSim(dettyp); + for (Int_t i=0;i<3;i++) { + ITS->SetSimulationModel(i,new AliITSsimulationFastPoints()); + } + for (int ev=evNumber1; ev<= evNumber2; ev++) { cout << "...working on event "<< ev << " ..." << endl; Int_t nparticles = gAlice->GetEvent(ev); cout << "event " <GetEvent(ev); - if(gime->TreeR() == 0x0) gime->MakeTree("R"); - - ITS->MakeBranch("RF"); - if (ev < evNumber1) continue; + //if(gime->TreeR() == 0x0) gime->MakeTree("R"); + + if (ev < evNumber1) continue; if (nparticles <= 0) return; Int_t bgr_ev=Int_t(ev/nsignal); diff --git a/ITS/AliITSL2GConvertPointsV2.C b/ITS/AliITSL2GConvertPointsV2.C index c1ad5951b0a..670d9f1b527 100644 --- a/ITS/AliITSL2GConvertPointsV2.C +++ b/ITS/AliITSL2GConvertPointsV2.C @@ -66,7 +66,7 @@ Int_t AliITSL2GConvertPointsV2 // Converts and stores the ITS points into global coordinate format Int_t pos = 0; - AliITSclusterV2 *local = 0; + AliITSRecPoint *local = 0; AliITSNeuralPoint *global = 0; TTree *TP = new TTree("TreeP", "Event points in global coords"); TP->Branch("pos", &pos, "pos/I"); @@ -88,7 +88,7 @@ Int_t AliITSL2GConvertPointsV2 TR->GetEvent(module); count = (Int_t)localArray->GetEntriesFast(); for (index = 0; index < count; index++) { - local = (AliITSclusterV2*)localArray->At(index); + local = (AliITSRecPoint*)localArray->At(index); cout << module << " - " << local->GetDetectorIndex() << endl; global = new AliITSNeuralPoint(local, geom, module, index); global->SetUser(-1); diff --git a/ITS/AliITSNeuralPoint.cxx b/ITS/AliITSNeuralPoint.cxx index 31762f96546..f126884f951 100644 --- a/ITS/AliITSNeuralPoint.cxx +++ b/ITS/AliITSNeuralPoint.cxx @@ -11,7 +11,7 @@ #include #include "AliITSRecPoint.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSgeom.h" #include "AliITSgeomMatrix.h" @@ -71,25 +71,25 @@ AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm) } // local to global conversions of coords - locPos[0] = rp->fX; + locPos[0] = rp->GetDetLocalX(); locPos[1] = 0.0; - locPos[2] = rp->fZ; + locPos[2] = rp->GetDetLocalZ(); gm->LtoGPosition(locPos, globPos); fX = globPos[0]; fY = globPos[1]; fZ = globPos[2]; // local to global conversions of sigmas - locErr[0][0] = rp->fSigmaX2; - locErr[2][2] = rp->fSigmaZ2; + locErr[0][0] = rp->GetSigmaDetLocX2(); + locErr[2][2] = rp->GetSigmaZ2(); gm->LtoGPositionError(locErr, globErr); - for (i = 0; i < 3; i++) fLabel[i] = rp->fTracks[i]; + for (i = 0; i < 3; i++) fLabel[i] = rp->GetLabel(i); fEX = TMath::Sqrt(globErr[0][0]); fEY = TMath::Sqrt(globErr[1][1]); fEZ = TMath::Sqrt(globErr[2][2]); // copy of other data-members - fCharge = rp->fQ; + fCharge = rp->GetQ(); fLayer = 0; fIndex = 0; fModule = 0; @@ -99,11 +99,11 @@ AliITSNeuralPoint::AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm) //------------------------------------------------------------------------------------------------- // AliITSNeuralPoint::AliITSNeuralPoint -(AliITSclusterV2 *rp, AliITSgeom *geom, Short_t module, Short_t index) +(AliITSRecPoint *rp, AliITSgeom *geom, Short_t module, Short_t index) { // Conversion constructor. - // Accepts a AliITSclusterV2 and an AliITSgeom, - // and converts the local coord of the AliITSclusterV2 object into global + // Accepts a AliITSRecPoint and an AliITSgeom, + // and converts the local coord of the AliITSRecPoint object into global Int_t mod = (Int_t)module, lay, lad, det; fModule = module; diff --git a/ITS/AliITSNeuralPoint.h b/ITS/AliITSNeuralPoint.h index 2fea18e4cc8..5a1d2fc40bb 100644 --- a/ITS/AliITSNeuralPoint.h +++ b/ITS/AliITSNeuralPoint.h @@ -10,7 +10,7 @@ class AliITSgeom; class AliITSgeomMatrix; class AliITSRecPoint; -class AliITSclusterV2; +class AliITSRecPoint; class AliITSNeuralPoint : public TObject { @@ -19,7 +19,7 @@ public: AliITSNeuralPoint(); AliITSNeuralPoint(AliITSNeuralPoint *p); AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeomMatrix *gm); - AliITSNeuralPoint(AliITSclusterV2 *rp, AliITSgeom *geom, Short_t module, Short_t index); + AliITSNeuralPoint(AliITSRecPoint *rp, AliITSgeom *geom, Short_t module, Short_t index); virtual ~AliITSNeuralPoint() { } diff --git a/ITS/AliITSRecPoint.cxx b/ITS/AliITSRecPoint.cxx index 2f63bd1b8c5..462353f0928 100644 --- a/ITS/AliITSRecPoint.cxx +++ b/ITS/AliITSRecPoint.cxx @@ -15,20 +15,105 @@ /* $Id$ */ -//////////////////////////////////////////////// -// Reconstructed point class for set:ITS // -//////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Reconstructed space point class for set:ITS +// Reconstructed points are expressed simultaneously in two different +// reference frames, both differing from the global system. +// The first is referred to the sensor (see AliITSsegmentation for the +// definition) and each point is represented by two coordinates: fXloc and +// fZloc. This system in the code is referred to as "local" +// The second is used for tracking (V2, SA and MI versions) and the X axis +// represents the radial coordinate (this system is, in the bending plane, +// a rotated system w.r.t. the global reference system). +// Each reaconstructed point is represented by two coordinates: fY and fZ, +// inherited from AliCluster. This system in the code is referred to as +// "trackingV2". +/////////////////////////////////////////////////////////////////////////////// #include "AliITSRecPoint.h" +#include "AliITSgeom.h" ClassImp(AliITSRecPoint) -AliITSRecPoint::AliITSRecPoint() { +//_____________________________________________________________ +AliITSRecPoint::AliITSRecPoint(): AliCluster() { // default creator - fTracks[0]=fTracks[1]=fTracks[2]=-3; - fX=fZ=fQ=fdEdX=0.; - fSigmaX2=fSigmaZ2=0.; + fXloc=fZloc=fdEdX=0.; + fQ=0; fLayer=0; fNz=fNy=1; fType=0; fDeltaProb=0;fChargeRatio=0; + fGeom=0; } + +//_____________________________________________________________ +AliITSRecPoint::AliITSRecPoint(AliITSgeom* geom): AliCluster() { + // default creator + fXloc=fZloc=fdEdX=0.; + fQ=0; fLayer=0; fNz=fNy=1; fType=0; fDeltaProb=0;fChargeRatio=0; + fGeom=geom; +} + +//________________________________________________________________________ +AliITSRecPoint::AliITSRecPoint(Int_t module,AliITSgeom* geom,Int_t *lab,Float_t *hit, Int_t *info):AliCluster(lab,hit){ + //standard constructor used in AliITSClusterFinderV2 + fIndex=lab[3]; + fQ=hit[4]; + fNy = info[0]; + fNz = info[1]; + fLayer = info[2]; + fChargeRatio = 0; + fType=0; + fDeltaProb=0.; + + fGeom = geom; + fGeom->TrackingV2ToDetL(module,fY,fZ,fXloc,fZloc); + if(moduleGetStartSDD()) fdEdX=0.; + if(module>=fGeom->GetStartSDD() && moduleGetStartSSD()){ + fdEdX=fQ*1e-6; + } + if(module>=fGeom->GetStartSSD()) fdEdX=fQ*2.16; + + +} +//_______________________________________________________________________ +AliITSRecPoint::AliITSRecPoint(const AliITSRecPoint& pt):AliCluster(pt){ + //Copy constructor + fXloc = pt.fXloc; + fZloc = pt.fZloc; + fdEdX = pt.fdEdX; + fIndex= pt.fIndex; + fQ = pt.fQ; + fNy = pt.fNy; + fNz = pt.fNz; + fLayer = pt.fLayer; + fChargeRatio = pt.fChargeRatio; + fType = pt.fType; + fDeltaProb = pt.fDeltaProb; + fGeom = pt.fGeom; + +} + +//______________________________________________________________________ +AliITSRecPoint& AliITSRecPoint::operator=(const AliITSRecPoint& /* source */){ + // Assignment operator + // Assignment is not allowed. The method is protected to avoid misuse. + Fatal("= operator","Assignment operator not allowed\n"); + return *this; +} + +//________________________________________________________________________ +AliITSRecPoint::AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info):AliCluster(lab,hit){ + //standard constructor used in AliITSClusterFinderV2 + fXloc=fZloc=fdEdX=0.; + fIndex=lab[3]; + fQ=hit[4]; + fNy = info[0]; + fNz = info[1]; + fLayer = info[2]; + fChargeRatio = 0; + fType=0; + fDeltaProb=0.; + fGeom = 0; +} + //---------------------------------------------------------------------- void AliITSRecPoint::Print(ostream *os){ //////////////////////////////////////////////////////////////////////// @@ -50,11 +135,11 @@ void AliITSRecPoint::Print(ostream *os){ fmt = os->setf(ios::fixed); // set fixed floating point output *os << fTracks[0]<< " " << fTracks[1] << " " << fTracks[2] << " "; - *os << fX << " " << fZ << " " << fQ << " "; + *os << fXloc << " " << fZloc << " " << fQ << " "; fmt = os->setf(ios::scientific); // set scientific for dEdX. *os << fdEdX << " "; fmt = os->setf(ios::fixed); // every fixed - *os << fSigmaX2 << " " << fSigmaZ2; + *os << fSigmaY2 << " " << fSigmaZ2; os->flags(fmt); // reset back to old formating. return; } @@ -65,8 +150,8 @@ void AliITSRecPoint::Read(istream *is){ //////////////////////////////////////////////////////////////////////// - *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fX >> fZ >> fQ; - *is >> fdEdX >> fSigmaX2 >> fSigmaZ2; + *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fXloc >> fZloc >> fQ; + *is >> fdEdX >> fSigmaY2 >> fSigmaZ2; return; } //---------------------------------------------------------------------- diff --git a/ITS/AliITSRecPoint.h b/ITS/AliITSRecPoint.h index a973c90e0a6..c2ad0573f1d 100644 --- a/ITS/AliITSRecPoint.h +++ b/ITS/AliITSRecPoint.h @@ -7,56 +7,114 @@ $Id$ */ -//////////////////////////////////////////////////// -// Reconstructed space point class for set:ITS // -//////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Reconstructed space point class for set:ITS +// Reconstructed points are expressed simultaneously in two different +// reference frames, both differing from the global system. +// The first is referred to the sensor (see AliITSsegmentation for the +// definition) and each point is represented by two coordinates: fXloc and +// fZloc. This system in the code is referred to as "local" +// The second is used for tracking (V2, SA and MI versions) and the X axis +// represents the radial coordinate (this system is, in the bending plane, +// a rotated system w.r.t. the global reference system). +// Each reaconstructed point is represented by two coordinates: fY and fZ, +// inherited from AliCluster. This system in the code is referred to as +// "trackingV2". +/////////////////////////////////////////////////////////////////////////////// -#include +#include #include +#include +#include -class AliITSRecPoint : public TObject { +class AliITSRecPoint : public AliCluster { public: - AliITSRecPoint(); - virtual ~AliITSRecPoint() {}; // distructor - Bool_t IsSortable() const {return kTRUE;} // allows for sorting - Int_t GetLabel(Int_t i) const {return fTracks[i];} // get track label - Int_t *GetTracks(){return fTracks;}// Returns pointer to track array - Int_t GetNTracks(){return 3;} // returns track array size - Float_t GetX() const {return fX;} // gets fX - Float_t GetZ() const {return fZ;} // gets fZ - Float_t GetQ() const {return fQ;} // gets fQ - Float_t GetdEdX() const {return fdEdX;} // gets fdEdX - Float_t GetSigmaX2() const {return fSigmaX2;} // gets fSigmaX2 - Float_t GetSigmaZ2() const {return fSigmaZ2;} // gets fSigmaZ2 - void SetLabel(Int_t i, Int_t lab){fTracks[i]=lab;} // sets track label - void SetX(Float_t x){fX=x;} // sets fX - void SetZ(Float_t z){fZ=z;} // sets fZ - void SetQ(Float_t q){fQ=q;} // sets fQ - void SetdEdX(Float_t dedx){fdEdX=dedx;} // sets fdEdX - void SetSigmaX2(Float_t sx2){fSigmaX2=sx2;} // sets fSigmaX2 - void SetSigmaZ2(Float_t sz2){fSigmaZ2=sz2;} // sets fSigmaZ2 - void Use() { //if fQ<0 cluster is already associated with a track - fQ=-fQ;} - Int_t IsUsed() const {return (fQ<0) ? 1 : 0;} // checks Use condision - Int_t Compare(const TObject *) const {return 0;} //to be defined - // Prints out the content of this class in ASCII format. - void Print(ostream *os); - // Reads in the content of this class in the format of Print - void Read(istream *is); - virtual void Print(Option_t *option="") const {TObject::Print(option);} - virtual Int_t Read(const char *name) {return TObject::Read(name);} + AliITSRecPoint(); + AliITSRecPoint(AliITSgeom* geom); + AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info); + AliITSRecPoint(Int_t module,AliITSgeom* geom,Int_t *lab, + Float_t *hit, Int_t *info); + AliITSRecPoint(const AliITSRecPoint& pt); + AliITSRecPoint& operator=(const AliITSRecPoint &source); + + virtual ~AliITSRecPoint() {}; // distructor + Bool_t IsSortable() const {return kTRUE;} // allows for sorting + Int_t *GetTracks(){return fTracks;}// Returns pointer to track array + Int_t GetNTracks() const {return 3;} // returns track array size + Float_t GetDetLocalX() const {return fXloc;} // gets fX + Float_t GetDetLocalZ() const {return fZloc;} // gets fZ + Float_t GetdEdX() const {return fdEdX;} // gets fdEdX + Float_t GetSigmaDetLocX2() const {return fSigmaY2;} // gets fSigmaX2 + void SetdEdX(Float_t dedx){fdEdX=dedx;} // sets fdEdX + void SetSigmaDetLocX2(Float_t sx2){fSigmaY2=sx2;} // sets fSigmaX2 + Int_t Compare(const TObject *) const {return 0;} //to be defined + void Print(ostream *os); + // Reads in the content of this class in the format of Print + void Read(istream *is); + virtual void Print(Option_t *option="") const {TObject::Print(option);} + virtual Int_t Read(const char *name) {return TObject::Read(name);} + + void SetITSgeom(AliITSgeom* geom) {fGeom=geom;} + virtual void SetY(Float_t y ){fY=y; + AliError("For consistency, Use method SetYZ. Data members are only partially set\n");} + virtual void SetZ(Float_t z ){fZ=z; + AliError("For consistency, Use method SetYZ. Data members are only partially set\n");} + void SetYZ(Int_t module, Float_t y, Float_t z){ + fY=y;fZ=z; + if(fGeom)fGeom->TrackingV2ToDetL(module,y,z,fXloc,fZloc); + else AliError("Geometry not set. \n"); + } + void SetXZ(Int_t module, Float_t x, Float_t z){ + fXloc=x;fZloc=z; + if(fGeom)fGeom->DetLToTrackingV2(module,x,z,fY,fZ); + else AliError("Geometry not set. Nothing done!!!!!\n"); + } + void Use(Int_t = 0) {fQ=-fQ;} + void UnUse() {fQ=TMath::Abs(fQ);} + void SetQ(Float_t q) {fQ=q;} + void SetDetectorIndex(Int_t i) { fIndex=i; } + void SetLayer(Int_t layer) {fLayer=layer;} + void SetNz(Int_t nz) {fNz =nz;} + void SetNy(Int_t ny){fNy=ny;} + void SetChargeRatio(Float_t ratio) { fChargeRatio = ratio;} + void SetPhiR(Float_t y) { fChargeRatio=y; } + void SetType(Int_t type){ fType=type;} + void SetDeltaProbability(Float_t prob){fDeltaProb = prob;} + + Int_t IsUsed() const {return (fQ<0)?1:0;} + Float_t GetQ() const {return TMath::Abs(fQ);} + Int_t GetDetectorIndex() const { return 0x3FF&fIndex; } + Int_t GetLayer() const {return fLayer;} + Int_t GetNz() const {return fNz;} + Int_t GetNy() const {return fNy;} + Float_t GetChargeRatio() const {return fChargeRatio;} + Float_t GetPhiR() const {return fChargeRatio;} + Int_t GetPindex() const { return 0xFFF00000&fIndex; } //SSD clusters only + Int_t GetNindex() const { return 0xFFC00&fIndex; } //SSD clusters only + Int_t GetType() const {return fType;} // type of the cluster + Float_t GetDeltaProbability() const{return fDeltaProb;} //probability to belong to the delta ray + - public: - Int_t fTracks[3]; //labels of overlapped tracks - Float_t fX ; //X of cluster - Float_t fZ ; //Z of cluster - Float_t fQ ; //Q of cluster (in ADC counts) - Float_t fdEdX; //dE/dX inside this cluster - Float_t fSigmaX2; //Sigma X square of cluster - Float_t fSigmaZ2; //Sigma Z square of cluster - ClassDef(AliITSRecPoint,1) // AliITSRecPoint class + protected: + + Float_t fXloc ; //X of cluster (local coordinates) + Float_t fZloc ; //Z of cluster (local coordinates) + Float_t fdEdX; //dE/dX inside this cluster + + Int_t fIndex; // detector index + Float_t fQ ; // Q of cluster (in ADC counts) + Char_t fLayer; // layer number + Short_t fNz; //number of digits in Z direction + Short_t fNy; //number of digits in y direction + Float_t fChargeRatio; //charge ratio + Int_t fType; //quality factor of the cluster + Float_t fDeltaProb; // probability to be deleta electron + + AliITSgeom* fGeom; //!pointer to ITS geometry + + ClassDef(AliITSRecPoint,2) // AliITSRecPoint class }; // Input and output function for standard C++ input/output. ostream& operator<<(ostream &os,AliITSRecPoint &source); diff --git a/ITS/AliITSReconstructor.cxx b/ITS/AliITSReconstructor.cxx index 4bd865e4e0e..937a18b36df 100644 --- a/ITS/AliITSReconstructor.cxx +++ b/ITS/AliITSReconstructor.cxx @@ -23,9 +23,10 @@ #include "Riostream.h" #include "AliITSReconstructor.h" +#include "AliRun.h" #include "AliRunLoader.h" #include "AliRawReader.h" -#include "AliITSclustererV2.h" +#include "AliITSDetTypeRec.h" #include "AliITSLoader.h" #include "AliITStrackerMI.h" #include "AliITStrackerSA.h" @@ -66,42 +67,43 @@ AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& / Error("= operator","Assignment operator not allowed\n"); return *this; } + //_____________________________________________________________________________ void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader) const { // reconstruct clusters - AliITSLoader *loader = (AliITSLoader *)runLoader->GetLoader("ITSLoader"); + AliLoader* loader = runLoader->GetLoader("ITSLoader"); if (!loader) { Error("Reconstruct", "ITS loader not found"); return; } + gAlice=runLoader->GetAliRun(); + TDirectory* olddir = gDirectory; + runLoader->CdGAFile(); + AliITSgeom* geom = (AliITSgeom*)gDirectory->Get("AliITSgeom"); + olddir->cd(); + AliITSDetTypeRec* rec = new AliITSDetTypeRec(); + rec->SetLoader((AliITSLoader*)loader); + rec->SetITSgeom(geom); + rec->SetDefaults(); + loader->LoadRecPoints("recreate"); loader->LoadDigits("read"); runLoader->LoadKinematics(); + TString option = GetOption(); + Bool_t clusfinder=kTRUE; // Default: V2 cluster finder + if(option.Contains("OrigCF"))clusfinder=kFALSE; - AliITSgeom* geom = GetITSgeom(runLoader); - - AliITSclustererV2 clusterer(geom); Int_t nEvents = runLoader->GetNumberOfEvents(); for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) { runLoader->GetEvent(iEvent); - TTree* treeClusters = loader->TreeR(); - if (!treeClusters) { - loader->MakeTree("R"); - treeClusters = loader->TreeR(); - } - TTree* treeDigits = loader->TreeD(); - if (!treeDigits) { - Error("Reconstruct", "Can't get digits tree !"); - return; - } - - clusterer.Digits2Clusters(treeDigits, treeClusters); - - loader->WriteRecPoints("OVERWRITE"); + if(loader->TreeR()==0x0) loader->MakeTree("R"); + rec->MakeBranch("R"); + rec->SetTreeAddress(); + rec->DigitsToRecPoints(iEvent,0,"All",clusfinder); } loader->UnloadRecPoints(); @@ -109,40 +111,41 @@ void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader) const runLoader->UnloadKinematics(); } - -//_____________________________________________________________________________ -void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader, - AliRawReader* rawReader) const +//_________________________________________________________________ +void AliITSReconstructor::Reconstruct(AliRunLoader* runLoader, + AliRawReader* rawReader) const { -// reconstruct clusters from raw data +// reconstruct clusters - AliITSLoader *loader = (AliITSLoader*)runLoader->GetLoader("ITSLoader"); + + AliLoader* loader = runLoader->GetLoader("ITSLoader"); if (!loader) { Error("Reconstruct", "ITS loader not found"); return; } - loader->LoadRecPoints("recreate"); + gAlice=runLoader->GetAliRun(); + TDirectory* olddir = gDirectory; + runLoader->CdGAFile(); + AliITSgeom* geom = (AliITSgeom*)gDirectory->Get("AliITSgeom"); + olddir->cd(); - AliITSgeom* geom = GetITSgeom(runLoader); - AliITSclustererV2 clusterer(geom); + AliITSDetTypeRec* rec = new AliITSDetTypeRec(); + rec->SetLoader((AliITSLoader*)loader); + rec->SetITSgeom(geom); + rec->SetDefaults(); + rec->SetDefaultClusterFindersV2(kTRUE); - Int_t iEvent = 0; - while (rawReader->NextEvent()) { - runLoader->GetEvent(iEvent++); + loader->LoadRecPoints("recreate"); - TTree* treeClusters = loader->TreeR(); - if (!treeClusters) { - loader->MakeTree("R"); - treeClusters = loader->TreeR(); - } + Int_t iEvent = 0; - clusterer.Digits2Clusters(rawReader); - - loader->WriteRecPoints("OVERWRITE"); + while(rawReader->NextEvent()) { + runLoader->GetEvent(iEvent++); + if(loader->TreeR()==0x0) loader->MakeTree("R"); + rec->DigitsToRecPoints(rawReader); } loader->UnloadRecPoints(); - } //_____________________________________________________________________________ diff --git a/ITS/AliITSRiemannFit.cxx b/ITS/AliITSRiemannFit.cxx index af110c09491..111dd4ffc92 100644 --- a/ITS/AliITSRiemannFit.cxx +++ b/ITS/AliITSRiemannFit.cxx @@ -287,10 +287,10 @@ void AliITSRiemannFit::InitPoints(Int_t ntracks,TTree *TR,Int_t nparticles){ for (irec=0;irecUncheckedAt(irec); - track=recp->fTracks[0]; + track=recp->GetLabel(0); if(track <0 ) continue; - xcluster=recp->GetX(); // x on cluster - zcluster=recp->GetZ(); // z on cluster + xcluster=recp->GetDetLocalX(); // x on cluster + zcluster=recp->GetDetLocalZ(); // z on cluster part = (TParticle*) gAlice->GetMCApp()->Particle(track); part->ProductionVertex(oT); // set the vertex part->Momentum(pE); // set the vertex momentum @@ -306,15 +306,15 @@ void AliITSRiemannFit::InitPoints(Int_t ntracks,TTree *TR,Int_t nparticles){ locals[0]=xcluster; // x on cluster locals[1]=0.0; // y on cluster locals[2]=zcluster; // z on cluster - localserror[0]=sqrt(recp->GetSigmaX2()); + localserror[0]=sqrt(recp->GetSigmaDetLocX2()); localserror[1]=0.0; localserror[2]=sqrt(recp->GetSigmaZ2()); - localsplus[0]=xcluster+sqrt(recp->GetSigmaX2()); // x on cluster + localsplus[0]=xcluster+sqrt(recp->GetSigmaDetLocX2()); // x on cluster if(layer==1||layer==2) localsplus[1]=0.0150/2; // y on cluster else if(layer==3||layer==4) localsplus[1]=0.0280/2; // y on cluster else if(layer==5||layer==6) localsplus[1]=0.0300/2; // y on cluster localsplus[2]=zcluster+sqrt(recp->GetSigmaZ2()); // z on cluster - localsminus[0]=xcluster-sqrt(recp->GetSigmaX2()); // x on cluster + localsminus[0]=xcluster-sqrt(recp->GetSigmaDetLocX2()); // x on cluster localsminus[1]=0.0; // y on cluster localsminus[2]=zcluster-sqrt(recp->GetSigmaZ2()); // z on cluster diff --git a/ITS/AliITSVertexer.cxx b/ITS/AliITSVertexer.cxx index f44f5b62bba..aa9d30da436 100644 --- a/ITS/AliITSVertexer.cxx +++ b/ITS/AliITSVertexer.cxx @@ -2,8 +2,6 @@ #include #include #include -#include -#include ClassImp(AliITSVertexer) @@ -17,7 +15,7 @@ ClassImp(AliITSVertexer) //______________________________________________________________________ AliITSVertexer::AliITSVertexer():AliVertexer() { // Default Constructor - SetUseV2Clusters(kTRUE); + //SetUseV2Clusters(kTRUE); } AliITSVertexer::AliITSVertexer(TString filename) { @@ -43,7 +41,7 @@ AliITSVertexer::AliITSVertexer(TString filename) { lst = static_cast(rl->TreeE()->GetEntries()); SetLastEvent(lst-1); } - SetUseV2Clusters(kTRUE); + //SetUseV2Clusters(kTRUE); } //______________________________________________________________________ @@ -73,12 +71,12 @@ void AliITSVertexer::WriteCurrentVertex(){ Int_t rc = itsLoader->PostVertex(fCurrentVertex); rc = itsLoader->WriteVertices(); } - +/* //______________________________________________________________________ void AliITSVertexer::Clusters2RecPoints (const TClonesArray *clusters, Int_t idx, TClonesArray *points) { //------------------------------------------------------------ - // Conversion AliITSclusterV2 -> AliITSRecPoints for the ITS + // Conversion AliITSRecPoint -> AliITSRecPoints for the ITS // module "idx" (entry in the tree with the clusters). // Simplified version, supposed to work with the pixels only ! //------------------------------------------------------------ @@ -100,7 +98,7 @@ void AliITSVertexer::Clusters2RecPoints Int_t ncl=clusters->GetEntriesFast(); for (Int_t i=0; iUncheckedAt(i); + AliITSRecPoint *c = (AliITSRecPoint *)clusters->UncheckedAt(i); Float_t x=c->GetY(); if (idx<=klastSPD1) x=-x; x+=yshift; @@ -108,16 +106,18 @@ void AliITSVertexer::Clusters2RecPoints Float_t z=c->GetZ(); z=-z; z+=zshift[idx%4]; - p.SetX(x); - p.SetZ(z); + p.SetDetLocalX(x); + p.SetDetLocalZ(z); p.SetQ(c->GetQ()); - p.SetSigmaX2(c->GetSigmaY2()); + p.SetSigmaDetLocX2(c->GetSigmaY2()); p.SetSigmaZ2(c->GetSigmaZ2()); - p.SetLabel(0,c->GetLabel(0)); - p.SetLabel(1,c->GetLabel(1)); - p.SetLabel(2,c->GetLabel(2)); + p.SetLabel(c->GetLabel(0),0); + p.SetLabel(c->GetLabel(1),1); + p.SetLabel(c->GetLabel(2),2); new (pn[i]) AliITSRecPoint(p); } } + +*/ diff --git a/ITS/AliITSVertexer.h b/ITS/AliITSVertexer.h index b1711cc35a9..269a8128db3 100644 --- a/ITS/AliITSVertexer.h +++ b/ITS/AliITSVertexer.h @@ -23,7 +23,7 @@ class AliITSVertexer : public AliVertexer { virtual ~AliITSVertexer(){;} virtual void SetUseV2Clusters(Bool_t v2c){fUseV2Clusters = v2c;} virtual void WriteCurrentVertex(); - virtual void Clusters2RecPoints(const TClonesArray *clusters, Int_t idx, TClonesArray *points); + //virtual void Clusters2RecPoints(const TClonesArray *clusters, Int_t idx, TClonesArray *points); diff --git a/ITS/AliITSVertexerIons.cxx b/ITS/AliITSVertexerIons.cxx index 6be5900c09f..c15202ee93b 100644 --- a/ITS/AliITSVertexerIons.cxx +++ b/ITS/AliITSVertexerIons.cxx @@ -122,9 +122,9 @@ AliESDVertex* AliITSVertexerIons::FindVertexForCurrentEvent(Int_t evnumber){ npoints = recpoints->GetEntries(); for (Int_t ipoint=0;ipointUncheckedAt(ipoint); - l[0]=pnt->GetX(); + l[0]=pnt->GetDetLocalX(); l[1]=0; - l[2]=pnt->GetZ(); + l[2]=pnt->GetDetLocalZ(); g2->LtoG(i, l, p); r=TMath::Sqrt(TMath::Power(p[0],2)+TMath::Power(p[1],2)); diff --git a/ITS/AliITSVertexerPPZ.cxx b/ITS/AliITSVertexerPPZ.cxx index 53243f175f2..8f8a5de7a2e 100644 --- a/ITS/AliITSVertexerPPZ.cxx +++ b/ITS/AliITSVertexerPPZ.cxx @@ -206,18 +206,18 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ detTypeRec.SetTreeAddressR(tR); itsRec = detTypeRec.RecPoints(); // missing - TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy; + // TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy; TBranch *branch; - if(fUseV2Clusters){ - branch = tR->GetBranch("Clusters"); - branch->SetAddress(&clusters); - } - else { - branch = tR->GetBranch("ITSRecPoints"); - if(!branch){ - branch = tR->GetBranch("ITSRecPointsF"); - } + //if(fUseV2Clusters){ + // branch = tR->GetBranch("ITSRecPoints"); + // branch->SetAddress(&clusters); + //} + //else { + branch = tR->GetBranch("ITSRecPoints"); + if(!branch){ + branch = tR->GetBranch("ITSRecPointsF"); } + //} if(!branch){ Error("FindVertexForCurrentEvent","branch for ITS rec points not found"); return fCurrentVertex; @@ -228,20 +228,19 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ Int_t firipixe=0; for(Int_t module= fFirstL1; module<=fLastL1;module++){ branch->GetEvent(module); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,module,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,module,itsRec); + //} Int_t nrecp1 = itsRec->GetEntries(); for(Int_t i=0; iAt(i); - lc[0]=current->GetX(); - lc[2]=current->GetZ(); + lc[0]=current->GetDetLocalX(); + lc[2]=current->GetDetLocalZ(); geom->LtoG(module,lc,gc); zave+=gc[2]; zave2+=gc[2]*gc[2]; firipixe++; } - //fITS->ResetRecPoints(); detTypeRec.ResetRecPoints(); } if(firipixe>1){ @@ -271,9 +270,9 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ for(Int_t module= fFirstL1; module<=fLastL1;module++){ if(fDebug>0)cout<<"processing module "<GetEvent(module); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,module,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,module,itsRec); + //} Int_t nrecp1 = itsRec->GetEntries(); TObjArray *poiL1 = new TObjArray(nrecp1); for(Int_t i=0; iAddAt(itsRec->At(i),i); @@ -281,8 +280,8 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ detTypeRec.ResetRecPoints(); for(Int_t i=0; iAt(i); - lc[0]=current->GetX(); - lc[2]=current->GetZ(); + lc[0]=current->GetDetLocalX(); + lc[2]=current->GetDetLocalZ(); geom->LtoG(module,lc,gc); gc[0]-=fX0; gc[1]-=fY0; @@ -292,14 +291,14 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ if(fDebug>1)cout<<"module "<GetEvent(modul2); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,modul2,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,modul2,itsRec); + //} Int_t nrecp2 = itsRec->GetEntries(); for(Int_t j=0; jAt(j); - lc2[0]=recp->GetX(); - lc2[2]=recp->GetZ(); + lc2[0]=recp->GetDetLocalX(); + lc2[2]=recp->GetDetLocalZ(); geom->LtoG(modul2,lc2,gc2); gc2[0]-=fX0; gc2[1]-=fY0; @@ -327,7 +326,6 @@ AliESDVertex* AliITSVertexerPPZ::FindVertexForCurrentEvent(Int_t evnumber){ } } } - //fITS->ResetRecPoints(); detTypeRec.ResetRecPoints(); } } diff --git a/ITS/AliITSVertexerZ.cxx b/ITS/AliITSVertexerZ.cxx index 823fe8455ea..8213055bcaf 100644 --- a/ITS/AliITSVertexerZ.cxx +++ b/ITS/AliITSVertexerZ.cxx @@ -124,15 +124,15 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(Int_t evnumber){ Float_t gc2[3]; for(Int_t ii=0; ii<3; ii++) gc2[ii]=0.; itsRec = detTypeRec.RecPoints(); - TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy; + // TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy; TBranch *branch; - if(fUseV2Clusters){ - branch = tR->GetBranch("Clusters"); - branch->SetAddress(&clusters); - } - else { - branch = tR->GetBranch("ITSRecPoints"); - } + //if(fUseV2Clusters){ + // branch = tR->GetBranch("ITSRecPoints"); + // branch->SetAddress(&clusters); + //} + //else { + branch = tR->GetBranch("ITSRecPoints"); + //} Int_t nbinfine = static_cast((fHighLim-fLowLim)/fStepFine); Int_t nbincoarse = static_cast((fHighLim-fLowLim)/fStepCoarse); @@ -148,17 +148,17 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(Int_t evnumber){ // cout<<"Procesing module "<GetEvent(module); // cout<<"Number of clusters "<GetEntries()<GetEntries(); detTypeRec.ResetRecPoints(); } for(Int_t module= fFirstL2; module<=fLastL2;module++){ branch->GetEvent(module); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,module,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,module,itsRec); + //} nrpL2+= itsRec->GetEntries(); detTypeRec.ResetRecPoints(); } @@ -178,14 +178,14 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(Int_t evnumber){ for(Int_t module= fFirstL1; module<=fLastL1;module++){ if(module%4==0 || module%4==3)continue; branch->GetEvent(module); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,module,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,module,itsRec); + //} Int_t nrecp1 = itsRec->GetEntries(); for(Int_t j=0;jAt(j); - lc[0]=recp->GetX(); - lc[2]=recp->GetZ(); + lc[0]=recp->GetDetLocalX(); + lc[2]=recp->GetDetLocalZ(); geom->LtoG(module,lc,gc); gc[0]-=fX0; gc[1]-=fY0; @@ -201,14 +201,14 @@ AliESDVertex* AliITSVertexerZ::FindVertexForCurrentEvent(Int_t evnumber){ ind = 0; for(Int_t module= fFirstL2; module<=fLastL2;module++){ branch->GetEvent(module); - if(fUseV2Clusters){ - Clusters2RecPoints(clusters,module,itsRec); - } + //if(fUseV2Clusters){ + // Clusters2RecPoints(clusters,module,itsRec); + //} Int_t nrecp2 = itsRec->GetEntries(); for(Int_t j=0;jAt(j); - lc[0]=recp->GetX(); - lc[2]=recp->GetZ(); + lc[0]=recp->GetDetLocalX(); + lc[2]=recp->GetDetLocalZ(); geom->LtoG(module,lc,gc); gc[0]-=fX0; gc[1]-=fY0; diff --git a/ITS/AliITSclustererV2.cxx b/ITS/AliITSclustererV2.cxx index 767099ceb1d..2cafb669215 100644 --- a/ITS/AliITSclustererV2.cxx +++ b/ITS/AliITSclustererV2.cxx @@ -382,9 +382,9 @@ void AliITSclustererV2::RecPoints2Clusters for (Int_t i=0; iUncheckedAt(i); Float_t lp[5]; - lp[0]=-(-p->GetX()+fYshift[idx]); if (idx<=fLastSPD1) lp[0]*=-1; //SPD1 + lp[0]=-(-p->GetDetLocalX()+fYshift[idx]); if (idx<=fLastSPD1) lp[0]*=-1; //SPD1 lp[1]= -p->GetZ()+fZshift[idx]; - lp[2]=p->GetSigmaX2(); + lp[2]=p->GetSigmaDetLocX2(); lp[3]=p->GetSigmaZ2(); lp[4]=p->GetQ()*36./23333.; //electrons -> ADC Int_t lab[4]; diff --git a/ITS/AliITSgeom.cxx b/ITS/AliITSgeom.cxx index 128a76d6388..aae9928ab31 100644 --- a/ITS/AliITSgeom.cxx +++ b/ITS/AliITSgeom.cxx @@ -1206,4 +1206,25 @@ void AliITSgeom::GetNearest27(const Double_t g[3],Int_t n[27],Int_t lay){ } // end for i for(i=0;i<27;i++) n[i] = in[i]; } -//---------------------------------------------------------------------- +//_______________________________________________________________________ +void AliITSgeom::DetLToTrackingV2(Int_t md, Float_t xin, Float_t zin, Float_t &yout, Float_t &zout) { + + //Conversion from local coordinates on detectors to local + //coordinates used for tracking ("v2") + Float_t x,y,z; Double_t rt[9];GetTrans(md,x,y,z);GetRotMatrix(md,rt); + Double_t al=TMath::ATan2(rt[1],rt[0])+TMath::Pi(); + yout=-(-xin+(x*TMath::Cos(al)+y*TMath::Sin(al))); + if(md<(GetModuleIndex(2,1,1)-1))yout*=-1; zout=-zin+(Double_t)z; +} + +//_______________________________________________________________________ +void AliITSgeom::TrackingV2ToDetL(Int_t md,Float_t yin,Float_t zin,Float_t &xout,Float_t &zout) { + //Conversion from local coordinates used for tracking ("v2") to + //local detector coordinates + + Float_t x,y,z; Double_t rt[9];GetTrans(md,x,y,z);GetRotMatrix(md,rt); + Double_t al=TMath::ATan2(rt[1],rt[0])+TMath::Pi(); + xout=yin;if(md<(GetModuleIndex(2,1,1)-1))xout=-xout; + xout+=(x*TMath::Cos(al)+y*TMath::Sin(al)); + zout=-zin+(Double_t)z; +} diff --git a/ITS/AliITSgeom.h b/ITS/AliITSgeom.h index adcffaa01d5..f231dcea181 100644 --- a/ITS/AliITSgeom.h +++ b/ITS/AliITSgeom.h @@ -733,6 +733,13 @@ class AliITSgeom : public TObject { // This function reads in that single steam printed out by PrintGeom. ifstream &ReadGeom(ifstream &in); + //Conversion from det. local coordinates to local ("V2") coordinates + //used for tracking + + void DetLToTrackingV2(Int_t md, Float_t xin, Float_t zin, Float_t &yout, Float_t &zout); + + void TrackingV2ToDetL(Int_t md,Float_t yin,Float_t zin,Float_t &xout,Float_t &zout); + private: char fVersion[20];// Transformation version. Int_t fTrans; // Flag to keep track of which transformation diff --git a/ITS/AliITSsimulationFastPoints.cxx b/ITS/AliITSsimulationFastPoints.cxx index a9e34f114e0..45eb1a3bdc3 100644 --- a/ITS/AliITSsimulationFastPoints.cxx +++ b/ITS/AliITSsimulationFastPoints.cxx @@ -71,6 +71,12 @@ void AliITSsimulationFastPoints::CreateFastRecPoints(AliITSmodule *mod, AliITSgeom *gm = aliITS->GetITSgeom(); const Float_t kdEdXtoQ = 2.778e+8; + Int_t lay,lad,det; + gm->GetModuleId(module,lay,lad,det); + Int_t ind=(lad-1)*gm->GetNdetectors(lay)+(det-1); + Int_t lyr=(lay-1); + + Int_t ihit,flag,numofhits; Float_t locals[3]; Float_t globals[3]; @@ -123,17 +129,18 @@ void AliITSsimulationFastPoints::CreateFastRecPoints(AliITSmodule *mod, if ( (hitdestep+deltaDe) > thrde ){ locals[0] += deltaXl; locals[2] += deltaZl; - AliITSRecPoint rp; - rp.fTracks[0]=hit->GetTrack(); + AliITSRecPoint rp(gm); + rp.SetLabel(hit->GetTrack(),0); // rp.fTracks[0]=mod->GetHitTrackIndex(ihit); - rp.fTracks[1]=-3; - rp.fTracks[2]=-3; - rp.SetX(locals[0]); - rp.SetZ(locals[2]); + rp.SetLabel(-3,1); + rp.SetLabel(-3,2); + rp.SetXZ(module,locals[0],locals[2]); rp.SetdEdX(hitdestep+deltaDe); rp.SetQ(kdEdXtoQ*(hitdestep+deltaDe)); // number of e - rp.SetSigmaX2(sigmarphi*sigmarphi); + rp.SetSigmaDetLocX2(sigmarphi*sigmarphi); rp.SetSigmaZ2(sigmaz*sigmaz); + rp.SetDetectorIndex(ind); + rp.SetLayer(lyr); new (pt[irecp]) AliITSRecPoint(rp); irecp++; } // end if ( (hitdestep+deltaDe) diff --git a/ITS/AliITSsimulationFastPointsV0.cxx b/ITS/AliITSsimulationFastPointsV0.cxx index 7f6548831bf..92dab6a66bf 100644 --- a/ITS/AliITSsimulationFastPointsV0.cxx +++ b/ITS/AliITSsimulationFastPointsV0.cxx @@ -120,7 +120,7 @@ void AliITSsimulationFastPointsV0::CreateFastRecPoints(AliITSmodule *mod,Int_t m } //_______________________________________________________________________ void AliITSsimulationFastPointsV0::AddSPD(Float_t &e, - AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){ + AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){ // TClonesArray &pt=*recp; const Float_t kmicronTocm = 1.0e-4; @@ -128,30 +128,33 @@ void AliITSsimulationFastPointsV0::AddSPD(Float_t &e, const Float_t kRMSx = 12.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 const Float_t kRMSz = 70.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 Float_t a1,a2; // general float. - AliITSRecPoint rpSPD; + + AliITSgeom* gm = mod->GetITS()->GetITSgeom(); + + AliITSRecPoint rpSPD(gm); - rpSPD.fTracks[0]=trackNumber; - rpSPD.fTracks[1]=-3; - rpSPD.fTracks[2]=-3; - rpSPD.SetX(fSx->GetMean()); - rpSPD.SetZ(fSz->GetMean()); + rpSPD.SetLabel(trackNumber,0); + rpSPD.SetLabel(-3,1); + rpSPD.SetLabel(-3,2); + rpSPD.SetXZ(mod->GetIndex(),fSx->GetMean(),fSz->GetMean()); rpSPD.SetdEdX(e); rpSPD.SetQ(1.0); a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx; // if(a1>1.E5) printf("addSPD: layer=%d track #%d dedx=%e sigmaX2= %e ", // mod->GetLayer(),trackNumber,e,a1); - rpSPD.SetSigmaX2(a1); + rpSPD.SetSigmaDetLocX2(a1); a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz; // if(a1>1.E5) printf(" sigmaZ2= %e\n",a2); rpSPD.SetSigmaZ2(a2); - + rpSPD.SetDetectorIndex(mod->GetIndex()); + rpSPD.SetLayer(mod->GetLayer()); //(mod->GetITS())->AddRecPoint(rpSPD); new (pt[fNrecp]) AliITSRecPoint(rpSPD); fNrecp++; } //_______________________________________________________________________ void AliITSsimulationFastPointsV0::AddSDD(Float_t &e, - AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){ + AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){ // TClonesArray &pt=*recp; const Float_t kmicronTocm = 1.0e-4; @@ -159,30 +162,32 @@ void AliITSsimulationFastPointsV0::AddSDD(Float_t &e, const Float_t kRMSx = 38.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 const Float_t kRMSz = 28.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 Float_t a1,a2; // general float. - AliITSRecPoint rpSDD; + AliITSgeom* gm = mod->GetITS()->GetITSgeom(); + + AliITSRecPoint rpSDD(gm); - rpSDD.fTracks[0]=trackNumber; - rpSDD.fTracks[1]=-3; - rpSDD.fTracks[2]=-3; - rpSDD.SetX(fSx->GetMean()); - rpSDD.SetZ(fSz->GetMean()); + rpSDD.SetLabel(trackNumber,0); + rpSDD.SetLabel(-3,1); + rpSDD.SetLabel(-3,2); + rpSDD.SetXZ(mod->GetIndex(),fSx->GetMean(),fSz->GetMean()); rpSDD.SetdEdX(e); rpSDD.SetQ(kdEdXtoQ*e); a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx; // if(a1>1.E5) printf("addSDD: layer=%d track #%d dedx=%e sigmaX2= %e ", // mod->GetLayer(),trackNumber,e,a1); - rpSDD.SetSigmaX2(a1); + rpSDD.SetSigmaDetLocX2(a1); a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz; // if(a1>1.E5) printf(" sigmaZ2= %e\n",a2); rpSDD.SetSigmaZ2(a2); - + rpSDD.SetDetectorIndex(mod->GetIndex()); + rpSDD.SetLayer(mod->GetLayer()); new (pt[fNrecp]) AliITSRecPoint(rpSDD); fNrecp++; } //_______________________________________________________________________ void AliITSsimulationFastPointsV0::AddSSD(Float_t &e, - AliITSmodule* /*mod*/,Int_t trackNumber,TClonesArray* recp){ + AliITSmodule* mod,Int_t trackNumber,TClonesArray* recp){ // TClonesArray &pt=*recp; const Float_t kmicronTocm = 1.0e-4; @@ -190,23 +195,26 @@ void AliITSsimulationFastPointsV0::AddSSD(Float_t &e, const Float_t kRMSx = 20.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 const Float_t kRMSz = 830.0*kmicronTocm; // microns->cm ITS TDR Table 1.3 Float_t a1,a2; // general float. - AliITSRecPoint rpSSD; - rpSSD.fTracks[0]=trackNumber; - rpSSD.fTracks[1]=-3; - rpSSD.fTracks[2]=-3; - rpSSD.SetX(fSx->GetMean()); - rpSSD.SetZ(fSz->GetMean()); + AliITSgeom* gm = mod->GetITS()->GetITSgeom(); + + AliITSRecPoint rpSSD(gm); + + rpSSD.SetLabel(trackNumber,0); + rpSSD.SetLabel(-3,1); + rpSSD.SetLabel(-3,2); + rpSSD.SetXZ(mod->GetIndex(),fSx->GetMean(),fSz->GetMean()); rpSSD.SetdEdX(e); rpSSD.SetQ(kdEdXtoQ*e); a1 = fSx->GetRMS(); a1 *= a1; a1 += kRMSx*kRMSx; // if(a1>1.E5) printf("addSSD: layer=%d track #%d dedx=%e sigmaX2= %e ", // mod->GetLayer(),trackNumber,e,a1); - rpSSD.SetSigmaX2(a1); + rpSSD.SetSigmaDetLocX2(a1); a2 = fSz->GetRMS(); a2 *= a2; a2 += kRMSz*kRMSz; // if(a1>1.E5) printf(" sigmaZ2= %e RMSx=%e RMSz=%e\n",a2,fSx->GetRMS(),fSz->GetRMS()); rpSSD.SetSigmaZ2(a2); - + rpSSD.SetDetectorIndex(mod->GetIndex()); + rpSSD.SetLayer(mod->GetLayer()); new (pt[fNrecp]) AliITSRecPoint(rpSSD); fNrecp++; diff --git a/ITS/AliITStrackerANN.cxx b/ITS/AliITStrackerANN.cxx index 35843506edc..58e227315bd 100644 --- a/ITS/AliITStrackerANN.cxx +++ b/ITS/AliITStrackerANN.cxx @@ -31,7 +31,7 @@ #include "AliITSgeom.h" #include "AliITStrackSA.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITStrackV2.h" #include "AliITStrackerANN.h" @@ -55,7 +55,7 @@ AliITStrackerANN::AliITStrackerANN(const AliITSgeom *geom, Int_t msglev) 2) the flag for log-messages writing The AliITSgeometry is used along the class, - in order to translate the local AliITSclusterV2 coordinates + in order to translate the local AliITSRecPoint coordinates into the Global reference frame, which is necessary for the Neural Network algorithm to operate. In case of serialized use, the log messages should be excluded, @@ -275,7 +275,7 @@ Bool_t AliITStrackerANN::GetGlobalXYZ Operations: essentially, determines the ITS module index from the - detector index of the AliITSclusterV2 object, and extracts + detector index of the AliITSRecPoint object, and extracts the roto-translation from the ITS geometry, to convert the local module coordinates into the global ones. @@ -293,7 +293,7 @@ Bool_t AliITStrackerANN::GetGlobalXYZ return kFALSE; } // checks if the referenced cluster exists and corresponds to the passed reference - AliITSclusterV2 *refCluster = (AliITSclusterV2*) GetCluster(refIndex); + AliITSRecPoint *refCluster = (AliITSRecPoint*) GetCluster(refIndex); if (!refCluster) { Error("GetGlobalXYZ", "Cluster not found for index %d", refIndex); return kFALSE; @@ -348,7 +348,7 @@ AliITStrackerANN::AliITSnode* AliITStrackerANN::AddNode(Int_t refIndex) neuron-creation phase. Arguments: - 1) reference index of the correlated AliITSclusterV2 object + 1) reference index of the correlated AliITSRecPoint object Operations: - allocates the new AliITSnode objects @@ -475,7 +475,7 @@ Int_t AliITStrackerANN::ArrangePoints(char *exportFile) If this file must not be created, simply pass a NULL argument Operations: - - for each AliITSclusterV2 in each AliITSlayer, a ne AliITSnode + - for each AliITSRecPoint in each AliITSlayer, a ne AliITSnode is created and stored in the correct location. Return values: @@ -843,7 +843,7 @@ void AliITStrackerANN::PrintMatches(Bool_t stop) TObjArray *sector = 0; Int_t ilayer, isector, itheta, nF; AliITSnode *node1 = 0, *node2 = 0; - //AliITSclusterV2 *cluster1 = 0, *cluster2 = 0; + //AliITSRecPoint *cluster1 = 0, *cluster2 = 0; for (ilayer = 0; ilayer < 6; ilayer++) { for (isector = 0; isector < fSectorNum; isector++) { @@ -1434,7 +1434,7 @@ Int_t AliITStrackerANN::SaveTracks(Int_t sector) } //if (!RiemannFit(fNLayers, node, param)) continue; // initialization of Kalman Filter Tracking - AliITSclusterV2 *cluster = (AliITSclusterV2*)GetCluster(node[0]->ClusterRef()); + AliITSRecPoint *cluster = (AliITSRecPoint*)GetCluster(node[0]->ClusterRef()); Int_t mod = cluster->GetDetectorIndex(); Int_t lay, lad, det; fGeom->GetModuleId(mod, lay, lad, det); @@ -1444,7 +1444,7 @@ Int_t AliITStrackerANN::SaveTracks(Int_t sector) y0, z0, param[4], param[7], param[3], 1); for (l = 0; l < fNLayers; l++) { - cluster = (AliITSclusterV2*)GetCluster(node[l]->ClusterRef()); + cluster = (AliITSRecPoint*)GetCluster(node[l]->ClusterRef()); if (cluster) trac->AddClusterV2(l, (node[l]->ClusterRef() & 0x0fffffff)>>0); } AliITStrackV2* ot = new AliITStrackV2(*trac); @@ -1598,7 +1598,7 @@ Int_t AliITStrackerANN::StoreTracks() //if (!RiemannFit(fNLayers, trackitem, param)) continue; if (!annTrack.RiemannFit()) continue; // initialization of Kalman Filter Tracking - AliITSclusterV2 *cluster = (AliITSclusterV2*)GetCluster(annTrack[0]->ClusterRef()); + AliITSRecPoint *cluster = (AliITSRecPoint*)GetCluster(annTrack[0]->ClusterRef()); Int_t mod = cluster->GetDetectorIndex(); Int_t lay, lad, det; fGeom->GetModuleId(mod, lay, lad, det); @@ -1609,7 +1609,7 @@ Int_t AliITStrackerANN::StoreTracks() annTrack.Curv(), 1); for (Int_t l = 0; l < fNLayers; l++) { if (!annTrack[l]) continue; - cluster = (AliITSclusterV2*)GetCluster(annTrack[l]->ClusterRef()); + cluster = (AliITSRecPoint*)GetCluster(annTrack[l]->ClusterRef()); if (cluster) trac->AddClusterV2(l, (annTrack[l]->ClusterRef() & 0x0fffffff)>>0); } AliITStrackV2* ot = new AliITStrackV2(*trac); diff --git a/ITS/AliITStrackerMI.cxx b/ITS/AliITStrackerMI.cxx index 001f60d8a84..b8398c6e033 100644 --- a/ITS/AliITStrackerMI.cxx +++ b/ITS/AliITStrackerMI.cxx @@ -17,7 +17,7 @@ //------------------------------------------------------------------------- // Implementation of the ITS tracker class -// It reads AliITSclusterV2 clusters and creates AliITStrackMI tracks +// It reads AliITSRecPoint clusters and creates AliITStrackMI tracks // and fills with them the ESD // Origin: Marian Ivanov, CERN, Marian.Ivanov@cern.ch // dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch @@ -32,7 +32,7 @@ #include "AliESD.h" #include "AliESDV0MI.h" #include "AliHelix.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSgeom.h" #include "AliITStrackerMI.h" #include "AliTrackPointArray.h" @@ -131,13 +131,13 @@ Int_t AliITStrackerMI::LoadClusters(TTree *cTree) { //-------------------------------------------------------------------- //This function loads ITS clusters //-------------------------------------------------------------------- - TBranch *branch=cTree->GetBranch("Clusters"); + TBranch *branch=cTree->GetBranch("ITSRecPoints"); if (!branch) { Error("LoadClusters"," can't get the branch !\n"); return 1; } - TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy; + TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy; branch->SetAddress(&clusters); Int_t j=0; @@ -150,9 +150,9 @@ Int_t AliITStrackerMI::LoadClusters(TTree *cTree) { Int_t ncl=clusters->GetEntriesFast(); SignDeltas(clusters,GetZ()); while (ncl--) { - AliITSclusterV2 *c=(AliITSclusterV2*)clusters->UncheckedAt(ncl); + AliITSRecPoint *c=(AliITSRecPoint*)clusters->UncheckedAt(ncl); detector = c->GetDetectorIndex(); - fgLayers[i].InsertCluster(new AliITSclusterV2(*c)); + fgLayers[i].InsertCluster(new AliITSRecPoint(*c)); } clusters->Delete(); //add dead zone virtual "cluster" @@ -165,22 +165,22 @@ Int_t AliITStrackerMI::LoadClusters(TTree *cTree) { if (i==1) hit[0]=ydead-3.75; hit[1] =-0.04; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); hit[1]=-7.05; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); hit[1]=-7.15; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); hit[1] =0.06; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); hit[1]=7.05; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); hit[1]=7.25; if (TMath::Abs(fgLayers[i].GetDetector(detector).GetZmax()-hit[1])<2.) - fgLayers[i].InsertCluster(new AliITSclusterV2(lab, hit, info)); + fgLayers[i].InsertCluster(new AliITSRecPoint(lab, hit, info)); } } @@ -516,7 +516,7 @@ Bool_t AliITStrackerMI::GetTrackPoint(Int_t index, AliTrackPoint& p) const { // Int_t l=(index & 0xf0000000) >> 28; Int_t c=(index & 0x0fffffff) >> 00; - AliITSclusterV2 *cl = fgLayers[l].GetCluster(c); + AliITSRecPoint *cl = fgLayers[l].GetCluster(c); Int_t idet = cl->GetDetectorIndex(); const AliITSdetector &det = fgLayers[l].GetDetector(idet); Float_t phi = det.GetPhi(); @@ -697,7 +697,7 @@ void AliITStrackerMI::FollowProlongationTree(AliITStrackMI * otrack, Int_t esdin msy/=50; msz/=50.; } // - const AliITSclusterV2 *c=0; Int_t ci=-1; + const AliITSRecPoint *c=0; Int_t ci=-1; Double_t chi2=12345.; Int_t deadzone=0; currenttrack = ¤ttrack1; @@ -1012,7 +1012,7 @@ void AliITStrackerMI::AliITSlayer::ResetWeights() { fClusterTracks[3][i]=-1; } for (Int_t i=0; iIsUsed()) cl->Use(); } @@ -1031,7 +1031,7 @@ void AliITStrackerMI::AliITSlayer::ResetRoad() { } -Int_t AliITStrackerMI::AliITSlayer::InsertCluster(AliITSclusterV2 *c) { +Int_t AliITStrackerMI::AliITSlayer::InsertCluster(AliITSRecPoint *c) { //-------------------------------------------------------------------- //This function adds a cluster to this layer //-------------------------------------------------------------------- @@ -1056,7 +1056,7 @@ void AliITStrackerMI::AliITSlayer::SortClusters() // //sort clusters // - AliITSclusterV2 **clusters = new AliITSclusterV2*[fN]; + AliITSRecPoint **clusters = new AliITSRecPoint*[fN]; Float_t *z = new Float_t[fN]; Int_t * index = new Int_t[fN]; // @@ -1283,7 +1283,7 @@ FindDetectorIndex(Double_t phi, Double_t z) const { } -const AliITSclusterV2 *AliITStrackerMI::AliITSlayer::GetNextCluster(Int_t &ci){ +const AliITSRecPoint *AliITStrackerMI::AliITSlayer::GetNextCluster(Int_t &ci){ //-------------------------------------------------------------------- // This function returns clusters within the "window" //-------------------------------------------------------------------- @@ -1450,7 +1450,7 @@ Int_t AliITStrackerMI::AliITSlayer::InRoad() const { //-------------------------------------------------------------------- Int_t ncl=0; for (Int_t i=fI; iGetZ() > fZmax) break; if (c->IsUsed()) continue; const AliITSdetector &det=GetDetector(c->GetDetectorIndex()); @@ -1529,12 +1529,12 @@ AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,const AliITStrackMI *c) { } t->SetDetectorIndex(idet); - const AliITSclusterV2 *cl=0; + const AliITSRecPoint *cl=0; Double_t maxchi2=1000.*kMaxChi2; Int_t idx=index[i]; if (idx>0) { - const AliITSclusterV2 *c=(AliITSclusterV2 *)GetCluster(idx); + const AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(idx); if (c){ if (idet != c->GetDetectorIndex()) { idet=c->GetDetectorIndex(); @@ -1566,7 +1566,7 @@ AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,const AliITStrackMI *c) { Double_t ymax=t->GetY() + phi*r + dy; layer.SelectClusters(zmin,zmax,ymin,ymax); - const AliITSclusterV2 *c=0; Int_t ci=-1; + const AliITSRecPoint *c=0; Int_t ci=-1; while ((c=layer.GetNextCluster(ci))!=0) { if (idet != c->GetDetectorIndex()) continue; Double_t chi2=t->GetPredictedChi2(c); @@ -1667,12 +1667,12 @@ AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,const Int_t *clindex) { } t->SetDetectorIndex(idet); - const AliITSclusterV2 *cl=0; + const AliITSRecPoint *cl=0; Double_t maxchi2=1000.*kMaxChi2; Int_t idx=index[i]; if (idx>0) { - const AliITSclusterV2 *c=(AliITSclusterV2 *)GetCluster(idx); + const AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(idx); if (c){ if (idet != c->GetDetectorIndex()) { idet=c->GetDetectorIndex(); @@ -1704,7 +1704,7 @@ AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,const Int_t *clindex) { Double_t ymax=t->GetY() + phi*r + dy; layer.SelectClusters(zmin,zmax,ymin,ymax); - const AliITSclusterV2 *c=0; Int_t ci=-1; + const AliITSRecPoint *c=0; Int_t ci=-1; while ((c=layer.GetNextCluster(ci))!=0) { if (idet != c->GetDetectorIndex()) continue; Double_t chi2=t->GetPredictedChi2(c); @@ -1774,7 +1774,7 @@ Double_t AliITStrackerMI::GetNormalizedChi2(AliITStrackMI * track, Int_t mode) } } if (i<2 ||i>3){ - AliITSclusterV2 * cl = (AliITSclusterV2*)GetCluster( track->fClIndex[i]); + AliITSRecPoint * cl = (AliITSRecPoint*)GetCluster( track->fClIndex[i]); Double_t delta = cl->GetNy()+cl->GetNz()-ny[i]-nz[i]; if (delta>1) chi2 +=0.5*TMath::Min(delta/2,2.); if (i<2) chi2+=2*cl->GetDeltaProbability(); @@ -2016,7 +2016,7 @@ void AliITStrackerMI::UnRegisterClusterTracks(AliITStrackMI* track, Int_t id) } } } -Float_t AliITStrackerMI::GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id, Int_t list[6], AliITSclusterV2 *clist[6]) +Float_t AliITStrackerMI::GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id, Int_t list[6], AliITSRecPoint *clist[6]) { //------------------------------------------------------------- //get number of shared clusters @@ -2035,7 +2035,7 @@ Float_t AliITStrackerMI::GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id if (ny[l]==0){ printf("problem\n"); } - AliITSclusterV2 *cl = (AliITSclusterV2*)GetCluster(index); + AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(index); Float_t weight=1; // Float_t deltan = 0; @@ -2053,7 +2053,7 @@ Float_t AliITStrackerMI::GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id for (Int_t itrack=0;itrack<4;itrack++){ if (fgLayers[l].fClusterTracks[itrack][c]>=0 && fgLayers[l].fClusterTracks[itrack][c]!=id){ list[l]=index; - clist[l] = (AliITSclusterV2*)GetCluster(index); + clist[l] = (AliITSRecPoint*)GetCluster(index); shared+=weight; break; } @@ -2086,7 +2086,7 @@ Int_t AliITStrackerMI::GetOverlapTrack(AliITStrackMI *track, Int_t trackID, Int_ } if (c>fgLayers[l].fN) continue; //if (l>3) continue; - AliITSclusterV2 *cl = (AliITSclusterV2*)GetCluster(index); + AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(index); // Float_t deltan = 0; if (l>3&&cl->GetNy()+cl->GetNz()>6) continue; @@ -2151,7 +2151,7 @@ Int_t AliITStrackerMI::GetOverlapTrack(AliITStrackMI *track, Int_t trackID, Int_ Int_t l=(index & 0xf0000000) >> 28; Int_t c=(index & 0x0fffffff) >> 00; if (c>fgLayers[l].fN) continue; - AliITSclusterV2 *cl = (AliITSclusterV2*)GetCluster(index); + AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(index); if (l==0 || l==1){ if (cl->GetNy()>2) continue; if (cl->GetNz()>2) continue; @@ -2206,7 +2206,7 @@ AliITStrackMI * AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2, Double_t w1,w2; Int_t list1[6],list2[6]; - AliITSclusterV2 *clist1[6], *clist2[6] ; + AliITSRecPoint *clist1[6], *clist2[6] ; RegisterClusterTracks(track10,trackID1); RegisterClusterTracks(track20,trackID2); Float_t conflict1 = GetNumberOfSharedClusters(track10,trackID1,list1,clist1); @@ -2283,7 +2283,7 @@ AliITStrackMI * AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2, Float_t nskipped=0; RegisterClusterTracks(track2,trackID2); Int_t list1[6],list2[6]; - AliITSclusterV2 *clist1[6], *clist2[6] ; + AliITSRecPoint *clist1[6], *clist2[6] ; Float_t cconflict1 = GetNumberOfSharedClusters(track1,trackID1,list1,clist1); Float_t cconflict2 = GetNumberOfSharedClusters(track2,trackID2,list2,clist2); UnRegisterClusterTracks(track2,trackID2); @@ -2427,10 +2427,10 @@ void AliITStrackerMI::UseClusters(const AliKalmanTrack *t, Int_t from) const { //-------------------------------------------------------------------- AliTracker::UseClusters(t,from); - AliITSclusterV2 *c=(AliITSclusterV2 *)GetCluster(t->GetClusterIndex(0)); + AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(0)); //if (c->GetQ()>2) c->Use(); if (c->GetSigmaZ2()>0.1) c->Use(); - c=(AliITSclusterV2 *)GetCluster(t->GetClusterIndex(1)); + c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(1)); //if (c->GetQ()>2) c->Use(); if (c->GetSigmaZ2()>0.1) c->Use(); @@ -2702,7 +2702,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI forwardtrack->fD[1] = track->fD[1]; { Int_t list[6]; - AliITSclusterV2* clist[6]; + AliITSRecPoint* clist[6]; track->fChi2MIP[4] = GetNumberOfSharedClusters(track,esdindex,list,clist); if ( (!track->fConstrain) && track->fChi2MIP[4]>1.0) continue; } @@ -2772,7 +2772,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI //if (longtrack) besttrack=longtrack; Int_t list[6]; - AliITSclusterV2 * clist[6]; + AliITSRecPoint * clist[6]; Float_t shared = GetNumberOfSharedClusters(besttrack,esdindex,list,clist); if (besttrack->fConstrain&&besttrack->fChi2MIP[0]fChi2MIP[1]fChi2MIP[2]fChi2MIP[3]> 28; if (besttrack->fSigmaY[ilayer]<0.00000000001) continue; - AliITSclusterV2 *c = (AliITSclusterV2*)GetCluster(index); + AliITSRecPoint *c = (AliITSRecPoint*)GetCluster(index); if (!c) continue; if (ilayer>3&&c->GetNy()+c->GetNz()>6) continue; if ( (c->GetNy()+c->GetNz() )> ny[i]+nz[i]+0.7) continue; //shared track @@ -2887,7 +2887,7 @@ void AliITStrackerMI::GetBestHypothesysMIP(TObjArray &itsTracks) // if (besttrack){ Int_t list[6]; - AliITSclusterV2 * clist[6]; + AliITSRecPoint * clist[6]; Float_t shared = GetNumberOfSharedClusters(longtrack,i,list,clist); // track->fNUsed = shared; @@ -2937,7 +2937,7 @@ void AliITStrackerMI::CookLabel(AliITStrackMI *track,Float_t wrong) const { for (Int_t i=0;iGetNumberOfClusters();i++){ Int_t cindex = track->GetClusterIndex(i); Int_t l=(cindex & 0xf0000000) >> 28; - AliITSclusterV2 *cl = (AliITSclusterV2*)GetCluster(cindex); + AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(cindex); Int_t isWrong=1; for (Int_t ind=0;ind<3;ind++){ if (tpcLabel>0) @@ -2962,7 +2962,7 @@ void AliITStrackerMI::CookdEdx(AliITStrackMI* track) // // // Int_t list[6]; - //AliITSclusterV2 * clist[6]; + //AliITSRecPoint * clist[6]; // Int_t shared = GetNumberOfSharedClusters(track,index,list,clist); Float_t dedx[4]; Int_t accepted=0; @@ -2970,7 +2970,7 @@ void AliITStrackerMI::CookdEdx(AliITStrackMI* track) for (Int_t i=0;iGetNumberOfClusters();i++){ Int_t cindex = track->GetClusterIndex(i); Int_t l=(cindex & 0xf0000000) >> 28; - AliITSclusterV2 *cl = (AliITSclusterV2*)GetCluster(cindex); + AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(cindex); Int_t lab = TMath::Abs(track->fESDtrack->GetTPCLabel()); Int_t isWrong=1; for (Int_t ind=0;ind<3;ind++){ @@ -3016,7 +3016,7 @@ void AliITStrackerMI::MakeCoeficients(Int_t ntracks){ } -Double_t AliITStrackerMI::GetPredictedChi2MI(AliITStrackMI* track, const AliITSclusterV2 *cluster,Int_t layer) +Double_t AliITStrackerMI::GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer) { // // @@ -3045,7 +3045,7 @@ Double_t AliITStrackerMI::GetPredictedChi2MI(AliITStrackMI* track, const AliITSc } -Int_t AliITStrackerMI::UpdateMI(AliITStrackMI* track, const AliITSclusterV2* cl,Double_t chi2,Int_t index) const +Int_t AliITStrackerMI::UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t index) const { // // @@ -3059,7 +3059,7 @@ Int_t AliITStrackerMI::UpdateMI(AliITStrackMI* track, const AliITSclusterV2* return track->UpdateMI(cl->GetY(),cl->GetZ(),track->fSigmaY[layer],track->fSigmaZ[layer],chi2,index); } -void AliITStrackerMI::GetNTeor(Int_t layer, const AliITSclusterV2* /*cl*/, Float_t theta, Float_t phi, Float_t &ny, Float_t &nz) +void AliITStrackerMI::GetNTeor(Int_t layer, const AliITSRecPoint* /*cl*/, Float_t theta, Float_t phi, Float_t &ny, Float_t &nz) { // //get "mean shape" @@ -3086,7 +3086,7 @@ void AliITStrackerMI::GetNTeor(Int_t layer, const AliITSclusterV2* /*cl*/, Float -Int_t AliITStrackerMI::GetError(Int_t layer, const AliITSclusterV2*cl, Float_t theta, Float_t phi,Float_t expQ, Float_t &erry, Float_t &errz) +Int_t AliITStrackerMI::GetError(Int_t layer, const AliITSRecPoint*cl, Float_t theta, Float_t phi,Float_t expQ, Float_t &erry, Float_t &errz) { //calculate cluster position error // @@ -3260,7 +3260,7 @@ void AliITStrackerMI::SignDeltas( TObjArray *ClusterArray, Float_t vz) // Int_t entries = ClusterArray->GetEntriesFast(); if (entries<4) return; - AliITSclusterV2* cluster = (AliITSclusterV2*)ClusterArray->At(0); + AliITSRecPoint* cluster = (AliITSRecPoint*)ClusterArray->At(0); Int_t layer = cluster->GetLayer(); if (layer>1) return; Int_t index[10000]; @@ -3268,7 +3268,7 @@ void AliITStrackerMI::SignDeltas( TObjArray *ClusterArray, Float_t vz) Float_t r = (layer>0)? 7:4; // for (Int_t i=0;iAt(i); + AliITSRecPoint* cl0 = (AliITSRecPoint*)ClusterArray->At(i); Float_t nz = 1+TMath::Abs((cl0->GetZ()-vz)/r); if (cl0->GetNy()+cl0->GetNz()<=5+2*layer+nz) continue; index[ncandidates] = i; //candidate to belong to delta electron track @@ -3281,7 +3281,7 @@ void AliITStrackerMI::SignDeltas( TObjArray *ClusterArray, Float_t vz) // // for (Int_t i=0;iAt(index[i]); + AliITSRecPoint* cl0 = (AliITSRecPoint*)ClusterArray->At(index[i]); if (cl0->GetDeltaProbability()>0.8) continue; // Int_t ncl = 0; @@ -3289,7 +3289,7 @@ void AliITStrackerMI::SignDeltas( TObjArray *ClusterArray, Float_t vz) sumy=sumz=sumy2=sumyz=sumw=0.0; for (Int_t j=0;jAt(index[j]); + AliITSRecPoint* cl1 = (AliITSRecPoint*)ClusterArray->At(index[j]); // Float_t dz = cl0->GetZ()-cl1->GetZ(); Float_t dy = cl0->GetY()-cl1->GetY(); diff --git a/ITS/AliITStrackerMI.h b/ITS/AliITStrackerMI.h index 78f0a110342..dbdd8154822 100644 --- a/ITS/AliITStrackerMI.h +++ b/ITS/AliITStrackerMI.h @@ -13,14 +13,13 @@ class TTree; class TTreeSRedirector; -#include - class AliESD; class AliHelix; class AliITSgeom; class AliV0vertex; -#include "AliITSclusterV2.h" +#include +#include "AliITSRecPoint.h" #include "AliITStrackMI.h" #include "AliTracker.h" #include "AliV0vertex.h" @@ -33,7 +32,7 @@ public: ~AliITStrackerMI(); AliCluster *GetCluster(Int_t index) const; virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const; - AliITSclusterV2 *GetClusterLayer(Int_t layn, Int_t ncl) const + AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const {return fgLayers[layn].GetCluster(ncl);} Int_t GetNumberOfClustersLayer(Int_t layn) const {return fgLayers[layn].GetNumberOfClusters();} @@ -50,18 +49,18 @@ public: void SetLastLayerToTrackTo(Int_t l=0) {fLastLayerToTrackTo=l;} void SetLayersNotToSkip(Int_t *l); void UseClusters(const AliKalmanTrack *t, Int_t from=0) const; - void GetNTeor(Int_t layer, const AliITSclusterV2* cl, Float_t theta, Float_t phi, Float_t &ny, Float_t &nz); - Int_t GetError(Int_t layer, const AliITSclusterV2*cl, Float_t theta, Float_t phi, Float_t expQ, Float_t &erry, Float_t &errz); + void GetNTeor(Int_t layer, const AliITSRecPoint* cl, Float_t theta, Float_t phi, Float_t &ny, Float_t &nz); + Int_t GetError(Int_t layer, const AliITSRecPoint*cl, Float_t theta, Float_t phi, Float_t expQ, Float_t &erry, Float_t &errz); void GetDCASigma(AliITStrackMI* track, Float_t & sigmarfi, Float_t &sigmaz); - Double_t GetPredictedChi2MI(AliITStrackMI* track, const AliITSclusterV2 *cluster,Int_t layer); - Int_t UpdateMI(AliITStrackMI* track, const AliITSclusterV2* cl,Double_t chi2,Int_t layer) const; + Double_t GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer); + Int_t UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const; class AliITSdetector { public: AliITSdetector(){} AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi; fSinPhi = TMath::Sin(phi); fCosPhi = TMath::Cos(phi); fYmin=10000;fYmax=-1000; fZmin=10000;fZmax=-1000;} - inline void GetGlobalXYZ( const AliITSclusterV2 *cl, Double_t xyz[3]) const; + inline void GetGlobalXYZ( const AliITSRecPoint *cl, Double_t xyz[3]) const; Double_t GetR() const {return fR;} Double_t GetPhi() const {return fPhi;} Double_t GetYmin() const {return fYmin;} @@ -89,17 +88,17 @@ public: AliITSlayer(); AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd); ~AliITSlayer(); - Int_t InsertCluster(AliITSclusterV2 *c); + Int_t InsertCluster(AliITSRecPoint *c); void SortClusters(); void ResetClusters(); void ResetWeights(); void SelectClusters(Double_t zmi,Double_t zma,Double_t ymi,Double_t yma); - const AliITSclusterV2 *GetNextCluster(Int_t &ci); + const AliITSRecPoint *GetNextCluster(Int_t &ci); void ResetRoad(); Double_t GetRoad() const {return fRoad;} Double_t GetR() const {return fR;} Int_t FindClusterIndex(Float_t z) const; - AliITSclusterV2 *GetCluster(Int_t i) const {return ifNSkipped)); return track->fNormChi2[layer]; } -inline void AliITStrackerMI::AliITSdetector::GetGlobalXYZ(const AliITSclusterV2 *cl, Double_t xyz[3]) const +inline void AliITStrackerMI::AliITSdetector::GetGlobalXYZ(const AliITSRecPoint *cl, Double_t xyz[3]) const { // // get cluster coordinates in global cooordinate diff --git a/ITS/AliITStrackerSA.cxx b/ITS/AliITStrackerSA.cxx index cb274042115..787a576434c 100644 --- a/ITS/AliITStrackerSA.cxx +++ b/ITS/AliITStrackerSA.cxx @@ -34,7 +34,7 @@ #include "AliESDtrack.h" #include "AliITSVertexer.h" #include "AliITSclusterTable.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITSgeom.h" #include "AliITStrackSA.h" #include "AliITStrackerSA.h" @@ -216,7 +216,7 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ UInt_t idx[6]; Int_t ncl = track->GetITSclusters(idx); for(Int_t k=0;kSetBit(kSAflag); } } @@ -235,13 +235,13 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ for(Int_t i=0;iGetNlayers();i++){ AliITSlayer &layer=fgLayers[i]; for(Int_t cli=0;cliTestBit(kSAflag)==kTRUE) continue; //clusters used by TPC prol. if(cls->GetQ()==0) continue; //fake clusters dead zones nclusters[i]++; } dmar[i]=0; - fCluLayer[i] = new TClonesArray("AliITSclusterV2",nclusters[i]); + fCluLayer[i] = new TClonesArray("AliITSRecPoint",nclusters[i]); fCluCoord[i] = new TClonesArray("AliITSclusterTable",nclusters[i]); } @@ -256,7 +256,7 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ TClonesArray &clucoo = *fCluCoord[ilay]; AliITSlayer &layer=fgLayers[ilay]; for(Int_t cli=0;cliTestBit(kSAflag)==kTRUE) continue; if(cls->GetQ()==0) continue; Double_t phi=0;Double_t lambda=0; @@ -265,7 +265,7 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ Int_t module = cls->GetDetectorIndex()+firstmod[ilay]; GetCoorAngles(cls,module,phi,lambda,x,y,z,primaryVertex); GetCoorErrors(cls,module,sx,sy,sz); - new (clulay[dmar[ilay]]) AliITSclusterV2(*cls); + new (clulay[dmar[ilay]]) AliITSRecPoint(*cls); new (clucoo[dmar[ilay]]) AliITSclusterTable(x,y,z,sx,sy,sz,phi,lambda,cli); dmar[ilay]++; } @@ -282,7 +282,7 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ ResetForFinding(); Int_t pflag=0; - AliITSclusterV2* cl = (AliITSclusterV2*)fCluLayer[0]->At(ncl); + AliITSRecPoint* cl = (AliITSRecPoint*)fCluLayer[0]->At(ncl); if(!cl) continue; @@ -370,7 +370,7 @@ Int_t AliITStrackerSA::FindTracks(AliESD* event){ while(ncl2--){ //loop starting from layer 2 ResetForFinding(); Int_t pflag=0; - AliITSclusterV2* cl = (AliITSclusterV2*)fCluLayer[1]->At(ncl2); + AliITSRecPoint* cl = (AliITSRecPoint*)fCluLayer[1]->At(ncl2); if(!cl) continue; AliITSclusterTable* arr = (AliITSclusterTable*)GetClusterCoord(1,ncl2); @@ -482,7 +482,7 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert for(Int_t ncl=0;nclGetClusterIndexSA(ncl); - AliITSclusterV2* cl = (AliITSclusterV2*)GetCluster(index); + AliITSRecPoint* cl = (AliITSRecPoint*)GetCluster(index); if(cl->TestBit(kSAflag)==kTRUE) cl->ResetBit(kSAflag); Int_t lay = (index & 0xf0000000) >> 28; if(lay==0) { listlayer[0]->AddLast(cl); clind0[nnn[0]]=index;nnn[0]++;} @@ -522,11 +522,11 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert if(end[0]==0) end[0]=1; //for tracks with cluster on layer 0 missing for(Int_t l1=0;l1At(l1); + AliITSRecPoint* cl0 = (AliITSRecPoint*)listlayer[0]->At(l1); Double_t x1,y1,z1,sx1,sy1,sz1; Double_t x2,y2,z2,sx2,sy2,sz2; - AliITSclusterV2* p1=0; - AliITSclusterV2* p2=0; + AliITSRecPoint* p1=0; + AliITSRecPoint* p2=0; Int_t index1=clind0[l1]; Int_t index2=0; Int_t mrk1 = mark0[l1]; @@ -535,11 +535,11 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert Int_t lay2=1; Int_t module1=-1; for(Int_t l2=0;l2At(l2); + AliITSRecPoint* cl1 = (AliITSRecPoint*)listlayer[1]->At(l2); index2=clind1[l2]; mrk2 = mark1[l2]; for(Int_t l3=0;l3At(l3); + AliITSRecPoint* cl2 = (AliITSRecPoint*)listlayer[2]->At(l3); if(cl0==0 && cl1!=0) { p2 = cl2;index1=clind2[l3];mrk1=mark2[l3];lay1=2; @@ -584,11 +584,11 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert Double_t phi2 = TMath::ATan2((y2-y1),(x2-x1)); for(Int_t l4=0;l4At(l4); + AliITSRecPoint* cl3 = (AliITSRecPoint*)listlayer[3]->At(l4); for(Int_t l5=0;l5At(l5); + AliITSRecPoint* cl4 = (AliITSRecPoint*)listlayer[4]->At(l5); for(Int_t l6=0;l6At(l6); + AliITSRecPoint* cl5 = (AliITSRecPoint*)listlayer[5]->At(l6); AliITStrackSA* trac = new AliITStrackSA(fGeom,layer,ladder,detector,yclu1,zclu1,phi2,tgl2,cv,1); if(cl5!=0) { @@ -658,6 +658,8 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert delete listlayer[i]; } delete [] listlayer; + listSA->Delete(); + delete listSA; delete [] firstmod; return 0; } @@ -671,6 +673,8 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert delete listlayer[i]; } delete [] listlayer; + listSA->Delete(); + delete listSA; delete [] firstmod; return 0; } @@ -679,14 +683,14 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert for(Int_t nind=0;nindGetNumberOfClusters();nind++){ indexc[nind] = otrack->GetClusterIndex(nind); } - AliITSclusterV2* cl0 = (AliITSclusterV2*)GetCluster(indexc[0]); - AliITSclusterV2* cl1 = (AliITSclusterV2*)GetCluster(indexc[1]); - AliITSclusterV2* cl2 = (AliITSclusterV2*)GetCluster(indexc[2]); - AliITSclusterV2* cl3 = (AliITSclusterV2*)GetCluster(indexc[3]); - AliITSclusterV2* cl4 = (AliITSclusterV2*)GetCluster(indexc[4]); + AliITSRecPoint* cl0 = (AliITSRecPoint*)GetCluster(indexc[0]); + AliITSRecPoint* cl1 = (AliITSRecPoint*)GetCluster(indexc[1]); + AliITSRecPoint* cl2 = (AliITSRecPoint*)GetCluster(indexc[2]); + AliITSRecPoint* cl3 = (AliITSRecPoint*)GetCluster(indexc[3]); + AliITSRecPoint* cl4 = (AliITSRecPoint*)GetCluster(indexc[4]); Int_t labl[3]={-1,-1,-1}; if(otrack->GetNumberOfClusters()==fGeom->GetNlayers()){ - AliITSclusterV2* cl5 = (AliITSclusterV2*)GetCluster(indexc[5]); + AliITSRecPoint* cl5 = (AliITSRecPoint*)GetCluster(indexc[5]); labl[0]=cl5->GetLabel(0); labl[1]=cl5->GetLabel(1); labl[2]=cl5->GetLabel(2); @@ -755,7 +759,7 @@ Int_t AliITStrackerSA::SearchClusters(Int_t layer,Double_t phiwindow,Double_t la Int_t ncl = fCluLayer[layer]->GetEntries(); for (Int_t index=0; indexAt(index); + AliITSRecPoint *c = (AliITSRecPoint*)fCluLayer[layer]->At(index); if (!c) continue; if (c->GetQ()<=0) continue; @@ -1017,7 +1021,7 @@ void AliITStrackerSA::SetWindowSizes(Int_t n, Double_t *phi, Double_t *lam){ } //_______________________________________________________________________ -void AliITStrackerSA::GetCoorAngles(AliITSclusterV2* cl,Int_t module,Double_t &phi,Double_t &lambda, Float_t &x, Float_t &y,Float_t &z,Double_t* vertex){ +void AliITStrackerSA::GetCoorAngles(AliITSRecPoint* cl,Int_t module,Double_t &phi,Double_t &lambda, Float_t &x, Float_t &y,Float_t &z,Double_t* vertex){ //Returns values of phi (azimuthal) and lambda angles for a given cluster Double_t rot[9]; fGeom->GetRotMatrix(module,rot); @@ -1040,7 +1044,7 @@ void AliITStrackerSA::GetCoorAngles(AliITSclusterV2* cl,Int_t module,Double_t &p } //________________________________________________________________________ -void AliITStrackerSA::GetCoorErrors(AliITSclusterV2* cl, Int_t module,Float_t &sx,Float_t &sy, Float_t &sz){ +void AliITStrackerSA::GetCoorErrors(AliITSRecPoint* cl, Int_t module,Float_t &sx,Float_t &sy, Float_t &sz){ //returns x,y,z of cluster in global coordinates diff --git a/ITS/AliITStrackerSA.h b/ITS/AliITStrackerSA.h index 64414911d44..413f6d88b17 100644 --- a/ITS/AliITStrackerSA.h +++ b/ITS/AliITStrackerSA.h @@ -75,10 +75,8 @@ class AliITStrackerSA : public AliITStrackerMI { Int_t SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow, AliITStrackSA* trs,Double_t zvertex,Int_t flagp); - - - void GetCoorAngles(AliITSclusterV2* cl,Int_t module,Double_t &phi,Double_t &lambda,Float_t &x,Float_t &y,Float_t &z,Double_t* vertex); - void GetCoorErrors(AliITSclusterV2* cl, Int_t module,Float_t &sx,Float_t &sy, Float_t &sz); + void GetCoorAngles(AliITSRecPoint* cl,Int_t module,Double_t &phi,Double_t &lambda,Float_t &x,Float_t &y,Float_t &z,Double_t* vertex); + void GetCoorErrors(AliITSRecPoint* cl, Int_t module,Float_t &sx,Float_t &sy, Float_t &sz); AliITSclusterTable* GetClusterCoord(Int_t layer,Int_t n) const {return (AliITSclusterTable*)fCluCoord[layer]->UncheckedAt(n);} void RemoveClusterCoord(Int_t layer, Int_t n) {fCluCoord[layer]->RemoveAt(n);fCluCoord[layer]->Compress();} diff --git a/ITS/AliITStrackerV2.cxx b/ITS/AliITStrackerV2.cxx index 02468600801..ba90fca08df 100644 --- a/ITS/AliITStrackerV2.cxx +++ b/ITS/AliITStrackerV2.cxx @@ -15,7 +15,7 @@ //------------------------------------------------------------------------- // Implementation of the ITS tracker class -// It reads AliITSclusterV2 clusters and creates AliITStrackV2 tracks +// It reads AliITSRecPoint clusters and creates AliITStrackV2 tracks // and fills with them the ESD // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch // dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch @@ -30,7 +30,7 @@ #include "AliITSgeom.h" #include "AliITSRecPoint.h" #include "AliESD.h" -#include "AliITSclusterV2.h" +#include "AliITSRecPoint.h" #include "AliITStrackerV2.h" ClassImp(AliITStrackerV2) @@ -109,13 +109,13 @@ Int_t AliITStrackerV2::LoadClusters(TTree *cTree) { //-------------------------------------------------------------------- //This function loads ITS clusters //-------------------------------------------------------------------- - TBranch *branch=cTree->GetBranch("Clusters"); + TBranch *branch=cTree->GetBranch("ITSRecPoints"); if (!branch) { Error("LoadClusters"," can't get the branch !\n"); return 1; } - TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy; + TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy; branch->SetAddress(&clusters); Int_t j=0; @@ -130,14 +130,14 @@ Int_t AliITStrackerV2::LoadClusters(TTree *cTree) { if (!cTree->GetEvent(j)) continue; Int_t ncl=clusters->GetEntriesFast(); while (ncl--) { - AliITSclusterV2 *c=(AliITSclusterV2*)clusters->UncheckedAt(ncl); + AliITSRecPoint *c=(AliITSRecPoint*)clusters->UncheckedAt(ncl); Int_t idx=c->GetDetectorIndex(); Double_t y=r*fgLayers[i].GetDetector(idx).GetPhi()+c->GetY(); if (y>circ) y-=circ; else if (y<0) y+=circ; c->SetPhiR(y); - fgLayers[i].InsertCluster(new AliITSclusterV2(*c)); + fgLayers[i].InsertCluster(new AliITSRecPoint(*c)); } clusters->Delete(); } @@ -516,8 +516,8 @@ Int_t AliITStrackerV2::TakeNextProlongation() { dz=road*scz; dy=road*scy; } - const AliITSclusterV2 *c=0; Int_t ci=-1; - const AliITSclusterV2 *cc=0; Int_t cci=-1; + const AliITSRecPoint *c=0; Int_t ci=-1; + const AliITSRecPoint *cc=0; Int_t cci=-1; Double_t chi2=kMaxChi2; while ((c=layer.GetNextCluster(ci))!=0) { Int_t idet=c->GetDetectorIndex(); @@ -638,7 +638,7 @@ void AliITStrackerV2::AliITSlayer::ResetRoad() { if (n>1) fRoad=2*fR*TMath::Sqrt(3.14/n); } -Int_t AliITStrackerV2::AliITSlayer::InsertCluster(AliITSclusterV2 *c) { +Int_t AliITStrackerV2::AliITSlayer::InsertCluster(AliITSRecPoint *c) { //-------------------------------------------------------------------- // This function inserts a cluster to this layer in increasing // order of the cluster's fZ @@ -658,7 +658,7 @@ Int_t AliITStrackerV2::AliITSlayer::InsertCluster(AliITSclusterV2 *c) { else { Int_t i=FindClusterIndex(c->GetZ(),sec); Int_t k=n-i+sec*kMaxClusterPerSector; - memmove(fClusters+i+1 ,fClusters+i,k*sizeof(AliITSclusterV2*)); + memmove(fClusters+i+1 ,fClusters+i,k*sizeof(AliITSRecPoint*)); fClusters[i]=c; } n++; @@ -703,7 +703,7 @@ SelectClusters(Float_t zmin,Float_t zmax,Float_t ymin, Float_t ymax) { Float_t ym = (ymaxIsUsed()) continue; if (c->GetZ()>zmax) break; if (c->GetPhiR()<=ymin) continue; @@ -719,7 +719,7 @@ SelectClusters(Float_t zmin,Float_t zmax,Float_t ymin, Float_t ymax) { Float_t ym = (ymin>ymax) ? ymin-circ : ymin; Int_t i=FindClusterIndex(zmin,i2), imax=i2*kMaxClusterPerSector+fN[i2]; for (; iIsUsed()) continue; if (c->GetZ()>zmax) break; if (c->GetPhiR()<=ym) continue; @@ -731,11 +731,11 @@ SelectClusters(Float_t zmin,Float_t zmax,Float_t ymin, Float_t ymax) { return fNsel; } -const AliITSclusterV2 *AliITStrackerV2::AliITSlayer::GetNextCluster(Int_t &ci){ +const AliITSRecPoint *AliITStrackerV2::AliITSlayer::GetNextCluster(Int_t &ci){ //-------------------------------------------------------------------- // This function returns clusters within the "window" //-------------------------------------------------------------------- - AliITSclusterV2 *c=0; + AliITSRecPoint *c=0; ci=-1; if (fNsel) { fNsel--; @@ -963,12 +963,12 @@ AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,const AliITStrackV2 *c) { } t->SetDetectorIndex(idet); - const AliITSclusterV2 *cl=0; + const AliITSRecPoint *cl=0; Double_t maxchi2=kMaxChi2; Int_t idx=index[i]; if (idx>0) { - const AliITSclusterV2 *c=(AliITSclusterV2 *)GetCluster(idx); + const AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(idx); if (idet != c->GetDetectorIndex()) { idet=c->GetDetectorIndex(); const AliITSdetector &det=layer.GetDetector(idet); @@ -996,7 +996,7 @@ AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,const AliITStrackV2 *c) { Double_t ymax=t->GetY() + phi*r + dy; layer.SelectClusters(zmin,zmax,ymin,ymax); - const AliITSclusterV2 *c=0; Int_t ci=-1; + const AliITSRecPoint *c=0; Int_t ci=-1; while ((c=layer.GetNextCluster(ci))!=0) { if (idet != c->GetDetectorIndex()) continue; Double_t chi2=t->GetPredictedChi2(c); @@ -1039,9 +1039,9 @@ void AliITStrackerV2::UseClusters(const AliKalmanTrack *t, Int_t from) const { //-------------------------------------------------------------------- AliTracker::UseClusters(t,from); - AliITSclusterV2 *c=(AliITSclusterV2 *)GetCluster(t->GetClusterIndex(0)); + AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(0)); if (c && c->GetSigmaZ2()>0.1) c->UnUse(); - c=(AliITSclusterV2 *)GetCluster(t->GetClusterIndex(1)); + c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(1)); if (c && c->GetSigmaZ2()>0.1) c->UnUse(); } diff --git a/ITS/AliITStrackerV2.h b/ITS/AliITStrackerV2.h index bca24192ca8..a8b343f3d5c 100644 --- a/ITS/AliITStrackerV2.h +++ b/ITS/AliITStrackerV2.h @@ -5,14 +5,14 @@ //------------------------------------------------------------------------- // ITS tracker -// reads AliITSclusterV2 clusters and creates AliITStrackV2 tracks +// reads AliITSRecPoint clusters and creates AliITStrackV2 tracks // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //------------------------------------------------------------------------- #include "AliTracker.h" #include "AliITSrecoV2.h" #include "AliITStrackV2.h" -class AliITSclusterV2; +class AliITSRecPoint; class AliESD; class AliITSgeom; class TTree; @@ -25,7 +25,7 @@ public: AliITStrackerV2(const AliITSgeom *geom); ~AliITStrackerV2(){} AliCluster *GetCluster(Int_t index) const; - AliITSclusterV2 *GetCluster(Int_t l, Int_t c) const { + AliITSRecPoint *GetCluster(Int_t l, Int_t c) const { return fgLayers[l].GetCluster(c); } Int_t GetNumberOfClustersLayer(Int_t n) const { @@ -62,14 +62,14 @@ public: AliITSlayer(); AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd); ~AliITSlayer(); - Int_t InsertCluster(AliITSclusterV2 *c); + Int_t InsertCluster(AliITSRecPoint *c); void ResetClusters(); Int_t SelectClusters(Float_t zmi, Float_t zma, Float_t ymi, Float_t yma); - const AliITSclusterV2 *GetNextCluster(Int_t &ci); + const AliITSRecPoint *GetNextCluster(Int_t &ci); void ResetRoad(); Double_t GetRoad() const {return fRoad;} Double_t GetR() const {return fR;} - AliITSclusterV2 *GetCluster(Int_t i) const { return fClusters[i]; } + AliITSRecPoint *GetCluster(Int_t i) const { return fClusters[i]; } AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; } Int_t FindDetectorIndex(Double_t phi, Double_t z) const; Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const; @@ -84,7 +84,7 @@ public: Int_t fNdetectors; // detectors/ladder AliITSdetector *fDetectors; // array of detectors - AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters + AliITSRecPoint *fClusters[kMaxClusterPerLayer]; // pointers to clusters Int_t fN[kNsector]; // numbers of clusters sector by sector Int_t fIndex[kMaxClusterPerLayer]; // indexes of selected clusters -- 2.43.0