]>
Commit | Line | Data |
---|---|---|
aba8920f | 1 | AliAnalysisTaskLambdaStar *AddTaskLambda |
2 | ( | |
d681f0bc | 3 | //ULong64_t Triggermask = AliVEvent::kCentral, |
4 | UInt_t Triggermask = AliVEvent::kCentral, | |
aba8920f | 5 | Bool_t Cirpid = kFALSE, |
6 | Int_t Centmin = 0, | |
7 | Int_t Centmax =10, | |
8 | Double_t Nsigma = 3.0, | |
9 | Int_t Nmix = 2, | |
10 | Bool_t Nstrong = kFALSE, | |
11 | Int_t Centp = 510 | |
12 | ) | |
13 | { | |
14 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
15 | if (!mgr) { | |
16 | ::Error("AddTaskPhysicsSelection", "No analysis manager to connect to."); | |
17 | return NULL;} | |
18 | ||
19 | // Check the analysis type using the event handlers connected to the analysis manager. | |
20 | //============================================================================== | |
21 | if (!mgr->GetInputEventHandler()) { | |
22 | ::Error("AddTaskPhysicsSelection", "This task requires an input event handler"); | |
23 | return NULL; } | |
24 | ||
25 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
26 | ||
27 | if (inputDataType != "AOD") { | |
28 | Printf("ERROR! This task can only run on AODs!");} | |
29 | ||
30 | // Configure analysis | |
d681f0bc | 31 | AliAnalysisTaskLambdaStar *task = new AliAnalysisTaskLambdaStar("LStar"); |
aba8920f | 32 | task->SelectCollisionCandidates(Triggermask); |
33 | task->SetCentrality(Centmin,Centmax ); | |
34 | task->UseCircPID(Cirpid); | |
35 | task->SetNMix(Nmix); | |
36 | task->SetNSigma(Nsigma); | |
37 | task->SetStrongCut(Nstrong); | |
38 | task->SetCentPatch(Centp); | |
39 | ||
40 | mgr->AddTask(task); | |
41 | AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer(); | |
42 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("cHistLambda", TList::Class(),AliAnalysisManager::kOutputContainer, Form("%s:lambdastar", AliAnalysisManager::GetCommonFileName())); | |
43 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("cHistPrim", TList::Class(),AliAnalysisManager::kOutputContainer, Form("%s:primary", AliAnalysisManager::GetCommonFileName())); | |
44 | ||
45 | mgr->ConnectInput (task, 0, cinput0); | |
46 | mgr->ConnectOutput(task,1,coutput1); | |
47 | mgr->ConnectOutput(task,2,coutput2); | |
48 | ||
49 | return task; | |
50 | } | |
51 | ||
52 |