Double_t AliPerformanceRes::fgkMergeEntriesCut=5000000.; //5*10**6 tracks (small default to keep default memory foorprint low)
//_____________________________________________________________________________
-AliPerformanceRes::AliPerformanceRes():
- AliPerformanceObject("AliPerformanceRes"),
- fResolHisto(0),
- fPullHisto(0),
-
- // Cuts
- fCutsRC(0),
- fCutsMC(0),
-
- // histogram folder
- fAnalysisFolder(0)
-{
- Init();
-}
-
-//_____________________________________________________________________________
-AliPerformanceRes::AliPerformanceRes(Char_t* name="AliPerformanceRes", Char_t* title="AliPerformanceRes",Int_t analysisMode=0,Bool_t hptGenerator=kFALSE):
+AliPerformanceRes::AliPerformanceRes(const Char_t* name, const Char_t* title, Int_t analysisMode, Bool_t hptGenerator):
AliPerformanceObject(name,title),
fResolHisto(0),
fPullHisto(0),
// set pt bins
Int_t nPtBins = 50;
- Double_t ptMin = 1.e-2, ptMax = 20.;
+ Double_t ptMin = 1.e-1, ptMax = 20.;
Double_t *binsPt = 0;
Double_t maxResolHisto[10]={ 1., 1., 0.03, 0.03, 0.2, yMax, zMax, 2.*TMath::Pi(), 1.5, ptMax};
fResolHisto = new THnSparseF("fResolHisto","res_y:res_z:res_phi:res_lambda:res_pt:y:z:phi:eta:pt",10,binsResolHisto,minResolHisto,maxResolHisto);
- fResolHisto->SetBinEdges(9,binsPt);
+
+ //fResolHisto->SetBinEdges(9,binsPt);
+ fResolHisto->GetAxis(9)->Set(nPtBins,binsPt);
fResolHisto->GetAxis(0)->SetTitle("y-y_{mc} (cm)");
fResolHisto->GetAxis(1)->SetTitle("z-z_{mc} (cm)");
//fPullHisto = new THnSparseF("fPullHisto","pull_y:pull_z:pull_phi:pull_lambda:pull_1pt:y:z:eta:phi:pt",10,binsPullHisto,minPullHisto,maxPullHisto);
//pull_y:pull_z:pull_snp:pull_tgl:pull_1pt:y:z:snp:tgl:1pt
- Int_t binsPullHisto[10]={100,100,100,100,100,50,50,50,50,nPtBins};
- Double_t minPullHisto[10]={-5.,-5.,-5.,-5.,-5.,yMin, zMin,-1., -2.0, ptMin};
- Double_t maxPullHisto[10]={ 5., 5., 5., 5., 5., yMax, zMax, 1., 2.0, ptMax};
+ //Int_t binsPullHisto[10]={100,100,100,100,100,50,50,50,50,nPtBins};
+ //Double_t minPullHisto[10]={-5.,-5.,-5.,-5.,-5.,yMin, zMin,-1., -2.0, ptMin};
+ //Double_t maxPullHisto[10]={ 5., 5., 5., 5., 5., yMax, zMax, 1., 2.0, ptMax};
+ Int_t binsPullHisto[10]={100,100,100,100,100,50,50,50,50,20};
+ Double_t minPullHisto[10]={-5.,-5.,-5.,-5.,-5.,yMin, zMin,-1., -2.0, 0.};
+ Double_t maxPullHisto[10]={ 5., 5., 5., 5., 5., yMax, zMax, 1., 2.0, 10.};
fPullHisto = new THnSparseF("fPullHisto","pull_y:pull_z:pull_y:pull_z:pull_snp:pull_tgl:pull_1pt:y:z:snp:tgl:1pt",10,binsPullHisto,minPullHisto,maxPullHisto);
/*
fPullHisto->Sumw2();
*/
+ fPullHisto->GetAxis(9)->Set(nPtBins,binsPt);
+
fPullHisto->GetAxis(0)->SetTitle("(y-y_{mc})/#sigma");
fPullHisto->GetAxis(1)->SetTitle("(z-z_{mc})/#sigma");
fPullHisto->GetAxis(2)->SetTitle("(sin#phi-sin#phi_{mc})/#sigma");
// Fill rec vs MC information
//
if(!stack) return;
- Int_t label = TMath::Abs(esdTrack->GetLabel());
+ Int_t label = esdTrack->GetTPCLabel(); //Use TPC-only label for TPC-only resolution analysis
+ if (label <= 0) return;
TParticle* particle = stack->Particle(label);
if(!particle) return;
if(!particle->GetPDG()) return;
//
if(!stack) return;
- Int_t label = TMath::Abs(esdTrack->GetLabel());
+ Int_t label = TMath::Abs(esdTrack->GetLabel()); //Use global label for combined resolution analysis
TParticle* particle = stack->Particle(label);
if(!particle) return;
if(!particle->GetPDG()) return;
//
if(!mcEvent) return;
- Int_t label = TMath::Abs(esdTrack->GetLabel());
+ Int_t label = esdTrack->GetTPCLabel(); //Use TPC-only label for TPC-only resolution analysis
+ if (label <= 0) return;
AliMCParticle *mcParticle = (AliMCParticle*) mcEvent->GetTrack(label);
if(!mcParticle) return;
mclocal[2] = px*c + py*s;
mclocal[3] =-px*s + py*c;
- Double_t xyz[3] = {ref0->X(),ref0->Y(),ref0->Z()};
+ //Double_t xyz[3] = {ref0->X(),ref0->Y(),ref0->Z()};
// propagate track to the radius of the first track reference within TPC
- Double_t trRadius = TMath::Sqrt(xyz[1] * xyz[1] + xyz[0] * xyz[0]);
+ //Double_t trRadius = TMath::Sqrt(xyz[1] * xyz[1] + xyz[0] * xyz[0]);
Double_t field[3]; track->GetBxByBz(field);
if (TGeoGlobalMagField::Instance()->GetField() == NULL) {
Error("ProcessInnerTPC", "Magnetic Field not set");
//
if(!mcEvent) return;
- Int_t label = TMath::Abs(esdTrack->GetLabel());
+ Int_t label = esdTrack->GetTPCLabel(); //Use TPC-only label for TPC-only resolution analysis
+ if (label <= 0) return;
AliMCParticle *mcParticle = (AliMCParticle*) mcEvent->GetTrack(label);
if(!mcParticle) return;
vtxESD = esdEvent->GetPrimaryVertexTracks();
if(vtxESD && (vtxESD->GetStatus()<=0)) return;
}
- else {
- // TPC track vertex
- vtxESD = esdEvent->GetPrimaryVertexTPC();
- }
+ // Coverity - removed else branch as vtxESD is not further used in method
+ // else {
+ // // TPC track vertex
+ // vtxESD = esdEvent->GetPrimaryVertexTPC();
+ // }
if(j!=8) fResolHisto->GetAxis(8)->SetRangeUser(-0.9,0.89); // eta window
//if(j!=8) fResolHisto->GetAxis(8)->SetRangeUser(0.0,0.89); // eta window
else fResolHisto->GetAxis(8)->SetRangeUser(-1.5,1.49);
- fResolHisto->GetAxis(9)->SetRangeUser(0.16,100.); // pt threshold
- if(GetAnalysisMode() == 3) fResolHisto->GetAxis(5)->SetRangeUser(-80.,80.); // y range
+ if(GetAnalysisMode() == 3) fResolHisto->GetAxis(5)->SetRangeUser(-80.,79.99); // y range
h2D = (TH2F*)fResolHisto->Projection(i,j);
aFolderObj->Add(h);
fResolHisto->GetAxis(8)->SetRangeUser(-1.5,1.5);
- fResolHisto->GetAxis(9)->SetRangeUser(0.0,10.);
+ fResolHisto->GetAxis(9)->SetRangeUser(0.1,100.);
//
- //if(j!=8) fPullHisto->GetAxis(8)->SetRangeUser(-0.9,0.89); // eta window
- if(j!=8) fPullHisto->GetAxis(8)->SetRangeUser(0.0,0.89); // eta window
+ if(j!=8) fPullHisto->GetAxis(8)->SetRangeUser(-0.9,0.89); // eta window
+ //if(j!=8) fPullHisto->GetAxis(8)->SetRangeUser(0.0,0.89); // eta window
else fPullHisto->GetAxis(8)->SetRangeUser(-1.5,1.49); // eta window
- fPullHisto->GetAxis(9)->SetRangeUser(0.16,100.); // pt threshold
- if(GetAnalysisMode() == 3) fPullHisto->GetAxis(5)->SetRangeUser(-80.,80.); // y range
+ fPullHisto->GetAxis(9)->SetRangeUser(0.,9.99); // 1./pt threshold
+ if(GetAnalysisMode() == 3) fPullHisto->GetAxis(5)->SetRangeUser(-80.,79.99); // y range
h2D = (TH2F*)fPullHisto->Projection(i,j);