CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / TOF / AddTOFAnalysisTaskCalibPass0.C
CommitLineData
3c8efc07 1AliTOFAnalysisTaskCalibPass0 *
2AddTOFAnalysisTaskCalibPass0()
3{
4
5 /* check analysis manager */
6 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
7 if (!mgr) {
8 Error("AddAnalysisTaskEventTime", "cannot get analysis manager");
9 return NULL;
10 }
11
12 /* check input event handler */
13 if (!mgr->GetInputEventHandler()) {
14 Error("AddAnalysisTaskEventTime", "cannot get input event handler");
15 return NULL;
16 }
17
18 /* check input data type */
19 TString str = mgr->GetInputEventHandler()->GetDataType();
20 if (str.CompareTo("ESD")) {
21 Error("AddAnalysisTaskEventTime", "input data type is not \"ESD\"");
22 return NULL;
23 }
24
25 /* get common input data container */
26 AliAnalysisDataContainer *inputc = mgr->GetCommonInputContainer();
27 if (!inputc) {
28 Error("AddAnalysisTaskEventTime", "cannot get common input container");
29 return NULL;
30 }
31
32 /* create output data container */
87ddb812 33 AliAnalysisDataContainer *outputc1 = mgr->CreateContainer("TOFHistos", TList::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");
3c8efc07 34 if (!outputc1) {
35 Error("AddAnalysisTaskEventTime", "cannot create output container \"Histos\"");
36 return NULL;
37 }
38
39 /* create task and connect input/output */
40 AliTOFAnalysisTaskCalibPass0 *task = new AliTOFAnalysisTaskCalibPass0();
87ddb812 41
42 // adding the task
43 mgr->AddTask(task);
44
3c8efc07 45 mgr->ConnectInput(task, 0, inputc);
46 mgr->ConnectOutput(task, 1, outputc1);
47
48 /* setup task */
b9a457fc 49 task->SetEventSelectionFlag(kTRUE);
3c8efc07 50 task->SetVertexSelectionFlag(kTRUE);
51 task->SetVertexCut(25.0);
52 /* setup TOF calib */
53 task->GetTOFcalib()->SetRemoveMeanT0(kFALSE);
3fd7a5cd 54 task->GetTOFcalib()->SetUseLHCClockPhase(kTRUE);
3c8efc07 55 task->GetTOFcalib()->SetCalibrateTOFsignal(kTRUE);
56 task->GetTOFcalib()->SetCorrectTExp(kFALSE);
57 /* setup track cuts */
58 AliESDtrackCuts *trackCuts = task->GetTrackCuts();
59 trackCuts->SetPtRange(0.5, 10.);
60 trackCuts->SetEtaRange(-1.0, 1.0);
61 trackCuts->SetRequireITSRefit(kTRUE);
62 trackCuts->SetMinNClustersITS(1);
63 trackCuts->SetRequireTPCRefit(kTRUE);
64 trackCuts->SetMinNClustersTPC(70);
65 trackCuts->SetMaxChi2PerClusterTPC(4.);
66 trackCuts->SetAcceptKinkDaughters(kFALSE);
67 trackCuts->SetMaxDCAToVertexZ(3.2);
68 trackCuts->SetMaxDCAToVertexXY(2.4);
69 trackCuts->SetDCAToVertex2D(kTRUE);
70
71 /* return task */
72 return task;
73
74}