]>
Commit | Line | Data |
---|---|---|
4552dff5 | 1 | AliAnalysisTask *AddTaskTPCPIDEtaTree(TString period = "", Bool_t isPbpOrpPb = kFALSE, Bool_t storeMultiplicity = kTRUE, |
ba8a8d20 | 2 | Bool_t correctdEdxEtaDependence = kFALSE, Bool_t correctdEdxMultiplicityDependence = kFALSE, |
b5ca2753 | 3 | Bool_t setDoAdditionalQA = kFALSE, |
4 | Int_t tpcCutType = AliTPCPIDBase::kTPCCutMIGeo /*AliTPCPIDBase::kTPCnclCut*/, | |
5 | Bool_t usePhiCut = kFALSE){ | |
88b71b9f | 6 | //get the current analysis manager |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | Error("AddTask_bhess_PIDetaTree", "No analysis manager found."); | |
10 | return 0; | |
11 | } | |
12 | ||
13 | //========= Add task to the ANALYSIS manager ===== | |
14 | AliTPCPIDEtaTree *task = new AliTPCPIDEtaTree("TPCPIDEtaTree"); | |
15 | task->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kINT7); | |
16 | ||
17 | // | |
18 | // Add track filters | |
19 | // | |
20 | AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter"); | |
21 | AliESDtrackCuts* esdTrackCutsL = 0x0; | |
22 | ||
23 | printf("\nSettings:\n"); | |
ba8a8d20 | 24 | if (period.Contains("LHC11") || period.Contains("LHC12") || period.Contains("LHC13")) { |
88b71b9f | 25 | esdTrackCutsL = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kTRUE); |
26 | printf("Using standard ITS-TPC track cuts 2011.\n"); | |
27 | } | |
ba8a8d20 | 28 | else if (period.Contains("LHC10")) { |
88b71b9f | 29 | esdTrackCutsL = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE); |
30 | printf("Using standard ITS-TPC track cuts 2010.\n"); | |
31 | } | |
32 | else { | |
33 | esdTrackCutsL = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kTRUE); | |
34 | printf("WARNING: Cuts not configured for this period!!! Using standard ITS-TPC track cuts 2011\n"); | |
35 | } | |
36 | ||
4552dff5 | 37 | task->SetStoreMultiplicity(storeMultiplicity); |
38 | if (task->GetStoreMultiplicity()) { | |
39 | printf("Storing multiplicity in tree!\n"); | |
88b71b9f | 40 | } |
41 | else { | |
4552dff5 | 42 | printf("NOT storing multiplicity in tree!\n"); |
88b71b9f | 43 | } |
44 | ||
45 | ||
ba8a8d20 | 46 | task->SetIsPbpOrpPb(isPbpOrpPb); |
47 | if (task->GetIsPbpOrpPb()) { | |
48 | printf("Collision type pPb/Pbp set -> Adapting vertex cuts!\n"); | |
88b71b9f | 49 | } |
50 | else { | |
ba8a8d20 | 51 | printf("Collision type different from pPb/Pbp -> Using standard vertex cuts!\n"); |
88b71b9f | 52 | } |
53 | ||
54 | ||
55 | trackFilter->AddCuts(esdTrackCutsL); | |
56 | task->SetTrackFilter(trackFilter); | |
57 | task->SetUsePhiCut(usePhiCut); | |
b5ca2753 | 58 | task->SetTPCcutType(tpcCutType); |
88b71b9f | 59 | |
60 | printf("UsePhiCut: %d\n", task->GetUsePhiCut()); | |
61 | printf("UseTPCCutMIGeo: %d\n", task->GetUseTPCCutMIGeo()); | |
b5ca2753 | 62 | printf("UseTPCnclCut: %d\n", task->GetUseTPCnclCut()); |
88b71b9f | 63 | |
64 | ||
65 | task->SetDoAdditionalQA(setDoAdditionalQA); | |
66 | ||
67 | if (task->GetDoAdditionalQA()) | |
68 | printf("Storing histos for additional QA!\n"); | |
69 | else | |
70 | printf("NOT storing histos for additional QA!\n"); | |
71 | ||
72 | task->SetZvtxCutEvent(10.0); | |
73 | printf("Cut on z position of vertex: %.2f cm\n", task->GetZvtxCutEvent()); | |
74 | ||
75 | task->SetEtaCut(0.9); | |
76 | printf("EtaCut: %.2f\n", task->GetEtaCut()); | |
77 | ||
78 | task->SetPtpcPionCut(0.6); | |
79 | printf("P_TPC_Pion cut: %.2f\n", task->GetPtpcPionCut()); | |
80 | ||
81 | task->SetStoreNumOfSubthresholdclusters(kTRUE); | |
82 | printf("Store num subthreshold clusters: %d\n", task->GetStoreNumOfSubthresholdclusters()); | |
83 | ||
84 | task->SetStoreNumClustersInActiveVolume(kTRUE); | |
85 | printf("Store num clusters in active volume: %d\n", task->GetStoreNumClustersInActiveVolume()); | |
86 | ||
87 | task->SetCorrectdEdxEtaDependence(correctdEdxEtaDependence); | |
88 | task->SetCorrectdEdxMultiplicityDependence(correctdEdxMultiplicityDependence); | |
89 | ||
90 | printf("Eta correction: %s for this task\n", | |
91 | task->GetCorrectdEdxEtaDependence() ? "enabled (only works if enabled in PIDresponse!)" : "explicitly disabled"); | |
92 | printf("Multiplicity correction: %s for this task\n\n", | |
93 | task->GetCorrectdEdxMultiplicityDependence() ? "enabled (only works if enabled in PIDresponse!)" : "explicitly disabled"); | |
94 | ||
95 | mgr->AddTask(task); | |
96 | ||
97 | ||
98 | //================================================ | |
99 | // data containers | |
100 | //================================================ | |
101 | // find input container | |
102 | //below the trunk version | |
103 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
104 | ||
105 | //dumm output container | |
106 | AliAnalysisDataContainer *coutput0 = | |
c61648e8 | 107 | mgr->CreateContainer("TPCPIDEtaTree_tree", |
88b71b9f | 108 | TTree::Class(), |
109 | AliAnalysisManager::kExchangeContainer, | |
110 | "TPCPIDEtaTree_default"); | |
111 | ||
112 | //define output containers, please use 'username'_'somename' | |
113 | AliAnalysisDataContainer *coutput1 = | |
114 | mgr->CreateContainer("TPCPIDEtaTree", TTree::Class(), | |
115 | AliAnalysisManager::kOutputContainer,"TPCPIDEtaTree.root"); | |
116 | AliAnalysisDataContainer *coutput2 = | |
c61648e8 | 117 | mgr->CreateContainer("TPCPIDEtaTreePions", TTree::Class(), |
88b71b9f | 118 | AliAnalysisManager::kOutputContainer,"TPCPIDEtaTreePions.root"); |
119 | AliAnalysisDataContainer *coutput3 = | |
120 | mgr->CreateContainer("TPCPIDEtaTreeAdditionalQA", TObjArray::Class(), | |
121 | AliAnalysisManager::kOutputContainer,"TPCPIDEtaTreeAddionalQA.root"); | |
122 | ||
123 | //connect containers | |
124 | mgr->ConnectInput(task, 0, cinput ); | |
125 | mgr->ConnectOutput(task, 0, coutput0); | |
126 | mgr->ConnectOutput(task, 1, coutput1); | |
127 | mgr->ConnectOutput(task, 2, coutput2); | |
128 | mgr->ConnectOutput(task, 3, coutput3); | |
129 | ||
130 | return task; | |
131 | } |