From 70d3ac15ac8ff5d8a87eaccd376853d5394789a4 Mon Sep 17 00:00:00 2001 From: janielsk Date: Wed, 3 Jul 2013 12:19:00 +0000 Subject: [PATCH] Added support for electron template to use TPC PID to higher momenta for Kaons. --- .../PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx b/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx index 98f0ba77537..d0301cd2d1d 100644 --- a/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx +++ b/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx @@ -880,8 +880,8 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) TParticle *trackMC = stack->Particle(TMath::Abs(track->GetLabel())); Int_t pdg = TMath::Abs(trackMC->GetPdgCode()); // - if (pdg != assumedPdg && stack->IsPhysicalPrimary(TMath::Abs(track->GetLabel()))) code = 2; - if (pdg != assumedPdg && stack->IsSecondaryFromWeakDecay(TMath::Abs(track->GetLabel()))) code = 5; + if (pdg != assumedPdg) code = 2; + //if (pdg != assumedPdg && stack->IsSecondaryFromWeakDecay(TMath::Abs(track->GetLabel()))) code = 5; if (pdg == assumedPdg && stack->IsPhysicalPrimary(TMath::Abs(track->GetLabel()))) code = 1; if (pdg == assumedPdg && stack->IsSecondaryFromWeakDecay(TMath::Abs(track->GetLabel()))) { code = 3; @@ -892,8 +892,17 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) if (trackMother->GetPdgCode() == 3222) motherCode = 8; //Sigma+ } } - if (pdg == assumedPdg && stack->IsSecondaryFromMaterial(TMath::Abs(track->GetLabel()))) code = 4; - + + + //FILL MATERIAL TEMPLATE FOR KAONS WITH ELECTRONS + if (iPart != 1){ + if (pdg == assumedPdg && stack->IsSecondaryFromMaterial(TMath::Abs(track->GetLabel()))) code = 4; + } + else { + if (pdg == 11) code = 4; + //cout << "got an electron for kaons!" << endl; + } + // // muons need special treatment, because they are indistinguishable from pions // -- 2.43.0