]>
Commit | Line | Data |
---|---|---|
60dfeffb | 1 | AliAnalysisTaskLukeAOD * AddTaskLukeAOD(const char * outfilename, bool isMonteCarlo, double cutCosPa, double cutcTauMin, double cutNcTauMax, double cutBetheBloch, double cutMinNClustersTPC, double cutRatio, double cutEta, double cutRapidity, double cutArmenteros) { |
2 | ||
3 | ||
4 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
5 | if (!mgr) { | |
6 | ::Error("AddTaskPhysicsSelection", "No analysis manager to connect to."); | |
7 | return NULL; | |
8 | } | |
9 | ||
10 | // Check the analysis type using the event handlers connected to the analysis manager. | |
11 | //============================================================================== | |
12 | if (!mgr->GetInputEventHandler()) { | |
13 | ::Error("AddTaskPhysicsSelection", "This task requires an input event handler"); | |
14 | return NULL; | |
15 | } | |
16 | ||
17 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
18 | ||
19 | if (inputDataType != "AOD") { | |
20 | Printf("ERROR! This task can only run on AODs!"); | |
21 | } | |
22 | ||
23 | // Configure analysis | |
24 | //=========================================================================== | |
25 | // Int_t nbMinTPCclusters = 80; | |
26 | // Int_t lCollidingSystems = 1; | |
27 | // TString fAnalysisType = "ESD"; | |
28 | // TString lAnalysisPidMode = "withPID"; | |
29 | // TString lAnalysisCut = "no"; | |
30 | //Int_t iMCAnalysis = 0; | |
31 | ||
32 | char taskName[15]; | |
33 | sprintf(taskName,"example_task"); | |
34 | ||
35 | AliAnalysisTaskLukeAOD * task = new AliAnalysisTaskLukeAOD(taskName); | |
36 | task->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented | |
37 | ||
38 | task->SetIsMonteCarlo (isMonteCarlo); | |
39 | task->SetCutCosPa (cutCosPa); | |
40 | task->SetCutcTauMin (cutcTauMin); | |
41 | task->SetCutNcTauMax (cutNcTauMax); | |
42 | task->SetCutBetheBloch (cutBetheBloch); | |
43 | task->SetCutMinNClustersTPC (cutMinNClustersTPC); | |
44 | task->SetCutRatio (cutRatio) ; | |
45 | task->SetCutEta (cutEta); | |
46 | task->SetCutRapidity (cutRapidity); | |
47 | task->SetCutArmenteros (cutArmenteros); | |
48 | ||
49 | ||
50 | //task->SetOption("sample"); | |
51 | ||
52 | mgr->AddTask(task); | |
53 | AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer(); | |
54 | ||
55 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(outfilename, TList::Class(),AliAnalysisManager::kOutputContainer, Form("%s:lambdak0Luke", AliAnalysisManager::GetCommonFileName())); | |
56 | ||
57 | mgr->ConnectInput (task, 0, cinput0); | |
58 | mgr->ConnectOutput(task,1,coutput1); | |
59 | ||
60 | return task; | |
61 | } | |
62 | ||
63 |