use trigger selection only for real data
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Mar 2010 09:01:29 +0000 (09:01 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Mar 2010 09:01:29 +0000 (09:01 +0000)
PWG1/TRD/macros/AddTRDinfoGen.C

index 3cf8fad..8d1bf4b 100644 (file)
@@ -12,17 +12,17 @@ void AddTRDinfoGen(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContaine
 {
   Int_t map = ParseOptions(trd);
   if(!(TSTBIT(map, kInfoGen))) return;
-  
+  Bool_t mc(mgr->GetMCtruthEventHandler()?kTRUE:kFALSE);
   //AliLog::SetClassDebugLevel("AliTRDinfoGen", 2);
   AliTRDinfoGen *info(NULL);
   mgr->AddTask(info = new AliTRDinfoGen((char*)"genInfo"));
   info->SetDebugLevel(0);
-  info->SetMCdata(mgr->GetMCtruthEventHandler());
+  info->SetMCdata(mc);
 
   // settings for collisions
-  info->SetCollision(/*kFALSE*/);
+  info->SetCollision(kFALSE);
   if(info->IsCollision()){
-    info->SetTrigger(
+    if(mc) info->SetTrigger(
       "CINT1B-ABCE-NOPF-ALL"
       " CSCO1-ABCE-NOPF-CENT" // cosmic SPD trigger
     );