From: shahoian Date: Mon, 22 Apr 2013 17:27:05 +0000 (+0000) Subject: Made chi2-cut, road definitions AliITSUTrackCond and layer dependent X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=ee54014a709c0b4ba0a5c9388e06596448a97c1d;p=u%2Fmrichter%2FAliRoot.git Made chi2-cut, road definitions AliITSUTrackCond and layer dependent By default the roadwidth will be calculated from the track-cluster chi2 --- diff --git a/ITS/UPGRADE/AliITSURecoParam.cxx b/ITS/UPGRADE/AliITSURecoParam.cxx index 99c76f55265..8f8dd57eb35 100644 --- a/ITS/UPGRADE/AliITSURecoParam.cxx +++ b/ITS/UPGRADE/AliITSURecoParam.cxx @@ -30,13 +30,9 @@ const Double_t AliITSURecoParam::fgkMaxDforV0dghtrForProlongation = 30; const Double_t AliITSURecoParam::fgkMaxDForProlongation = 40; const Double_t AliITSURecoParam::fgkMaxDZForProlongation = 60; const Double_t AliITSURecoParam::fgkMinPtForProlongation = 0.0; -const Double_t AliITSURecoParam::fgkNSigmaRoadY = 5.; -const Double_t AliITSURecoParam::fgkNSigmaRoadZ = 5.; -const Double_t AliITSURecoParam::fgkSigmaRoadY = 100e-4;//1000e-4; -const Double_t AliITSURecoParam::fgkSigmaRoadZ = 100e-4;//1000e-4; -const Double_t AliITSURecoParam::fgkMaxTr2ClChi2 = 15.; +const Double_t AliITSURecoParam::fgkSigmaRoadY = 20.E-4;//1000e-4; +const Double_t AliITSURecoParam::fgkSigmaRoadZ = 20.E-4;//1000e-4; const Double_t AliITSURecoParam::fgkTanLorentzAngle = 0; -const Double_t AliITSURecoParam::fgkMissPenalty = 2.0; const Bool_t AliITSURecoParam::fgkAllowDiagonalClusterization = kFALSE; // // hardwired params for TPC-ITS border layer @@ -54,8 +50,6 @@ AliITSURecoParam::AliITSURecoParam() ,fMaxDForProlongation(fgkMaxDForProlongation) ,fMaxDZForProlongation(fgkMaxDZForProlongation) ,fMinPtForProlongation(fgkMinPtForProlongation) - ,fNSigmaRoadY(fgkNSigmaRoadY) - ,fNSigmaRoadZ(fgkNSigmaRoadZ) // ,fTPCITSWallRMin(fgkTPCITSWallRMin) ,fTPCITSWallRMax(fgkTPCITSWallRMax) @@ -66,8 +60,6 @@ AliITSURecoParam::AliITSURecoParam() ,fTanLorentzAngle(0) ,fSigmaY2(0) ,fSigmaZ2(0) - ,fMaxTr2ClChi2(0) - ,fMissPenalty(0) ,fTrackingConditions(0) { // def c-tor @@ -82,8 +74,6 @@ AliITSURecoParam::AliITSURecoParam(Int_t nLr) ,fMaxDForProlongation(fgkMaxDForProlongation) ,fMaxDZForProlongation(fgkMaxDZForProlongation) ,fMinPtForProlongation(fgkMinPtForProlongation) - ,fNSigmaRoadY(fgkNSigmaRoadY) - ,fNSigmaRoadZ(fgkNSigmaRoadZ) // ,fTPCITSWallRMin(fgkTPCITSWallRMin) ,fTPCITSWallRMax(fgkTPCITSWallRMax) @@ -94,8 +84,6 @@ AliITSURecoParam::AliITSURecoParam(Int_t nLr) ,fTanLorentzAngle(0) ,fSigmaY2(0) ,fSigmaZ2(0) - ,fMaxTr2ClChi2(0) - ,fMissPenalty(0) ,fTrackingConditions(0) { // def c-tor @@ -111,8 +99,6 @@ AliITSURecoParam::~AliITSURecoParam() delete[] fTanLorentzAngle; delete[] fSigmaY2; delete[] fSigmaZ2; - delete[] fMaxTr2ClChi2; - delete[] fMissPenalty; delete[] fAllowDiagonalClusterization; fTrackingConditions.Delete(); } @@ -155,8 +141,6 @@ void AliITSURecoParam::SetNLayers(Int_t n) fTanLorentzAngle = new Double_t[n]; fSigmaY2 = new Double_t[n]; fSigmaZ2 = new Double_t[n]; - fMaxTr2ClChi2 = new Double_t[n]; - fMissPenalty = new Double_t[n]; fAllowDiagonalClusterization = new Bool_t[n]; // for (int i=n;i--;) { @@ -164,8 +148,6 @@ void AliITSURecoParam::SetNLayers(Int_t n) fTanLorentzAngle[i] = fgkTanLorentzAngle; fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY; fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ; - fMaxTr2ClChi2[i] = fgkMaxTr2ClChi2; - fMissPenalty[i] = fgkMissPenalty; } // } @@ -194,22 +176,6 @@ void AliITSURecoParam::SetSigmaZ2(Int_t lr, Double_t v) fSigmaZ2[lr] = v; } -//_____________________________________________________________________________ -void AliITSURecoParam::SetMaxTr2ClChi2(Int_t lr, Double_t v) -{ - // set Lorentz angle value - if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers)); - fMaxTr2ClChi2[lr] = v; -} - -//_____________________________________________________________________________ -void AliITSURecoParam::SetMissPenalty(Int_t lr, Double_t v) -{ - // set Lorentz angle value - if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers)); - fMissPenalty[lr] = v; -} - //_____________________________________________________________________________ void AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v) { @@ -228,8 +194,6 @@ void AliITSURecoParam::Print(Option_t *) const printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation); printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation); printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation); - printf("%-30s\t%f\n","fNSigmaRoadY",fNSigmaRoadY); - printf("%-30s\t%f\n","fNSigmaRoadZ",fNSigmaRoadZ); // printf("TPC-ITS wall: %.3f using namespace AliITSUAux; +using namespace TMath; + +Int_t AliITSUTrackCond::fgkMaxBranches = 50; +Int_t AliITSUTrackCond::fgkMaxCandidates = 500; +Float_t AliITSUTrackCond::fgkMaxTr2ClChi2 = 50.; +Float_t AliITSUTrackCond::fgkMissPenalty = 2.; //______________________________________________________________ AliITSUTrackCond::AliITSUTrackCond(int nLayers) - :fNLayers(0) + :fInitDone(kFALSE) + ,fNLayers(0) ,fMaxBranches(0) ,fMaxCandidates(0) + ,fMaxTr2ClChi2(0) + ,fMissPenalty(0) + ,fNSigmaRoadY(0) + ,fNSigmaRoadZ(0) ,fNConditions(0) ,fConditions(0) ,fAuxData(0) @@ -19,22 +31,28 @@ AliITSUTrackCond::AliITSUTrackCond(int nLayers) //______________________________________________________________ AliITSUTrackCond::AliITSUTrackCond(const AliITSUTrackCond& src) - :TObject(src), - fNLayers(src.fNLayers) + :TObject(src) + ,fInitDone(src.fInitDone) + ,fNLayers(0) ,fMaxBranches(0) ,fMaxCandidates(0) + ,fMaxTr2ClChi2(0) + ,fMissPenalty(0) + ,fNSigmaRoadY(0) + ,fNSigmaRoadZ(0) ,fNConditions(src.fNConditions) ,fConditions(src.fConditions) ,fAuxData(src.fAuxData) { // copy c-tor - if (fNLayers>0) { - fMaxBranches = new Short_t[fNLayers]; - fMaxCandidates = new Short_t[fNLayers]; - for (int i=fNLayers;i--;) { - SetMaxBranches(i,src.GetMaxBranches(i)); - SetMaxCandidates(i,src.GetMaxCandidates(i)); - } + SetNLayers(src.fNLayers); + for (int i=fNLayers;i--;) { + SetMaxBranches(i,src.GetMaxBranches(i)); + SetMaxCandidates(i,src.GetMaxCandidates(i)); + SetMaxTr2ClChi2(i,src.GetMaxTr2ClChi2(i)); + SetMissPenalty(i,src.GetMissPenalty(i)); + SetNSigmaRoadY(i,src.GetNSigmaRoadY(i)); + SetNSigmaRoadZ(i,src.GetNSigmaRoadZ(i)); } } @@ -43,18 +61,19 @@ AliITSUTrackCond& AliITSUTrackCond::operator=(const AliITSUTrackCond& src) { // copy op. if (this!=&src) { - fNLayers = src.fNLayers; + fInitDone = src.fInitDone; fNConditions = src.fNConditions; fConditions = src.fConditions; - if (fNLayers) { - delete fMaxBranches; - delete fMaxCandidates; - fMaxBranches = new Short_t[fNLayers]; - fMaxCandidates = new Short_t[fNLayers]; - for (int i=fNLayers;i--;) { - SetMaxBranches(i,src.GetMaxBranches(i)); - SetMaxCandidates(i,src.GetMaxCandidates(i)); - } + // + SetNLayers(src.fNLayers); + // + for (int i=fNLayers;i--;) { + SetMaxBranches(i,src.GetMaxBranches(i)); + SetMaxCandidates(i,src.GetMaxCandidates(i)); + SetMaxTr2ClChi2(i,src.GetMaxTr2ClChi2(i)); + SetMissPenalty(i,src.GetMissPenalty(i)); + SetNSigmaRoadY(i,src.GetNSigmaRoadY(i)); + SetNSigmaRoadZ(i,src.GetNSigmaRoadZ(i)); } fAuxData = src.fAuxData; } @@ -65,15 +84,42 @@ AliITSUTrackCond& AliITSUTrackCond::operator=(const AliITSUTrackCond& src) void AliITSUTrackCond::SetNLayers(int nLayers) { // set number of layers + fInitDone = kFALSE; + if (fNLayers) { + delete fMaxBranches; + delete fMaxCandidates; + delete fMaxTr2ClChi2; + delete fMissPenalty; + delete fNSigmaRoadY; + delete fNSigmaRoadZ; + } fNLayers = nLayers; + // if (fNLayers>0) { fMaxBranches = new Short_t[fNLayers]; fMaxCandidates = new Short_t[fNLayers]; + fMaxTr2ClChi2 = new Float_t[fNLayers]; + fMissPenalty = new Float_t[fNLayers]; + fNSigmaRoadY = new Float_t[fNLayers]; + fNSigmaRoadZ = new Float_t[fNLayers]; for (int i=fNLayers;i--;) { - SetMaxBranches(i,kMaxBranches); - SetMaxCandidates(i,kMaxCandidates); + SetMaxBranches(i,fgkMaxBranches); + SetMaxCandidates(i,fgkMaxCandidates); + SetMaxTr2ClChi2(i,fgkMaxTr2ClChi2); + SetMissPenalty(i,fgkMissPenalty); + SetNSigmaRoadY(i,-1); // force recalculation + SetNSigmaRoadZ(i,-1); // force recalculation } } + else { + fMaxBranches = 0; + fMaxCandidates = 0; + fMaxTr2ClChi2 = 0; + fMissPenalty = 0; + fNSigmaRoadY = 0; + fNSigmaRoadZ = 0; + } + // } //______________________________________________________________ @@ -139,6 +185,27 @@ void AliITSUTrackCond::Print(Option_t*) const printf("\n"); cntCond += kNAuxSz; } - printf("Max allowed branches/candidates per seed: "); - for (int i=0;iSetNLayers(fITS->GetNLayersActive()); cond->AddNewCondition(nLr); cond->AddGroupPattern( 0xffff ); // require all layers hit + cond->Init(); // fDefTrackConds.AddLast(cond); // @@ -182,6 +183,7 @@ Int_t AliITSUTrackerGlo::Clusters2Tracks(AliESDEvent *esdEv) // for (int icnd=0;icndUncheckedAt(icnd); + if (!fCurrTrackCond->IsInitDone()) fCurrTrackCond->Init(); // select ESD tracks to propagate for (int itr=0;itrGetTrack(itr); @@ -486,7 +488,7 @@ void AliITSUTrackerGlo::FindTrack(AliESDtrack* esdTr, Int_t esdID) // cluster search is done. Do we need to have a version of this seed skipping current layer if (!NeedToKill(&seedUC,kMissingCluster)) { AliITSUSeed* seedSkp = NewSeedFromPool(&seedUC); - double penalty = -AliITSUReconstructor::GetRecoParam()->GetMissPenalty(ila); + double penalty = -fCurrTrackCond->GetMissPenalty(ila); // to do: make penalty to account for probability to miss the cluster for good reason seedSkp->SetChi2Cl(penalty); AddProlongationHypothesis(seedSkp,ila); @@ -775,8 +777,8 @@ Bool_t AliITSUTrackerGlo::GetRoadWidth(AliITSUSeed* seed, int ilrA) fTrImpData[kTrPhiOut] = ATan2(fTrImpData[kTrYOut],fTrImpData[kTrXOut]); double sgy = sc.GetSigmaY2() + dr*dr*sc.GetSigmaSnp2() + AliITSUReconstructor::GetRecoParam()->GetSigmaY2(ilrA); double sgz = sc.GetSigmaZ2() + dr*dr*sc.GetSigmaTgl2() + AliITSUReconstructor::GetRecoParam()->GetSigmaZ2(ilrA); - sgy = Sqrt(sgy)*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY(); - sgz = Sqrt(sgz)*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ(); + sgy = Sqrt(sgy)*fCurrTrackCond->GetNSigmaRoadY(ilrA); + sgz = Sqrt(sgz)*fCurrTrackCond->GetNSigmaRoadZ(ilrA); double dphi0 = 0.5*Abs(fTrImpData[kTrPhiOut]-fTrImpData[kTrPhiIn]); double phi0 = 0.5*(fTrImpData[kTrPhiOut]+fTrImpData[kTrPhiIn]); if ( dphi0>(0.5*Pi()) ) { @@ -867,7 +869,7 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID) // double dy2 = dy*dy; double tol2 = (track->GetSigmaY2() + AliITSUReconstructor::GetRecoParam()->GetSigmaY2(lr))* - AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY()*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY(); // RS TOOPTIMIZE + fCurrTrackCond->GetNSigmaRoadY(lr)*fCurrTrackCond->GetNSigmaRoadY(lr); // RS TOOPTIMIZE if (dy2>tol2) { // the clusters are sorted in Z(col) then in Y(row). if (goodCl&&goodSeed && AliDebugLevelClass()>2) { AliDebug(2,Form("Lost good cl: dy2=%e > tol2=%e |ESDtrack#%d (MClb:%d)",dy2,tol2,fCurrESDtrack->GetID(),fCurrESDtrMClb)); @@ -882,7 +884,7 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID) } double dz2 = dz*dz; tol2 = (track->GetSigmaZ2() + AliITSUReconstructor::GetRecoParam()->GetSigmaZ2(lr))* - AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ()*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ(); // RS TOOPTIMIZE + fCurrTrackCond->GetNSigmaRoadZ(lr)*fCurrTrackCond->GetNSigmaRoadZ(lr); // RS TOOPTIMIZE if (dz2>tol2) { if (goodCl&&goodSeed && AliDebugLevelClass()>2) { AliDebug(2,Form("Lost good cl on L:%d : dz2=%e > tol2=%e |ESDtrack#%d (MClb:%d)",lr,dz2,tol2,fCurrESDtrack->GetID(),fCurrESDtrMClb)); @@ -904,10 +906,10 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID) } #endif // - if (chi2>AliITSUReconstructor::GetRecoParam()->GetMaxTr2ClChi2(lr)) { + if (chi2>fCurrTrackCond->GetMaxTr2ClChi2(lr)) { if (goodCl&&goodSeed && AliDebugLevelClass()>2) { AliDebug(2,Form("Lost good cl on L:%d : Chi2=%e > Chi2Max=%e |dy: %+.3e dz: %+.3e |ESDtrack#%d (MClb:%d)\n", - lr,chi2,AliITSUReconstructor::GetRecoParam()->GetMaxTr2ClChi2(lr),dy,dz,fCurrESDtrack->GetID(),fCurrESDtrMClb)); + lr,chi2,fCurrTrackCond->GetMaxTr2ClChi2(lr),dy,dz,fCurrESDtrack->GetID(),fCurrESDtrMClb)); track->Print("etp"); cl->Print(""); PrintSeedClusters(track); diff --git a/ITS/UPGRADE/testITSU/MakeITSRecoParam.C b/ITS/UPGRADE/testITSU/MakeITSRecoParam.C index e4fbc43a94a..62174577978 100644 --- a/ITS/UPGRADE/testITSU/MakeITSRecoParam.C +++ b/ITS/UPGRADE/testITSU/MakeITSRecoParam.C @@ -36,6 +36,7 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult // int nBranch[7] = {3,3,3,3,3,3,3}; // max branching for the seed on layer int nCands[7] = {250,200,150,100,60,40,20}; // max branching for the TPC seed + float tr2clChi2[7] = {50,50,50,50,50,50,50}; // cut on cluster to track chi2 // { AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam(); @@ -52,10 +53,13 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult // Add tracking conditions >>> trCond = new AliITSUTrackCond(); trCond->SetNLayers(nLr); - // each seed propagated to given layer can produce max nBranch branches - for (int i=0;iSetMaxBranches(i,nBranch[i]); - // each tpc track may have at most nCands prolongations - for (int i=0;iSetMaxCandidates(i,nCands[i]); + // + for (int i=0;iSetMaxBranches(i,nBranch[i]); // each seed propagated to given layer can produce max nBranch branches + trCond->SetMaxCandidates(i,nCands[i]); // each tpc track may have at most nCands prolongations + trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]); // cut on cluster to track chi2 + // + } // trCond->AddNewCondition(5); // min hits trCond->AddGroupPattern( kBit0|kBit1 ); @@ -71,7 +75,9 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult trCond->AddGroupPattern( kBit1|kBit2 ); trCond->AddGroupPattern( kBit3|kBit4 ); trCond->AddGroupPattern( kBit5|kBit6 ); - // + // + trCond->Init(); + // itsRecoParam->AddTrackingCondition(trCond); // Add tracking conditions <<< } @@ -85,13 +91,19 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult itsRecoParam->SetTitle("HighMult"); recoParamArray->AddLast(itsRecoParam); //****************************************************************** - for (int i=0;iSetAllowDiagonalClusterization(i,kTRUE); - // + for (int i=0;iSetAllowDiagonalClusterization(i,kTRUE); + // // Add tracking conditions >>> trCond = new AliITSUTrackCond(); trCond->SetNLayers(nLr); - for (int i=0;iSetMaxBranches(i,nBranch[i]); - for (int i=0;iSetMaxCandidates(i,nCands[i]); + // + for (int i=0;iSetMaxBranches(i,nBranch[i]); // each seed propagated to given layer can produce max nBranch branches + trCond->SetMaxCandidates(i,nCands[i]); // each tpc track may have at most nCands prolongations + trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]); // cut on cluster to track chi2 + // + } + // trCond->AddNewCondition(5); // min hits trCond->AddGroupPattern( kBit0|kBit1 ); trCond->AddGroupPattern( kBit3|kBit4 ); @@ -106,7 +118,9 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult trCond->AddGroupPattern( kBit1|kBit2 ); trCond->AddGroupPattern( kBit3|kBit4 ); trCond->AddGroupPattern( kBit5|kBit6 ); - // + // + trCond->Init(); + // itsRecoParam->AddTrackingCondition(trCond); // Add tracking conditions <<< // diff --git a/ITS/UPGRADE/testITSU/itsupcdb.tar.gz b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz index fd27dd68906..027d80cc1d7 100644 Binary files a/ITS/UPGRADE/testITSU/itsupcdb.tar.gz and b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz differ