]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2012 12:10:07 +0000 (12:10 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2012 12:10:07 +0000 (12:10 +0000)
PWGHF/hfe/macros/AddTaskHFEtpctofPbPb.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C

index 5e876fbf52b82a68e6fdbfbed287ca0285fe80bf..a23ee163320dde0b377c17271bcb4b494f91df3b 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=-1, Int_t tpcCls=120,  Int_t tpcClsPID = 80, Double_t tpcClsRatio = 0.6, Double_t tpcClShared = 1.1, Int_t itsCls=4,Double_t itsChi2PerClusters=36.,Int_t itspixelcut=AliHFEextraCuts::kBoth, Double_t dcaxy=1.0, Double_t dcaz=2.0, Bool_t usetof=kFALSE, Double_t tofs=3.,Bool_t etacor=kFALSE,TString listname="",Double_t tpceff=0.5, Float_t prodlow=0., Float_t prodhigh=100.,Bool_t kMCQA = kFALSE){
+AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=16,Int_t clusterdef=AliHFEextraCuts::kFoundAll, Int_t clusterrdef=AliHFEextraCuts::kFoundAllOverFindable,Int_t tpcCls=130,  Int_t tpcClsPID = 80, Double_t tpcClsRatio = 0.6, Double_t tpcClShared = 1.1, Bool_t rejectkinkmother = kFALSE, Int_t itsCls=4,Double_t itsChi2PerClusters=-1,Int_t itspixelcut=AliHFEextraCuts::kBoth, Double_t dcaxy=1.0, Double_t dcaz=2.0, Bool_t usetof=kTRUE, Double_t tofs=3.,Bool_t etacor=kFALSE,TString listname="",Double_t tpceff=0.5, Float_t prodlow=0., Float_t prodhigh=3.,Bool_t kNoPhotonic = kTRUE){
 
   // libraries in case
   gSystem->Load("libANALYSIS.so");
@@ -6,8 +6,8 @@ AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=
 
 
   //set config file name
-  //TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
-  TString configFile("/d/alice12/bailhache/AliRootInstallations/07_10_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
+  TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
+  //TString configFile("/d/alice12/bailhache/AliRootInstallations/07_10_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
   TString checkconfig="ConfigHFEpbpb";
   if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
     gROOT->LoadMacro(configFile.Data());
@@ -23,14 +23,16 @@ AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=
   Int_t iprodlow = (Int_t) (prodlow*10);
   Int_t iprodhigh = (Int_t) (prodhigh*10);
   Int_t itof = 0;
-  Int_t iMCQA = 0;
+  Int_t iNoPhotonic = 0;
   Int_t ietacor = 0;
   Int_t itpceff = (Int_t) (tpceff*10);
+  Int_t irejectkinkmother = 0;
   if(usetof) itof=kTRUE;
-  if(kMCQA) iMCQA = 1;
+  if(kNoPhotonic) iNoPhotonic = 1;
   if(etacor) ietacor = 1;
+  if(rejectkinkmother) irejectkinkmother = 1;
   
-  TString appendix(TString::Format("f%dt%dtp%dtr%dts%di%dic%di%ddcaxy%dz%dtof%dts%de%dtpc%dprodlow%dhigh%dmc%d",aodfilter,tpcCls,tpcClsPID,itpcClsRatio,itpcClShared,itsCls,iitsChi2PerClusters,itspixelcut,idcaxy,idcaz,itof,itofs,ietacor,itpceff,iprodlow,iprodhigh,iMCQA));
+  TString appendix(TString::Format("f%dcd%dcr%dt%dtp%dtr%dts%dkm%di%dic%di%ddcaxy%dz%dtof%dts%de%dtpc%dprodlow%dhigh%dnhfe%d",aodfilter,clusterdef,clusterrdef,tpcCls,tpcClsPID,itpcClsRatio,itpcClShared,irejectkinkmother,itsCls,iitsChi2PerClusters,itspixelcut,idcaxy,idcaz,itof,itofs,ietacor,itpceff,iprodlow,iprodhigh,iNoPhotonic));
   printf("appendix %s\n", appendix.Data());
   
 
@@ -45,7 +47,7 @@ AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=
   if (inputDataType == "AOD") isaod = kTRUE;
 
   
-  // TPC cut
+  // TPC cut 2010
   // 0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100,one more per history
   // http://www.physi.uni-heidelberg.de/~pachmay/projects/hfe/pid/tpc/
   // without eta correction 50%
@@ -57,7 +59,7 @@ AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=
 
   // Task
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-  AliAnalysisTaskHFE *task = ConfigHFEpbpb(isaod,isMC,appendix,aodfilter,tpcCls,tpcClsPID,tpcClsRatio,tpcClShared,itsCls,itsChi2PerClusters,itspixelcut,dcaxy,dcaz,usetof,tofs,etacor,listname,tpcdEdxcutlow,tpcdEdxcuthigh,prodlow,prodhigh,kMCQA);  
+  AliAnalysisTaskHFE *task = ConfigHFEpbpb(isaod,isMC,appendix,aodfilter,clusterdef,clusterrdef,tpcCls,tpcClsPID,tpcClsRatio,tpcClShared,irejectkinkmother,itsCls,itsChi2PerClusters,itspixelcut,dcaxy,dcaz,usetof,tofs,etacor,listname,tpcdEdxcutlow,tpcdEdxcuthigh,prodlow,prodhigh,kNoPhotonic);  
 
   mgr->AddTask(task);
 
index f436c55f3712ffaa2f07aa516f7bc02ed5fcc747..9b8592cada18dd0fff7fb728e1891569bbb74325 100644 (file)
@@ -28,8 +28,10 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
                                  Bool_t useMC,
                                  TString appendix,
                                  Int_t aodfilter=-1,
+                                 Int_t clusterdef=AliHFEextraCuts::kFound, Int_t clusterrdef=AliHFEextraCuts::kFoundOverFindable, 
                                  UChar_t TPCcl=70, UChar_t TPCclPID = 80, 
                                  Double_t TPCclRatio = 0.6, Double_t TPCclshared = 1.1,
+                                 Bool_t rejectkinkmother = kFALSE,
                                  UChar_t ITScl=3,  Double_t ITSchi2perclusters=99999999.,
                                  Int_t itspixelcut=AliHFEextraCuts::kBoth,
                                   Double_t dcaxy=1.0, Double_t dcaz=2.0,
@@ -38,7 +40,7 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
                                  Bool_t etacor=kFALSE,TString listname="",
                                  Double_t* tpcdEdxcutlow=NULL,Double_t* tpcdEdxcuthigh=NULL,
                                  Float_t prodlow=0., Float_t prodhigh=100., 
-                                 Bool_t kMCQA = kFALSE,
+                                 Bool_t kNoPhotonic = kFALSE,
                                  Int_t nondefaultcentr=0, Float_t* arraycentr=NULL,
                                  Int_t ptbin=0){
   //
@@ -56,7 +58,7 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
   hfecuts->SetMinNClustersTPC(TPCcl);
   hfecuts->SetMinNClustersTPCPID(TPCclPID);
   hfecuts->SetMinRatioTPCclusters(TPCclRatio);
-  hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
+  hfecuts->SetTPCmodes(clusterdef, clusterrdef);
   hfecuts->SetFractionOfSharedTPCClusters(TPCclshared);
 
   hfecuts->SetMinNClustersITS(ITScl);
@@ -79,10 +81,32 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
   //hfecuts->SetTPCPIDCleanUpStep(kTRUE);
   hfecuts->SetQAOn();
 
+  // Background Subtraction
+  AliHFENonPhotonicElectron *backe = new AliHFENonPhotonicElectron(appendix,"Background subtraction");
+  AliESDtrackCuts *hfeBackgroundCuts = new AliESDtrackCuts();
+  hfeBackgroundCuts->SetName("backgroundcuts");
+  //hfeBackgroundCuts->SetAcceptKinkDaughters(kFALSE);
+  hfeBackgroundCuts->SetRequireTPCRefit(kTRUE);
+  hfeBackgroundCuts->SetRequireITSRefit(kTRUE);
+  hfeBackgroundCuts->SetMinNClustersITS(2);
+  hfeBackgroundCuts->SetEtaRange(-0.8,0.8);
+  hfeBackgroundCuts->SetRequireSigmaToVertex(kTRUE);
+  hfeBackgroundCuts->SetMaxChi2PerClusterTPC(3.5);
+  hfeBackgroundCuts->SetMinNClustersTPC(100);
+  hfeBackgroundCuts->SetPtRange(0.3,1e10);
+  AliHFEpid *pidbackground = backe->GetPIDBackground();
+  if(useMC) pidbackground->SetHasMCData(kTRUE);
+  pidbackground->AddDetector("TPC", 1);
+  pidbackground->ConfigureTPCasymmetric(0.0,9999.,-3.,3.);
+  backe->SetHFEBackgroundCuts(hfeBackgroundCuts);
+
+  // task
   AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(appendix);
   task->SetHFECuts(hfecuts);
+  task->SetHFEBackgroundSubtraction(backe);
   task->SetPbPbAnalysis(kTRUE);
   task->SetRemovePileUp(kFALSE);
+  task->SetRejectKinkMother(rejectkinkmother);
   task->GetPIDQAManager()->SetHighResolutionHistos();
   if(useMC) task->SetHasMCData(kTRUE); // necessary for AOD
   printf("AOD filter %d On/OFF?\n",aodfilter);
@@ -91,6 +115,9 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
     task->SetUseFilterAOD(kTRUE);
     task->SetFilter(aodfilter);
   }
+  else {
+    task->SetUseFilterAOD(kFALSE);
+  }
  
   
   if((nondefaultcentr!=0) && arraycentr) {
@@ -191,7 +218,7 @@ AliAnalysisTaskHFE* ConfigHFEpbpb(Bool_t isaod,
   // QA
   task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
   //task->SetFillSignalOnly(kFALSE);    // for DE pluging for MC
-  if(kMCQA) task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
+  if(kNoPhotonic) task->SwitchOnPlugin(AliAnalysisTaskHFE::kNonPhotonicElectron);
   //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround);
   //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx);
   //task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);