]>
Commit | Line | Data |
---|---|---|
c01f11a1 | 1 | AliAnalysisTaskKinkResonance *AddTaskKinkResonanceL1520ESD(Short_t lCollidingSystems=0 /*0 = pp, 1 = AA*/) |
2 | { | |
3 | // Creates, configures and attaches to the train a kink resonance task. | |
4 | // Get the pointer to the existing analysis manager via the static access method. | |
5 | //============================================================================== | |
6 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
7 | if (!mgr) { | |
8 | ::Error("AddTaskKinkResonanceL1520ESD", "No analysis manager to connect to."); | |
9 | return NULL; | |
10 | } | |
11 | ||
12 | // Check the analysis type using the event handlers connected to the analysis manager. | |
13 | //============================================================================== | |
14 | if (!mgr->GetInputEventHandler()) { | |
15 | ::Error("AddTaskKinkResonanceL1520ESD", "This task requires an input event handler"); | |
16 | return NULL; | |
17 | } | |
18 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
19 | if (type != "ESD") { | |
20 | ::Error("AddTaskKinkResonanceL1520ESD", "This task needs an ESD input handler"); | |
21 | return NULL; | |
22 | } | |
23 | if (!mgr->GetMCtruthEventHandler()) { | |
24 | ::Error("AddTaskKinkResonanceL1520ESD", "This task needs an MC handler"); | |
25 | return NULL; | |
26 | } | |
27 | ||
28 | // Setup the analysis object | |
29 | ||
30 | AliResonanceKink *kinkResonanceObjectLESD=new AliResonanceKink(); | |
31 | kinkResonanceObjectLESD->InitOutputHistograms(100,1.4,1.8); | |
32 | kinkResonanceObjectLESD->SetPDGCodes(kProton, kKPlus, AliResonanceKink::kLambda1520); | |
33 | kinkResonanceObjectLESD->SetAnalysisType("ESD"); // "ESD" or "MC" | |
34 | kinkResonanceObjectLESD->SetMaxNsigmaToVertex(4.0); | |
35 | kinkResonanceObjectLESD->SetMaxDCAxy(3.0); | |
36 | kinkResonanceObjectLESD->SetMaxDCAzaxis(3.0); | |
37 | kinkResonanceObjectLESD->SetPtTrackCut(0.25); | |
38 | kinkResonanceObjectLESD->SetMinTPCclusters(50); | |
39 | kinkResonanceObjectLESD->SetMaxChi2PerTPCcluster(3.5); | |
40 | kinkResonanceObjectLESD->SetMaxCov0(2.0); | |
41 | kinkResonanceObjectLESD->SetMaxCov2(2.0); | |
42 | kinkResonanceObjectLESD->SetMaxCov5(0.5); | |
43 | kinkResonanceObjectLESD->SetMaxCov9(0.5); | |
44 | kinkResonanceObjectLESD->SetMaxCov14(2.0); | |
45 | ||
46 | // Create and configure the task | |
47 | AliAnalysisTaskKinkResonance *taskresonanceL1520ESD = new AliAnalysisTaskKinkResonance("TaskResL1520ESDKinkPID"); | |
48 | taskresonanceL1520ESD->SetAnalysisKinkObject(kinkResonanceObjectLESD); | |
49 | mgr->AddTask(taskresonanceL1520ESD); | |
50 | ||
51 | // Create ONLY the output containers for the data produced by the task. | |
52 | // Get and connect other common input/output containers via the manager as below | |
53 | //============================================================================== | |
4cb65f9e | 54 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); |
55 | outputFileName += ":PWG2KINKResonanceL1520ESD"; | |
56 | if (lCollidingSystems) outputFileName += "_AA"; | |
57 | else outputFileName += "_PP"; | |
58 | if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC"; | |
59 | ||
60 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("KinkResL1520ESD", | |
61 | TList::Class(), | |
62 | AliAnalysisManager::kOutputContainer, | |
63 | outputFileName ); | |
c01f11a1 | 64 | |
65 | mgr->ConnectInput(taskresonanceL1520ESD, 0, mgr->GetCommonInputContainer()); | |
66 | mgr->ConnectOutput(taskresonanceL1520ESD, 1, coutput1); | |
67 | return taskresonanceL1520ESD; | |
68 | } |