Update
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2012 13:46:47 +0000 (13:46 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2012 13:46:47 +0000 (13:46 +0000)
PWGHF/hfe/AliAnalysisTaskHFEFlow.cxx
PWGHF/hfe/AliAnalysisTaskHFEFlow.h
PWGHF/hfe/macros/AddTaskHFEtpctofv2.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C
PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_2030.root [new file with mode: 0644]
PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_3040.root [new file with mode: 0644]
PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_4050.root [new file with mode: 0644]

index 7174f2f..675acad 100644 (file)
@@ -137,6 +137,7 @@ AliAnalysisTaskHFEFlow::AliAnalysisTaskHFEFlow() :
   fEventPlane(0x0),\r
   fEventPlaneaftersubtraction(0x0),\r
   fFractionContamination(0x0),\r
+  fContaminationv2(0x0),\r
   fCosSin2phiep(0x0),\r
   fCos2phie(0x0),\r
   fSin2phie(0x0),\r
@@ -177,6 +178,7 @@ AliAnalysisTaskHFEFlow::AliAnalysisTaskHFEFlow() :
   }\r
   for(Int_t k = 0; k < 11; k++) {\r
     fContamination[k] = NULL;\r
+    fv2contamination[k] = NULL;\r
   }\r
    \r
 }\r
@@ -241,6 +243,7 @@ AliAnalysisTaskHFEFlow:: AliAnalysisTaskHFEFlow(const char *name) :
   fEventPlane(0x0),\r
   fEventPlaneaftersubtraction(0x0),\r
   fFractionContamination(0x0),\r
+  fContaminationv2(0x0),\r
   fCosSin2phiep(0x0),\r
   fCos2phie(0x0),\r
   fSin2phie(0x0),\r
@@ -289,6 +292,7 @@ AliAnalysisTaskHFEFlow:: AliAnalysisTaskHFEFlow(const char *name) :
 \r
   for(Int_t k = 0; k < 11; k++) {\r
     fContamination[k] = NULL;\r
+    fv2contamination[k] = NULL;\r
   }\r
   \r
   fPID = new AliHFEpid("hfePid");\r
@@ -367,6 +371,7 @@ AliAnalysisTaskHFEFlow::AliAnalysisTaskHFEFlow(const AliAnalysisTaskHFEFlow &ref
   fEventPlane(NULL),\r
   fEventPlaneaftersubtraction(NULL),\r
   fFractionContamination(NULL),\r
+  fContaminationv2(NULL),\r
   fCosSin2phiep(NULL),\r
   fCos2phie(NULL),\r
   fSin2phie(NULL),\r
@@ -471,6 +476,7 @@ void AliAnalysisTaskHFEFlow::Copy(TObject &o) const {
   target.fHFEVZEROEventPlane = fHFEVZEROEventPlane;\r
   for(Int_t k = 0; k < 11; k++) {\r
     target.fContamination[k] = fContamination[k];\r
+    target.fv2contamination[k] = fv2contamination[k];\r
   }\r
  \r
 }\r
@@ -789,6 +795,9 @@ void AliAnalysisTaskHFEFlow::UserCreateOutputObjects()
   fFractionContamination->SetBinEdges(0,binLimPt);\r
   fFractionContamination->SetBinEdges(1,binLimC);\r
   fFractionContamination->Sumw2();\r
+  //  \r
+  fContaminationv2 = new TProfile2D("Contaminationv2","",nBinsC,binLimC,nBinsPt,binLimPt);\r
+  fContaminationv2->Sumw2();\r
 \r
   AliDebug(2,"AliAnalysisTaskHFEFlow: fraction of contamination");\r
 \r
@@ -975,6 +984,7 @@ void AliAnalysisTaskHFEFlow::UserCreateOutputObjects()
     fDeltaPhiMapsContamination->SetBinEdges(3,binLimTPCdEdx);\r
     fDeltaPhiMapsContamination->Sumw2();  \r
     AliDebug(2,"AliAnalysisTaskHFEFlow: deltaphimapscontamination");\r
+\r
   }\r
   //\r
   // fMonitorWithoutPID\r
