]>
Commit | Line | Data |
---|---|---|
c683922f | 1 | // $Id$ |
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, |
c1076e58 | 15 | const Double_t TrkEta = 0.9, |
b1121dd6 | 16 | const Int_t nmixingTR = 5000, |
17 | const Int_t nmixingEV = 5, | |
18 | UInt_t trigevent = AliVEvent::kAny, | |
19 | UInt_t mixevent = AliVEvent::kAny, | |
20 | Bool_t lessSparseAxes = 0, | |
21 | Bool_t widertrackbin = 0, | |
22 | UInt_t centbinsize = 1, | |
c1076e58 | 23 | const char *branch = "biased" |
22d3f9c2 | 24 | |
1101e468 | 25 | ) |
26 | { | |
27 | // Get the pointer to the existing analysis manager via the static access method. | |
28 | //============================================================================== | |
29 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
30 | if (!mgr) | |
31 | { | |
32 | ::Error("AddTaskEmcalJetHMEC", "No analysis manager to connect to."); | |
33 | return NULL; | |
34 | } | |
35 | ||
36 | // Check the analysis type using the event handlers connected to the analysis manager. | |
37 | //============================================================================== | |
38 | if (!mgr->GetInputEventHandler()) | |
39 | { | |
40 | ::Error("AddTaskEmcalJetHMEC", "This task requires an input event handler"); | |
41 | return NULL; | |
42 | } | |
43 | ||
44 | //------------------------------------------------------- | |
45 | // Init the task and do settings | |
46 | //------------------------------------------------------- | |
47 | ||
c1076e58 | 48 | TString name(Form("Correlations_%s_%s", nJets, branch)); |
1101e468 | 49 | AliAnalysisTaskEmcalJetHMEC *correlationtask = new AliAnalysisTaskEmcalJetHMEC(name); |
4e35889f | 50 | correlationtask->SetJetsName(nJets); |
51 | correlationtask->SetTracksName(nTracks); | |
52 | correlationtask->SetJetPhi(minPhi,maxPhi); | |
53 | correlationtask->SetJetEta(minEta,maxEta); | |
54 | correlationtask->SetAreaCut(minArea); | |
dc64e292 | 55 | if(EvtMix>0){ |
56 | correlationtask->SetMixingTracks(EvtMix); | |
57 | correlationtask->SetEventMixing(1); | |
b1121dd6 | 58 | correlationtask->SetNMixedTracks(nmixingTR); |
59 | correlationtask->SetNMixedEvents(nmixingEV); | |
dc64e292 | 60 | }else{ |
61 | correlationtask->SetEventMixing(EvtMix); | |
62 | } | |
76cd9c11 | 63 | correlationtask->SetTrkBias(TrkBias); |
fab37389 | 64 | correlationtask->SetClusBias(ClusBias); |
22d3f9c2 | 65 | correlationtask->SetTrkEta(TrkEta); |
b1121dd6 | 66 | correlationtask->SetTrigType(trigevent); |
67 | correlationtask->SetMixType(mixevent); | |
68 | correlationtask->SetDoLessSparseAxes(lessSparseAxes); | |
69 | correlationtask->SetDoWiderTrackBin(widertrackbin); | |
70 | correlationtask->SetCentBinSize(centbinsize); | |
76cd9c11 | 71 | |
1101e468 | 72 | //------------------------------------------------------- |
73 | // Final settings, pass to manager and set the containers | |
74 | //------------------------------------------------------- | |
75 | ||
4e35889f | 76 | mgr->AddTask(correlationtask); |
1101e468 | 77 | |
78 | // Create containers for input/output | |
79 | mgr->ConnectInput (correlationtask, 0, mgr->GetCommonInputContainer() ); | |
80 | AliAnalysisDataContainer *cojeth = mgr->CreateContainer(name, | |
81 | TList::Class(), | |
82 | AliAnalysisManager::kOutputContainer, | |
83 | outfilename); | |
84 | mgr->ConnectOutput(correlationtask,1,cojeth); | |
85 | ||
86 | return correlationtask; | |
87 | } |