Check that the PID response is properly set (Rossella)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 30 Sep 2012 22:36:28 +0000 (22:36 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 30 Sep 2012 22:36:28 +0000 (22:36 +0000)
PWGHF/vertexingHF/AliRDHFCutsLctopKpi.cxx

index ea6bb20..2f283b2 100644 (file)
@@ -24,6 +24,9 @@
 
 #include <TDatabasePDG.h>
 #include <Riostream.h>
+#include <AliAnalysisManager.h>
+#include <AliInputEventHandler.h>
+#include <AliPIDResponse.h>
 
 #include "AliRDHFCutsLctopKpi.h"
 #include "AliAODRecoDecayHF3Prong.h"
@@ -418,6 +421,25 @@ Int_t AliRDHFCutsLctopKpi::IsSelectedPID(AliAODRecoDecayHF* obj) {
      fPidObjpion->SetMC(kTRUE);
     }
 
+   if(fPidObjprot->GetPidResponse()==0x0){
+      AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+      AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+      AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+      fPidObjprot->SetPidResponse(pidResp);
+    }
+    if(fPidObjpion->GetPidResponse()==0x0){
+      AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+      AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+      AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+      fPidObjpion->SetPidResponse(pidResp);
+    }
+    if(fPidHF->GetPidResponse()==0x0){
+      AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+      AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+      AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+      fPidHF->SetPidResponse(pidResp);
+    }
+
     for(Int_t i=0;i<3;i++){
      AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i);
      if(!track) return 0;