@@ -1123,6 +1133,7 @@ void AliAnalysisTaskHFEFlow::UserCreateOutputObjects()
   fListHist->Add(fCosPhiMaps);\r
   fListHist->Add(fDeltaPhiMaps);\r
   fListHist->Add(fPIDqa->MakeList("HFEpidQA"));\r
+  fListHist->Add(fContaminationv2);\r
   AliDebug(2,"AliAnalysisTaskHFEFlow: add default");\r
 \r
   if(fMonitorEventPlane) {\r
@@ -1146,7 +1157,9 @@ void AliAnalysisTaskHFEFlow::UserCreateOutputObjects()
 \r
   AliDebug(2,"AliAnalysisTaskHFEFlow: add monitortrackcuts");\r
 \r
-  if(fMonitorContamination) fListHist->Add(fDeltaPhiMapsContamination);\r
+  if(fMonitorContamination) {\r
+    fListHist->Add(fDeltaPhiMapsContamination);\r
+  }\r
   \r
   AliDebug(2,"AliAnalysisTaskHFEFlow: add deltaphimapscontamination");\r
 \r
@@ -1960,6 +1973,10 @@ void AliAnalysisTaskHFEFlow::UserExec(Option_t */*option*/)
          if(weight<0.0) weight=0.0;\r
          if(weight>1.0) weight=1.0;\r
          fFractionContamination->Fill(&valuefractioncont[0],weight);\r
+         if(fv2contamination[((Int_t)valuefractioncont[1])]){\r
+           Double_t v2 =  fv2contamination[((Int_t)valuefractioncont[1])]->Eval(track->Pt());\r
+           fContaminationv2->Fill(valuefractioncont[1],valuefractioncont[0],v2,weight);\r
+         }\r
        }     \r
       }\r
       if(fMonitorEventPlane) {\r
index 40f56f5..0aaa6fc 100644 (file)
@@ -94,6 +94,7 @@ public:
 \r
 \r
   void SetContamination(TF1 * const function,Int_t k) { fContamination[k] = function; };\r
+  void SetV2Contamination(TF1 * const function,Int_t k) { fv2contamination[k] = function; };\r
   void SetHFECuts(AliHFEcuts * const cuts) { fHFECuts = cuts; };\r
   void SetHFEBackgroundCuts(AliESDtrackCuts * const cuts) { fHFEBackgroundCuts = cuts; };\r
   void SetSubEtaGapTPC(Bool_t  subEtaGapTPC) { fSubEtaGapTPC = subEtaGapTPC; };\r
@@ -204,6 +205,7 @@ private:
 \r
   // Hadron Contamination\r
   TF1 *fContamination[11];        // Parametrization of the contamination (0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100)\r
+  TF1 *fv2contamination[11];      // Parametrization of the v2 of charged pions (0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100)\r
 \r
   // Cuts for background study\r
   AliESDtrackCuts *fHFEBackgroundCuts;    // HFE background cuts\r
@@ -229,7 +231,8 @@ private:
   THnSparseF *fEventPlaneaftersubtraction; //! Event plane\r
 \r
   // Contamination\r
-  THnSparseF *fFractionContamination;//! Fraction of contamination as function of pt\r
+  THnSparseF *fFractionContamination;    //! Fraction of contamination as function of pt\r
+  TProfile2D *fContaminationv2;          //! v2 of contamination\r
 \r
   // Monitoring Event plane: cos2phi, sin2phi, centrality\r
   THnSparseF *fCosSin2phiep;        //! Cos(2phi), Sin(2phi)\r
index 1534c19..e8a3953 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t tpcClspid=60, Double_t tpcsharedfraction=10, 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=3, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE){
+AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t tpcClspid=60, Double_t tpcsharedfraction=10, 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, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE){
 
   //
   // Define TPC cut for 2011 data
@@ -62,7 +62,10 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
   }
 
   // Name
-  TString appendixx("tpctofv2");
+  TString appendixx(TString::Format("TPC%dr%dp%ds%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%d",tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel));
+  //printf("appendixx %s\n", appendixx.Data());
+
+  //TString appendixx("tpctofv2");
   
 
   //set config file name
