From: slindal Date: Wed, 19 Jan 2011 18:23:22 +0000 (+0000) Subject: Fixing bug preventing pi0s to be added to tclonesarray of reconstructed pi0 if aod... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=952035754d72edfbe029dd1357793bf5b8a88399 Fixing bug preventing pi0s to be added to tclonesarray of reconstructed pi0 if aod creation is off --- diff --git a/PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx b/PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx index eb2f7b38467..0513f3963c4 100644 --- a/PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx +++ b/PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx @@ -2448,16 +2448,17 @@ void AliAnalysisTaskGammaConversion::ProcessGammasForNeutralMesonAnalysis(){ Double_t lowMassPi0=0.1; Double_t highMassPi0=0.15; - if ( fKFCreateAOD && (massTwoGammaCandidate > lowMassPi0) && (massTwoGammaCandidate < highMassPi0) ){ + if ( ( massTwoGammaCandidate > lowMassPi0) && (massTwoGammaCandidate < highMassPi0) ){ new((*fKFReconstructedPi0sTClone)[fKFReconstructedPi0sTClone->GetEntriesFast()]) AliKFParticle(*twoGammaCandidate); fGammav1.push_back(firstGammaIndex); fGammav2.push_back(secondGammaIndex); - AddPionToAOD(twoGammaCandidate, massTwoGammaCandidate, firstGammaIndex, secondGammaIndex); + if( fKFCreateAOD ) { + AddPionToAOD(twoGammaCandidate, massTwoGammaCandidate, firstGammaIndex, secondGammaIndex); + } } } } - //} delete twoGammaCandidate; } }