]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/AddTaskPWG4HighPtQATPConly.C
addedd new histos for cosmics
[u/mrichter/AliRoot.git] / PWG4 / macros / AddTaskPWG4HighPtQATPConly.C
CommitLineData
fdceab34 1//DEFINITION OF A FEW CONSTANTS
2
3AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly()//<some_parameters>)
4{
67ebd013 5 // Creates HighPtQATPConly analysis task and adds it to the analysis manager.
fdceab34 6
7 // A. Get the pointer to the existing analysis manager via the static access method.
8 //==============================================================================
9 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
10 if (!mgr) {
67ebd013 11 Error("AddTaskPWG4HighPtQATPConly", "No analysis manager to connect to.");
fdceab34 12 return NULL;
13 }
14
15 // B. Check the analysis type using the event handlers connected to the analysis
16 // manager. The availability of MC handler can also be checked here.
17 //==============================================================================
18 if (!mgr->GetInputEventHandler()) {
67ebd013 19 ::Error("AddTaskPWG4HighPtQATPConly", "This task requires an input event handler");
fdceab34 20 return NULL;
21 }
22 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
23 const char *analysisType = "ESD";//"TPC"
24
25 // C. Create the task, add it to manager.
26 //===========================================================================
27
28 //CREATE THE CUTS -----------------------------------------------
29 //Use AliESDtrackCuts
30 AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
31 //Standard Cuts
32 trackCuts->SetAcceptKinkDaughters(kFALSE);//
e50809ff 33 trackCuts->SetRequireTPCRefit(kTRUE);
fdceab34 34 trackCuts->SetEtaRange(-0.9,0.9);//-0.5,0.5);//
35 trackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);//
36 trackCuts->SetPtRange(0.15, 1e10);//
67ebd013 37 trackCuts->SetMinNClustersTPC(70);//
fdceab34 38 trackCuts->SetMaxChi2PerClusterTPC(3.5);//
39 //trackCuts->SetRequireITSRefit(kTRUE);
40 trackCuts->SetMaxDCAToVertexXY(2.4);
41 trackCuts->SetMaxDCAToVertexZ(3.2);
42 trackCuts->SetDCAToVertex2D(kTRUE);
43
44 AliESDtrackCuts *trackCutsITS = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts with ITSrefit");
45 trackCutsITS->SetAcceptKinkDaughters(kFALSE);//
46 trackCutsITS->SetRequireTPCRefit(kTRUE);//
47 trackCutsITS->SetEtaRange(-0.9,0.9);//-0.5,0.5);//
48 trackCutsITS->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);//
49 trackCutsITS->SetPtRange(0.15, 1e10);//
67ebd013 50 trackCutsITS->SetMinNClustersTPC(70);//
fdceab34 51 trackCutsITS->SetMaxChi2PerClusterTPC(3.5);//
52 trackCutsITS->SetRequireITSRefit(kTRUE);
53 trackCutsITS->SetMaxDCAToVertexXY(2.4);
54 trackCutsITS->SetMaxDCAToVertexZ(3.2);
55 trackCutsITS->SetDCAToVertex2D(kTRUE);
56
57 //Create the task
58 AliPWG4HighPtQATPConly *taskPWG4QA = new AliPWG4HighPtQATPConly("AliPWG4HighPtQATPConly");
59 taskPWG4QA->SetCuts(trackCuts);
60 taskPWG4QA->SetCutsITS(trackCutsITS);
65e8ecdd 61 taskPWG4QA->SetMaxCosmicAngle(0.008);
fdceab34 62
67ebd013 63
fdceab34 64 // E. Create ONLY the output containers for the data produced by the task.
65 // Get and connect other common input/output containers via the manager as below
66 //==============================================================================
67
68 //------ input data ------
69 // AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
70 TString outputfile = AliAnalysisManager::GetCommonFileName();
71 outputfile += ":PWG4_HighPtQATPConly";
72 //char *outputfile = "outputAliPWG4HighPtQATPConlyTestTrain.root";
73 AliAnalysisDataContainer *cout_hist0 = mgr->CreateContainer("qa_hists", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
74 AliAnalysisDataContainer *cout_hist1 = mgr->CreateContainer("qa_histsTPC", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
75 AliAnalysisDataContainer *cout_hist2 = mgr->CreateContainer("qa_histsITS", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
65e8ecdd 76 AliAnalysisDataContainer *cout_hist3 = mgr->CreateContainer("qa_histsCosmics", TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
67ebd013 77
fdceab34 78 mgr->AddTask(taskPWG4QA);
79
80 mgr->ConnectInput(taskPWG4QA,0,mgr->GetCommonInputContainer());
81 mgr->ConnectOutput(taskPWG4QA,0,cout_hist0);
82 mgr->ConnectOutput(taskPWG4QA,1,cout_hist1);
83 mgr->ConnectOutput(taskPWG4QA,2,cout_hist2);
65e8ecdd 84 mgr->ConnectOutput(taskPWG4QA,3,cout_hist3);
fdceab34 85
86 // Return task pointer at the end
87 return taskPWG4QA;
88}