@@ -97,7 +100,7 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
   containerName += appendixx.Data();
 
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-  mgr->ConnectOutput(task,1, mgr->CreateContainer("testtpctofv2", TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
+  mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("list_%s",appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
   mgr->ConnectInput(task,0, cinput );    
 
   return NULL;
index b6de3ae..e74a2d7 100644 (file)
@@ -1,3 +1,59 @@
+TF1* Getv2Contamination_30_40(){
+  
+  TString v2Map="$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_3040.root";
+  TString trainRoot=gSystem->Getenv("TRAIN_ROOT");
+
+  if (gSystem->AccessPathName(gSystem->ExpandPathName(v2Map.Data()))){
+    //Error("ConfigPbPb2010_Cent","v2 map not found: %s",v2Map.Data());
+    return 0;
+  }
+
+  TFile f(v2Map.Data());
+  if (!f.IsOpen()) return 0;
+  gROOT->cd();
+  TF1 *fg = (TF1 *) f.Get("flogisticTadd");
+  return fg;
+
+}
+
+TF1* Getv2Contamination_40_50(){
+  
+  TString v2Map="$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_4050.root";
+  TString trainRoot=gSystem->Getenv("TRAIN_ROOT");
+
+  if (gSystem->AccessPathName(gSystem->ExpandPathName(v2Map.Data()))){
+    //Error("ConfigPbPb2010_Cent","v2 map not found: %s",v2Map.Data());
+    return 0;
+  }
+
+  TFile f(v2Map.Data());
+  if (!f.IsOpen()) return 0;
+  gROOT->cd();
+  TF1 *fg = (TF1 *) f.Get("flogisticTadd");
+  return fg;
+
+}
+
+
+TF1* Getv2Contamination_20_30(){
+  
+  TString v2Map="$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_2030.root";
+  TString trainRoot=gSystem->Getenv("TRAIN_ROOT");
+
+  if (gSystem->AccessPathName(gSystem->ExpandPathName(v2Map.Data()))){
+    //Error("ConfigPbPb2010_Cent","v2 map not found: %s",v2Map.Data());
+    return 0;
+  }
+
+  TFile f(v2Map.Data());
+  if (!f.IsOpen()) return 0;
+  gROOT->cd();
+  TF1 *fg = (TF1 *) f.Get("flogisticTadd");
+  return fg;
+
+}
+
+
 AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, Int_t tpcCls, Double_t tpcClsr,Int_t tpcClspid, Double_t tpcsharedfraction, 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, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE)
 {
   //
@@ -161,12 +217,20 @@ AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, In
   hBackground->SetParameter(2, -0.076635);
   hBackground->SetParameter(3, 0.00947502);
   task->SetContamination(hBackground,3);
+  TF1 *fv2_20_30 = Getv2Contamination_20_30();  
+  if(fv2_20_30) task->SetV2Contamination(fv2_20_30,3);
   // 30-40%
   hBackground->SetParameter(0, -0.072222);
   hBackground->SetParameter(1, 0.132098);
   hBackground->SetParameter(2, -0.0561759);
   hBackground->SetParameter(3, 0.00789356);
   task->SetContamination(hBackground,4);
+  TF1 *fv2_30_40 = Getv2Contamination_30_40();  
+  if(fv2_30_40) task->SetV2Contamination(fv2_30_40,4);
+  // 40-50%
+  TF1 *fv2_40_50 = Getv2Contamination_40_50();  
+  if(fv2_40_50) task->SetV2Contamination(fv2_40_50,5);
+
 
   // Define PID TOF Only
   AliHFEpid *pidTOFOnly = task->GetPIDTOFOnly();
diff --git a/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_2030.root b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_2030.root
new file mode 100644 (file)
index 0000000..3af64c0
Binary files /dev/null and b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_2030.root differ
diff --git a/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_3040.root b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_3040.root
new file mode 100644 (file)
index 0000000..60663cb
Binary files /dev/null and b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_3040.root differ
diff --git a/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_4050.root b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_4050.root
new file mode 100644 (file)
index 0000000..f6cfdf6
Binary files /dev/null and b/PWGHF/hfe/macros/configs/PbPb/raw_TF1_pi_v2_4050.root differ