* Contributors are mentioned in the code where appropriate. *
* *
* Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
+ * documentation strictly for non-commerciatobjl purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
#include "AliESDtrackCuts.h"
#include <AliESDtrack.h>
+#include <AliESDVertex.h>
#include <AliESDEvent.h>
#include <AliLog.h>
"p_{z}",
"y",
"eta",
- "trk-to-vtx dca absolute"
+ "trk-to-vtx dca absolute",
+ "trk-to-vtx dca xy absolute"
};
//____________________________________________________________________
fCutNsigmaToVertex(0),
fCutSigmaToVertexRequired(0),
fCutDCAToVertex(0),
+ fCutDCAToVertexXY(0),
fPMin(0),
fPMax(0),
fPtMin(0),
SetMinNsigmaToVertex();
SetRequireSigmaToVertex();
SetDCAToVertex();
+ SetDCAToVertexXY();
SetPRange();
SetPtRange();
SetPxRange();
fCutNsigmaToVertex(0),
fCutSigmaToVertexRequired(0),
fCutDCAToVertex(0),
+ fCutDCAToVertexXY(0),
fPMin(0),
fPMax(0),
fPtMin(0),
fCutNsigmaToVertex = 0;
fCutSigmaToVertexRequired = 0;
fCutDCAToVertex = 0;
+ fCutDCAToVertexXY = 0;
fPMin = 0;
fPMax = 0;
target.fCutNsigmaToVertex = fCutNsigmaToVertex;
target.fCutSigmaToVertexRequired = fCutSigmaToVertexRequired;
target.fCutDCAToVertex = fCutDCAToVertex;
+ target.fCutDCAToVertexXY = fCutDCAToVertexXY;
target.fPMin = fPMin;
target.fPMax = fPMax;
esdTrack->GetImpactParameters(b,bCov);
if (bCov[0]<=0 || bCov[2]<=0) {
- AliDebug(1, "Estimated b resolution lower or equal zero!");
+ AliDebugClass(1, "Estimated b resolution lower or equal zero!");
bCov[0]=0; bCov[2]=0;
}
bRes[0] = TMath::Sqrt(bCov[0]);
Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
- // stupid rounding problem screws up everything:
+ // work around precision problem
// if d is too big, TMath::Exp(...) gets 0, and TMath::ErfInverse(1) that should be infinite, gets 0 :(
- if (TMath::Exp(-d * d / 2) < 1e-10)
+ // 1e-15 corresponds to nsigma ~ 7.7
+ if (TMath::Exp(-d * d / 2) < 1e-15)
return 1000;
- d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
- return d;
+ Float_t nSigma = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
+ return nSigma;
}
void AliESDtrackCuts::EnableNeededBranches(TTree* tree)
AliDebug(1, "Estimated b resolution lower or equal zero!");
bCov[0]=0; bCov[2]=0;
}
- Float_t dcaToVertex = TMath::Sqrt(b[0]*b[0] + b[1]*b[1]);
+ Float_t dcaToVertex = TMath::Sqrt(b[0]*b[0] + b[1]*b[1]);
+ Float_t dcaToVertexXY = b[0];
+
// getting the kinematic variables of the track
// (assuming the mass is known)
Double_t p[3];
cuts[17] = kTRUE;
if((p[2] < fPzMin) || (p[2] > fPzMax))
cuts[18] = kTRUE;
- if((eta < fEtaMin) || (eta > fEtaMax))
+ if((eta < fEtaMin) || (eta > fEtaMax))
cuts[19] = kTRUE;
if((y < fRapMin) || (y > fRapMax))
cuts[20] = kTRUE;
if (dcaToVertex > fCutDCAToVertex)
cuts[21] = kTRUE;
+ if (dcaToVertexXY > fCutDCAToVertexXY)
+ cuts[22] = kTRUE;
Bool_t cut=kFALSE;
for (Int_t i=0; i<kNCuts; i++)
if (!esd->GetPrimaryVertexTPC())
return 0; // No TPC vertex no TPC tracks
+ if(!esd->GetPrimaryVertexTPC()->GetStatus())
+ return 0; // TPC Vertex is created by default in AliESDEvent, do not use in this case
+
+
AliESDtrack* track = esd->GetTrack(iTrack);
if (!track)
return 0;
for (Int_t iTrack = 0; iTrack < esd->GetNumberOfTracks(); iTrack++) {
if(bTPC){
if(!esd->GetPrimaryVertexTPC())return acceptedTracks; // No TPC vertex no TPC tracks
+ if(!esd->GetPrimaryVertexTPC()->GetStatus())return acceptedTracks; // No proper TPC vertex, only the default
AliESDtrack *tpcTrack = GetTPCOnlyTrack(esd, iTrack);
if (!tpcTrack)
fhCutStatistics->GetXaxis()->SetBinLabel(i+4,fgkCutNames[i]);
fhCutCorrelation->GetXaxis()->SetBinLabel(i+1,fgkCutNames[i]);
fhCutCorrelation->GetYaxis()->SetBinLabel(i+1,fgkCutNames[i]);
- }
+ }
fhCutStatistics ->SetLineColor(color);
fhCutCorrelation ->SetLineColor(color);
fhC11[i] = new TH1F("covMatrixDiagonal11","",2000,0,20);
fhC22[i] = new TH1F("covMatrixDiagonal22","",2000,0,20);
- fhC33[i] = new TH1F("covMatrixDiagonal33","",1000,0,1);
- fhC44[i] = new TH1F("covMatrixDiagonal44","",1000,0,5);
+ fhC33[i] = new TH1F("covMatrixDiagonal33","",1000,0,0.1);
+ fhC44[i] = new TH1F("covMatrixDiagonal44","",1000,0,0.1);
fhC55[i] = new TH1F("covMatrixDiagonal55","",1000,0,5);
fhDXY[i] = new TH1F("dXY" ,"",500,-10,10);