testing if mc before select collision candidates
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Sep 2012 11:43:31 +0000 (11:43 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Sep 2012 11:43:31 +0000 (11:43 +0000)
PWGGA/EMCALTasks/macros/AddTaskEMCALIsoPhoton.C

index 08138e8..17a3dff 100644 (file)
@@ -17,16 +17,16 @@ AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
   //===========================================================================
   AliAnalysisTaskEMCALIsoPhoton* ana = new  AliAnalysisTaskEMCALIsoPhoton("");
   
-  ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
-  
   Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
 
+  if(!isMC)
+    ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
+  
   //ana->SetClusThreshold(clusTh);
   
   ana->SetTrainMode(kTRUE);
-  ana->SetMcMode(isMC);
   ana->SetTriggerBit(trigbitname);
-  // ana->SetMcMode(isMC);
+  ana->SetMcMode(isMC);
   
   AliESDtrackCuts *cutsp = new AliESDtrackCuts;
   cutsp->SetMinNClustersTPC(70);