Add TOF beta cut option
[u/mrichter/AliRoot.git] / PWGCF / FLOW / macros / AddTaskPidVZEROSP_2.C
index 2d46f6d..32fdf43 100644 (file)
@@ -1,4 +1,4 @@
-AddTaskPidVZEROSP_2(Int_t centralityselection=AliVEvent::kAny,Float_t etamin=-0.8,Float_t etamax=0.8,Int_t side=0,Int_t filterbit=1){
+AddTaskPidVZEROSP_2(Int_t centralityselection=AliVEvent::kAny,Float_t etamin=-0.8,Float_t etamax=0.8,Int_t side=0,Int_t filterbit=1,Bool_t TOFbeta=kFALSE){
   gROOT->LoadMacro("$ALICE_ROOT/PWGCF/FLOW/macros/AddTaskFlowCentralityPIDSP.C");
 
   const Int_t ncentr = 4;
@@ -6,11 +6,20 @@ AddTaskPidVZEROSP_2(Int_t centralityselection=AliVEvent::kAny,Float_t etamin=-0.
   Int_t cmax[ncentr]={40,60,70,80};
 
   for(Int_t i=0;i < ncentr;i++){
-    AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kFALSE,AliPID::kPion,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit); // no pid
-    AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kPion,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
-    AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kKaon,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
-    AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbayesian,-1,2,0,etamin,etamax,"",side,filterbit);
-    AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
+    if(!TOFbeta){
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kFALSE,AliPID::kPion,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit); // no pid
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kPion,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kKaon,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbayesian,-1,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbayesian,0,2,0,etamin,etamax,"",side,filterbit);
+    }
+    else{
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kFALSE,AliPID::kPion,AliFlowTrackCuts::kTOFbeta,0,2,0,etamin,etamax,"",side,filterbit); // no pid
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kPion,AliFlowTrackCuts::kTOFbeta,0,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kKaon,AliFlowTrackCuts::kTOFbeta,0,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbeta,-1,2,0,etamin,etamax,"",side,filterbit);
+      AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTOFbeta,0,2,0,etamin,etamax,"",side,filterbit);
+    }
     AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kPion,AliFlowTrackCuts::kTPCbayesian,0,2,0,etamin,etamax,"",side,filterbit);
     AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kKaon,AliFlowTrackCuts::kTPCbayesian,0,2,0,etamin,etamax,"",side,filterbit);
     AddTaskFlowCentralityPIDSP(centralityselection,cmin[i],cmax[i],"AnalysisResults",kTRUE,AliPID::kProton,AliFlowTrackCuts::kTPCbayesian,-1,2,0,etamin,etamax,"",side,filterbit);