update for the TRD trigger data analysis
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Apr 2013 18:00:31 +0000 (18:00 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Apr 2013 18:00:31 +0000 (18:00 +0000)
PWGHF/hfe/macros/AddTaskHFEpPb.C

index 2abbbf2..a31965d 100644 (file)
@@ -4,7 +4,8 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
                                Bool_t kTPC_Only = kFALSE,\r
                                Bool_t kTPCTOF_Cent = kFALSE,\r
                                Bool_t kTPCTOF_Sys = kFALSE,\r
-                               Bool_t kTPCTOFTRD_Ref = kFALSE\r
+                              Bool_t kTPCTOFTRD_Ref = kFALSE,\r
+                               int TRDtrigger = 0
   ){\r
   //get the current analysis manager\r
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
@@ -28,7 +29,8 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
   const double kDefTPCs = 0;\r
   const double kDefTPCu = 3;   \r
   const double kDefTOFs = 3.;\r
-  const int TRDtrigger = 1; // trd trigger type\r
+  //const int TRDtrigger = 1; // trd trigger type\r
+  if(!kTPCTOFTRD_Ref) TRDtrigger = 0;
   \r
   Double_t dEdxlm[12] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};  //  50%\r
   Double_t dEdxhm[12] = {3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};\r
@@ -157,7 +159,7 @@ AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();\r
   AliAnalysisTaskHFE *task = ConfigHFEpPb(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, \r
                                          tpcdEdxcutlow,tpcdEdxcuthigh,\r
-                                         tofs,tofm,itshitpixel,icent);\r
+                                         tofs,tofm,itshitpixel);\r
 \r
   if(isAOD)\r
     task->SetAODAnalysis();\r
@@ -211,7 +213,9 @@ AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120,
   else{\r
     task->SetHasMCData(kFALSE);\r
   }\r
-  task->SelectCollisionCandidates(AliVEvent::kINT7);\r
+
+  if(TRDtrigger==0) task->SelectCollisionCandidates(AliVEvent::kINT7);
+  else task->SelectCollisionCandidates(AliVEvent::kTRD);
  \r
   Int_t idcaxy = (Int_t)(dcaxy*10.);\r
   Int_t idcaz = (Int_t)(dcaz*10.);\r