]>
Commit | Line | Data |
---|---|---|
ed45f693 | 1 | AliAnalysisTaskCheckCascadepp276 *AddTaskCheckCascadepp276( Int_t minnTPCcls = 70, |
74457772 | 2 | Float_t vtxlim = 10.0, |
3 | Float_t vtxlimmin = 0.0, | |
93900229 | 4 | Bool_t fwithsdd = kFALSE, |
ed45f693 | 5 | Bool_t kextrasel = kFALSE, |
6 | Bool_t krelaunchvertexers = kFALSE, | |
7 | Bool_t ksddonselection = kTRUE, | |
74457772 | 8 | Float_t minptondaughtertracks = 0.0, |
9 | Float_t etacutondaughtertracks = 0.8) { | |
ed45f693 | 10 | |
11 | // Creates, configures and attaches to the train a cascades check task. | |
12 | // Get the pointer to the existing analysis manager via the static access method. | |
13 | //============================================================================== | |
14 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
15 | if (!mgr) { | |
74457772 | 16 | ::Error("AddTaskCheckCascadepp276", "No analysis manager to connect to."); |
ed45f693 | 17 | return NULL; |
18 | } | |
19 | ||
20 | // Check the analysis type using the event handlers connected to the analysis manager. | |
21 | //============================================================================== | |
22 | if (!mgr->GetInputEventHandler()) { | |
23 | ::Error("AddTaskCheckCascadepp276", "This task requires an input event handler"); | |
24 | return NULL; | |
25 | } | |
26 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
27 | ||
28 | // Create and configure the task | |
74457772 | 29 | //============================================================================== |
30 | TString taskname = Form("TaskCheckCascadepp276_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
31 | if(fwithsdd) { | |
32 | if (ksddonselection) taskname += "_wSDDon"; | |
33 | else if (!ksddonselection) taskname += "_wSDDoff"; | |
34 | } else if (!fwithsdd) taskname += "_woSDD"; | |
35 | AliAnalysisTaskCheckCascadepp276 *taskcheckcascadepp276 = new AliAnalysisTaskCheckCascadepp276(taskname); | |
36 | taskcheckcascadepp276->SetAnalysisType (type); // "ESD" or "AOD" | |
37 | taskcheckcascadepp276->SetRelaunchV0CascVertexers (krelaunchvertexers); // choose if reconstruct the vertex of V0 in the cascades | |
38 | taskcheckcascadepp276->SetSDDSelection (fwithsdd); // choose if apply SDD event selection | |
39 | taskcheckcascadepp276->SetQualityCutZprimVtxPos (kTRUE); // choose if apply Z vtx PV position event selection | |
40 | taskcheckcascadepp276->SetQualityCutNoTPConlyPrimVtx (kTRUE); // choose if apply no TPC only event selection | |
41 | taskcheckcascadepp276->SetQualityCutTPCrefit (kTRUE); // choose if apply TPC refit on daughter tracks | |
42 | taskcheckcascadepp276->SetQualityCutnTPCcls (kTRUE); // choose if apply n TPC cluster selection on daughter tracks | |
43 | taskcheckcascadepp276->SetQualityCutPileup (kTRUE); // choose if apply no Pileup event selection | |
44 | taskcheckcascadepp276->SetWithSDDOn (ksddonselection); // which SDD selection do you want apply? [if kTRUE select SDDon events] | |
45 | taskcheckcascadepp276->SetQualityCutMinnTPCcls (minnTPCcls); // which value do you want apply for the minTPCcls cut? | |
46 | taskcheckcascadepp276->SetExtraSelections (kextrasel); // choose if apply the extra selection of cascade reco. | |
47 | taskcheckcascadepp276->SetVertexRange (vtxlim); // which higher value do you want apply for vtx Z cut? | |
48 | taskcheckcascadepp276->SetVertexRangeMin (vtxlimmin); // which lower value do you want apply for vtx Z cut? | |
49 | taskcheckcascadepp276->SetMinptCutOnDaughterTracks (minptondaughtertracks); // which value do you want apply for cut on min pt daughter track? | |
50 | taskcheckcascadepp276->SetEtaCutOnDaughterTracks (etacutondaughtertracks); // which value do you want apply for cut on eta daughter track? | |
ed45f693 | 51 | |
52 | mgr->AddTask(taskcheckcascadepp276); | |
53 | ||
54 | // Create ONLY the output containers for the data produced by the task. | |
55 | // Get and connect other common input/output containers via the manager as below | |
56 | //============================================================================== | |
74457772 | 57 | // Directory name |
58 | TString outputFileName = Form("%s:PWGLFStrangeness.outputCheckCascadepp276", AliAnalysisManager::GetCommonFileName()); | |
59 | // Objects name | |
89a90483 | 60 | TString outputname0 = "clistCasc"; |
61 | TString outpotname1 = "cfcontPIDAsXiM"; | |
62 | TString outpotname2 = "cfcontPIDAsXiP"; | |
63 | TString outpotname3 = "cfcontPIDAsOmegaM"; | |
64 | TString outpotname4 = "cfcontPIDAsOmegaP"; | |
65 | TString outpotname5 = "cfcontAsCuts"; | |
66 | outputname0 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
67 | outputname1 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
68 | outputname2 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
69 | outputname3 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
70 | outputname4 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
71 | outputname5 += Form("_minnTPCcls%i_vtxlim%.1f-%.1f_minptdghtrk%.1f_etacutdghtrk%.1f",minnTPCcls,vtxlim,vtxlimmin,minptondaughtertracks,etacutondaughtertracks); | |
72 | if(fwithsdd) { | |
73 | if (ksddonselection) { | |
74 | outputname0 += "_wSDDon"; | |
75 | outputname1 += "_wSDDon"; | |
76 | outputname2 += "_wSDDon"; | |
77 | outputname3 += "_wSDDon"; | |
78 | outputname4 += "_wSDDon"; | |
79 | outputname5 += "_wSDDon"; | |
80 | } else if (!ksddonselection) { | |
81 | outputname0 += "_wSDDoff"; | |
82 | outputname1 += "_wSDDoff"; | |
83 | outputname2 += "_wSDDoff"; | |
84 | outputname3 += "_wSDDoff"; | |
85 | outputname4 += "_wSDDoff"; | |
86 | outputname5 += "_wSDDoff"; | |
87 | } | |
88 | } else if (!fwithsdd) { | |
89 | outputname0 += "_woSDD"; | |
90 | outputname1 += "_woSDD"; | |
91 | outputname2 += "_woSDD"; | |
92 | outputname3 += "_woSDD"; | |
93 | outputname4 += "_woSDD"; | |
94 | outputname5 += "_woSDD"; | |
95 | } | |
ed45f693 | 96 | |
74457772 | 97 | //Save objects into the train common file |
89a90483 | 98 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(outputname0, |
99 | TList::Class(), | |
100 | AliAnalysisManager::kOutputContainer, | |
101 | outputFileName ); | |
102 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(outputname1, | |
ed45f693 | 103 | AliCFContainer::Class(), |
104 | AliAnalysisManager::kOutputContainer, | |
105 | outputFileName ); | |
89a90483 | 106 | AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(outputname2, |
ed45f693 | 107 | AliCFContainer::Class(), |
108 | AliAnalysisManager::kOutputContainer, | |
109 | outputFileName ); | |
89a90483 | 110 | AliAnalysisDataContainer *coutput4 = mgr->CreateContainer(outputname3, |
ed45f693 | 111 | AliCFContainer::Class(), |
112 | AliAnalysisManager::kOutputContainer, | |
113 | outputFileName ); | |
89a90483 | 114 | AliAnalysisDataContainer *coutput5 = mgr->CreateContainer(outputname4, |
ed45f693 | 115 | AliCFContainer::Class(), |
116 | AliAnalysisManager::kOutputContainer, | |
117 | outputFileName ); | |
89a90483 | 118 | AliAnalysisDataContainer *coutput6 = mgr->CreateContainer(outputname5, |
ed45f693 | 119 | AliCFContainer::Class(), |
120 | AliAnalysisManager::kOutputContainer, | |
121 | outputFileName ); | |
122 | ||
ed45f693 | 123 | mgr->ConnectInput( taskcheckcascadepp276, 0, mgr->GetCommonInputContainer()); |
124 | mgr->ConnectOutput(taskcheckcascadepp276, 1, coutput1); | |
125 | mgr->ConnectOutput(taskcheckcascadepp276, 2, coutput2); | |
126 | mgr->ConnectOutput(taskcheckcascadepp276, 3, coutput3); | |
127 | mgr->ConnectOutput(taskcheckcascadepp276, 4, coutput4); | |
128 | mgr->ConnectOutput(taskcheckcascadepp276, 5, coutput5); | |
129 | mgr->ConnectOutput(taskcheckcascadepp276, 6, coutput6); | |
130 | ||
131 | return taskcheckcascadepp276; | |
132 | } |