]>
Commit | Line | Data |
---|---|---|
1fd65ac0 | 1 | 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){ |
eeb1e952 | 2 | |
3 | // libraries in case | |
4070f709 | 4 | gSystem->Load("libANALYSIS"); |
5 | gSystem->Load("libANALYSISalice"); | |
eeb1e952 | 6 | |
7 | ||
8 | //set config file name | |
1fd65ac0 | 9 | TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C"); |
10 | //TString configFile("/d/alice12/bailhache/AliRootInstallations/07_10_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C"); | |
eeb1e952 | 11 | TString checkconfig="ConfigHFEpbpb"; |
12 | if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data())) | |
13 | gROOT->LoadMacro(configFile.Data()); | |
14 | ||
a86a8fda | 15 | |
eace61b9 | 16 | // Name |
17 | Int_t itpcClsRatio = (Int_t) (tpcClsRatio*10); | |
18 | Int_t itpcClShared = (Int_t) (tpcClShared*10); | |
19 | Int_t iitsChi2PerClusters = (Int_t) (itsChi2PerClusters*10); | |
20 | Int_t idcaxy = (Int_t) (dcaxy*10); | |
21 | Int_t idcaz = (Int_t) (dcaz*10); | |
22 | Int_t itofs = (Int_t) (tofs*10); | |
23 | Int_t iprodlow = (Int_t) (prodlow*10); | |
24 | Int_t iprodhigh = (Int_t) (prodhigh*10); | |
25 | Int_t itof = 0; | |
1fd65ac0 | 26 | Int_t iNoPhotonic = 0; |
eace61b9 | 27 | Int_t ietacor = 0; |
28 | Int_t itpceff = (Int_t) (tpceff*10); | |
1fd65ac0 | 29 | Int_t irejectkinkmother = 0; |
eace61b9 | 30 | if(usetof) itof=kTRUE; |
1fd65ac0 | 31 | if(kNoPhotonic) iNoPhotonic = 1; |
eace61b9 | 32 | if(etacor) ietacor = 1; |
1fd65ac0 | 33 | if(rejectkinkmother) irejectkinkmother = 1; |
eace61b9 | 34 | |
1fd65ac0 | 35 | 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)); |
eeb1e952 | 36 | printf("appendix %s\n", appendix.Data()); |
37 | ||
eeb1e952 | 38 | |
eace61b9 | 39 | // ESD or AOD |
40 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
eeb1e952 | 41 | if (!mgr->GetInputEventHandler()) { |
a86a8fda | 42 | printf("AddTaskEventplane", "This task requires an input event handler"); |
eeb1e952 | 43 | return NULL; |
44 | } | |
45 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
eace61b9 | 46 | Bool_t isaod = kFALSE; |
47 | if (inputDataType == "AOD") isaod = kTRUE; | |
eeb1e952 | 48 | |
eace61b9 | 49 | |
1fd65ac0 | 50 | // TPC cut 2010 |
eace61b9 | 51 | // 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 |
52 | // http://www.physi.uni-heidelberg.de/~pachmay/projects/hfe/pid/tpc/ | |
53 | // without eta correction 50% | |
54 | Double_t tpcdEdxcutlow[12] = {0.03,0.15,0.24,0.3,0.39,0.48,0.5,0.51,0.5,0.5,0.5,0.5}; | |
55 | // with eta correction 50% | |
56 | // Double_t tpcdEdxcutlow[12] = {-0.01,0.076,0.197,0.26,0.298,0.3,0.3,0.3,0.3,0.3,0.3,0.3}; | |
57 | Double_t tpcdEdxcuthigh[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}; | |
eeb1e952 | 58 | |
eeb1e952 | 59 | |
eace61b9 | 60 | // Task |
61 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
1fd65ac0 | 62 | 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); |
eace61b9 | 63 | |
eeb1e952 | 64 | mgr->AddTask(task); |
65 | ||
eace61b9 | 66 | |
67 | // Write Output | |
eeb1e952 | 68 | TString containerName = mgr->GetCommonFileName(); |
69 | containerName += ":"; | |
70 | containerName += appendix.Data(); | |
71 | ||
72 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
a86a8fda | 73 | mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data())); |
74 | mgr->ConnectOutput(task,2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data())); | |
eeb1e952 | 75 | mgr->ConnectInput(task,0, cinput ); |
76 | ||
77 | return NULL; | |
78 | ||
79 | } |