]>
Commit | Line | Data |
---|---|---|
a86a8fda | 1 | AliAnalysisTask *AddTaskHFEtpctof(Bool_t isMC,Bool_t kAnalyseTaggedTracks = kFALSE, Bool_t kMCQA = kFALSE, Bool_t kDEStep = kFALSE, Int_t aodfilter=-1, Int_t tpcCls=110, Int_t tpcClsPID = 70, Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, Double_t tpcs=0., Double_t tpcu=3., Double_t tofs=3., Double_t ipSig=3.0, Bool_t prodcut = kFALSE, Bool_t ipAbs = kFALSE, Int_t itspixelcut=AliHFEextraCuts::kAny, Bool_t withetacorrection=kFALSE, TString listname="", Int_t ptbin=0){ |
fda4fd95 | 2 | |
3 | // libraries in case | |
4070f709 | 4 | gSystem->Load("libANALYSIS"); |
5 | gSystem->Load("libANALYSISalice"); | |
fda4fd95 | 6 | |
31ae1571 | 7 | AliLog::SetGlobalDebugLevel(AliLog::kError); |
8 | AliLog::SetClassDebugLevel("AliCFParticleGenCuts",4); | |
fda4fd95 | 9 | |
10 | //set config file name | |
eeb1e952 | 11 | TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/pp/ConfigHFEpid2SYS.C"); |
12 | //TString configFile("/d/alice12/bailhache/AliRootInstallations/11_09_2012/AliRoot/PWGHF/hfe/macros/configs/pp/ConfigHFEpid2SYS.C"); | |
13 | TString checkconfig="ConfigHFEpid2SYS"; | |
fda4fd95 | 14 | if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data())) |
15 | gROOT->LoadMacro(configFile.Data()); | |
16 | ||
eeb1e952 | 17 | // Name |
18 | ||
31ae1571 | 19 | Int_t iAODfilter = (Int_t) aodfilter; |
eeb1e952 | 20 | Int_t iDCAxy = (Int_t)(dcaxy*10.); |
21 | Int_t iDCAz = (Int_t)(dcaz*10.); | |
22 | Int_t iTPCs = (Int_t)(tpcs*1000.); | |
23 | Int_t iTOFs = (Int_t)(tofs*10.); | |
24 | Int_t iIpSig= (Int_t)(ipSig*10.); | |
25 | Int_t iProdCut = 1; | |
26 | Int_t iIPAbs = 0; | |
27 | Int_t iPixelAny = itspixelcut; | |
28 | Int_t iEtaCorr = 0; | |
29 | Int_t iAnalyseTaggedTracks = 0; | |
30 | Int_t iMCQA = 0; | |
31 | Int_t iDEStep = 0; | |
32 | if(prodcut) iProdCut = 0; | |
33 | if(ipAbs) iIPAbs = 1; | |
34 | if(withetacorrection) iEtaCorr = 1; | |
35 | if(kAnalyseTaggedTracks) iAnalyseTaggedTracks = 1; | |
36 | if(kMCQA) iMCQA = 1; | |
37 | if(kDEStep) iDEStep = 1; | |
38 | ||
39 | ||
31ae1571 | 40 | TString appendix(TString::Format("T%dM%dD%df%dt%di%dr%dz%ds%dt%db%dp%da%dpa%detacorr%dptbin%d",iAnalyseTaggedTracks,iMCQA,iDEStep,iAODfilter,tpcCls,itsCls,iDCAxy,iDCAz,iTPCs,iTOFs,iIpSig,iProdCut,iIPAbs,iPixelAny,iEtaCorr,ptbin)); |
fda4fd95 | 41 | printf("appendix %s\n", appendix.Data()); |
42 | ||
43 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
eeb1e952 | 44 | |
c8096c66 | 45 | // Check the analysis type using the event handlers connected to the analysis manager. |
46 | //============================================================================== | |
47 | if (!mgr->GetInputEventHandler()) { | |
31ae1571 | 48 | printf("AddTaskEventplane", "This task requires an input event handler"); |
c8096c66 | 49 | return NULL; |
50 | } | |
51 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
eeb1e952 | 52 | |
fda4fd95 | 53 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); |
31ae1571 | 54 | AliAnalysisTaskHFE *task = ConfigHFEpid2SYS(isMC,appendix,tpcCls,tpcClsPID,itsCls,dcaxy,dcaz,tpcs,tpcu,tofs,ipSig,prodcut,ipAbs,itspixelcut,withetacorrection,listname,ptbin,kAnalyseTaggedTracks,kMCQA,kDEStep,aodfilter); |
c8096c66 | 55 | |
56 | if (inputDataType == "AOD"){ | |
eeb1e952 | 57 | task->SetAODAnalysis(); |
c8096c66 | 58 | task->SetFillNoCuts(kTRUE); |
a86a8fda | 59 | //task->SetUseFilterAOD(kFALSE); |
c8096c66 | 60 | task->SetApplyCutAOD(kTRUE); |
90aa28e9 | 61 | } |
eeb1e952 | 62 | task->SelectCollisionCandidates(); |
90aa28e9 | 63 | |
64 | ||
fda4fd95 | 65 | mgr->AddTask(task); |
66 | ||
67 | TString containerName = mgr->GetCommonFileName(); | |
68 | containerName += ":"; | |
69 | containerName += appendix.Data(); | |
70 | ||
71 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
eeb1e952 | 72 | mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data())); |
73 | mgr->ConnectOutput(task,2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data())); | |
fda4fd95 | 74 | mgr->ConnectInput(task,0, cinput ); |
75 | ||
eeb1e952 | 76 | return task; |
fda4fd95 | 77 | |
78 | } |