]>
Commit | Line | Data |
---|---|---|
8df8e382 | 1 | |
2 | void InitHistograms(AliDielectron *die, Int_t cutDefinition); | |
3 | void InitCF(AliDielectron* die, Int_t cutDefinition); | |
4 | ||
5 | void SetupTrackCuts(AliDielectron *die, Int_t cutDefinition); | |
6 | void SetupPairCuts(AliDielectron *die, Int_t cutDefinition); | |
7 | ||
48609e3d | 8 | AliESDtrackCuts *SetupESDtrackCuts(Int_t cutDefinition); |
8df8e382 | 9 | |
48609e3d | 10 | TString names=("nocut;TPCrefit;ESDcuts;ESDcuts+SPDany+TPCpid;ESDcuts+SPDfirst+TPCpid"); |
8df8e382 | 11 | TObjArray *arrNames=names.Tokenize(";"); |
12 | const Int_t nDie=arrNames->GetEntriesFast(); | |
13 | ||
48609e3d | 14 | AliDielectron* ConfigJpsi2ee(Int_t cutDefinition, Bool_t isAOD=kFALSE) |
8df8e382 | 15 | { |
16 | // | |
17 | // Setup the instance of AliDielectron | |
18 | // | |
48609e3d | 19 | if (isAOD) return 0x0; |
8df8e382 | 20 | // create the actual framework object |
21 | TString name=Form("%02d",cutDefinition); | |
22 | if (cutDefinition<arrNames->GetEntriesFast()){ | |
23 | name=arrNames->At(cutDefinition)->GetName(); | |
24 | } | |
25 | AliDielectron *die = | |
26 | new AliDielectron(Form("%s",name.Data()), | |
27 | Form("Track cuts: %s",name.Data())); | |
28 | ||
29 | // cut setup | |
30 | SetupTrackCuts(die,cutDefinition); | |
31 | SetupPairCuts(die,cutDefinition); | |
32 | ||
33 | // | |
34 | // histogram setup | |
35 | // only if an AliDielectronHistos object is attached to the | |
36 | // dielectron framework histograms will be filled | |
37 | // | |
38 | InitHistograms(die,cutDefinition); | |
39 | InitCF(die,cutDefinition); | |
40 | ||
41 | return die; | |
42 | } | |
43 | ||
44 | //______________________________________________________________________________________ | |
45 | void SetupTrackCuts(AliDielectron *die, Int_t cutDefinition) | |
46 | { | |
47 | // | |
48 | // Setup the track cuts | |
49 | // | |
48609e3d | 50 | |
8df8e382 | 51 | //ESD quality cuts |
52 | if (cutDefinition>0){ | |
48609e3d | 53 | die->GetTrackFilter().AddCuts(SetupESDtrackCuts(cutDefinition)); |
8df8e382 | 54 | } |
48609e3d | 55 | |
8df8e382 | 56 | if (cutDefinition>=3){ |
48609e3d | 57 | //ESD pid cuts |
58 | AliDielectronPID *pid=new AliDielectronPID("MC_Prod_Data","MC to reproduce data"); | |
59 | //proton cut to reproduce data parametrisation | |
60 | Double_t resolution=0.058; | |
61 | Double_t nSigma=3.; | |
62 | TF1 *ff=new TF1(Form("fBethe%d",AliPID::kProton), Form("(%f*%f+(AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])-AliExternalTrackParam::BetheBlochAleph(x/%f,[0],[1],[2],[3],[4])))/%f", nSigma,resolution, AliPID::ParticleMass(AliPID::kProton), AliPID::ParticleMass(AliPID::kElectron), resolution), 0.05,200.); | |
63 | ff->SetParameters(0.0283086/0.97,2.63394e+01,5.04114e-11,2.12543e+00,4.88663e+00); | |
64 | pid->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,3); | |
65 | pid->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,ff,10,0,3); | |
66 | pid->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3,3,kTRUE); | |
8df8e382 | 67 | die->GetTrackFilter().AddCuts(pid); |
48609e3d | 68 | } |
8df8e382 | 69 | } |
70 | ||
71 | //______________________________________________________________________________________ | |
72 | void SetupPairCuts(AliDielectron *die, Int_t cutDefinition) | |
73 | { | |
74 | // | |
75 | // Setup the pair cuts | |
76 | // | |
8df8e382 | 77 | |
48609e3d | 78 | //reject conversions |
79 | AliDielectronVarCuts *openingAngleCut=new AliDielectronVarCuts("OpeningAngle","Opening angle>0.35rad"); | |
80 | openingAngleCut->AddCut(AliDielectronVarManager::kOpeningAngle,.035,4.); | |
81 | if(cutDefinition>1) | |
82 | die->GetPairFilter().AddCuts(openingAngleCut); | |
8df8e382 | 83 | } |
84 | ||
85 | //______________________________________________________________________________________ | |
48609e3d | 86 | AliESDtrackCuts *SetupESDtrackCuts(Int_t cutDefinition) |
8df8e382 | 87 | { |
88 | // | |
89 | // Setup default AliESDtrackCuts | |
90 | // | |
91 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts; | |
48609e3d | 92 | if(cutDefinition==1) { |
93 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
94 | } | |
95 | if(cutDefinition>1) { | |
96 | // esdTrackCuts->SetEtaRange(-0.9,0.9); | |
97 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
98 | esdTrackCuts->SetMaxDCAToVertexZ(3.0); | |
99 | esdTrackCuts->SetMaxDCAToVertexXY(1); | |
100 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
101 | esdTrackCuts->SetAcceptKinkDaughters(kFALSE); | |
102 | esdTrackCuts->SetMinNClustersTPC(80); | |
103 | esdTrackCuts->SetMaxChi2PerClusterTPC(4); | |
104 | } | |
105 | if(cutDefinition==3) { | |
106 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); | |
107 | } | |
108 | if(cutDefinition==4) { | |
109 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst); | |
110 | } | |
111 | ||
8df8e382 | 112 | return esdTrackCuts; |
113 | } | |
114 | ||
115 | //______________________________________________________________________________________ | |
116 | void InitHistograms(AliDielectron *die, Int_t cutDefinition) | |
117 | { | |
118 | // | |
119 | // Initialise the histograms | |
120 | // | |
121 | ||
122 | //Setup histogram classes | |
123 | AliDielectronHistos *histos= | |
124 | new AliDielectronHistos(die->GetName(), | |
125 | die->GetTitle()); | |
126 | ||
127 | //Initialise histogram classes | |
128 | histos->SetReservedWords("Track;Pair"); | |
129 | ||
130 | //Event class | |
131 | histos->AddClass("Event"); | |
132 | ||
133 | //Track classes | |
134 | //to fill also track info from 2nd event loop until 2 | |
135 | for (Int_t i=0; i<2; ++i){ | |
136 | histos->AddClass(Form("Track_%s",AliDielectron::TrackClassName(i))); | |
137 | } | |
138 | ||
139 | //Pair classes | |
140 | // to fill also mixed event histograms loop until 10 | |
141 | for (Int_t i=0; i<3; ++i){ | |
142 | histos->AddClass(Form("Pair_%s",AliDielectron::PairClassName(i))); | |
143 | } | |
144 | //add histograms to event class | |
145 | histos->UserHistogram("Event","nEvents","Number of processed events after cuts;Number events", | |
146 | 1,0.,1.,AliDielectronVarManager::kNevents); | |
147 | ||
148 | //add histograms to Track classes | |
149 | histos->UserHistogram("Track","Pt","Pt;Pt [GeV];#tracks",200,0,20.,AliDielectronVarManager::kPt); | |
150 | histos->UserHistogram("Track","dEdx_P","dEdx;P [GeV];TPC signal (arb units);#tracks", | |
151 | 400,1e-2,20.,200,0.,200.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCsignal,kTRUE); | |
152 | histos->UserHistogram("Track","TPCnSigma_P","TPC number of sigmas Electrons;P [GeV];TPC number of sigmas Electrons;#tracks", | |
153 | 400,1e-2,20.,100,-10.,10.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCnSigmaEle,kTRUE); | |
154 | histos->UserHistogram("Track","dXY","dXY;dXY [cm];#tracks",200,-2.,2.,AliDielectronVarManager::kImpactParXY); | |
155 | ||
156 | //add histograms to Pair classes | |
157 | histos->UserHistogram("Pair","InvMass","Inv.Mass;Inv. Mass [GeV];#pairs", | |
158 | 500,0.,4.,AliDielectronVarManager::kM); | |
159 | histos->UserHistogram("Pair","Rapidity","Rapidity;Rapidity;#pairs", | |
160 | 100,-2.,2.,AliDielectronVarManager::kY); | |
161 | histos->UserHistogram("Pair","OpeningAngle","Opening angle;angle", | |
162 | 100,0.,3.15,AliDielectronVarManager::kOpeningAngle); | |
163 | histos->UserHistogram("Pair","InvMass_OpeningAngle","Opening angle:Inv.Mass;Inv. Mass [GeV];angle", | |
164 | 100,0.,4.,100,0.,3.15,AliDielectronVarManager::kM,AliDielectronVarManager::kOpeningAngle); | |
165 | ||
166 | die->SetHistogramManager(histos); | |
167 | } | |
168 | ||
169 | void InitCF(AliDielectron* die, Int_t cutDefinition) | |
170 | { | |
171 | // | |
172 | // Setupd the CF Manager if needed | |
173 | // | |
174 | ||
175 | AliDielectronCF *cf=new AliDielectronCF(die->GetName(),die->GetTitle()); | |
48609e3d | 176 | |
177 | //pair variables ********************************************************** | |
178 | // j/psi pt ------------------ | |
179 | TVectorD *binLimPt=new TVectorD(14); | |
180 | (*binLimPt)[0]=0.0; (*binLimPt)[1]=0.4; (*binLimPt)[2]=0.8; (*binLimPt)[3]=1.4; | |
181 | (*binLimPt)[4]=2.0; (*binLimPt)[5]=2.8; (*binLimPt)[6]=3.5; (*binLimPt)[7]=4.2; | |
182 | (*binLimPt)[8]=5.0; (*binLimPt)[9]=6.0; (*binLimPt)[10]=7.0; (*binLimPt)[11]=8.0; | |
183 | (*binLimPt)[12]=9.0; (*binLimPt)[13]=10.0; | |
184 | cf->AddVariable(AliDielectronVarManager::kPt, binLimPt); | |
185 | // j/psi y ------------------- | |
186 | TVectorD *binLimY=new TVectorD(13); | |
187 | (*binLimY)[0]=-1.0; (*binLimY)[1]=-0.88; (*binLimY)[2]=-0.8; | |
188 | (*binLimY)[3]=-0.6; (*binLimY)[4]=-0.4; (*binLimY)[5]=-0.2; (*binLimY)[6]=0.0; | |
189 | (*binLimY)[7]=0.2; (*binLimY)[8]=0.4; (*binLimY)[9]=0.6; (*binLimY)[10]=0.8; | |
190 | (*binLimY)[11]=0.88; (*binLimY)[12]=1.0; | |
191 | cf->AddVariable(AliDielectronVarManager::kY, binLimY); | |
192 | // pair type ----------------- | |
193 | cf->AddVariable(AliDielectronVarManager::kPairType, 3, 0.0, 3.0); | |
194 | //leg variables ********************************************************** | |
195 | // leg pseudo-rapidity -------------------------- | |
196 | cf->AddVariable(AliDielectronVarManager::kEta, binLimY, kTRUE); | |
197 | // leg TPC n-sigma electron --------------------- | |
198 | // cf->AddVariable(AliDielectronVarManager::kTPCnSigmaEle, 12, -3.0, 3.0, kTRUE); | |
199 | // leg pt --------------------------------------- | |
200 | TVectorD *binLimPtLeg=new TVectorD(7); | |
201 | (*binLimPtLeg)[0]=0.0; (*binLimPtLeg)[1]=0.8; (*binLimPtLeg)[2]=0.9; | |
202 | (*binLimPtLeg)[3]=1.0; (*binLimPtLeg)[4]=1.1; (*binLimPtLeg)[5]=1.2; | |
203 | (*binLimPtLeg)[6]=20.0; | |
204 | cf->AddVariable(AliDielectronVarManager::kPt, binLimPtLeg, kTRUE); | |
205 | // leg Ncls TPC --------------------------------- | |
206 | TVectorD *binLimNclsTPC=new TVectorD(7); | |
207 | (*binLimNclsTPC)[0]=0.0; (*binLimNclsTPC)[1]=80.0; (*binLimNclsTPC)[2]=90.0; | |
208 | (*binLimNclsTPC)[3]=100.0; (*binLimNclsTPC)[4]=110.0; (*binLimNclsTPC)[5]=120.0; | |
209 | (*binLimNclsTPC)[6]=160.0; | |
210 | cf->AddVariable(AliDielectronVarManager::kNclsTPC, binLimNclsTPC, kTRUE); | |
211 | // ------------------------------------------------------------------------------- | |
212 | ||
213 | if(cutDefinition==0) { | |
8df8e382 | 214 | cf->SetStepForMCtruth(); |
8df8e382 | 215 | cf->SetStepForAfterAllCuts(kFALSE); |
48609e3d | 216 | cf->SetStepsForSignal(kFALSE); |
8df8e382 | 217 | } |
48609e3d | 218 | if(cutDefinition>0){ |
219 | // cf->SetStepForNoCutsMCmotherPid(); | |
220 | cf->SetStepForAfterAllCuts(); | |
221 | // cf->SetStepsForEachCut(); | |
222 | cf->SetStepsForSignal(); | |
223 | // cf->SetStepsForBackground(); | |
8df8e382 | 224 | } |
8df8e382 | 225 | die->SetCFManagerPair(cf); |
226 | ||
227 | } |