]>
Commit | Line | Data |
---|---|---|
22d3f9c2 | 1 | // $Id: AddTaskEmcalJetHMECadron.C 57095 2012-07-23 3:50:07Z mconnors $ |
1101e468 | 2 | |
3 | AliAnalysisTaskEmcalJetHMEC* AddTaskEmcalJetHMEC( | |
4 | const char *outfilename = "AnalysisOutput.root", | |
5 | const char *nJets = "Jets", | |
6 | const char *nTracks = "PicoTracks", | |
7 | const Double_t minPhi = 1.8, | |
8 | const Double_t maxPhi = 2.74, | |
9 | const Double_t minEta = -0.3, | |
10 | const Double_t maxEta = 0.3, | |
55f64c2f | 11 | const Double_t minArea = 0.4, |
22d3f9c2 | 12 | const Int_t EvtMix = 0, |
76cd9c11 | 13 | const Double_t TrkBias = 5, |
22d3f9c2 | 14 | const Double_t ClusBias = 5, |
15 | const Double_t TrkEta = 0.9 | |
16 | ||
1101e468 | 17 | ) |
18 | { | |
19 | // Get the pointer to the existing analysis manager via the static access method. | |
20 | //============================================================================== | |
21 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
22 | if (!mgr) | |
23 | { | |
24 | ::Error("AddTaskEmcalJetHMEC", "No analysis manager to connect to."); | |
25 | return NULL; | |
26 | } | |
27 | ||
28 | // Check the analysis type using the event handlers connected to the analysis manager. | |
29 | //============================================================================== | |
30 | if (!mgr->GetInputEventHandler()) | |
31 | { | |
32 | ::Error("AddTaskEmcalJetHMEC", "This task requires an input event handler"); | |
33 | return NULL; | |
34 | } | |
35 | ||
36 | //------------------------------------------------------- | |
37 | // Init the task and do settings | |
38 | //------------------------------------------------------- | |
39 | ||
40 | TString name(Form("Correlations_%s", nJets)); | |
41 | AliAnalysisTaskEmcalJetHMEC *correlationtask = new AliAnalysisTaskEmcalJetHMEC(name); | |
4e35889f | 42 | correlationtask->SetJetsName(nJets); |
43 | correlationtask->SetTracksName(nTracks); | |
44 | correlationtask->SetJetPhi(minPhi,maxPhi); | |
45 | correlationtask->SetJetEta(minEta,maxEta); | |
46 | correlationtask->SetAreaCut(minArea); | |
55f64c2f | 47 | correlationtask->SetEventMixing(EvtMix); |
76cd9c11 | 48 | correlationtask->SetTrkBias(TrkBias); |
fab37389 | 49 | correlationtask->SetClusBias(ClusBias); |
22d3f9c2 | 50 | correlationtask->SetTrkEta(TrkEta); |
76cd9c11 | 51 | |
1101e468 | 52 | |
53 | //------------------------------------------------------- | |
54 | // Final settings, pass to manager and set the containers | |
55 | //------------------------------------------------------- | |
56 | ||
4e35889f | 57 | mgr->AddTask(correlationtask); |
1101e468 | 58 | |
59 | // Create containers for input/output | |
60 | mgr->ConnectInput (correlationtask, 0, mgr->GetCommonInputContainer() ); | |
61 | AliAnalysisDataContainer *cojeth = mgr->CreateContainer(name, | |
62 | TList::Class(), | |
63 | AliAnalysisManager::kOutputContainer, | |
64 | outfilename); | |
65 | mgr->ConnectOutput(correlationtask,1,cojeth); | |
66 | ||
67 | return correlationtask; | |
68 | } |