]>
Commit | Line | Data |
---|---|---|
f0bce5e0 | 1 | AliAnalysisTaskVertexESD *AddTaskVertexESD(Bool_t readMC=kFALSE) |
388ca814 | 2 | { |
3 | // | |
4 | // Task for validation of the primary vertices (SPD,TPC,ITS+TPC) | |
5 | // | |
6 | // andrea.dainese@pd.infn.it | |
7 | // | |
8 | ||
9 | ||
10 | // Get the pointer to the existing analysis manager via the static access method. | |
11 | //============================================================================== | |
12 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
13 | if (!mgr) { | |
14 | ::Error("AddTask", "No analysis manager to connect to."); | |
15 | return NULL; | |
16 | } | |
17 | ||
18 | // Create the task | |
19 | AliAnalysisTaskVertexESD *taskVtxESD = new AliAnalysisTaskVertexESD("VertexESD"); | |
f0bce5e0 | 20 | taskVtxESD->SetReadMC(readMC); |
21 | taskVtxESD->SetFillNtuple(kFALSE); | |
22 | taskVtxESD->SetRerecoVertexITSTPCHalfEvent(kFALSE); | |
30b05a14 | 23 | taskVtxESD->SetFillNtupleBeamSpot(kTRUE); |
24 | taskVtxESD->SetRerecoVertexITSTPC(kTRUE); | |
388ca814 | 25 | AliLog::SetClassDebugLevel("AliAnalysisTaskVertexESD",10); |
26 | // Add to the manager | |
27 | mgr->AddTask(taskVtxESD); | |
28 | ||
29 | // | |
30 | // Create containers for input/output | |
31 | AliAnalysisDataContainer *cInputVtxESD = mgr->CreateContainer("cInputVtxESD",TChain::Class(),AliAnalysisManager::kInputContainer); | |
32 | ||
997f86cb | 33 | AliAnalysisDataContainer *cOutputVtxESD = mgr->CreateContainer("cOutputVtxESD",TList::Class(),AliAnalysisManager::kOutputContainer, Form("%s:Vertex_Performance", mgr->GetCommonFileName())); |
388ca814 | 34 | |
35 | ||
36 | // Attach input | |
37 | mgr->ConnectInput(taskVtxESD,0,mgr->GetCommonInputContainer()); | |
38 | // Attach output | |
f55d78b9 | 39 | mgr->ConnectOutput(taskVtxESD,1,cOutputVtxESD); |
388ca814 | 40 | |
41 | return taskVtxESD; | |
42 | } |