From 7b116aa1b3544825e27ebcd6f6e169a049b69bc8 Mon Sep 17 00:00:00 2001 From: masera Date: Tue, 16 Sep 2008 16:16:32 +0000 Subject: [PATCH] - include option to avoid multiple reconstruction of tracklets in the SPD overlaps (default to FALSE) - allow relevant tracklet reconstruction params to be set via ITSRecoParam: Concerning the last point, here are the params: Bool_t fTrackleterOnlyOneTrackletPerC2; // Allow only one tracklet per cluster in the outer layer Float_t fTrackleterPhiWindow; // Search window in phi Float_t fTrackleterZetaWindow; // Search window in eta Bool_t fTrackleterRemoveClustersFromOverlaps; // Option to skip clusters in the overlaps Float_t fTrackleterPhiOverlapCut; // Fiducial window in phi for overlap cut Float_t fTrackleterZetaOverlapCut; // Fiducial window in eta for overlap cut and the usual scheme for setting them different wrt default: // ITS settings AliITSRecoParam* itsRecoParam = AliITSRecoParam::GetLowFluxParam(); itsRecoParam->SetTrackleterOnlyOneTrackletPerC2(kTRUE); itsRecoParam->SetTrackleterPhiWindow(0.08); itsRecoParam->SetTrackleterZetaWindow(1.00); itsRecoParam->SetTrackleterRemoveClustersFromOverlaps(kFALSE); itsRecoParam->SetTrackleterPhiOverlapCut(0.005); itsRecoParam->SetTrackleterZetaOverlapCut(0.05); reco.SetRecoParam("ITS",itsRecoParam); Domenico Elia --- ITS/AliITSMultReconstructor.cxx | 155 +++++++++++++++++++++++++++++--- ITS/AliITSMultReconstructor.h | 31 +++++-- ITS/AliITSRecoParam.cxx | 8 +- ITS/AliITSRecoParam.h | 22 +++++ 4 files changed, 194 insertions(+), 22 deletions(-) diff --git a/ITS/AliITSMultReconstructor.cxx b/ITS/AliITSMultReconstructor.cxx index cb876016f07..398a25ef9ec 100644 --- a/ITS/AliITSMultReconstructor.cxx +++ b/ITS/AliITSMultReconstructor.cxx @@ -48,6 +48,8 @@ // - cluster coordinates taken with GetGlobalXYZ() // - fGeometry removed // - number of fired chips on the two layers +// - option to avoid duplicates in the overlaps (fRemoveClustersFromOverlaps) +// - options and fiducial cuts via AliITSRecoParam // //____________________________________________________________________ @@ -57,6 +59,7 @@ #include #include "AliITSMultReconstructor.h" +#include "AliITSReconstructor.h" #include "AliITSsegmentationSPD.h" #include "AliITSRecPoint.h" #include "AliITSgeom.h" @@ -70,6 +73,10 @@ ClassImp(AliITSMultReconstructor) AliITSMultReconstructor::AliITSMultReconstructor(): fClustersLay1(0), fClustersLay2(0), +fDetectorIndexClustersLay1(0), +fDetectorIndexClustersLay2(0), +fOverlapFlagClustersLay1(0), +fOverlapFlagClustersLay2(0), fTracklets(0), fSClusters(0), fAssociationFlag(0), @@ -77,9 +84,12 @@ fNClustersLay1(0), fNClustersLay2(0), fNTracklets(0), fNSingleCluster(0), +fOnlyOneTrackletPerC2(0), fPhiWindow(0), fZetaWindow(0), -fOnlyOneTrackletPerC2(0), +fRemoveClustersFromOverlaps(0), +fPhiOverlapCut(0), +fZetaOverlapCut(0), fHistOn(0), fhClustersDPhiAcc(0), fhClustersDThetaAcc(0), @@ -104,21 +114,41 @@ fhphiClustersLay1(0){ SetHistOn(); - SetPhiWindow(); - SetZetaWindow(); - SetOnlyOneTrackletPerC2(); - fClustersLay1 = new Float_t*[300000]; - fClustersLay2 = new Float_t*[300000]; - fTracklets = new Float_t*[300000]; - fSClusters = new Float_t*[300000]; - fAssociationFlag = new Bool_t[300000]; + if(AliITSReconstructor::GetRecoParam()) { + SetOnlyOneTrackletPerC2(AliITSReconstructor::GetRecoParam()->GetTrackleterOnlyOneTrackletPerC2()); + SetPhiWindow(AliITSReconstructor::GetRecoParam()->GetTrackleterPhiWindow()); + SetZetaWindow(AliITSReconstructor::GetRecoParam()->GetTrackleterZetaWindow()); + SetRemoveClustersFromOverlaps(AliITSReconstructor::GetRecoParam()->GetTrackleterRemoveClustersFromOverlaps()); + SetPhiOverlapCut(AliITSReconstructor::GetRecoParam()->GetTrackleterPhiOverlapCut()); + SetZetaOverlapCut(AliITSReconstructor::GetRecoParam()->GetTrackleterZetaOverlapCut()); + } else { + SetOnlyOneTrackletPerC2(); + SetPhiWindow(); + SetZetaWindow(); + SetRemoveClustersFromOverlaps(); + SetPhiOverlapCut(); + SetZetaOverlapCut(); + } + + + fClustersLay1 = new Float_t*[300000]; + fClustersLay2 = new Float_t*[300000]; + fDetectorIndexClustersLay1 = new Int_t[300000]; + fDetectorIndexClustersLay2 = new Int_t[300000]; + fOverlapFlagClustersLay1 = new Bool_t[300000]; + fOverlapFlagClustersLay2 = new Bool_t[300000]; + fTracklets = new Float_t*[300000]; + fSClusters = new Float_t*[300000]; + fAssociationFlag = new Bool_t[300000]; for(Int_t i=0; i<300000; i++) { fClustersLay1[i] = new Float_t[6]; fClustersLay2[i] = new Float_t[6]; fTracklets[i] = new Float_t[5]; fSClusters[i] = new Float_t[2]; + fOverlapFlagClustersLay1[i] = kFALSE; + fOverlapFlagClustersLay2[i] = kFALSE; fAssociationFlag[i] = kFALSE; } @@ -161,6 +191,10 @@ fhphiClustersLay1(0){ AliITSMultReconstructor::AliITSMultReconstructor(const AliITSMultReconstructor &mr) : TObject(mr), fClustersLay1(mr.fClustersLay1), fClustersLay2(mr.fClustersLay2), +fDetectorIndexClustersLay1(mr.fDetectorIndexClustersLay1), +fDetectorIndexClustersLay2(mr.fDetectorIndexClustersLay2), +fOverlapFlagClustersLay1(mr.fOverlapFlagClustersLay1), +fOverlapFlagClustersLay2(mr.fOverlapFlagClustersLay2), fTracklets(mr.fTracklets), fSClusters(mr.fSClusters), fAssociationFlag(mr.fAssociationFlag), @@ -168,9 +202,12 @@ fNClustersLay1(mr.fNClustersLay1), fNClustersLay2(mr.fNClustersLay2), fNTracklets(mr.fNTracklets), fNSingleCluster(mr.fNSingleCluster), +fOnlyOneTrackletPerC2(mr.fOnlyOneTrackletPerC2), fPhiWindow(mr.fPhiWindow), fZetaWindow(mr.fZetaWindow), -fOnlyOneTrackletPerC2(mr.fOnlyOneTrackletPerC2), +fRemoveClustersFromOverlaps(mr.fRemoveClustersFromOverlaps), +fPhiOverlapCut(mr.fPhiOverlapCut), +fZetaOverlapCut(mr.fZetaOverlapCut), fHistOn(mr.fHistOn), fhClustersDPhiAcc(mr.fhClustersDPhiAcc), fhClustersDThetaAcc(mr.fhClustersDThetaAcc), @@ -227,6 +264,10 @@ AliITSMultReconstructor::~AliITSMultReconstructor(){ } delete [] fClustersLay1; delete [] fClustersLay2; + delete [] fDetectorIndexClustersLay1; + delete [] fDetectorIndexClustersLay2; + delete [] fOverlapFlagClustersLay1; + delete [] fOverlapFlagClustersLay2; delete [] fTracklets; delete [] fSClusters; @@ -308,10 +349,12 @@ AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Float_t* Float_t dPhimin = 0.; // Used for histograms only! Float_t dThetamin = 0.; // Used for histograms only! Float_t dZetamin = 0.; // Used for histograms only! - + + if (fOverlapFlagClustersLay1[iC1]) continue; + // Loop on layer 2 for (Int_t iC2=0; iC2GetLabel(i); fNClustersLay1++; @@ -505,6 +554,9 @@ AliITSMultReconstructor::LoadClusterArrays(TTree* itsClusterTree) { fClustersLay2[fNClustersLay2][0] = x; fClustersLay2[fNClustersLay2][1] = y; fClustersLay2[fNClustersLay2][2] = z; + + fDetectorIndexClustersLay2[fNClustersLay2]=iIts; + for (Int_t i=0; i<3; i++) fClustersLay2[fNClustersLay2][3+i] = cluster->GetLabel(i); fNClustersLay2++; @@ -618,3 +670,82 @@ AliITSMultReconstructor::SaveHists() { fhetaClustersLay1->Write(); fhphiClustersLay1->Write(); } + +//____________________________________________________________________ +void +AliITSMultReconstructor::FlagClustersInOverlapRegions (Int_t iC1, Int_t iC2WithBestDist) { + + Float_t distClSameMod=0.; + Float_t distClSameModMin=0.; + Int_t iClOverlap =0; + Float_t meanRadiusLay1 = 3.99335; // average radius inner layer + Float_t meanRadiusLay2 = 7.37935; // average radius outer layer; + + Float_t zproj1=0.; + Float_t zproj2=0.; + Float_t deZproj=0.; + + // Loop on inner layer clusters + for (Int_t iiC1=0; iiC1TMath::Pi()) dePhi=2.*TMath::Pi()-dePhi; + + zproj1=meanRadiusLay1/TMath::Tan(fClustersLay1[iC1][0]); + zproj2=meanRadiusLay1/TMath::Tan(fClustersLay1[iiC1][0]); + + deZproj=TMath::Abs(zproj1-zproj2); + + distClSameMod = TMath::Sqrt(TMath::Power(deZproj/fZetaOverlapCut,2)+TMath::Power(dePhi/fPhiOverlapCut,2)); + if (distClSameMod<=1.) fOverlapFlagClustersLay1[iiC1]=kTRUE; + +// if (distClSameMod<=1.) { +// if (distClSameModMin==0. || distClSameModTMath::Pi()) dePhi=2.*TMath::Pi()-dePhi; + + zproj1=meanRadiusLay2/TMath::Tan(fClustersLay2[iC2WithBestDist][0]); + zproj2=meanRadiusLay2/TMath::Tan(fClustersLay2[iiC2][0]); + + deZproj=TMath::Abs(zproj1-zproj2); + distClSameMod = TMath::Sqrt(TMath::Power(deZproj/fZetaOverlapCut,2)+TMath::Power(dePhi/fPhiOverlapCut,2)); + if (distClSameMod<=1.) fOverlapFlagClustersLay2[iiC2]=kTRUE; + +// if (distClSameMod<=1.) { +// if (distClSameModMin==0. || distClSameMod