]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
lego train PbPb
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Nov 2013 12:26:21 +0000 (12:26 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Nov 2013 12:26:21 +0000 (12:26 +0000)
PWGHF/hfe/macros/AddTaskHFEnpePbPb.C [new file with mode: 0755]
PWGHF/hfe/macros/configs/ConfigHFEnpePbPb.C [new file with mode: 0755]
PWGHF/hfe/macros/configs/EtaCorrMapsTPC.root [new file with mode: 0755]
PWGHF/hfe/macros/configs/hadronContamination_PbPbTPC.root [new file with mode: 0755]

diff --git a/PWGHF/hfe/macros/AddTaskHFEnpePbPb.C b/PWGHF/hfe/macros/AddTaskHFEnpePbPb.C
new file mode 100755 (executable)
index 0000000..a7dfbe4
--- /dev/null
@@ -0,0 +1,142 @@
+AliAnalysisTask *AddTaskHFEnpePbPb(Bool_t MCthere, \r
+                                   Bool_t isAOD,\r
+                                   Bool_t kNPERef = kTRUE,\r
+                                   Bool_t kNPEkAny = kTRUE)\r
+{\r
+  // Default settings (TOF-TPC PbPb)\r
+  const int    kDefTPCcl       = 130;\r
+  const int    kDefTPCclPID    =  80;\r
+  const int kDefTPCclshared = 1.1;\r
+  const int    kDefITScl       =   4;\r
+  const int kDefITSchi2percluster = -1; // cleanup removes badly matching tracks - effects high pt  (cut value = 36)\r
+  const double kDefDCAr        =   1.;\r
+  const double kDefDCAz        =   2.;\r
+  const double kDefTOFs        =   3.;\r
+  const double  kDefEtaIncMin = -0.8;\r
+  const double  kDefEtaIncMax = 0.8;\r
+  const Bool_t   etacorrection   = kFALSE;\r
+  const Bool_t   multicorrection = kTRUE;\r
+\r
+  Double_t dEdxhm[12] = {3.11,3.11,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};  \r
+  Double_t tpcl1[12]  = {-0.14,-0.14,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3};  \r
+\r
+  // Default setting for the associated electron for the NonPhotonic Analysis\r
+  const double kassETAm = -0.8;\r
+  const double kassETAp = 0.8;\r
+  const int    kassITS         =   2;\r
+  const int    kassTPCcl       = 60;\r
+  const int    kassTPCPIDcl    =  60;\r
+  const double kassDCAr        =   1.0;\r
+  const double kassDCAz        =   2.0;\r
+  const double kassTPCSminus   =  -3.0;\r
+  const double kassTPCSplus    =   3.0;\r
+\r
+  //get the current analysis manager\r
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+  if (!mgr) {\r
+    Error("AddTask_hfe_HFE", "No analysis manager found.");\r
+    return 0;\r
+  }\r
+\r
+  AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();\r
+\r
+  //@@ 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
+\r
+  Double_t dEdxaclm[12], dEdxachm[12];\r
+  for(int icent = 0; icent < 12; icent++){\r
+    dEdxaclm[icent] = kassTPCSminus;\r
+    dEdxachm[icent] = kassTPCSplus;\r
+  }\r
+\r
+  if(kNPERef){\r
+    // **************************************************************\r
+    // \r
+    // Reference task\r
+    //\r
+    // **************************************************************\r
+    RegisterTaskNPEPbPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kDefITSchi2percluster, kDefTPCclshared, etacorrection, multicorrection, kDefEtaIncMin, kDefEtaIncMax,\r
+                    kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE);\r
+  }\r
+\r
+  if(kNPEkAny){\r
+    // **************************************************************\r
+    // \r
+    // task for kAny instead of kBoth\r
+    //\r
+    // **************************************************************\r
+    RegisterTaskNPEPbPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kDefITSchi2percluster, kDefTPCclshared, etacorrection, multicorrection, kDefEtaIncMin, kDefEtaIncMax,\r
+                    kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE);\r
+  }\r
+\r
+  return NULL;\r
+}\r
+\r
+//===============================================================================\r
+AliAnalysisTask *RegisterTaskNPEPbPb(Bool_t useMC, Bool_t isAOD, \r
+               Int_t tpcCls=120, Int_t tpcClsPID=80, \r
+               Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, \r
+               Double_t *tpcdEdxcutlow=NULL, Double_t *tpcdEdxcuthigh=NULL, \r
+               Double_t tofs=3., Int_t itshitpixel =AliHFEextraCuts::kBoth,\r
+               Double_t itschi2percluster = -1, Double_t tpcsharedcluster = 1.1,\r
+               Bool_t etacorr=kFALSE, Bool_t multicorr = kFALSE,\r
+               Double_t etaIncMin = -0.8, Double_t etaIncMax = 0.8,\r
+               Double_t assETAm=-0.8, Double_t assETAp=0.8, Int_t assITS=2, Int_t assTPCcl=100,\r
+               Int_t assTPCPIDcl=80, Double_t assDCAr=1.0, Double_t assDCAz=2.0,\r
+               Double_t *assTPCSminus = NULL, Double_t *assTPCSplus=NULL,\r
+               Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE)\r
+{\r
+\r
+  //\r
+  // Cuts on the inclusive leg\r
+  //\r
+  Int_t idcaxy = (Int_t)(dcaxy*10.);\r
+  Int_t idcaz = (Int_t)(dcaz*10.);\r
+  Int_t tpclow = 0;\r
+  if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);\r
+  Int_t itofs = (Int_t)(tofs*10.);\r
+  Int_t ipixelany = itshitpixel;\r
+  Int_t imult = multicorr ? 1 : 0;\r
+\r
+  //\r
+  // Cuts on the associated leg\r
+  //\r
+  Int_t iassDCAr = (Int_t)(assDCAr*10);\r
+  Int_t iassDCAz = (Int_t)(assDCAz*10);\r
+  Int_t iassTPCSplus  = assTPCSplus ? (Int_t)(assTPCSplus[0]*1000) : 0;\r
+  Int_t icat1 = useCat1Tracks ? 1 : 0;\r
+  Int_t icat2 = useCat2Tracks ? 1 : 0;\r
+\r
+  TString appendix(TString::Format("SPD%d_incTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%d_photTPCc%dTPCp%dITS%dDCAr%dDCAz%dTPCs%d",ipixelany,tpcCls,tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,imult,assTPCcl,assTPCPIDcl,assITS,iassDCAr,iassDCAz,iassTPCSplus));\r
+\r
+  printf("Add macro appendix %s\n", appendix.Data());\r
+\r
+  if(!gROOT->GetListOfGlobalFunctions()->FindObject("ConfigHFEnpePbPb"))gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEnpePbPb.C");\r
+\r
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+  AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();\r
+  AliAnalysisTaskHFE *task = ConfigHFEnpePbPb(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, tpcdEdxcutlow, tpcdEdxcuthigh, tofs, 0, itshitpixel, itschi2percluster, tpcsharedcluster, etacorr, multicorr, etaIncMin, etaIncMax,\r
+                                            assETAm, assETAp, assITS, assTPCcl, assTPCPIDcl, assDCAr, assDCAz, assTPCSminus, assTPCSplus, useCat1Tracks, useCat2Tracks);\r
+  if(isAOD)\r
+    task->SetAODAnalysis();\r
+  else\r
+    task->SetESDAnalysis();\r
+\r
+  if (useMC)   task->SetHasMCData(kTRUE);\r
+  else         task->SetHasMCData(kFALSE);\r
+\r
+  task->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);\r
+\r
+  TString containerName = mgr->GetCommonFileName();\r
+  containerName += ":HFE";\r
+  containerName += appendix.Data();\r
+  printf("container name: %s\n", containerName.Data());\r
+\r
+  //create data containers\r
+  task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, containerName.Data()));\r
+  task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, containerName.Data()));\r
+  mgr->ConnectInput(task,  0, cinput );\r
+\r
+  mgr->AddTask(task);\r
+\r
+  return NULL;\r
+}\r
diff --git a/PWGHF/hfe/macros/configs/ConfigHFEnpePbPb.C b/PWGHF/hfe/macros/configs/ConfigHFEnpePbPb.C
new file mode 100755 (executable)
index 0000000..7f636c6
--- /dev/null
@@ -0,0 +1,322 @@
+TF1* GetEtaCorrection(){\r
+  TString list=gSystem->Getenv("LIST");\r
+\r
+  TString etaMap="$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/EtaCorrMapsTPC.root";\r
+  if (gSystem->AccessPathName(gSystem->ExpandPathName(etaMap.Data()))){\r
+    Error("ConfigPbPb2010_Cent","Eta map not found: %s",etaMap.Data());\r
+    return 0;\r
+  }\r
+\r
+  TFile f(etaMap.Data());\r
+  if (!f.IsOpen()) return 0;\r
+  gROOT->cd();\r
+  TList *keys=f.GetListOfKeys();\r
+\r
+  for (Int_t i=0; i<keys->GetEntries(); ++i){\r
+    TString kName=keys->At(i)->GetName();\r
+    TPRegexp reg(kName);\r
+    if (reg.MatchB(list)){\r
+      printf("Using Eta Correction Function: %s\n",kName.Data());\r
+      return (TF1*)f.Get(kName.Data());\r
+    }\r
+  }\r
+  return 0;\r
+}\r
+\r
+Bool_t ReadContaminationFunctions(TString filename, TF1 **functions, double sigma){\r
+  TFile *in = TFile::Open(Form("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/%s", filename.Data()));\r
+  gROOT->cd();\r
+  int isig = static_cast<int>(sigma * 100.);\r
+  printf("Getting hadron background for the sigma cut: %d\n", isig);\r
+  bool status = kTRUE;\r
+  for(int icent = 0; icent < 12; icent++){\r
+    functions[icent] = dynamic_cast<TF1 *>(in->Get(Form("hback_%d_%d", isig, icent)));\r
+    if(functions[icent]) printf("Config for centrality class %d found\n", icent);\r
+    else{\r
+      printf("Config for the centrality class %d not found\n", icent);\r
+      status = kFALSE;\r
+    }\r
+  }\r
+  delete in;\r
+  return status;\r
+}\r
+\r
+AliAnalysisTaskHFE* ConfigHFEnpePbPb(Bool_t useMC, Bool_t isAOD, TString appendix,\r
+                UChar_t TPCcl=70, UChar_t TPCclPID = 80, \r
+                UChar_t ITScl=3, Double_t DCAxy=1000., Double_t DCAz=1000., \r
+                Double_t* tpcdEdxcutlow=NULL, Double_t* tpcdEdxcuthigh=NULL, \r
+                Double_t TOFs=3., Int_t TOFmis=0, \r
+                Int_t itshitpixel = 0, Double_t itsChi2PerClusters, Double_t tpcClShared,\r
+                Bool_t etacor = kFALSE, Bool_t multicor = kFALSE, \r
+                       Double_t etami=-0.8, Double_t etama=0.8,\r
+                Double_t assETAm=-0.8, Double_t assETAp=0.8,\r
+                Int_t assITS=2, \r
+                Int_t assTPCcl=100, Int_t assTPCPIDcl=80, \r
+                Double_t assDCAr=1.0, Double_t assDCAz=2.0, \r
+                Double_t *assTPCSminus=NULL, Double_t *assTPCSplus=NULL, \r
+                Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE)\r
+{\r
+  Bool_t kAnalyseTaggedTracks = kFALSE;\r
+  Bool_t kApplyPreselection = kFALSE;\r
+\r
+  //***************************************//\r
+  //        Setting up the HFE cuts        //\r
+  //***************************************//\r
+\r
+  AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts for PbPb");\r
+  //hfecuts->SetQAOn();\r
+  hfecuts->CreateStandardCuts();\r
+  hfecuts->SetMinNClustersTPC(TPCcl);\r
+  hfecuts->SetMinNClustersTPCPID(TPCclPID);\r
+  hfecuts->SetMinNClustersITS(ITScl);\r
+  hfecuts->SetMinRatioTPCclusters(0.6);\r
+  hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);\r
+  hfecuts->SetCutITSpixel(itshitpixel);\r
+  hfecuts->SetCheckITSLayerStatus(kFALSE);\r
+  hfecuts->SetMaxChi2perClusterITS(itsChi2PerClusters);\r
+  hfecuts->SetEtaRange(etami,etama);\r
+  hfecuts->SetFractionOfSharedTPCClusters(tpcClShared);\r
+  if(isAOD) hfecuts->SetAODFilterBit(4);\r
+  \r
+  //if((iPixelAny==AliHFEextraCuts::kAny) || (iPixelAny==AliHFEextraCuts::kSecond))     \r
+  //hfecuts->SetProductionVertex(0,7,0,7);\r
\r
+  hfecuts->SetMaxImpactParam(DCAxy,DCAz);\r
+  hfecuts->SetUseMixedVertex(kTRUE);\r
+  hfecuts->SetVertexRange(10.);\r
+\r
+  // TOF settings:\r
+  Int_t usetof=0;\r
+  Bool_t kTOFmis=kFALSE;\r
+  if (TOFs>0.){\r
+    usetof = 1;\r
+    printf("CONFIGURATION FILE: TOF is used \n");\r
+    hfecuts->SetTOFPIDStep(kTRUE);\r
+    printf("CONFIGURATION FILE: TOF PID step is requested !!!! \n");\r
+    if (TOFmis>0){\r
+      kTOFmis = kTRUE;\r
+      printf("CONFIGURATION FILE: TOF mismatch rejection is set ON \n");\r
+    }\r
+  }\r
+\r
+  //***************************************//\r
+  //        Setting up the task            //\r
+  //***************************************//\r
+\r
+  AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEtask%s",appendix.Data()));\r
+  printf("task %p\n", task);\r
+  task->SetPbPbAnalysis();\r
+  task->SetRemovePileUp(kFALSE);\r
+  task->SetHFECuts(hfecuts);\r
+  task->GetPIDQAManager()->SetHighResolutionHistos();\r
+\r
+  // Determine the centrality estimator\r
+  task->SetCentralityEstimator("V0M");\r
+\r
+  //***************************************//\r
+  //        Prepare preselection           //\r
+  // This mimics the ESD->AOD filter in    //\r
+  // case of the ESD analysis and selects  //\r
+  // only tracks which will be selected in //\r
+  // the AOD analysis with the given filter//\r
+  // bit. Not to be applied for AODS.      //\r
+  // For pPb the cuts used are (bit 4)     //\r
+  // esdTrackCutsHG0 from file $ALICE_ROOT///\r
+  // ANALYSIS/macros/AddTaskESDFilter.C    //\r
+  //***************************************//\r
+  if(kApplyPreselection){\r
+       AliESDtrackCuts* esdTrackCutsH = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kFALSE);\r
+       esdTrackCutsH->SetMaxDCAToVertexXY(2.4);\r
+       esdTrackCutsH->SetMaxDCAToVertexZ(3.2);\r
+       esdTrackCutsH->SetDCAToVertex2D(kTRUE); \r
+       esdTrackCutsH->SetMaxChi2PerClusterITS(1e10);\r
+       task->SetHFECutsPreselect(esdTrackCutsH);\r
+       printf("Put a preselection cut\n");\r
+       task->SetFillNoCuts(kTRUE);\r
+  }\r
+\r
+  //***************************************//\r
+  //          Variable manager             //\r
+  //***************************************//\r
+  // Define Variables\r
+  Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};\r
+  Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};\r
+\r
+  Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1;\r
+  Int_t sizeeta=(sizeof(etabinning)/sizeof(double))-1;\r
+\r
+  AliHFEvarManager *vm = task->GetVarManager();\r
+  vm->AddVariable("pt", sizept, ptbinning);\r
+  vm->AddVariable("eta", sizeeta, -0.8,0.8);\r
+  vm->AddVariable("phi",21, -0, 2*TMath::Pi());\r
+  vm->AddVariable("charge");\r
+  vm->AddVariable("source");\r
+  vm->AddVariable("centrality");\r
+\r
+  // For the moment, remove the part dedicated to the background subtraction.\r
+  // It will be implemented in a different way, reading it from a root file.\r
+\r
+  //***************************************//\r
+  //          Configure the PID            //\r
+  //***************************************//\r
+\r
+  // Define PID\r
+  AliHFEpid *pid = task->GetPID();\r
+  if(useMC) pid->SetHasMCData(kTRUE);\r
+\r
+  if (usetof){\r
+    pid->AddDetector("TOF", 0);\r
+    pid->AddDetector("TPC", 1);\r
+  } else {\r
+    pid->AddDetector("TPC", 0);\r
+  }\r
+  \r
+  // Configure TPC PID\r
+  // do the identical thing in data and MC\r
+  Double_t paramsTPCdEdxcutlow[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};\r
+  if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));\r
+\r
+  Double_t paramsTPCdEdxcuthigh[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
+  if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));\r
+\r
+  char *cutmodel;\r
+  cutmodel="pol0";\r
+\r
+  for(Int_t a=0;a<11;a++){\r
+    // Not necessary anymore, since the PbPb case is handled similarly to the pp case\r
+    //   cout << a << " " << paramsTPCdEdxcut[a] << endl;\r
+    Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};\r
+    Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];\r
+    pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);\r
+  }\r
+\r
+  if(!useMC){\r
+    AliHFEpidTPC *tpcpid = pid->GetDetPID(AliHFEpid::kTOFpid);\r
+    if(etacor){ \r
+         // Apply eta correction\r
+         TF1 *etacorrection = GetEtaCorrection();\r
+         if(etacorrection) tpcpid->SetEtaCorrection(etacorrection);\r
+    }\r
+    if(multicor){\r
+         TF1 *centralityCorrection = new TF1("centralityCorrection", "pol1", 0., 10000.);\r
+         centralityCorrection->SetParameter(0, 1.0);\r
+         centralityCorrection->SetParameter(1, -0.00002);\r
+         tpcpid->SetCentralityCorrection(centralityCorrection);\r
+    }\r
+  }\r
+\r
+  // Configure TOF PID\r
+  if (usetof){\r
+    pid->ConfigureTOF(TOFs);\r
+    AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);\r
+    if (kTOFmis){\r
+      tofpid->SetRejectTOFmismatch();\r
+    }\r
+  }\r
+\r
+  // To make different upper TOF cut to see contamination effect\r
+  // The below two lines should be removed after this check\r
+  //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);\r
+  //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut\r
+\r
+  // Load hadron background\r
+  if(!useMC){\r
+    Bool_t status = kTRUE;\r
+    TF1 *hBackground[12];\r
+    status = ReadContaminationFunctions("hadronContamination_PbPbTPC.root", hBackground, tpcdEdxcutlow[0]);\r
+    for(Int_t a=0;a<12;a++) {\r
+      //printf("back %f \n",hBackground[a]);\r
+      if(status) task->SetBackGroundFactorsFunction(hBackground[a],a);\r
+      else printf("not all background functions found\n");\r
+    }\r
+  }\r
+\r
+  //***************************************//\r
+  //       Configure NPE plugin            //\r
+  //***************************************//\r
+\r
+  AliHFENonPhotonicElectron *backe = new AliHFENonPhotonicElectron(Form("HFEBackGroundSubtractionPID2%s",appendix.Data()),"Background subtraction");  //appendix\r
+    //Setting the Cuts for the Associated electron-pool\r
+  AliHFEcuts *hfeBackgroundCuts = new AliHFEcuts(Form("HFEBackSub%s",appendix.Data()),"Background sub Cuts");\r
+  //  hfeBackgroundCuts->SetEtaRange(assETA);\r
+  hfeBackgroundCuts->SetEtaRange(assETAm,assETAp);\r
+  hfeBackgroundCuts->SetPtRange(0.1,1e10);\r
+\r
+  hfeBackgroundCuts->SetMaxChi2perClusterTPC(4);\r
+  hfeBackgroundCuts->SetMinNClustersITS(assITS);\r
+  hfeBackgroundCuts->SetMinNClustersTPC(assTPCcl);\r
+  hfeBackgroundCuts->SetMinNClustersTPCPID(assTPCPIDcl);\r
+  hfeBackgroundCuts->SetMaxImpactParam(assDCAr,assDCAz);\r
+  if(isAOD) hfeBackgroundCuts->SetAODFilterBit(4);\r
+  hfeBackgroundCuts->SetQAOn();                                // QA\r
+\r
+  AliHFEpid *pidbackground = backe->GetPIDBackground();\r
+  if(useMC) pidbackground->SetHasMCData(kTRUE);\r
+  pidbackground->AddDetector("TPC", 0);\r
+  Double_t paramsTPCdEdxcutlowAssoc[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
+  if(assTPCSminus) memcpy(paramsTPCdEdxcutlowAssoc,assTPCSminus,sizeof(paramsTPCdEdxcutlowAssoc));\r
+\r
+  Double_t paramsTPCdEdxcuthighAssoc[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
+  if(assTPCSplus) memcpy(paramsTPCdEdxcuthighAssoc,assTPCSplus,sizeof(paramsTPCdEdxcuthighAssoc));\r
+    \r
+  char *cutmodelAssoc;\r
+  cutmodelAssoc="pol0";\r
+  for(Int_t a=0;a<11;a++){\r
+    //   cout << a << " " << paramsTPCdEdxcut[a] << endl;\r
+    Double_t tpcparamlow[1]={paramsTPCdEdxcutlowAssoc[a]};\r
+    Float_t tpcparamhigh=paramsTPCdEdxcuthighAssoc[a];\r
+    pidbackground->ConfigureTPCcentralityCut(a,cutmodelAssoc,tpcparamlow,tpcparamhigh);\r
+  }\r
+  backe->GetPIDBackgroundQAManager()->SetHighResolutionHistos();\r
+  backe->SetHFEBackgroundCuts(hfeBackgroundCuts);\r
+\r
+  // Selection of associated tracks for the pool\r
+  if(useCat1Tracks) backe->SelectCategory1Tracks(kTRUE);\r
+  if(useCat2Tracks){\r
+    backe->SelectCategory2Tracks(kTRUE);\r
+    backe->SetITSMeanShift(-0.5);\r
+  }\r
+\r
+  // apply opening angle cut to reduce file size\r
+  backe->SetMaxInvMass(0.3);\r
+\r
+  task->SetHFEBackgroundSubtraction(backe);\r
+\r
+  //***************************************//\r
+  //          V0 tagged tracks             //\r
+  //***************************************//\r
+\r
+  if(kAnalyseTaggedTracks){\r
+    AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");\r
+    v0trackCuts->CreateStandardCuts();\r
+    v0trackCuts->SetMinNClustersTPC(TPCcl);\r
+    v0trackCuts->SetMinNClustersTPCPID(TPCclPID);\r
+    v0trackCuts->SetMinRatioTPCclusters(0.6);\r
+    v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);\r
+    v0trackCuts->SetMinNClustersITS(1);\r
+    v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kFirst);\r
+    v0trackCuts->SetCheckITSLayerStatus(kFALSE);\r
+    v0trackCuts->UnsetVertexRequirement();\r
+    //hfecuts->SetSigmaToVertex(10);\r
+    if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE);\r
+    v0trackCuts->SetQAOn();\r
+\r
+    task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);\r
+    task->SetTaggedTrackCuts(v0trackCuts);\r
+    task->SetCleanTaggedTrack(kTRUE);\r
+  }\r
+\r
+  // QA\r
+  printf("task %p\n", task);\r
+  task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);\r
+  task->SetQAOn(AliAnalysisTaskHFE::kMCqa);\r
+  task->SwitchOnPlugin(AliAnalysisTaskHFE::kNonPhotonicElectron);\r
+  task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);\r
+\r
+  printf("*************************************\n");\r
+  printf("Configuring standard Task:\n");\r
+  task->PrintStatus();\r
+  pid->PrintStatus();\r
+  printf("*************************************\n");\r
+  return task;\r
+}\r
diff --git a/PWGHF/hfe/macros/configs/EtaCorrMapsTPC.root b/PWGHF/hfe/macros/configs/EtaCorrMapsTPC.root
new file mode 100755 (executable)
index 0000000..1c81655
Binary files /dev/null and b/PWGHF/hfe/macros/configs/EtaCorrMapsTPC.root differ
diff --git a/PWGHF/hfe/macros/configs/hadronContamination_PbPbTPC.root b/PWGHF/hfe/macros/configs/hadronContamination_PbPbTPC.root
new file mode 100755 (executable)
index 0000000..b264f16
Binary files /dev/null and b/PWGHF/hfe/macros/configs/hadronContamination_PbPbTPC.root differ