if(!fUseKinkDaughters && track->GetKinkIndex(0) > 0) continue;
//Int_t label = TMath::Abs(track->GetLabel());
- Int_t label = track->GetLabel();
+ Int_t label = track->GetTPCLabel(); //Use TPC-only label for TPC-only efficiency analysis
labelsAllRec[iTrack]=label;
// TPC only
if(!fUseKinkDaughters && track->GetKinkIndex(0) > 0) continue;
//Int_t label = TMath::Abs(track->GetLabel());
- Int_t label = track->GetLabel();
+ Int_t label = track->GetTPCLabel(); //Use TPC-only label for TPC-only efficiency analysis
labelsAllRecSec[multAll]=label;
multAll++;
if(!fUseKinkDaughters && track->GetKinkIndex(0) > 0) continue;
//Int_t label = TMath::Abs(track->GetLabel());
- Int_t label = track->GetLabel();
+ Int_t label = track->GetLabel(); //Use global label for combined efficiency analysis
labelsAllRecTPCITS[iTrack]=label;
// iTPC+ITS
TH1D *rec = EffHisto->Projection(axis);
recc = (TH1D*)rec->Clone();
- recc->Divide(rec,all,1,1,"B");
- recc->GetYaxis()->SetTitle("efficiency");
+ if(recc)
+ {
+ recc->Divide(rec,all,1,1,"B");
+ recc->GetYaxis()->SetTitle("efficiency");
+ }
}
else if (type == 1) // Clone Rate
{
TH1D *clone = WeightedProjection(EffHisto, axis, 1, &axis_clone);
recc = (TH1D*) clone->Clone();
- recc->Divide(clone,all,1,1,"B");
- recc->GetYaxis()->SetTitle("clone rate");
+ if(recc)
+ {
+ recc->Divide(clone,all,1,1,"B");
+ recc->GetYaxis()->SetTitle("clone rate");
+ }
}
else if (type == 2) // Fake Rate
{
TH1D *fake = WeightedProjection(EffHisto, axis, 1, &axis_fake);
recc = (TH1D*) fake->Clone();
- recc->Divide(fake,all,1,1,"B");
- recc->GetYaxis()->SetTitle("fake rate");
+ if(recc)
+ {
+ recc->Divide(fake,all,1,1,"B");
+ recc->GetYaxis()->SetTitle("fake rate");
+ }
}
EffHisto->GetAxis(4)->SetRange(1,0); //Reset Range
// 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;
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;