]>
Commit | Line | Data |
---|---|---|
a65a7e70 | 1 | AliAnalysisTaskJetHadronCorrelation *AddTaskJetHadronCorrelation(Char_t *jf="ANTIKT",Float_t radius=0.4,UInt_t filter=256,Int_t backM=0,Float_t tPtcut=0.15,Int_t skipCone=0,Bool_t IsMC=true,Float_t JetEScale=1.,Float_t TrackEScale=1.) |
2 | { | |
3 | ||
4 | // Creates a JetQA task, configures it and adds it to the analysis manager. | |
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskJetHadronCorrelation", "No analysis manager to connect to."); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | // Check the analysis type using the event handlers connected to the analysis manager. | |
14 | //============================================================================== | |
15 | if (!mgr->GetInputEventHandler()) { | |
16 | ::Error("AddTaskJetHadronCorrelation", "This task requires an input event handler"); | |
17 | return NULL; | |
18 | } | |
19 | ||
20 | // Create the task and configure it. | |
21 | //=========================================================================== | |
22 | ||
23 | AliAnalysisTaskJetHadronCorrelation *jethadron = new AliAnalysisTaskJetHadronCorrelation("TaskJetHadronCorrelation"); | |
24 | jethadron->SetDebugLevel(3); | |
25 | jethadron->SetAlgorithm(jf); | |
26 | jethadron->SetRadius(radius); | |
27 | jethadron->SetFilterMask(filter); | |
28 | jethadron->SetBackSubMode(backM); | |
29 | jethadron->SetTrackPtCut(tPtcut); | |
30 | jethadron->SetSkipCone(skipCone); | |
31 | jethadron->SetMC(IsMC); | |
32 | jethadron->SetJetEScale(JetEScale); | |
33 | jethadron->SetTrackEScale(TrackEScale); | |
34 | mgr->AddTask(jethadron); | |
35 | ||
36 | TString cAdd = ""; | |
37 | cAdd += Form("%02d_" ,(int)((radius+0.01)*10.)); | |
38 | cAdd += Form("B%d" ,(int)backM); | |
39 | cAdd += Form("_Filter%05d" ,filter); | |
40 | cAdd += Form("_Cut%05d" ,(int)(1000.*tPtcut)); | |
41 | cAdd += Form("_Skip%02d" ,skipCone); | |
42 | cAdd += Form("_JetEScale%03d" ,(int)(JetEScale*100.)); | |
43 | cAdd += Form("_TrackEScale%03d",(int)(TrackEScale*100.)); | |
44 | TString Branch; | |
45 | if(IsMC)Branch = Form("MC_clustersAOD_%s%s",jf,cAdd.Data()); | |
46 | else Branch = Form("Data_clustersAOD_%s%s",jf,cAdd.Data()); | |
47 | ||
48 | AliAnalysisDataContainer *cout_JHC = mgr->CreateContainer(Form("JHC_%s%s",jf,cAdd.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWGJE_JHC_%s",AliAnalysisManager::GetCommonFileName(),Branch.Data())); | |
49 | ||
50 | // Create ONLY the output containers for the data produced by the task. | |
51 | // Get and connect other common input/output containers via the manager as below | |
52 | //============================================================================== | |
53 | ||
54 | mgr->ConnectInput (jethadron,0, mgr->GetCommonInputContainer()); | |
55 | mgr->ConnectOutput(jethadron,0, mgr->GetCommonOutputContainer()); | |
56 | mgr->ConnectOutput(jethadron,1, cout_JHC); | |
57 | ||
58 | ||
59 | return jethadron; | |
60 | } |