]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/macros/AddTaskHFEtpctof.C
add extra namings
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / AddTaskHFEtpctof.C
CommitLineData
6b349323 1AliAnalysisTask *AddTaskHFEtpctof(Bool_t beauty=kTRUE, Int_t tpcCls=110, Int_t tpcClsPID = 70, Double_t tpcClsRatio = 0.6, Double_t tpcClShared = 0.1, Int_t itsCls=4, Double_t itsChi2PerClusters=36., Double_t dcaxy=1.0, Double_t dcaz=2.0, Double_t tofs=3., Double_t ipSig=3.0, Bool_t syst = kFALSE, Int_t itspixelcut=AliHFEextraCuts::kBoth, Float_t prodlow=0., Float_t prodhigh=100., Int_t addflag=0.,Int_t etacor){
fda4fd95 2
3 // libraries in case
4 gSystem->Load("libANALYSIS.so");
5 gSystem->Load("libANALYSISalice.so");
6
7
8 //set config file name
9 TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
6b349323 10 //TString configFile("/d/alice12/bailhache/AliRootInstallations/07_06_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
fda4fd95 11 TString checkconfig="ConfigHFEpbpb";
12 if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
13 gROOT->LoadMacro(configFile.Data());
14
6b349323 15 TString appendix(TString::Format("TPC%dpid%dClShared%dratio%dITS%dITSChi%dITScut%dDCAr%dz%dIP%dTOF%dProdlow%dProdhigh%daddflag%ietacor%i",
16 tpcCls,tpcClsPID,(Int_t)(tpcClShared*100),(Int_t)(tpcClsRatio*100),itsCls,(Int_t)itsChi2PerClusters,itspixelcut,(Int_t)dcaxy,(Int_t)dcaz,(Int_t)ipSig,(Int_t)(tofs*10),(Int_t)prodlow,(Int_t)prodhigh,addflag,etacor));
fda4fd95 17 printf("appendix %s\n", appendix.Data());
18
19 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
c8096c66 20
21 // Check the analysis type using the event handlers connected to the analysis manager.
22 //==============================================================================
23 if (!mgr->GetInputEventHandler()) {
24 ::Error("AddTaskEventplane", "This task requires an input event handler");
25 return NULL;
26 }
27 TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
28
fda4fd95 29 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
6b349323 30 AliAnalysisTaskHFE *task = ConfigHFEpbpb(kFALSE,beauty,tpcCls,tpcClsPID,tpcClsRatio,tpcClShared,itsCls,itsChi2PerClusters,dcaxy,dcaz,tofs,ipSig,itspixelcut,appendix,prodlow,prodhigh,addflag,0,etacor);
c8096c66 31
32 if (inputDataType == "AOD"){
33 task->SetFillNoCuts(kTRUE);
34 task->SetUseFlagAOD(kFALSE);
35 task->SetApplyCutAOD(kTRUE);
90aa28e9 36 }
37
38
fda4fd95 39 mgr->AddTask(task);
40
41 TString containerName = mgr->GetCommonFileName();
42 containerName += ":";
43 containerName += appendix.Data();
44
45 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
46 mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("HFEtpctof_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
47 mgr->ConnectInput(task,0, cinput );
48
49 return NULL;
50
51}