//
// The tracker itself can be debugged - the information about tracks can be stored in several // phases of the reconstruction
// To enable storage of the TPC tracks in the ESD friend track
-// use AliTPCReconstructor::SetStreamLevel(n); where nis bigger 0
+// use AliTPCReconstructor::SetStreamLevel(n);
//
// The debug level - different procedure produce tree for numerical debugging
// To enable them set AliTPCReconstructor::SetStreamLevel(n); where nis bigger 1
// There are several places in the code which can be numerically debuged
// This code is keeped in order to enable code development and to check the calibration implementtion
//
-// 1. ErrParam stream (Log level 9) - dump information about
+// 1. ErrParam stream - dump information about
// 1.a) cluster
// 2.a) cluster error estimate
// 3.a) cluster shape estimate
//
//
+// Debug streamer levels:
+//
//-------------------------------------------------------
#include "AliTPCtrackerMI.h"
#include "TStopwatch.h"
#include "AliTPCReconstructor.h"
-#include "AliPID.h"
-#include "TTreeStream.h"
#include "AliAlignObj.h"
#include "AliTrackPointArray.h"
#include "TRandom.h"
Double_t rdistance2 = rdistancey2+rdistancez2;
//Int_t accept =0;
- if (AliTPCReconstructor::StreamLevel()>1 && seed->GetNumberOfClusters()>20) {
+ if (AliTPCReconstructor::StreamLevel()>2 && seed->GetNumberOfClusters()>20) {
Float_t rmsy2 = seed->GetCurrentSigmaY2();
Float_t rmsz2 = seed->GetCurrentSigmaZ2();
Float_t rmsy2p30 = seed->GetCMeanSigmaY2p30();
gcl[0]=gclf[0]; gcl[1]=gclf[1]; gcl[2]=gclf[2];
- if (AliTPCReconstructor::StreamLevel()>0) {
+ if (AliTPCReconstructor::StreamLevel()>2) {
(*fDebugStreamer)<<"ErrParam"<<
"Cl.="<<cluster<<
"T.="<<¶m<<
}
// << account for suppressed tracks in the kink indices (RS)
}
- printf("Number of filled ESDs-\t%d\n",fEvent->GetNumberOfTracks());
+ AliInfo(Form("Number of filled ESDs-\t%d\n",fEvent->GetNumberOfTracks()));
}
y2 -=y1;
//
Double_t det = x3*y2-x2*y3;
- if (det==0) {
+ if (TMath::Abs(det)<1e-16){
return 100;
}
//
y2 -=y1;
//
Double_t det = x3*y2-x2*y3;
- if (det==0) {
+ if (TMath::Abs(det)<1e-16) {
return 100;
}
//
return angle2;
}
-Bool_t AliTPCtrackerMI::GetProlongation(Double_t x1, Double_t x2, Double_t x[5], Double_t &y, Double_t &z)
+Bool_t AliTPCtrackerMI::GetProlongation(Double_t x1, Double_t x2, Double_t x[5], Double_t &y, Double_t &z) const
{//-----------------------------------------------------------------
// This function find proloncation of a track to a reference plane x=x2.
//-----------------------------------------------------------------
return kTRUE;
}
-Int_t AliTPCtrackerMI::LoadClusters (TTree *tree)
+Int_t AliTPCtrackerMI::LoadClusters (TTree *const tree)
{
//
//
//
// in debug mode check the transformation
//
- if (AliTPCReconstructor::StreamLevel()>1) {
+ if (AliTPCReconstructor::StreamLevel()>2) {
Float_t gx[3];
cluster->GetGlobalXYZ(gx);
Int_t event = (fEvent==NULL)? 0: fEvent->GetEventNumberInFile();
//
if (Float_t(shared+1)/Float_t(found+1)>factor){
if (pt->GetKinkIndexes()[0]!=0) continue; //don't remove tracks - part of the kinks
- if( AliTPCReconstructor::StreamLevel()>15){
+ if( AliTPCReconstructor::StreamLevel()>3){
TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"RemoveUsed"<<
"iter="<<fIteration<<
}
if (pt->GetNumberOfClusters()<50&&(found-0.5*shared)<minimal){ //remove short tracks
if (pt->GetKinkIndexes()[0]!=0) continue; //don't remove tracks - part of the kinks
- if( AliTPCReconstructor::StreamLevel()>15){
+ if( AliTPCReconstructor::StreamLevel()>3){
TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"RemoveShort"<<
"iter="<<fIteration<<
SignShared(&arraySeed);
// FindCurling(fSeeds, event,2); // find multi found tracks
FindSplitted(fSeeds, event,2); // find multi found tracks
- if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,2); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>5) FindMultiMC(fSeeds, fEvent,2); // find multi found tracks
Int_t ntracks=0;
Int_t nseed = fSeeds->GetEntriesFast();
AliExternalTrackParam paramIn;
AliExternalTrackParam paramOut;
Int_t ncl = seed->RefitTrack(seed,¶mIn,¶mOut);
- if (AliTPCReconstructor::StreamLevel()>0) {
+ if (AliTPCReconstructor::StreamLevel()>2) {
(*fDebugStreamer)<<"RecoverIn"<<
"seed.="<<seed<<
"esd.="<<esd<<
RemoveUsed2(fSeeds,0.4,0.4,20);
//FindCurling(fSeeds, fEvent,1);
FindSplitted(fSeeds, event,1); // find multi found tracks
- if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,1); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>5) FindMultiMC(fSeeds, fEvent,1); // find multi found tracks
//
Int_t nseed = fSeeds->GetEntriesFast();
AliExternalTrackParam paramIn;
AliExternalTrackParam paramOut;
Int_t ncl = seed->RefitTrack(seed,¶mIn,¶mOut);
- if (AliTPCReconstructor::StreamLevel()>0) {
+ if (AliTPCReconstructor::StreamLevel()>2) {
(*fDebugStreamer)<<"RecoverBack"<<
"seed.="<<seed<<
"esd.="<<esd<<
fSeeds =0;
}
-void AliTPCtrackerMI::ReadSeeds(AliESDEvent *event, Int_t direction)
+void AliTPCtrackerMI::ReadSeeds(AliESDEvent *const event, Int_t direction)
{
//
//read seeds from the event
}
-AliTPCseed *AliTPCtrackerMI::MakeSeed(AliTPCseed *track, Float_t r0, Float_t r1, Float_t r2)
+AliTPCseed *AliTPCtrackerMI::MakeSeed(AliTPCseed *const track, Float_t r0, Float_t r1, Float_t r2)
{
//
//
}
}
//
- if (AliTPCReconstructor::StreamLevel()>0) {
+ if (AliTPCReconstructor::StreamLevel()>5) {
TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"Multi"<<
"iter="<<iter<<
Double_t ratio0 = Float_t(sumShared)/Float_t(TMath::Min(nall0+1,nall1+1));
Double_t ratio1 = Float_t(sumShared)/Float_t(TMath::Max(nall0+1,nall1+1));
- if( AliTPCReconstructor::StreamLevel()>2){
+ if( AliTPCReconstructor::StreamLevel()>1){
TTreeSRedirector &cstream = *fDebugStreamer;
Int_t n0=s1->GetNumberOfClusters();
Int_t n1=s2->GetNumberOfClusters();
track0->SetCircular(track0->GetCircular()+2);
}
}
- if (AliTPCReconstructor::StreamLevel()>1){
+ if (AliTPCReconstructor::StreamLevel()>2){
//
//debug stream to tune "fine" cuts
Int_t lab0=track0->GetLabel();
kink->SetShapeFactor(shapesum/sum);
}
// esd->AddKink(kink);
+ //
+ // kink->SetMother(paramm);
+ //kink->SetDaughter(paramd);
+
+ Double_t chi2P2 = paramm.GetParameter()[2]-paramd.GetParameter()[2];
+ chi2P2*=chi2P2;
+ chi2P2/=paramm.GetCovariance()[5]+paramd.GetCovariance()[5];
+ Double_t chi2P3 = paramm.GetParameter()[3]-paramd.GetParameter()[3];
+ chi2P3*=chi2P3;
+ chi2P3/=paramm.GetCovariance()[9]+paramd.GetCovariance()[9];
+ //
+ if (AliTPCReconstructor::StreamLevel()>1) {
+ (*fDebugStreamer)<<"kinkLpt"<<
+ "chi2P2="<<chi2P2<<
+ "chi2P3="<<chi2P3<<
+ "p0.="<<¶mm<<
+ "p1.="<<¶md<<
+ "k.="<<kink<<
+ "\n";
+ }
+ if ( chi2P2+chi2P3<AliTPCReconstructor::GetRecoParam()->GetKinkAngleCutChi2(0)){
+ continue;
+ }
+ //
kinks->AddLast(kink);
kink = new AliKink;
ncandidates++;
kinks->Delete();
delete kinks;
- printf("Ncandidates=\t%d\t%d\t%d\t%d\n",esd->GetNumberOfKinks(),ncandidates,ntracks,nall);
+ AliInfo(Form("Ncandidates=\t%d\t%d\t%d\t%d\n",esd->GetNumberOfKinks(),ncandidates,ntracks,nall));
timer.Print();
}
-void AliTPCtrackerMI::FindV0s(const TObjArray * array, AliESDEvent *esd)
+void AliTPCtrackerMI::FindV0s(const TObjArray * array, AliESDEvent *const esd)
{
//
// find V0s
timer.Print();
}
-Int_t AliTPCtrackerMI::RefitKink(AliTPCseed &mother, AliTPCseed &daughter, AliESDkink &knk)
+Int_t AliTPCtrackerMI::RefitKink(AliTPCseed &mother, AliTPCseed &daughter, const AliESDkink &knk)
{
//
// refit kink towards to the vertex
}
-Int_t AliTPCtrackerMI::CheckKinkPoint(AliTPCseed*seed,AliTPCseed &mother, AliTPCseed &daughter, AliESDkink &knk)
+Int_t AliTPCtrackerMI::CheckKinkPoint(AliTPCseed*seed,AliTPCseed &mother, AliTPCseed &daughter, const AliESDkink &knk)
{
//
// check kink point for given track
delete seed1;
return 0;
}
+
// Float_t anglesigma = TMath::Sqrt(param0[index].fC22+param0[index].fC33+param1[index].fC22+param1[index].fC33);
kink.SetMother(param0[index]);
kink.SetDaughter(param1[index]);
kink.Update();
+
+ Double_t chi2P2 = param0[index].GetParameter()[2]-param1[index].GetParameter()[2];
+ chi2P2*=chi2P2;
+ chi2P2/=param0[index].GetCovariance()[5]+param1[index].GetCovariance()[5];
+ Double_t chi2P3 = param0[index].GetParameter()[3]-param1[index].GetParameter()[3];
+ chi2P3*=chi2P3;
+ chi2P3/=param0[index].GetCovariance()[9]+param1[index].GetCovariance()[9];
+ //
+ if (AliTPCReconstructor::StreamLevel()>1) {
+ (*fDebugStreamer)<<"kinkHpt"<<
+ "chi2P2="<<chi2P2<<
+ "chi2P3="<<chi2P3<<
+ "p0.="<<¶m0[index]<<
+ "p1.="<<¶m1[index]<<
+ "k.="<<&kink<<
+ "\n";
+ }
+ if ( chi2P2+chi2P3<AliTPCReconstructor::GetRecoParam()->GetKinkAngleCutChi2(0)){
+ delete seed0;
+ delete seed1;
+ return 0;
+ }
+
+
row0 = GetRowNumber(kink.GetR());
kink.SetTPCRow0(row0);
kink.SetLabel(CookLabel(seed0,0.5,0,row0),0);
daughter = param1[index];
daughter.SetLabel(kink.GetLabel(1));
param0[index].Reset(kTRUE);
- FollowProlongation(param0[index],0);
+ FollowProlongation(param0[index],0);
mother = param0[index];
mother.SetLabel(kink.GetLabel(0));
+ if ( chi2P2+chi2P3<AliTPCReconstructor::GetRecoParam()->GetKinkAngleCutChi2(1)){
+ mother=*seed;
+ }
delete seed0;
delete seed1;
//
return 0;
}
-Int_t AliTPCtrackerMI::Clusters2Tracks (AliESDEvent *esd)
+Int_t AliTPCtrackerMI::Clusters2Tracks (AliESDEvent *const esd)
{
//
if (fSeeds) DeleteSeeds();
RemoveUsed2(fSeeds,0.85,0.85,0);
if (AliTPCReconstructor::GetRecoParam()->GetDoKinks()) FindKinks(fSeeds,fEvent);
//FindCurling(fSeeds, fEvent,0);
- if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,-1); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>5) FindMultiMC(fSeeds, fEvent,-1); // find multi found tracks
RemoveUsed2(fSeeds,0.5,0.4,20);
FindSplitted(fSeeds, fEvent,0); // find multi found tracks
- if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,0); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>5) FindMultiMC(fSeeds, fEvent,0); // find multi found tracks
// //
// // refit short tracks
-void AliTPCtrackerMI::ParallelTracking(TObjArray * arr, Int_t rfirst, Int_t rlast)
+void AliTPCtrackerMI::ParallelTracking(TObjArray *const arr, Int_t rfirst, Int_t rlast)
{
//
// try to track in parralel
}
}
-void AliTPCtrackerMI::PrepareForBackProlongation(TObjArray * arr,Float_t fac) const
+void AliTPCtrackerMI::PrepareForBackProlongation(TObjArray *const arr,Float_t fac) const
{
//
//
}
-void AliTPCtrackerMI::PrepareForProlongation(TObjArray * arr, Float_t fac) const
+void AliTPCtrackerMI::PrepareForProlongation(TObjArray *const arr, Float_t fac) const
{
//
//
}
-Int_t AliTPCtrackerMI::PropagateBack(TObjArray * arr)
+Int_t AliTPCtrackerMI::PropagateBack(TObjArray *const arr)
{
//
// make back propagation
}
-Int_t AliTPCtrackerMI::PropagateForward2(TObjArray * arr)
+Int_t AliTPCtrackerMI::PropagateForward2(TObjArray *const arr)
{
//
// make forward propagation
-Int_t AliTPCtrackerMI::PropagateBack(AliTPCseed * pt, Int_t row0, Int_t row1)
+Int_t AliTPCtrackerMI::PropagateBack(AliTPCseed *const pt, Int_t row0, Int_t row1)
{
//
// make back propagation, in between row0 and row1
//__________________________________________________________________________
-Int_t AliTPCtrackerMI::CookLabel(AliTPCseed *t, Float_t wrong,Int_t first, Int_t last) const {
+Int_t AliTPCtrackerMI::CookLabel(AliTPCseed *const t, Float_t wrong,Int_t first, Int_t last) const {
//--------------------------------------------------------------------
//This function "cooks" a track label. If label<0, this track is fake.
//--------------------------------------------------------------------