From b09af9ec3adec1a3c2d54a323eaedf839b5b6c22 Mon Sep 17 00:00:00 2001 From: abercuci Date: Mon, 10 May 2010 13:08:34 +0000 Subject: [PATCH] fix for bug #66858] (PWG1 train problem for LHC10c data) --- PWG1/TRD/AliTRDinfoGen.cxx | 2 +- PWG1/TRD/info/AliTRDtrackInfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWG1/TRD/AliTRDinfoGen.cxx b/PWG1/TRD/AliTRDinfoGen.cxx index ee4bc74ae74..8a3319648b2 100644 --- a/PWG1/TRD/AliTRDinfoGen.cxx +++ b/PWG1/TRD/AliTRDinfoGen.cxx @@ -332,6 +332,7 @@ void AliTRDinfoGen::UserExec(Option_t *){ fTrackInfo->SetMC(); fTrackInfo->SetPDG(fPdg); fTrackInfo->SetPrimary(mcParticle->Particle()->IsPrimary()); + fTrackInfo->SetLabel(label); Int_t jref = iref;//, kref = 0; while(jrefGetTrackReference(jref); @@ -357,7 +358,6 @@ void AliTRDinfoGen::UserExec(Option_t *){ dedx[in++]=esdTrack->GetTRDslice(il, is); for(Int_t il=0; ilGetTRDmomentum(il); fTrackInfo->SetSlices(in, dedx); - fTrackInfo->SetLabel(label); fTrackInfo->SetNumberOfClustersRefit(esdTrack->GetNcls(2)); // some other Informations which we may wish to store in order to find problematic cases fTrackInfo->SetKinkIndex(esdTrack->GetKinkIndex(0)); diff --git a/PWG1/TRD/info/AliTRDtrackInfo.h b/PWG1/TRD/info/AliTRDtrackInfo.h index b57f620c68a..1e4315fa506 100644 --- a/PWG1/TRD/info/AliTRDtrackInfo.h +++ b/PWG1/TRD/info/AliTRDtrackInfo.h @@ -117,10 +117,10 @@ public: Bool_t HasMCinfo() const { return (Bool_t)fMC; } void SetCurved(Bool_t curv = kTRUE) {SetBit(kCurv, curv);} - void SetLabel(Int_t lab) {fMC->fLabel = lab; } + void SetLabel(Int_t lab) {if(fMC) fMC->fLabel = lab; } void SetNumberOfClustersRefit(Int_t n) {fNClusters = n;} inline void SetMC(); - void SetPDG(Int_t pdg) {fMC->fPDG = pdg; } + void SetPDG(Int_t pdg) {if(fMC) fMC->fPDG = pdg; } void SetPrimary(Bool_t prim = kTRUE) {SetBit(kPrim, prim);} void SetOuterParam(const AliExternalTrackParam *op); void SetStatus(ULong_t stat) {fESD.fStatus = stat;} -- 2.43.0