]>
Commit | Line | Data |
---|---|---|
3081b863 | 1 | //____________________________________________ |
2 | AliPerformanceTask* AddTaskPerformanceITSTPCMatch(Bool_t bUseMCInfo=kFALSE, Bool_t bUseESDfriend=kTRUE, const char *triggerClass=0) | |
3 | { | |
4 | // | |
5 | // Add AliPerformanceTask with TPC performance components | |
6 | // | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if(!mgr) { | |
9 | Error("AddTaskPerformanceTPC","AliAnalysisManager not set!"); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | TString type = mgr->GetInputEventHandler()->GetDataType(); | |
14 | if (!type.Contains("ESD")) { | |
15 | Error("AddTaskPerformanceTPC", "ESD input handler needed!"); | |
16 | return NULL; | |
17 | } | |
18 | ||
19 | AliMCEventHandler *mcH = (AliMCEventHandler*)mgr->GetMCtruthEventHandler(); | |
20 | if (!mcH && bUseMCInfo) { | |
21 | Error("AddTaskPerformanceTPC", "MC input handler needed!"); | |
22 | return NULL; | |
23 | } | |
24 | ||
25 | // | |
26 | // Create task | |
27 | // | |
28 | AliPerformanceTask *task = new AliPerformanceTask("Performance","TPC Performance"); | |
29 | if (!task) { | |
30 | Error("AddTaskPerformanceTPC", "TPC performance task cannot be created!"); | |
31 | return NULL; | |
32 | } | |
33 | task->SetUseMCInfo(bUseMCInfo); | |
34 | task->SetUseESDfriend(bUseESDfriend); | |
35 | task->SelectCollisionCandidates(); | |
36 | ||
37 | // | |
38 | // Add task to analysis manager | |
39 | // | |
40 | mgr->AddTask(task); | |
41 | ||
42 | ||
43 | // | |
44 | // Create TPC-ESD track reconstruction cuts | |
45 | // MATCH tracks | |
46 | // | |
47 | AliRecInfoCuts *pRecInfoCutsMATCH = new AliRecInfoCuts(); | |
48 | if(pRecInfoCutsMATCH) { | |
49 | pRecInfoCutsMATCH->SetMaxDCAToVertexXY(3.0); | |
36ace53b | 50 | pRecInfoCutsMATCH->SetMaxDCAToVertexZ(3..0); |
3081b863 | 51 | pRecInfoCutsMATCH->SetRequireSigmaToVertex(kFALSE); |
52 | pRecInfoCutsMATCH->SetRequireTPCRefit(kFALSE); | |
53 | pRecInfoCutsMATCH->SetAcceptKinkDaughters(kTRUE); | |
54 | pRecInfoCutsMATCH->SetMinNClustersTPC(70); | |
55 | pRecInfoCutsMATCH->SetMaxChi2PerClusterTPC(1000000.); | |
56 | pRecInfoCutsMATCH->SetDCAToVertex2D(kFALSE); | |
57 | pRecInfoCutsMATCH->SetTPCITSMatchingRadius(70); | |
58 | pRecInfoCutsMATCH->SetTPCTRDMatchingRadius(260); | |
59 | pRecInfoCutsMATCH->SetMinNClustersITS(3); | |
60 | ||
61 | pRecInfoCutsMATCH->SetHistogramsOn(kFALSE); | |
62 | } | |
63 | else { | |
64 | Error("AddTaskPerformanceTPC", "AliRecInfoCutsTPC cannot be created!"); | |
65 | return NULL; | |
66 | } | |
67 | ||
68 | // | |
69 | // Create TPC-MC track reconstruction cuts | |
70 | // | |
71 | AliMCInfoCuts *pMCInfoCuts = new AliMCInfoCuts(); | |
72 | if(pMCInfoCuts) { | |
73 | pMCInfoCuts->SetMinTrackLength(70); | |
74 | } | |
75 | else { | |
76 | Error("AddTaskPerformanceTPC", "AliMCInfoCuts cannot be created!"); | |
77 | return NULL; | |
78 | } | |
79 | ||
80 | // | |
81 | // Create performance objects for TPC and set cuts | |
82 | // | |
83 | // TPC+ITS matching performance | |
84 | // | |
85 | AliPerformanceMatch *pCompMatch0 = new AliPerformanceMatch("AliPerformanceMatchTPCITS","AliPerformanceMatchTPCITS",0,kFALSE); | |
86 | if(!pCompMatch0) { | |
87 | Error("AddTaskPerformanceMatch", "Cannot create AliPerformanceMatchTPCITS"); | |
88 | } | |
89 | pCompMatch0->SetAliRecInfoCuts(pRecInfoCutsMATCH); | |
90 | pCompMatch0->SetAliMCInfoCuts(pMCInfoCuts); | |
91 | // | |
92 | // TPC+TRD matching performance | |
93 | // | |
94 | AliPerformanceMatch *pCompMatch1 = new AliPerformanceMatch("AliPerformanceMatchTPCTRD","AliPerformanceMatchTPCTRD",1,kFALSE); | |
95 | if(!pCompMatch1) { | |
96 | Error("AddTaskPerformanceMatch", "Cannot create AliPerformanceMatchTPCTRD"); | |
97 | } | |
98 | pCompMatch1->SetAliRecInfoCuts(pRecInfoCutsMATCH); | |
99 | pCompMatch1->SetAliMCInfoCuts(pMCInfoCuts); | |
100 | ||
101 | AliPerformanceMatch *pCompMatch2 = new AliPerformanceMatch("AliPerformanceMatchTPCEFF","AliPerformanceMatchTPCEFF",2,kFALSE); | |
102 | if(!pCompMatch2) { | |
103 | Error("AddTaskPerformanceMatch", "Cannot create AliPerformanceMatchTPCEFF"); | |
104 | } | |
105 | pCompMatch2->SetAliRecInfoCuts(pRecInfoCutsMATCH); | |
106 | pCompMatch2->SetAliMCInfoCuts(pMCInfoCuts); | |
107 | ||
108 | // | |
109 | // Add components to the performance task | |
110 | // | |
111 | task->AddPerformanceObject( pCompMatch0 ); | |
112 | //task->AddPerformanceObject( pCompMatch1 ); | |
113 | task->AddPerformanceObject( pCompMatch2 ); | |
114 | ||
115 | // | |
116 | if(!bUseMCInfo && triggerClass) { | |
117 | pCompDEdx3->SetTriggerClass(triggerClass); | |
118 | pCompDCA0->SetTriggerClass(triggerClass); | |
119 | pCompTPC0->SetTriggerClass(triggerClass); | |
120 | pCompMatch0->SetTriggerClass(triggerClass); | |
121 | pCompMatch1->SetTriggerClass(triggerClass); | |
122 | pCompMatch2->SetTriggerClass(triggerClass); | |
123 | } | |
124 | ||
125 | // | |
126 | // Create containers for input | |
127 | // | |
128 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
129 | ||
130 | // | |
131 | // Create containers for output | |
132 | // | |
133 | AliAnalysisDataContainer *coutput_tpc = mgr->CreateContainer("ITSTPCMatch", TList::Class(), AliAnalysisManager::kOutputContainer, Form("TPC.%sDet.root", task->GetName())); | |
134 | mgr->ConnectOutput(task, 1, coutput_tpc); | |
135 | ||
36ace53b | 136 | AliAnalysisDataContainer *coutput2_tpc = mgr->CreateContainer("TPCTPCMatchSummary", TTree::Class(), AliAnalysisManager::kParamContainer, "trending.root:SummaryTPCQA"); |
137 | mgr->ConnectOutput(task, 2, coutput2_tpc); | |
138 | ||
3081b863 | 139 | return task; |
140 | } |