Macros
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 14:31:12 +0000 (14:31 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 14:31:12 +0000 (14:31 +0000)
PWGHF/hfe/macros/AddTaskHFEFlowTPCTOFEPSP.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C

index b62240f..a6244fa 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=16,Int_t tpcCls=110, Double_t tpcClsr=60, Int_t tpcClspid=80, Double_t tpcsharedfraction=11, Bool_t rejectkinkmother=kFALSE, Int_t itsCls=4, Double_t chi2peritscl=36, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1,Int_t debuglevel=0,Double_t etarange=80,Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0){
+AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=16,Bool_t cutPileup=kTRUE,Int_t tpcCls=110, Double_t tpcClsr=60, Int_t tpcClspid=80, Double_t tpcsharedfraction=11, Bool_t rejectkinkmother=kFALSE, Int_t itsCls=4, Double_t chi2peritscl=36, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1,Int_t debuglevel=0,Double_t etarange=80,Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0){
 
   //
   // Define TPC cut for 2011 data
@@ -62,7 +62,7 @@ AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=
   }
 
   // Name
-  TString appendixx(TString::Format("t%df%dTPC%dr%dp%ds%dkm%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%der%di%dt%dt%d",(Int_t)trigger,aodfilter,tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,(Int_t)rejectkinkmother,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel,(Int_t)(etarange*0.1),(Int_t)ITSclustersback,(Int_t)(minTPCback*10.0),(Int_t)(maxTPCback*10.0)));
+  TString appendixx(TString::Format("t%df%dp%dTPC%dr%dp%ds%dkm%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%der%di%dt%dt%d",(Int_t)trigger,aodfilter,(Int_t)cutPileup,tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,(Int_t)rejectkinkmother,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel,(Int_t)(etarange*0.1),(Int_t)ITSclustersback,(Int_t)(minTPCback*10.0),(Int_t)(maxTPCback*10.0)));
   //TString appendixx("tpctofv2");
   
 
@@ -75,7 +75,7 @@ AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=
   
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-  AliAnalysisTaskFlowTPCTOFEPSP *task = ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,trigger,aodfilter,tpcCls, tpcClsr, tpcClspid, tpcsharedfraction,rejectkinkmother,itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,etarange,kFALSE,ITSclustersback,minTPCback,maxTPCback);  
+  AliAnalysisTaskFlowTPCTOFEPSP *task = ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,trigger,aodfilter,cutPileup,tpcCls, tpcClsr, tpcClspid, tpcsharedfraction,rejectkinkmother,itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,etarange,kFALSE,ITSclustersback,minTPCback,maxTPCback);  
 
   
   task->SetNbBinsCentralityQCumulant(4);
index 7d24b40..0747812 100644 (file)
@@ -90,13 +90,14 @@ Double_t Contamination_40_50(const Double_t *x, const Double_t *par)
   
 }
 
-AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix,UInt_t trigger,Int_t aodfilter=-1,Int_t tpcCls, Double_t tpcClsr,Int_t tpcClspid, Double_t tpcsharedfraction, Bool_t rejectkinkmother = kFALSE, Int_t itsCls, Double_t chi2peritscl, Int_t pixellayer, Double_t dcaxy, Double_t dcaz,  Double_t tofsig, Double_t *tpcdedx, Int_t vzero, Int_t debuglevel, Double_t etarange=80, Bool_t withetacorrection=kFALSE, Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0)
+AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix,UInt_t trigger,Int_t aodfilter=-1,Bool_t cutPileup=kTRUE,Int_t tpcCls=110, Double_t tpcClsr=60.,Int_t tpcClspid=80, Double_t tpcsharedfraction=11., Bool_t rejectkinkmother = kFALSE, Int_t itsCls=4, Double_t chi2peritscl=36., Int_t pixellayer=2, Double_t dcaxy=100., Double_t dcaz=200.,  Double_t tofsig=30., Double_t *tpcdedx=NULL, Int_t vzero=1, Int_t debuglevel=0, Double_t etarange=80, Bool_t withetacorrection=kFALSE, Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0)
 {
   //
   // HFE flow task 
   //
   printf("Summary settings flow task\n");
   printf("filter %d\n",aodfilter);
+  printf("PileUp cut %d\n",cutPileup);
   printf("TPC number of tracking clusters %d\n",tpcCls);
   printf("TPC ratio clusters %f\n",tpcClsr*0.01);
   printf("TPC number of pid clusters %d\n",tpcClspid);
@@ -181,6 +182,20 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
     task->SetAfterBurnerOn(kTRUE);
     task->SetV1V2V3V4V5(0.0,0.2,0.0,0.0,0.0);
   }
+  if(cutPileup){
+    TF1 *uppercut=new TF1("fupcut","[0]+[1]*x+[5]*([2]+sqrt([3]*x+[4]))");
+    uppercut->SetParameter(0,-357.098973);
+    uppercut->SetParameter(1,0.673831);
+    uppercut->SetParameter(2,115.089350);
+    uppercut->SetParameter(3,5.433380);
+    uppercut->SetParameter(4,-1907.241935);
+    uppercut->SetParameter(5,3);
+    TF1 *lowercut=new TF1(*uppercut);
+    lowercut->SetParameter(5,-3);
+    task->SetPileUpCuts(uppercut,lowercut);
+  }
+  
+
   if(vzero>=1) task->SetVZEROEventPlane(kTRUE);
   if(vzero==2) task->SetVZEROEventPlaneA(kTRUE);
   if(vzero==3) task->SetVZEROEventPlaneC(kTRUE);