From 3ca4688a693076344669fe2d468e6fe1c44bf30b Mon Sep 17 00:00:00 2001 From: snelling Date: Wed, 1 Dec 2010 13:11:50 +0000 Subject: [PATCH] few bug fixes pid --- .../FLOW/AliFlowCommon/AliFlowEventSimple.cxx | 4 ++ .../AliFlowTasks/AliAnalysisTaskFlowEvent.cxx | 13 +++--- PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx | 40 +++++++++---------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx index fb010a6c668..2bb16769627 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx @@ -582,6 +582,8 @@ void AliFlowEventSimple::TagSubeventsInEta( Double_t etaMinA, for (Int_t i=0; i(fTrackCollection->At(i)); + if (!track) continue; + track->ResetSubEventTags(); Double_t eta=track->Eta(); if (eta >= etaMinA && eta <= etaMaxA) track->SetForSubevent(0); if (eta >= etaMinB && eta <= etaMaxB) track->SetForSubevent(1); @@ -595,6 +597,8 @@ void AliFlowEventSimple::TagSubeventsByCharge() for (Int_t i=0; i(fTrackCollection->At(i)); + if (!track) continue; + track->ResetSubEventTags(); Int_t charge=track->Charge(); if (charge<0) track->SetForSubevent(0); if (charge>0) track->SetForSubevent(1); diff --git a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx index 0ad5447a6ef..54a7af09ad5 100644 --- a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx @@ -260,11 +260,6 @@ void AliAnalysisTaskFlowEvent::UserCreateOutputObjects() AliError("cuts not set"); return; } - if (fCutsEvent) - { - if (!fCutsEvent->IsSelected(InputEvent())) return; - } - //PID if (fCutsRP->GetParamType()==AliFlowTrackCuts::kMC) { @@ -331,7 +326,13 @@ void AliAnalysisTaskFlowEvent::UserExec(Option_t *) exit(2); } } - + + //check event cuts + if (fCutsEvent) + { + if (!fCutsEvent->IsSelected(InputEvent())) return; + } + //use the new and temporarily inclomplete way of doing things if (fAnalysisType == "AUTOMATIC") { diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx index 014ffa57152..2fb762e1104 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx @@ -799,17 +799,29 @@ void AliFlowTrackCuts::InitPIDcuts() (*t)(0,9) = 0.65; (*t)(1,9) = 0; (*t)(2,9) = 0; } else + if (fAliPID==AliPID::kKaon) + { + t = new TMatrixF(3,7); + (*t)(0,0) = 0.20; (*t)(1,0) = -0.2; (*t)(2,0) = 0.4; + (*t)(0,1) = 0.25; (*t)(1,1) =-0.15; (*t)(2,1) = 0.4; + (*t)(0,2) = 0.30; (*t)(1,2) = -0.1; (*t)(2,2) = 0.4; + (*t)(0,3) = 0.35; (*t)(1,3) = -0.1; (*t)(2,3) = 0.4; + (*t)(0,4) = 0.40; (*t)(1,4) = -0.1; (*t)(2,4) = 0.6; + (*t)(0,5) = 0.45; (*t)(1,5) = -0.1; (*t)(2,5) = 0.6; + (*t)(0,6) = 0.50; (*t)(1,6) = 0; (*t)(2,6) = 0; + } + else if (fAliPID==AliPID::kProton) { t = new TMatrixF(3,16); - (*t)(0,0) = 0.20; (*t)(1,0) = 0; (*t)(2,0) = 0.3; - (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.6; + (*t)(0,0) = 0.20; (*t)(1,0) = 0; (*t)(2,0) = 0; + (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.3; (*t)(0,2) = 0.30; (*t)(1,2) = -0.2; (*t)(2,2) = 0.6; (*t)(0,3) = 0.35; (*t)(1,3) = -0.2; (*t)(2,3) = 0.6; (*t)(0,4) = 0.40; (*t)(1,4) = -0.2; (*t)(2,4) = 0.6; (*t)(0,5) = 0.45; (*t)(1,5) = -0.15; (*t)(2,5) = 0.6; (*t)(0,6) = 0.50; (*t)(1,6) = -0.1; (*t)(2,6) = 0.6; - (*t)(0,7) = 0.55; (*t)(1,7) = -0.05; (*t)(2,7) = 0.45; + (*t)(0,7) = 0.55; (*t)(1,7) = -0.05; (*t)(2,7) = 0.6; (*t)(0,8) = 0.60; (*t)(1,8) = -0.05; (*t)(2,8) = 0.45; (*t)(0,9) = 0.65; (*t)(1,9) = -0.05; (*t)(2,9) = 0.45; (*t)(0,10) = 0.70; (*t)(1,10) = -0.05; (*t)(2,10) = 0.45; @@ -819,18 +831,6 @@ void AliFlowTrackCuts::InitPIDcuts() (*t)(0,14) = 0.90; (*t)(1,14) = 0; (*t)(2,14) = 0.45; (*t)(0,15) = 0.95; (*t)(1,15) = 0; (*t)(2,15) = 0; } - else - if (fAliPID==AliPID::kKaon) - { - t = new TMatrixF(3,7); - (*t)(0,0) = 0.20; (*t)(1,0) = -0.2; (*t)(2,0) = 0.4; - (*t)(0,1) = 0.25; (*t)(1,1) =-0.15; (*t)(2,1) = 0.4; - (*t)(0,2) = 0.30; (*t)(1,2) = -0.1; (*t)(2,2) = 0.4; - (*t)(0,3) = 0.35; (*t)(1,3) = -0.1; (*t)(2,3) = 0.4; - (*t)(0,4) = 0.40; (*t)(1,4) = -0.1; (*t)(2,4) = 0.6; - (*t)(0,5) = 0.45; (*t)(1,5) = -0.1; (*t)(2,5) = 0.6; - (*t)(0,6) = 0.50; (*t)(1,6) = 0; (*t)(2,6) =0; - } fTPCpidCuts=t; } if (!fTOFpidCuts) @@ -869,11 +869,11 @@ void AliFlowTrackCuts::InitPIDcuts() if (fAliPID==AliPID::kProton) { t = new TMatrixF(3,39); - (*t)(0,0) = 0.3; (*t)(1,0) = 0; (*t)(2,0) = 0; - (*t)(0,1) = 0.35; (*t)(1,1) = 0; (*t)(2,1) = 0; - (*t)(0,2) = 0.40; (*t)(1,2) = 0; (*t)(2,2) = 0; - (*t)(0,3) = 0.45; (*t)(1,3) = 0; (*t)(2,3) = 0; - (*t)(0,4) = 0.50; (*t)(1,4) = 0; (*t)(2,4) = 0; + (*t)(0,0) = 0.3; (*t)(1,0) = 0; (*t)(2,0) = 0; + (*t)(0,1) = 0.35; (*t)(1,1) = 0; (*t)(2,1) = 0; + (*t)(0,2) = 0.40; (*t)(1,2) = 0; (*t)(2,2) = 0; + (*t)(0,3) = 0.45; (*t)(1,3) = 0; (*t)(2,3) = 0; + (*t)(0,4) = 0.50; (*t)(1,4) = 0; (*t)(2,4) = 0; (*t)(0,5) = 0.55; (*t)(1,5) = -900; (*t)(2,5) = 600; (*t)(0,6) = 0.60; (*t)(1,6) = -800; (*t)(2,6) = 600; (*t)(0,7) = 0.65; (*t)(1,7) = -800; (*t)(2,7) = 600; -- 2.43.5