]>
Commit | Line | Data |
---|---|---|
d486095a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
27de2dfb | 16 | /* $Id$ */ |
17 | ||
993bfba1 | 18 | //************************************************************************* |
19 | // Class AliAnalysisTaskSEDplus | |
20 | // AliAnalysisTaskSE for the D+ candidates Invariant Mass Histogram and | |
21 | //comparison of heavy-flavour decay candidates | |
22 | // to MC truth (kinematics stored in the AOD) | |
4afc48a2 | 23 | // Authors: Renu Bala, bala@to.infn.it |
24 | // F. Prino, prino@to.infn.it | |
25 | // G. Ortona, ortona@to.infn.it | |
d486095a | 26 | ///////////////////////////////////////////////////////////// |
27 | ||
28 | #include <TClonesArray.h> | |
29 | #include <TNtuple.h> | |
13808a30 | 30 | #include <TCanvas.h> |
d486095a | 31 | #include <TList.h> |
1f4e9722 | 32 | #include <TString.h> |
d486095a | 33 | #include <TH1F.h> |
4afc48a2 | 34 | #include <TDatabasePDG.h> |
b557eb43 | 35 | |
36 | #include "AliAnalysisManager.h" | |
4c230f6d | 37 | #include "AliRDHFCutsDplustoKpipi.h" |
b557eb43 | 38 | #include "AliAODHandler.h" |
d486095a | 39 | #include "AliAODEvent.h" |
40 | #include "AliAODVertex.h" | |
41 | #include "AliAODTrack.h" | |
42 | #include "AliAODMCHeader.h" | |
43 | #include "AliAODMCParticle.h" | |
44 | #include "AliAODRecoDecayHF3Prong.h" | |
45 | #include "AliAnalysisVertexingHF.h" | |
46 | #include "AliAnalysisTaskSE.h" | |
47 | #include "AliAnalysisTaskSEDplus.h" | |
a96083b9 | 48 | #include "AliNormalizationCounter.h" |
d486095a | 49 | |
50 | ClassImp(AliAnalysisTaskSEDplus) | |
51 | ||
52 | ||
53 | //________________________________________________________________________ | |
54 | AliAnalysisTaskSEDplus::AliAnalysisTaskSEDplus(): | |
55 | AliAnalysisTaskSE(), | |
595cc7e2 | 56 | fOutput(0), |
57 | fHistNEvents(0), | |
58 | fPtVsMass(0), | |
59 | fPtVsMassTC(0), | |
60 | fYVsPt(0), | |
61 | fYVsPtTC(0), | |
62 | fYVsPtSig(0), | |
63 | fYVsPtSigTC(0), | |
64 | fNtupleDplus(0), | |
65 | fUpmasslimit(1.965), | |
66 | fLowmasslimit(1.765), | |
67 | fNPtBins(0), | |
68 | fBinWidth(0.002), | |
69 | fListCuts(0), | |
70 | fRDCutsProduction(0), | |
71 | fRDCutsAnalysis(0), | |
a96083b9 | 72 | fCounter(0), |
595cc7e2 | 73 | fFillNtuple(kFALSE), |
74 | fReadMC(kFALSE), | |
a96083b9 | 75 | fUseStrangeness(kFALSE), |
5fc4893f | 76 | fUseBit(kTRUE), |
3ec9254b | 77 | fDoLS(0) |
d486095a | 78 | { |
82bb8d4b | 79 | // Default constructor |
d486095a | 80 | } |
81 | ||
82 | //________________________________________________________________________ | |
4c230f6d | 83 | AliAnalysisTaskSEDplus::AliAnalysisTaskSEDplus(const char *name,AliRDHFCutsDplustoKpipi *dpluscutsana,AliRDHFCutsDplustoKpipi *dpluscutsprod,Bool_t fillNtuple): |
d486095a | 84 | AliAnalysisTaskSE(name), |
4afc48a2 | 85 | fOutput(0), |
86 | fHistNEvents(0), | |
595cc7e2 | 87 | fPtVsMass(0), |
88 | fPtVsMassTC(0), | |
89 | fYVsPt(0), | |
90 | fYVsPtTC(0), | |
91 | fYVsPtSig(0), | |
92 | fYVsPtSigTC(0), | |
d486095a | 93 | fNtupleDplus(0), |
82bb8d4b | 94 | fUpmasslimit(1.965), |
95 | fLowmasslimit(1.765), | |
96 | fNPtBins(0), | |
993bfba1 | 97 | fBinWidth(0.002), |
4c230f6d | 98 | fListCuts(0), |
99 | fRDCutsProduction(dpluscutsprod), | |
100 | fRDCutsAnalysis(dpluscutsana), | |
a96083b9 | 101 | fCounter(0), |
1f4e9722 | 102 | fFillNtuple(fillNtuple), |
4afc48a2 | 103 | fReadMC(kFALSE), |
a96083b9 | 104 | fUseStrangeness(kFALSE), |
5fc4893f | 105 | fUseBit(kTRUE), |
3ec9254b | 106 | fDoLS(0) |
d486095a | 107 | { |
4c230f6d | 108 | // |
109 | // Standrd constructor | |
110 | // | |
a6003e0a | 111 | fNPtBins=fRDCutsAnalysis->GetNPtBins(); |
d486095a | 112 | // Default constructor |
82bb8d4b | 113 | // Output slot #1 writes into a TList container |
d486095a | 114 | DefineOutput(1,TList::Class()); //My private output |
4c230f6d | 115 | // Output slot #2 writes cut to private output |
116 | // DefineOutput(2,AliRDHFCutsDplustoKpipi::Class()); | |
117 | DefineOutput(2,TList::Class()); | |
a96083b9 | 118 | // Output slot #3 writes cut to private output |
119 | DefineOutput(3,AliNormalizationCounter::Class()); | |
120 | ||
1f4e9722 | 121 | if(fFillNtuple){ |
a96083b9 | 122 | // Output slot #4 writes into a TNtuple container |
123 | DefineOutput(4,TNtuple::Class()); //My private output | |
1f4e9722 | 124 | } |
d486095a | 125 | } |
126 | ||
127 | //________________________________________________________________________ | |
128 | AliAnalysisTaskSEDplus::~AliAnalysisTaskSEDplus() | |
129 | { | |
4c230f6d | 130 | // |
d486095a | 131 | // Destructor |
4c230f6d | 132 | // |
d486095a | 133 | if (fOutput) { |
134 | delete fOutput; | |
135 | fOutput = 0; | |
136 | } | |
137c7bcd | 137 | if(fHistNEvents){ |
138 | delete fHistNEvents; | |
139 | fHistNEvents=0; | |
140 | } | |
37fc80e6 | 141 | for(Int_t i=0;i<3;i++){ |
142 | if(fHistCentrality[i]){delete fHistCentrality[i]; fHistCentrality[i]=0;} | |
143 | } | |
137c7bcd | 144 | for(Int_t i=0;i<3*fNPtBins;i++){ |
145 | if(fMassHist[i]){ delete fMassHist[i]; fMassHist[i]=0;} | |
146 | if(fCosPHist[i]){ delete fCosPHist[i]; fCosPHist[i]=0;} | |
147 | if(fDLenHist[i]){ delete fDLenHist[i]; fDLenHist[i]=0;} | |
148 | if(fSumd02Hist[i]){ delete fSumd02Hist[i]; fSumd02Hist[i]=0;} | |
149 | if(fSigVertHist[i]){ delete fSigVertHist[i]; fSigVertHist[i]=0;} | |
150 | if(fPtMaxHist[i]){ delete fPtMaxHist[i]; fPtMaxHist[i]=0;} | |
3ec9254b | 151 | if(fPtKHist[i]){ delete fPtKHist[i]; fPtKHist[i]=0;} |
152 | if(fPtpi1Hist[i]){ delete fPtpi1Hist[i]; fPtpi1Hist[i]=0;} | |
153 | if(fPtpi2Hist[i]){ delete fPtpi2Hist[i]; fPtpi2Hist[i]=0;} | |
137c7bcd | 154 | if(fDCAHist[i]){ delete fDCAHist[i]; fDCAHist[i]=0;} |
155 | if(fMassHistTC[i]){ delete fMassHistTC[i]; fMassHistTC[i]=0;} | |
bb69f127 | 156 | if(fMassHistTCPlus[i]){ delete fMassHistTCPlus[i]; fMassHistTCPlus[i]=0;} |
157 | if(fMassHistTCMinus[i]){ delete fMassHistTCMinus[i]; fMassHistTCMinus[i]=0;} | |
4c230f6d | 158 | |
3ec9254b | 159 | if(fDLxy[i]){delete fDLxy[i]; fDLxy[i]=0;} |
160 | if(fDLxyTC[i]){delete fDLxyTC[i]; fDLxyTC[i]=0;} | |
161 | if(fCosxy[i]){delete fCosxy[i]; fCosxy[i]=0;} | |
162 | if(fCosxyTC[i]){delete fCosxyTC[i]; fCosxyTC[i]=0;} | |
137c7bcd | 163 | if(fMassHistLS[i]){ delete fMassHistLS[i]; fMassHistLS[i]=0;} |
164 | if(fCosPHistLS[i]){ delete fCosPHistLS[i]; fCosPHistLS[i]=0;} | |
165 | if(fDLenHistLS[i]){ delete fDLenHistLS[i]; fDLenHistLS[i]=0;} | |
166 | if(fSumd02HistLS[i]){ delete fSumd02HistLS[i]; fSumd02HistLS[i]=0;} | |
167 | if(fSigVertHistLS[i]){ delete fSigVertHistLS[i]; fSigVertHistLS[i]=0;} | |
168 | if(fPtMaxHistLS[i]){ delete fPtMaxHistLS[i]; fPtMaxHistLS[i]=0;} | |
169 | if(fDCAHistLS[i]){ delete fDCAHistLS[i]; fDCAHistLS[i]=0;} | |
170 | if(fMassHistLSTC[i]){ delete fMassHistLSTC[i]; fMassHistLSTC[i]=0;} | |
171 | } | |
172 | if(fPtVsMass){ | |
173 | delete fPtVsMass; | |
174 | fPtVsMass=0; | |
175 | } | |
176 | if(fPtVsMassTC){ | |
177 | delete fPtVsMassTC; | |
178 | fPtVsMassTC=0; | |
179 | } | |
180 | if(fYVsPt){ | |
181 | delete fYVsPt; | |
182 | fYVsPt=0; | |
183 | } | |
184 | if(fYVsPtTC){ | |
185 | delete fYVsPtTC; | |
186 | fYVsPtTC=0; | |
187 | } | |
188 | if(fYVsPtSig){ | |
189 | delete fYVsPtSig; | |
190 | fYVsPtSig=0; | |
191 | } | |
192 | if(fYVsPtSigTC){ | |
193 | delete fYVsPtSigTC; | |
194 | fYVsPtSigTC=0; | |
195 | } | |
196 | if(fNtupleDplus){ | |
197 | delete fNtupleDplus; | |
198 | fNtupleDplus=0; | |
199 | } | |
4c230f6d | 200 | if (fListCuts) { |
201 | delete fListCuts; | |
202 | fListCuts = 0; | |
d486095a | 203 | } |
4c230f6d | 204 | if(fRDCutsProduction){ |
205 | delete fRDCutsProduction; | |
206 | fRDCutsProduction = 0; | |
207 | } | |
137c7bcd | 208 | if(fRDCutsAnalysis){ |
4c230f6d | 209 | delete fRDCutsAnalysis; |
210 | fRDCutsAnalysis = 0; | |
211 | } | |
212 | ||
a96083b9 | 213 | if(fCounter){ |
214 | delete fCounter; | |
215 | fCounter = 0; | |
216 | } | |
137c7bcd | 217 | |
218 | ||
d486095a | 219 | } |
82bb8d4b | 220 | //_________________________________________________________________ |
221 | void AliAnalysisTaskSEDplus::SetMassLimits(Float_t range){ | |
4c230f6d | 222 | // set invariant mass limits |
993bfba1 | 223 | Float_t bw=GetBinWidth(); |
82bb8d4b | 224 | fUpmasslimit = 1.865+range; |
225 | fLowmasslimit = 1.865-range; | |
993bfba1 | 226 | SetBinWidth(bw); |
82bb8d4b | 227 | } |
228 | //_________________________________________________________________ | |
229 | void AliAnalysisTaskSEDplus::SetMassLimits(Float_t lowlimit, Float_t uplimit){ | |
4c230f6d | 230 | // set invariant mass limits |
82bb8d4b | 231 | if(uplimit>lowlimit) |
232 | { | |
993bfba1 | 233 | Float_t bw=GetBinWidth(); |
82bb8d4b | 234 | fUpmasslimit = lowlimit; |
235 | fLowmasslimit = uplimit; | |
993bfba1 | 236 | SetBinWidth(bw); |
82bb8d4b | 237 | } |
238 | } | |
993bfba1 | 239 | //________________________________________________________________ |
240 | void AliAnalysisTaskSEDplus::SetBinWidth(Float_t w){ | |
241 | Float_t width=w; | |
242 | Int_t nbins=(Int_t)((fUpmasslimit-fLowmasslimit)/width+0.5); | |
243 | Int_t missingbins=4-nbins%4; | |
244 | nbins=nbins+missingbins; | |
245 | width=(fUpmasslimit-fLowmasslimit)/nbins; | |
246 | if(missingbins!=0){ | |
247 | printf("AliAnalysisTaskSEDplus::SetBinWidth: W-bin width of %f will produce histograms not rebinnable by 4. New width set to %f\n",w,width); | |
248 | } | |
249 | else{ | |
250 | if(fDebug>1) printf("AliAnalysisTaskSEDplus::SetBinWidth: width set to %f\n",width); | |
251 | } | |
252 | fBinWidth=width; | |
253 | } | |
82bb8d4b | 254 | //_________________________________________________________________ |
993bfba1 | 255 | Int_t AliAnalysisTaskSEDplus::GetNBinsHistos(){ |
256 | return (Int_t)((fUpmasslimit-fLowmasslimit)/fBinWidth+0.5); | |
257 | } | |
82bb8d4b | 258 | //_________________________________________________________________ |
259 | void AliAnalysisTaskSEDplus::LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS){ | |
4c230f6d | 260 | // |
261 | // | |
262 | // Fill the Like Sign histograms | |
263 | // | |
3ec9254b | 264 | if(fDebug>1)printf("started LS\n"); |
5fc4893f | 265 | Bool_t fPlotVariables=kTRUE; |
266 | //histograms for like sign | |
267 | Int_t nbins=GetNBinsHistos();; | |
268 | TH1F *histLSPlus = new TH1F("LSPlus","LSPlus",nbins,fLowmasslimit,fUpmasslimit); | |
269 | TH1F *histLSMinus = new TH1F("LSMinus","LSMinus",nbins,fLowmasslimit,fUpmasslimit); | |
270 | ||
82bb8d4b | 271 | Int_t nPosTrks=0,nNegTrks=0; |
82bb8d4b | 272 | Int_t nOStriplets = arrayOppositeSign->GetEntriesFast(); |
82bb8d4b | 273 | Int_t nDplusLS=0; |
5fc4893f | 274 | Int_t nDminusLS=0; |
82bb8d4b | 275 | Int_t nLikeSign = arrayLikeSign->GetEntriesFast(); |
5fc4893f | 276 | Int_t index=0; |
277 | ||
278 | // loop over like sign candidates | |
82bb8d4b | 279 | for(Int_t iLikeSign = 0; iLikeSign < nLikeSign; iLikeSign++) { |
280 | AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)arrayLikeSign->UncheckedAt(iLikeSign); | |
5fc4893f | 281 | if(fUseBit && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts))continue; |
82bb8d4b | 282 | Bool_t unsetvtx=kFALSE; |
283 | if(!d->GetOwnPrimaryVtx()) { | |
284 | d->SetOwnPrimaryVtx(vtx1); // needed to compute all variables | |
285 | unsetvtx=kTRUE; | |
286 | } | |
4b99797c | 287 | Double_t ptCand = d->Pt(); |
288 | Int_t iPtBin = fRDCutsAnalysis->PtBin(ptCand); | |
289 | if(iPtBin<0)continue; | |
290 | Int_t sign= d->GetCharge(); | |
291 | if(sign>0){ | |
292 | nPosTrks++; | |
293 | }else{ | |
294 | nNegTrks++; | |
295 | } | |
5fc4893f | 296 | // if(fRDCutsProduction->IsSelected(d,AliRDHFCuts::kCandidate,aod)){ |
297 | fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kCandidate,aod); | |
298 | Int_t passTightCuts=fRDCutsAnalysis->GetIsSelectedCuts(); | |
299 | if(passTightCuts>0){ | |
82bb8d4b | 300 | Float_t invMass = d->InvMassDplus(); |
82bb8d4b | 301 | index=GetLSHistoIndex(iPtBin); |
82bb8d4b | 302 | fMassHistLS[index+1]->Fill(invMass); |
5fc4893f | 303 | if(sign>0){ |
304 | histLSPlus->Fill(invMass); | |
305 | nDplusLS++; | |
306 | }else{ | |
307 | histLSMinus->Fill(invMass); | |
308 | nDminusLS++; | |
309 | } | |
310 | if(fPlotVariables){ | |
311 | Double_t dlen=d->DecayLength(); | |
312 | Double_t cosp=d->CosPointingAngle(); | |
313 | Double_t sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); | |
314 | Double_t dca=d->GetDCA(); | |
315 | Double_t sigvert=d->GetSigmaVert(); | |
316 | Double_t ptmax=0; | |
317 | for(Int_t i=0;i<3;i++){ | |
318 | if(d->PtProng(i)>ptmax)ptmax=d->PtProng(i); | |
319 | } | |
320 | fCosPHistLS[iPtBin]->Fill(cosp); | |
321 | fDLenHistLS[iPtBin]->Fill(dlen); | |
322 | fSumd02HistLS[iPtBin]->Fill(sumD02); | |
323 | fSigVertHistLS[iPtBin]->Fill(sigvert); | |
324 | fPtMaxHistLS[iPtBin]->Fill(ptmax); | |
325 | fDCAHistLS[iPtBin]->Fill(dca); | |
82bb8d4b | 326 | } |
327 | } | |
328 | if(unsetvtx) d->UnsetOwnPrimaryVtx(); | |
329 | } | |
5fc4893f | 330 | //wei:normalized to the number of combinations (production) |
331 | //wei2:normalized to the number of LS/OS (production) | |
332 | //wei3:normalized to the number of LS/OS (analysis) | |
333 | //wei4:normalized to the number of combinations (analysis) | |
334 | Float_t wei2=0; | |
335 | if(nLikeSign!=0)wei2 = (Float_t)nOStriplets/(Float_t)nLikeSign; | |
336 | Float_t wei3=0; | |
3ec9254b | 337 | if(nDplusLS!=0)wei3 = (Float_t)nDplusOS/(Float_t)(nDplusLS+nDminusLS); |
5fc4893f | 338 | Float_t weiplus=1.,weiminus=1.; |
339 | Float_t wei4plus=1.,wei4minus=1.; | |
340 | //wei* should be automatically protected, since to get a triplet there must be at least 3 good tracks in the event | |
341 | if(nPosTrks>2)weiplus=3.*(Float_t)nNegTrks/((Float_t)nPosTrks-2.); | |
342 | if(nDplusLS>2)wei4plus=3.*(Float_t)nDminusLS/((Float_t)nDplusLS-2.); | |
343 | if(nNegTrks>2)weiminus=3.*(Float_t)nPosTrks/((Float_t)nNegTrks-2.); | |
344 | if(nDminusLS>2)wei4minus=3.*(Float_t)nDplusLS/((Float_t)nDminusLS-2.); | |
345 | ||
346 | fMassHistLS[index]->Add(histLSPlus,weiplus); | |
347 | fMassHistLS[index]->Add(histLSMinus,weiminus); | |
348 | fMassHistLS[index+2]->Add(histLSPlus,wei2); | |
349 | fMassHistLS[index+2]->Add(histLSMinus,wei2); | |
350 | fMassHistLS[index+3]->Add(histLSPlus,wei3); | |
351 | fMassHistLS[index+3]->Add(histLSMinus,wei3); | |
352 | fMassHistLS[index+4]->Add(histLSPlus,wei4plus); | |
353 | fMassHistLS[index+4]->Add(histLSMinus,wei4minus); | |
354 | ||
355 | delete histLSPlus;histLSPlus=0; | |
356 | delete histLSMinus;histLSMinus=0; | |
82bb8d4b | 357 | |
5fc4893f | 358 | if(fDebug>1) printf("LS analysis terminated\n"); |
82bb8d4b | 359 | } |
d486095a | 360 | |
4c230f6d | 361 | //__________________________________________ |
362 | void AliAnalysisTaskSEDplus::Init(){ | |
363 | // | |
364 | // Initialization | |
365 | // | |
d486095a | 366 | if(fDebug > 1) printf("AnalysisTaskSEDplus::Init() \n"); |
4c230f6d | 367 | |
368 | //PostData(2,fRDCutsloose);//we should then put those cuts in a tlist if we have more than 1 | |
369 | fListCuts=new TList(); | |
90993728 | 370 | AliRDHFCutsDplustoKpipi *production = new AliRDHFCutsDplustoKpipi(*fRDCutsProduction); |
371 | production->SetName("ProductionCuts"); | |
372 | AliRDHFCutsDplustoKpipi *analysis = new AliRDHFCutsDplustoKpipi(*fRDCutsAnalysis); | |
373 | analysis->SetName("AnalysisCuts"); | |
4c230f6d | 374 | |
375 | fListCuts->Add(production); | |
376 | fListCuts->Add(analysis); | |
377 | PostData(2,fListCuts); | |
378 | ||
d486095a | 379 | return; |
380 | } | |
381 | ||
382 | //________________________________________________________________________ | |
383 | void AliAnalysisTaskSEDplus::UserCreateOutputObjects() | |
384 | { | |
385 | // Create the output container | |
386 | // | |
387 | if(fDebug > 1) printf("AnalysisTaskSEDplus::UserCreateOutputObjects() \n"); | |
388 | ||
389 | // Several histograms are more conveniently managed in a TList | |
390 | fOutput = new TList(); | |
391 | fOutput->SetOwner(); | |
1f4e9722 | 392 | fOutput->SetName("OutputHistos"); |
393 | ||
1f4e9722 | 394 | TString hisname; |
82bb8d4b | 395 | Int_t index=0; |
396 | Int_t indexLS=0; | |
993bfba1 | 397 | Int_t nbins=GetNBinsHistos(); |
37fc80e6 | 398 | fHistCentrality[0]=new TH1F("centrality","centrality",100,0.5,30000.5); |
399 | fHistCentrality[1]=new TH1F("centrality(selectedCent)","centrality(selectedCent)",100,0.5,30000.5); | |
400 | fHistCentrality[2]=new TH1F("centrality(OutofCent)","centrality(OutofCent)",100,0.5,30000.5); | |
401 | for(Int_t i=0;i<3;i++){ | |
402 | fHistCentrality[i]->Sumw2(); | |
403 | fOutput->Add(fHistCentrality[i]); | |
404 | } | |
82bb8d4b | 405 | for(Int_t i=0;i<fNPtBins;i++){ |
1f4e9722 | 406 | |
82bb8d4b | 407 | index=GetHistoIndex(i); |
408 | indexLS=GetLSHistoIndex(i); | |
ba9ae5b2 | 409 | |
82bb8d4b | 410 | hisname.Form("hMassPt%d",i); |
993bfba1 | 411 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 412 | fMassHist[index]->Sumw2(); |
ba9ae5b2 | 413 | hisname.Form("hCosPAllPt%d",i); |
993bfba1 | 414 | fCosPHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 415 | fCosPHist[index]->Sumw2(); |
416 | hisname.Form("hDLenAllPt%d",i); | |
993bfba1 | 417 | fDLenHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 418 | fDLenHist[index]->Sumw2(); |
419 | hisname.Form("hSumd02AllPt%d",i); | |
993bfba1 | 420 | fSumd02Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 421 | fSumd02Hist[index]->Sumw2(); |
422 | hisname.Form("hSigVertAllPt%d",i); | |
993bfba1 | 423 | fSigVertHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 424 | fSigVertHist[index]->Sumw2(); |
425 | hisname.Form("hPtMaxAllPt%d",i); | |
993bfba1 | 426 | fPtMaxHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
ba9ae5b2 | 427 | fPtMaxHist[index]->Sumw2(); |
3ec9254b | 428 | hisname.Form("hPtKPt%d",i); |
429 | fPtKHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
430 | fPtKHist[index]->Sumw2(); | |
431 | hisname.Form("hPtpi1Pt%d",i); | |
432 | fPtpi1Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
433 | fPtpi1Hist[index]->Sumw2(); | |
434 | hisname.Form("hPtpi2Pt%d",i); | |
435 | fPtpi2Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
436 | fPtpi2Hist[index]->Sumw2(); | |
ba9ae5b2 | 437 | hisname.Form("hDCAAllPt%d",i); |
993bfba1 | 438 | fDCAHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 439 | fDCAHist[index]->Sumw2(); |
440 | ||
3ec9254b | 441 | hisname.Form("hDLxyPt%d",i); |
442 | fDLxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
443 | fDLxy[index]->Sumw2(); | |
444 | hisname.Form("hCosxyPt%d",i); | |
445 | fCosxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
446 | fCosxy[index]->Sumw2(); | |
447 | hisname.Form("hDLxyPt%dTC",i); | |
448 | fDLxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
449 | fDLxyTC[index]->Sumw2(); | |
450 | hisname.Form("hCosxyPt%dTC",i); | |
451 | fCosxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
452 | fCosxyTC[index]->Sumw2(); | |
453 | ||
ba9ae5b2 | 454 | |
455 | ||
1f4e9722 | 456 | hisname.Form("hMassPt%dTC",i); |
993bfba1 | 457 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 458 | fMassHistTC[index]->Sumw2(); |
bb69f127 | 459 | hisname.Form("hMassPt%dTCPlus",i); |
460 | fMassHistTCPlus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
461 | fMassHistTCPlus[index]->Sumw2(); | |
462 | hisname.Form("hMassPt%dTCMinus",i); | |
463 | fMassHistTCMinus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
464 | fMassHistTCMinus[index]->Sumw2(); | |
ba9ae5b2 | 465 | |
466 | ||
ba9ae5b2 | 467 | hisname.Form("hCosPAllPt%dLS",i); |
993bfba1 | 468 | fCosPHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 469 | fCosPHistLS[index]->Sumw2(); |
470 | hisname.Form("hDLenAllPt%dLS",i); | |
993bfba1 | 471 | fDLenHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 472 | fDLenHistLS[index]->Sumw2(); |
473 | hisname.Form("hSumd02AllPt%dLS",i); | |
993bfba1 | 474 | fSumd02HistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 475 | fSumd02HistLS[index]->Sumw2(); |
476 | hisname.Form("hSigVertAllPt%dLS",i); | |
993bfba1 | 477 | fSigVertHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 478 | fSigVertHistLS[index]->Sumw2(); |
479 | hisname.Form("hPtMaxAllPt%dLS",i); | |
993bfba1 | 480 | fPtMaxHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
ba9ae5b2 | 481 | fPtMaxHistLS[index]->Sumw2(); |
3ec9254b | 482 | |
ba9ae5b2 | 483 | |
484 | hisname.Form("hDCAAllPt%dLS",i); | |
993bfba1 | 485 | fDCAHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 486 | fDCAHistLS[index]->Sumw2(); |
487 | ||
82bb8d4b | 488 | hisname.Form("hLSPt%dLC",i); |
993bfba1 | 489 | fMassHistLS[indexLS] = new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 490 | fMassHistLS[indexLS]->Sumw2(); |
491 | ||
ba9ae5b2 | 492 | hisname.Form("hLSPt%dTC",i); |
993bfba1 | 493 | fMassHistLSTC[indexLS] = new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
ba9ae5b2 | 494 | fMassHistLSTC[indexLS]->Sumw2(); |
495 | ||
496 | ||
497 | ||
82bb8d4b | 498 | index=GetSignalHistoIndex(i); |
499 | indexLS++; | |
500 | hisname.Form("hSigPt%d",i); | |
993bfba1 | 501 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 502 | fMassHist[index]->Sumw2(); |
ba9ae5b2 | 503 | hisname.Form("hCosPSigPt%d",i); |
993bfba1 | 504 | fCosPHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 505 | fCosPHist[index]->Sumw2(); |
506 | hisname.Form("hDLenSigPt%d",i); | |
993bfba1 | 507 | fDLenHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 508 | fDLenHist[index]->Sumw2(); |
509 | hisname.Form("hSumd02SigPt%d",i); | |
993bfba1 | 510 | fSumd02Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 511 | fSumd02Hist[index]->Sumw2(); |
512 | hisname.Form("hSigVertSigPt%d",i); | |
993bfba1 | 513 | fSigVertHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 514 | fSigVertHist[index]->Sumw2(); |
515 | hisname.Form("hPtMaxSigPt%d",i); | |
993bfba1 | 516 | fPtMaxHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
3ec9254b | 517 | fPtMaxHist[index]->Sumw2(); |
518 | hisname.Form("hPtKSigPt%d",i); | |
519 | fPtKHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
520 | fPtKHist[index]->Sumw2(); | |
521 | hisname.Form("hPtpi1SigPt%d",i); | |
522 | fPtpi1Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
523 | fPtpi1Hist[index]->Sumw2(); | |
524 | hisname.Form("hPtpi2SigPt%d",i); | |
525 | fPtpi2Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
526 | fPtpi2Hist[index]->Sumw2(); | |
ba9ae5b2 | 527 | |
528 | hisname.Form("hDCASigPt%d",i); | |
993bfba1 | 529 | fDCAHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 530 | fDCAHist[index]->Sumw2(); |
531 | ||
3ec9254b | 532 | hisname.Form("hDLxySigPt%d",i); |
533 | fDLxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
534 | fDLxy[index]->Sumw2(); | |
535 | hisname.Form("hCosxySigPt%d",i); | |
536 | fCosxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
537 | fCosxy[index]->Sumw2(); | |
538 | hisname.Form("hDLxySigPt%dTC",i); | |
539 | fDLxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
540 | fDLxyTC[index]->Sumw2(); | |
541 | hisname.Form("hCosxySigPt%dTC",i); | |
542 | fCosxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
543 | fCosxyTC[index]->Sumw2(); | |
1f4e9722 | 544 | hisname.Form("hSigPt%dTC",i); |
993bfba1 | 545 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 546 | fMassHistTC[index]->Sumw2(); |
bb69f127 | 547 | hisname.Form("hSigPt%dTCPlus",i); |
548 | fMassHistTCPlus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
549 | fMassHistTCPlus[index]->Sumw2(); | |
550 | hisname.Form("hSigPt%dTCMinus",i); | |
551 | fMassHistTCMinus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
552 | fMassHistTCMinus[index]->Sumw2(); | |
ba9ae5b2 | 553 | |
82bb8d4b | 554 | hisname.Form("hLSPt%dLCnw",i); |
993bfba1 | 555 | fMassHistLS[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 556 | fMassHistLS[indexLS]->Sumw2(); |
557 | hisname.Form("hLSPt%dTCnw",i); | |
993bfba1 | 558 | fMassHistLSTC[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 559 | fMassHistLSTC[indexLS]->Sumw2(); |
560 | ||
ba9ae5b2 | 561 | |
562 | ||
563 | hisname.Form("hCosPSigPt%dLS",i); | |
993bfba1 | 564 | fCosPHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 565 | fCosPHistLS[index]->Sumw2(); |
566 | hisname.Form("hDLenSigPt%dLS",i); | |
993bfba1 | 567 | fDLenHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 568 | fDLenHistLS[index]->Sumw2(); |
569 | hisname.Form("hSumd02SigPt%dLS",i); | |
993bfba1 | 570 | fSumd02HistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 571 | fSumd02HistLS[index]->Sumw2(); |
572 | hisname.Form("hSigVertSigPt%dLS",i); | |
993bfba1 | 573 | fSigVertHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 574 | fSigVertHistLS[index]->Sumw2(); |
575 | hisname.Form("hPtMaxSigPt%dLS",i); | |
993bfba1 | 576 | fPtMaxHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
ba9ae5b2 | 577 | fPtMaxHistLS[index]->Sumw2(); |
578 | ||
579 | hisname.Form("hDCASigPt%dLS",i); | |
993bfba1 | 580 | fDCAHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 581 | fDCAHistLS[index]->Sumw2(); |
582 | ||
583 | ||
584 | ||
82bb8d4b | 585 | index=GetBackgroundHistoIndex(i); |
586 | indexLS++; | |
587 | hisname.Form("hBkgPt%d",i); | |
993bfba1 | 588 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 589 | fMassHist[index]->Sumw2(); |
ba9ae5b2 | 590 | hisname.Form("hCosPBkgPt%d",i); |
993bfba1 | 591 | fCosPHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 592 | fCosPHist[index]->Sumw2(); |
593 | hisname.Form("hDLenBkgPt%d",i); | |
993bfba1 | 594 | fDLenHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 595 | fDLenHist[index]->Sumw2(); |
596 | hisname.Form("hSumd02BkgPt%d",i); | |
993bfba1 | 597 | fSumd02Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 598 | fSumd02Hist[index]->Sumw2(); |
599 | hisname.Form("hSigVertBkgPt%d",i); | |
993bfba1 | 600 | fSigVertHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 601 | fSigVertHist[index]->Sumw2(); |
602 | hisname.Form("hPtMaxBkgPt%d",i); | |
993bfba1 | 603 | fPtMaxHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
ba9ae5b2 | 604 | fPtMaxHist[index]->Sumw2(); |
3ec9254b | 605 | hisname.Form("hPtKBkgPt%d",i); |
606 | fPtKHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
607 | fPtKHist[index]->Sumw2(); | |
608 | hisname.Form("hPtpi1BkgPt%d",i); | |
609 | fPtpi1Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
610 | fPtpi1Hist[index]->Sumw2(); | |
611 | hisname.Form("hPtpi2BkgPt%d",i); | |
612 | fPtpi2Hist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); | |
613 | fPtpi2Hist[index]->Sumw2(); | |
ba9ae5b2 | 614 | hisname.Form("hDCABkgPt%d",i); |
993bfba1 | 615 | fDCAHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 616 | fDCAHist[index]->Sumw2(); |
617 | ||
3ec9254b | 618 | hisname.Form("hDLxyBkgPt%d",i); |
619 | fDLxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
620 | fDLxy[index]->Sumw2(); | |
621 | hisname.Form("hCosxyBkgPt%d",i); | |
622 | fCosxy[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
623 | fCosxy[index]->Sumw2(); | |
624 | hisname.Form("hDLxyBkgPt%dTC",i); | |
625 | fDLxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,10.); | |
626 | fDLxyTC[index]->Sumw2(); | |
627 | hisname.Form("hCosxyBkgPt%dTC",i); | |
628 | fCosxyTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.85,1.); | |
629 | fCosxyTC[index]->Sumw2(); | |
630 | ||
ba9ae5b2 | 631 | |
1f4e9722 | 632 | hisname.Form("hBkgPt%dTC",i); |
993bfba1 | 633 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 634 | fMassHistTC[index]->Sumw2(); |
bb69f127 | 635 | hisname.Form("hBkgPt%dTCPlus",i); |
636 | fMassHistTCPlus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
637 | fMassHistTCPlus[index]->Sumw2(); | |
638 | hisname.Form("hBkgPt%dTCMinus",i); | |
639 | fMassHistTCMinus[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); | |
640 | fMassHistTCMinus[index]->Sumw2(); | |
ba9ae5b2 | 641 | |
82bb8d4b | 642 | hisname.Form("hLSPt%dLCntrip",i); |
993bfba1 | 643 | fMassHistLS[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 644 | fMassHistLS[indexLS]->Sumw2(); |
645 | hisname.Form("hLSPt%dTCntrip",i); | |
993bfba1 | 646 | fMassHistLSTC[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 647 | fMassHistLSTC[indexLS]->Sumw2(); |
648 | ||
ba9ae5b2 | 649 | |
650 | hisname.Form("hCosPBkgPt%dLS",i); | |
993bfba1 | 651 | fCosPHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,1.); |
ba9ae5b2 | 652 | fCosPHistLS[index]->Sumw2(); |
653 | hisname.Form("hDLenBkgPt%dLS",i); | |
993bfba1 | 654 | fDLenHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.5); |
ba9ae5b2 | 655 | fDLenHistLS[index]->Sumw2(); |
656 | hisname.Form("hSumd02BkgPt%dLS",i); | |
993bfba1 | 657 | fSumd02HistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,1.); |
ba9ae5b2 | 658 | fSumd02HistLS[index]->Sumw2(); |
659 | hisname.Form("hSigVertBkgPt%dLS",i); | |
993bfba1 | 660 | fSigVertHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 661 | fSigVertHistLS[index]->Sumw2(); |
662 | hisname.Form("hPtMaxBkgPt%dLS",i); | |
993bfba1 | 663 | fPtMaxHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.5,5.); |
ba9ae5b2 | 664 | fPtMaxHistLS[index]->Sumw2(); |
665 | hisname.Form("hDCABkgPt%dLS",i); | |
993bfba1 | 666 | fDCAHistLS[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,0.,0.1); |
ba9ae5b2 | 667 | fDCAHistLS[index]->Sumw2(); |
668 | ||
669 | ||
82bb8d4b | 670 | indexLS++; |
671 | hisname.Form("hLSPt%dLCntripsinglecut",i); | |
993bfba1 | 672 | fMassHistLS[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 673 | fMassHistLS[indexLS]->Sumw2(); |
674 | hisname.Form("hLSPt%dTCntripsinglecut",i); | |
993bfba1 | 675 | fMassHistLSTC[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 676 | fMassHistLSTC[indexLS]->Sumw2(); |
677 | ||
678 | indexLS++; | |
679 | hisname.Form("hLSPt%dLCspc",i); | |
993bfba1 | 680 | fMassHistLS[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 681 | fMassHistLS[indexLS]->Sumw2(); |
682 | hisname.Form("hLSPt%dTCspc",i); | |
993bfba1 | 683 | fMassHistLSTC[indexLS]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit); |
82bb8d4b | 684 | fMassHistLSTC[indexLS]->Sumw2(); |
1f4e9722 | 685 | } |
3ec9254b | 686 | |
82bb8d4b | 687 | for(Int_t i=0; i<3*fNPtBins; i++){ |
688 | fOutput->Add(fMassHist[i]); | |
3ec9254b | 689 | fOutput->Add(fCosPHist[i]); |
ba9ae5b2 | 690 | fOutput->Add(fDLenHist[i]); |
691 | fOutput->Add(fSumd02Hist[i]); | |
692 | fOutput->Add(fSigVertHist[i]); | |
693 | fOutput->Add(fPtMaxHist[i]); | |
3ec9254b | 694 | fOutput->Add(fPtKHist[i]); |
695 | fOutput->Add(fPtpi1Hist[i]); | |
696 | fOutput->Add(fPtpi2Hist[i]); | |
ba9ae5b2 | 697 | fOutput->Add(fDCAHist[i]); |
82bb8d4b | 698 | fOutput->Add(fMassHistTC[i]); |
bb69f127 | 699 | fOutput->Add(fMassHistTCPlus[i]); |
700 | fOutput->Add(fMassHistTCMinus[i]); | |
3ec9254b | 701 | fOutput->Add(fDLxy[i]); |
702 | fOutput->Add(fDLxyTC[i]); | |
703 | fOutput->Add(fCosxy[i]); | |
704 | fOutput->Add(fCosxyTC[i]); | |
705 | } | |
ba9ae5b2 | 706 | for(Int_t i=0; i<3*fNPtBins&&fDoLS; i++){ |
707 | fOutput->Add(fCosPHistLS[i]); | |
708 | fOutput->Add(fDLenHistLS[i]); | |
709 | fOutput->Add(fSumd02HistLS[i]); | |
710 | fOutput->Add(fSigVertHistLS[i]); | |
711 | fOutput->Add(fPtMaxHistLS[i]); | |
712 | fOutput->Add(fDCAHistLS[i]); | |
713 | } | |
82bb8d4b | 714 | for(Int_t i=0; i<5*fNPtBins&&fDoLS; i++){ |
715 | fOutput->Add(fMassHistLS[i]); | |
716 | fOutput->Add(fMassHistLSTC[i]); | |
717 | } | |
ba9ae5b2 | 718 | |
26da4c42 | 719 | |
5fc4893f | 720 | fHistNEvents = new TH1F("fHistNEvents", "number of events ",9,-0.5,8.5); |
de1b82ff | 721 | fHistNEvents->GetXaxis()->SetBinLabel(1,"nEventsAnal"); |
26da4c42 | 722 | fHistNEvents->GetXaxis()->SetBinLabel(2,"nEvents with good vertex"); |
de1b82ff | 723 | fHistNEvents->GetXaxis()->SetBinLabel(3,"nEvents with PbPb HM trigger"); |
724 | fHistNEvents->GetXaxis()->SetBinLabel(4,"no. of Rejected pileup events"); | |
725 | fHistNEvents->GetXaxis()->SetBinLabel(5,"no. of candidate"); | |
726 | fHistNEvents->GetXaxis()->SetBinLabel(6,"no. of D+ after loose cuts"); | |
727 | fHistNEvents->GetXaxis()->SetBinLabel(7,"no. of D+ after tight cuts"); | |
37fc80e6 | 728 | fHistNEvents->GetXaxis()->SetBinLabel(8,"no. of out centrality events"); |
5fc4893f | 729 | fHistNEvents->GetXaxis()->SetBinLabel(9,"no. of cand wo bitmask"); |
37fc80e6 | 730 | |
26da4c42 | 731 | fHistNEvents->GetXaxis()->SetNdivisions(1,kFALSE); |
732 | ||
ba9ae5b2 | 733 | fHistNEvents->Sumw2(); |
734 | fHistNEvents->SetMinimum(0); | |
735 | fOutput->Add(fHistNEvents); | |
595cc7e2 | 736 | |
4d797793 | 737 | fPtVsMass=new TH2F("hPtVsMass","PtVsMass (prod. cuts)",nbins,fLowmasslimit,fUpmasslimit,200,0.,20.); |
738 | fPtVsMassTC=new TH2F("hPtVsMassTC","PtVsMass (analysis cuts)",nbins,fLowmasslimit,fUpmasslimit,200,0.,20.); | |
595cc7e2 | 739 | fYVsPt=new TH2F("hYVsPt","YvsPt (prod. cuts)",40,0.,20.,80,-2.,2.); |
740 | fYVsPtTC=new TH2F("hYVsPtTC","YvsPt (analysis cuts)",40,0.,20.,80,-2.,2.); | |
741 | fYVsPtSig=new TH2F("hYVsPtSig","YvsPt (MC, only sig., prod. cuts)",40,0.,20.,80,-2.,2.); | |
742 | fYVsPtSigTC=new TH2F("hYVsPtSigTC","YvsPt (MC, only Sig, analysis cuts)",40,0.,20.,80,-2.,2.); | |
743 | ||
744 | fOutput->Add(fPtVsMass); | |
745 | fOutput->Add(fPtVsMassTC); | |
746 | fOutput->Add(fYVsPt); | |
747 | fOutput->Add(fYVsPtTC); | |
748 | fOutput->Add(fYVsPtSig); | |
749 | fOutput->Add(fYVsPtSigTC); | |
4afc48a2 | 750 | |
a96083b9 | 751 | |
752 | //Counter for Normalization | |
e0fdfa52 | 753 | TString normName="NormalizationCounter"; |
754 | AliAnalysisDataContainer *cont = GetOutputSlot(3)->GetContainer(); | |
755 | if(cont)normName=(TString)cont->GetName(); | |
756 | fCounter = new AliNormalizationCounter(normName.Data()); | |
de1b82ff | 757 | fCounter->SetRejectPileUp(fRDCutsProduction->GetOptPileUp()); |
a96083b9 | 758 | |
1f4e9722 | 759 | if(fFillNtuple){ |
e0fdfa52 | 760 | OpenFile(4); // 4 is the slot number of the ntuple |
ba9ae5b2 | 761 | |
762 | fNtupleDplus = new TNtuple("fNtupleDplus","D +","pdg:Px:Py:Pz:PtTrue:VxTrue:VyTrue:VzTrue:Ptpi:PtK:Ptpi2:PtRec:PointingAngle:DecLeng:VxRec:VyRec:VzRec:InvMass:sigvert:d0Pi:d0K:d0Pi2:dca:d0square"); | |
763 | ||
1f4e9722 | 764 | } |
ba9ae5b2 | 765 | |
d486095a | 766 | return; |
767 | } | |
768 | ||
769 | //________________________________________________________________________ | |
770 | void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/) | |
771 | { | |
772 | // Execute analysis for current event: | |
773 | // heavy flavor candidates association to MC truth | |
774 | ||
4c230f6d | 775 | AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent()); |
4afc48a2 | 776 | |
a96083b9 | 777 | |
778 | ||
b557eb43 | 779 | TClonesArray *array3Prong = 0; |
4afc48a2 | 780 | TClonesArray *arrayLikeSign =0; |
b557eb43 | 781 | if(!aod && AODEvent() && IsStandardAOD()) { |
782 | // In case there is an AOD handler writing a standard AOD, use the AOD | |
783 | // event in memory rather than the input (ESD) event. | |
784 | aod = dynamic_cast<AliAODEvent*> (AODEvent()); | |
4c230f6d | 785 | // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root) |
786 | // have to taken from the AOD event hold by the AliAODExtension | |
b557eb43 | 787 | AliAODHandler* aodHandler = (AliAODHandler*) |
788 | ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
789 | if(aodHandler->GetExtensions()) { | |
790 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root"); | |
791 | AliAODEvent *aodFromExt = ext->GetAOD(); | |
792 | array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
4afc48a2 | 793 | arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign3Prong"); |
b557eb43 | 794 | } |
dc222f77 | 795 | } else if(aod) { |
b557eb43 | 796 | array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); |
4afc48a2 | 797 | arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong"); |
b557eb43 | 798 | } |
8931c313 | 799 | |
90993728 | 800 | if(!aod || !array3Prong) { |
d486095a | 801 | printf("AliAnalysisTaskSEDplus::UserExec: Charm3Prong branch not found!\n"); |
802 | return; | |
803 | } | |
3a3c90f4 | 804 | if(!arrayLikeSign && fDoLS) { |
4afc48a2 | 805 | printf("AliAnalysisTaskSEDplus::UserExec: LikeSign3Prong branch not found!\n"); |
82bb8d4b | 806 | return; |
4afc48a2 | 807 | } |
808 | ||
7c23877d | 809 | |
810 | // fix for temporary bug in ESDfilter | |
811 | // the AODs with null vertex pointer didn't pass the PhysSel | |
a96083b9 | 812 | if(!aod->GetPrimaryVertex()||TMath::Abs(aod->GetMagneticField())<0.001) return; |
813 | fCounter->StoreEvent(aod,fReadMC); | |
de1b82ff | 814 | fHistNEvents->Fill(0); // count event |
37fc80e6 | 815 | |
816 | Bool_t isEvSel=fRDCutsAnalysis->IsEventSelected(aod); | |
817 | Float_t centrality=aod->GetNTracks();//fRDCutsAnalysis->GetCentrality(aod); | |
818 | fHistCentrality[0]->Fill(centrality); | |
de1b82ff | 819 | // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD |
820 | TString trigclass=aod->GetFiredTriggerClasses(); | |
821 | if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains("C0SMH-B-NOPF-ALL")) fHistNEvents->Fill(2); | |
822 | if(fRDCutsAnalysis->GetWhyRejection()==1)fHistNEvents->Fill(3); | |
37fc80e6 | 823 | if(fRDCutsAnalysis->GetWhyRejection()==2){fHistNEvents->Fill(7);fHistCentrality[2]->Fill(centrality);} |
824 | ||
825 | // Post the data already here | |
de1b82ff | 826 | PostData(1,fOutput); |
37fc80e6 | 827 | if(!isEvSel)return; |
828 | ||
829 | fHistCentrality[1]->Fill(centrality); | |
830 | fHistNEvents->Fill(1); | |
831 | ||
4afc48a2 | 832 | TClonesArray *arrayMC=0; |
833 | AliAODMCHeader *mcHeader=0; | |
d486095a | 834 | |
835 | // AOD primary vertex | |
1f4e9722 | 836 | AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex(); |
837 | // vtx1->Print(); | |
26da4c42 | 838 | TString primTitle = vtx1->GetTitle(); |
839 | //if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0)fHistNEvents->Fill(2); | |
840 | ||
d486095a | 841 | // load MC particles |
4afc48a2 | 842 | if(fReadMC){ |
843 | ||
844 | arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()); | |
845 | if(!arrayMC) { | |
846 | printf("AliAnalysisTaskSEDplus::UserExec: MC particles branch not found!\n"); | |
90993728 | 847 | return; |
4afc48a2 | 848 | } |
1f4e9722 | 849 | |
d486095a | 850 | // load MC header |
4afc48a2 | 851 | mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName()); |
852 | if(!mcHeader) { | |
82bb8d4b | 853 | printf("AliAnalysisTaskSEDplus::UserExec: MC header branch not found!\n"); |
854 | return; | |
4afc48a2 | 855 | } |
d486095a | 856 | } |
4afc48a2 | 857 | |
1f4e9722 | 858 | Int_t n3Prong = array3Prong->GetEntriesFast(); |
2bf2e62b | 859 | printf("Number of D+->Kpipi: %d and of tracks: %d\n",n3Prong,aod->GetNumberOfTracks()); |
4afc48a2 | 860 | |
861 | ||
862 | Int_t nOS=0; | |
82bb8d4b | 863 | Int_t index; |
1f4e9722 | 864 | Int_t pdgDgDplustoKpipi[3]={321,211,211}; |
3ec9254b | 865 | |
866 | if(fDoLS>1){ | |
867 | for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) { | |
868 | AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong); | |
869 | if(fUseBit && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts)){ | |
870 | if(fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kCandidate,aod))nOS++; | |
871 | } | |
872 | } | |
873 | }else{ | |
4c230f6d | 874 | // Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};//TO REMOVE |
875 | //Double_t *cutsDplus = new (Double_t*)fRDCuts->GetCuts(); | |
a96083b9 | 876 | Int_t nSelectedloose=0,nSelectedtight=0; |
1f4e9722 | 877 | for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) { |
878 | AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong); | |
de1b82ff | 879 | fHistNEvents->Fill(4); |
5fc4893f | 880 | if(fUseBit && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts)){ |
881 | fHistNEvents->Fill(8); | |
882 | continue; | |
883 | } | |
1f4e9722 | 884 | Bool_t unsetvtx=kFALSE; |
885 | if(!d->GetOwnPrimaryVtx()){ | |
886 | d->SetOwnPrimaryVtx(vtx1); | |
887 | unsetvtx=kTRUE; | |
888 | } | |
4afc48a2 | 889 | |
1275bf81 | 890 | if(fRDCutsProduction->IsSelected(d,AliRDHFCuts::kCandidate,aod)) { |
a96083b9 | 891 | |
1f4e9722 | 892 | Double_t ptCand = d->Pt(); |
a6003e0a | 893 | Int_t iPtBin = fRDCutsProduction->PtBin(ptCand); |
82bb8d4b | 894 | |
1275bf81 | 895 | Int_t passTightCuts=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kCandidate,aod); |
a6003e0a | 896 | Bool_t recVtx=kFALSE; |
897 | AliAODVertex *origownvtx=0x0; | |
898 | if(fRDCutsProduction->GetIsPrimaryWithoutDaughters()){ | |
899 | if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx()); | |
900 | if(fRDCutsProduction->RecalcOwnPrimaryVtx(d,aod))recVtx=kTRUE; | |
901 | else fRDCutsProduction->CleanOwnPrimaryVtx(d,aod,origownvtx); | |
902 | } | |
2bf2e62b | 903 | |
4afc48a2 | 904 | Int_t labDp=-1; |
905 | Float_t deltaPx=0.; | |
906 | Float_t deltaPy=0.; | |
907 | Float_t deltaPz=0.; | |
908 | Float_t truePt=0.; | |
909 | Float_t xDecay=0.; | |
910 | Float_t yDecay=0.; | |
911 | Float_t zDecay=0.; | |
912 | Float_t pdgCode=-2; | |
913 | if(fReadMC){ | |
914 | labDp = d->MatchToMC(411,arrayMC,3,pdgDgDplustoKpipi); | |
915 | if(labDp>=0){ | |
916 | AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp); | |
917 | AliAODMCParticle *dg0 = (AliAODMCParticle*)arrayMC->At(partDp->GetDaughter(0)); | |
918 | deltaPx=partDp->Px()-d->Px(); | |
919 | deltaPy=partDp->Py()-d->Py(); | |
920 | deltaPz=partDp->Pz()-d->Pz(); | |
921 | truePt=partDp->Pt(); | |
922 | xDecay=dg0->Xv(); | |
923 | yDecay=dg0->Yv(); | |
924 | zDecay=dg0->Zv(); | |
925 | pdgCode=TMath::Abs(partDp->GetPdgCode()); | |
926 | }else{ | |
927 | pdgCode=-1; | |
928 | } | |
929 | } | |
a6003e0a | 930 | |
1f4e9722 | 931 | Double_t invMass=d->InvMassDplus(); |
595cc7e2 | 932 | Double_t rapid=d->YDplus(); |
933 | fYVsPt->Fill(ptCand,rapid); | |
3ec9254b | 934 | if(passTightCuts) {fYVsPtTC->Fill(ptCand,rapid);nOS++;} |
595cc7e2 | 935 | Bool_t isFidAcc=fRDCutsAnalysis->IsInFiducialAcceptance(ptCand,rapid); |
936 | if(isFidAcc){ | |
937 | fPtVsMass->Fill(invMass,ptCand); | |
938 | if(passTightCuts) fPtVsMassTC->Fill(invMass,ptCand); | |
939 | } | |
ba9ae5b2 | 940 | Float_t tmp[24]; |
a6003e0a | 941 | Double_t dlen=d->DecayLength(); |
942 | Double_t cosp=d->CosPointingAngle(); | |
943 | Double_t sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); | |
944 | Double_t dca=d->GetDCA(); | |
945 | Double_t sigvert=d->GetSigmaVert(); | |
946 | Double_t ptmax=0; | |
947 | for(Int_t i=0;i<3;i++){ | |
948 | if(d->PtProng(i)>ptmax)ptmax=d->PtProng(i); | |
949 | } | |
950 | if(fFillNtuple){ | |
4afc48a2 | 951 | tmp[0]=pdgCode; |
952 | tmp[1]=deltaPx; | |
953 | tmp[2]=deltaPy; | |
954 | tmp[3]=deltaPz; | |
955 | tmp[4]=truePt; | |
956 | tmp[5]=xDecay; | |
957 | tmp[6]=yDecay; | |
958 | tmp[7]=zDecay; | |
959 | tmp[8]=d->PtProng(0); | |
960 | tmp[9]=d->PtProng(1); | |
961 | tmp[10]=d->PtProng(2); | |
962 | tmp[11]=d->Pt(); | |
a6003e0a | 963 | tmp[12]=cosp; |
964 | tmp[13]=dlen; | |
4afc48a2 | 965 | tmp[14]=d->Xv(); |
966 | tmp[15]=d->Yv(); | |
967 | tmp[16]=d->Zv(); | |
968 | tmp[17]=d->InvMassDplus(); | |
a6003e0a | 969 | tmp[18]=sigvert; |
4afc48a2 | 970 | tmp[19]=d->Getd0Prong(0); |
971 | tmp[20]=d->Getd0Prong(1); | |
ba9ae5b2 | 972 | tmp[21]=d->Getd0Prong(2); |
a6003e0a | 973 | tmp[22]=dca; |
ba9ae5b2 | 974 | tmp[23]=d->Prodd0d0(); |
4afc48a2 | 975 | fNtupleDplus->Fill(tmp); |
de1b82ff | 976 | PostData(4,fNtupleDplus); |
4afc48a2 | 977 | } |
82bb8d4b | 978 | if(iPtBin>=0){ |
3ec9254b | 979 | Float_t dlxy=d->NormalizedDecayLengthXY(); |
980 | Float_t cxy=d->CosPointingAngleXY(); | |
82bb8d4b | 981 | index=GetHistoIndex(iPtBin); |
595cc7e2 | 982 | if(isFidAcc){ |
de1b82ff | 983 | fHistNEvents->Fill(5); |
a96083b9 | 984 | nSelectedloose++; |
595cc7e2 | 985 | fMassHist[index]->Fill(invMass); |
986 | fCosPHist[index]->Fill(cosp); | |
987 | fDLenHist[index]->Fill(dlen); | |
988 | fSumd02Hist[index]->Fill(sumD02); | |
989 | fSigVertHist[index]->Fill(sigvert); | |
990 | fPtMaxHist[index]->Fill(ptmax); | |
3ec9254b | 991 | fPtKHist[index]->Fill(d->PtProng(1)); |
992 | fPtpi1Hist[index]->Fill(d->PtProng(0)); | |
993 | fPtpi2Hist[index]->Fill(d->PtProng(2)); | |
595cc7e2 | 994 | fDCAHist[index]->Fill(dca); |
3ec9254b | 995 | fDLxy[index]->Fill(dlxy); |
996 | fCosxy[index]->Fill(cxy); | |
de1b82ff | 997 | if(passTightCuts){ fHistNEvents->Fill(6); |
a96083b9 | 998 | nSelectedtight++; |
595cc7e2 | 999 | fMassHistTC[index]->Fill(invMass); |
3ec9254b | 1000 | fDLxyTC[index]->Fill(dlxy); |
1001 | fCosxyTC[index]->Fill(cxy); | |
bb69f127 | 1002 | if(d->GetCharge()>0) fMassHistTCPlus[index]->Fill(invMass); |
1003 | else if(d->GetCharge()<0) fMassHistTCMinus[index]->Fill(invMass); | |
595cc7e2 | 1004 | } |
82bb8d4b | 1005 | } |
3ec9254b | 1006 | |
82bb8d4b | 1007 | if(fReadMC){ |
1008 | if(labDp>=0) { | |
1009 | index=GetSignalHistoIndex(iPtBin); | |
595cc7e2 | 1010 | if(isFidAcc){ |
a96083b9 | 1011 | Float_t factor[3]={1.,1.,1.}; |
1012 | if(fUseStrangeness){ | |
1013 | for(Int_t iprong=0;iprong<3;iprong++){ | |
1014 | AliAODTrack *trad = (AliAODTrack*)d->GetDaughter(iprong); | |
1015 | Int_t labd= trad->GetLabel(); | |
1016 | if(labd>=0){ | |
1017 | AliAODMCParticle *dau = (AliAODMCParticle*)arrayMC->At(labd); | |
1018 | if(dau){ | |
1019 | Int_t labm = dau->GetMother(); | |
1020 | if(labm>=0){ | |
1021 | AliAODMCParticle *mot = (AliAODMCParticle*)arrayMC->At(labm); | |
1022 | if(mot){ | |
1023 | if(TMath::Abs(mot->GetPdgCode())==310 || TMath::Abs(mot->GetPdgCode())==130 || TMath::Abs(mot->GetPdgCode())==321){ //K0_S, K0_L, K^+- | |
1024 | if(d->PtProng(iprong)<=1)factor[iprong]=1./.7; | |
1025 | else factor[iprong]=1./.6; | |
1026 | // fNentries->Fill(12); | |
1027 | } | |
1028 | if(TMath::Abs(mot->GetPdgCode())==3122) { //Lambda | |
1029 | factor[iprong]=1./0.25; | |
1030 | // fNentries->Fill(13); | |
1031 | }//if 3122 | |
1032 | }//if(mot) | |
1033 | }//if labm>0 | |
1034 | }//if(dau) | |
1035 | }//if labd>=0 | |
1036 | }//prong loop | |
1037 | } | |
1038 | Float_t fact=1.;for(Int_t k=0;k<3;k++)fact=fact*factor[k]; | |
595cc7e2 | 1039 | fMassHist[index]->Fill(invMass); |
a96083b9 | 1040 | fCosPHist[index]->Fill(cosp,fact); |
1041 | fDLenHist[index]->Fill(dlen,fact); | |
3ec9254b | 1042 | fDLxy[index]->Fill(dlxy); |
1043 | fCosxy[index]->Fill(cxy); | |
1044 | ||
a96083b9 | 1045 | Float_t sumd02s=d->Getd0Prong(0)*d->Getd0Prong(0)*factor[0]*factor[0]+d->Getd0Prong(1)*d->Getd0Prong(1)*factor[1]*factor[1]+d->Getd0Prong(2)*d->Getd0Prong(2)*factor[2]*factor[2]; |
1046 | fSumd02Hist[index]->Fill(sumd02s); | |
1047 | fSigVertHist[index]->Fill(sigvert,fact); | |
1048 | fPtMaxHist[index]->Fill(ptmax,fact); | |
3ec9254b | 1049 | fPtKHist[index]->Fill(d->PtProng(1),fact); |
1050 | fPtpi1Hist[index]->Fill(d->PtProng(0),fact); | |
1051 | fPtpi2Hist[index]->Fill(d->PtProng(2),fact); | |
a96083b9 | 1052 | fDCAHist[index]->Fill(dca,fact); |
595cc7e2 | 1053 | if(passTightCuts){ |
1054 | fMassHistTC[index]->Fill(invMass); | |
3ec9254b | 1055 | fDLxyTC[index]->Fill(dlxy); |
1056 | fCosxyTC[index]->Fill(cxy); | |
1057 | ||
bb69f127 | 1058 | if(d->GetCharge()>0) fMassHistTCPlus[index]->Fill(invMass); |
1059 | else if(d->GetCharge()<0) fMassHistTCMinus[index]->Fill(invMass); | |
595cc7e2 | 1060 | } |
1061 | } | |
1062 | fYVsPtSig->Fill(ptCand,rapid); | |
1063 | if(passTightCuts) fYVsPtSigTC->Fill(ptCand,rapid); | |
82bb8d4b | 1064 | }else{ |
1065 | index=GetBackgroundHistoIndex(iPtBin); | |
595cc7e2 | 1066 | if(isFidAcc){ |
a96083b9 | 1067 | Float_t factor[3]={1.,1.,1.}; |
1068 | if(fUseStrangeness){ | |
1069 | for(Int_t iprong=0;iprong<3;iprong++){ | |
1070 | AliAODTrack *trad = (AliAODTrack*)d->GetDaughter(iprong); | |
1071 | Int_t labd= trad->GetLabel(); | |
1072 | if(labd>=0){ | |
1073 | AliAODMCParticle *dau = (AliAODMCParticle*)arrayMC->At(labd); | |
1074 | if(dau){ | |
1075 | Int_t labm = dau->GetMother(); | |
1076 | if(labm>=0){ | |
1077 | AliAODMCParticle *mot = (AliAODMCParticle*)arrayMC->At(labm); | |
1078 | if(mot){ | |
1079 | if(TMath::Abs(mot->GetPdgCode())==310 || TMath::Abs(mot->GetPdgCode())==130 || TMath::Abs(mot->GetPdgCode())==321){ //K0_S, K0_L, K^+- | |
1080 | if(d->PtProng(iprong)<=1)factor[iprong]=1./.7; | |
1081 | else factor[iprong]=1./.6; | |
1082 | // fNentries->Fill(12); | |
1083 | } | |
1084 | if(TMath::Abs(mot->GetPdgCode())==3122) { //Lambda | |
1085 | factor[iprong]=1./0.25; | |
1086 | // fNentries->Fill(13); | |
1087 | }//if 3122 | |
1088 | }//if(mot) | |
1089 | }//if labm>0 | |
1090 | }//if(dau) | |
1091 | }//if labd>=0 | |
1092 | }//prong loop | |
1093 | } | |
1094 | Float_t fact=1.;for(Int_t k=0;k<3;k++)fact=fact*factor[k]; | |
595cc7e2 | 1095 | fMassHist[index]->Fill(invMass); |
a96083b9 | 1096 | fCosPHist[index]->Fill(cosp,fact); |
1097 | fDLenHist[index]->Fill(dlen,fact); | |
3ec9254b | 1098 | fDLxy[index]->Fill(dlxy); |
1099 | fCosxy[index]->Fill(cxy); | |
1100 | ||
a96083b9 | 1101 | Float_t sumd02s=d->Getd0Prong(0)*d->Getd0Prong(0)*factor[0]*factor[0]+d->Getd0Prong(1)*d->Getd0Prong(1)*factor[1]*factor[1]+d->Getd0Prong(2)*d->Getd0Prong(2)*factor[2]*factor[2]; |
1102 | fSumd02Hist[index]->Fill(sumd02s); | |
1103 | fSigVertHist[index]->Fill(sigvert,fact); | |
1104 | fPtMaxHist[index]->Fill(ptmax,fact); | |
3ec9254b | 1105 | fPtKHist[index]->Fill(d->PtProng(1),fact); |
1106 | fPtpi1Hist[index]->Fill(d->PtProng(0),fact); | |
1107 | fPtpi2Hist[index]->Fill(d->PtProng(2),fact); | |
a96083b9 | 1108 | fDCAHist[index]->Fill(dca,fact); |
595cc7e2 | 1109 | if(passTightCuts){ |
1110 | fMassHistTC[index]->Fill(invMass); | |
3ec9254b | 1111 | fDLxyTC[index]->Fill(dlxy); |
1112 | fCosxyTC[index]->Fill(cxy); | |
1113 | ||
bb69f127 | 1114 | if(d->GetCharge()>0) fMassHistTCPlus[index]->Fill(invMass); |
1115 | else if(d->GetCharge()<0) fMassHistTCMinus[index]->Fill(invMass); | |
595cc7e2 | 1116 | } |
3ec9254b | 1117 | } |
2bf2e62b | 1118 | } |
3ec9254b | 1119 | |
1120 | } | |
1121 | ||
1122 | } | |
a6003e0a | 1123 | if(recVtx)fRDCutsProduction->CleanOwnPrimaryVtx(d,aod,origownvtx); |
d486095a | 1124 | } |
1f4e9722 | 1125 | if(unsetvtx) d->UnsetOwnPrimaryVtx(); |
1126 | } | |
a96083b9 | 1127 | fCounter->StoreCandidates(aod,nSelectedloose,kTRUE); |
1128 | fCounter->StoreCandidates(aod,nSelectedtight,kFALSE); | |
3ec9254b | 1129 | } |
4afc48a2 | 1130 | //start LS analysis |
1131 | if(fDoLS && arrayLikeSign) LSAnalysis(array3Prong,arrayLikeSign,aod,vtx1,nOS); | |
82bb8d4b | 1132 | |
ad42e35b | 1133 | PostData(1,fOutput); |
1134 | PostData(2,fListCuts); | |
a96083b9 | 1135 | PostData(3,fCounter); |
d486095a | 1136 | return; |
1137 | } | |
1138 | ||
4afc48a2 | 1139 | |
1140 | ||
82bb8d4b | 1141 | //________________________________________________________________________ |
d486095a | 1142 | void AliAnalysisTaskSEDplus::Terminate(Option_t */*option*/) |
1143 | { | |
1144 | // Terminate analysis | |
1145 | // | |
1146 | if(fDebug > 1) printf("AnalysisTaskSEDplus: Terminate() \n"); | |
82bb8d4b | 1147 | |
d486095a | 1148 | fOutput = dynamic_cast<TList*> (GetOutputData(1)); |
1149 | if (!fOutput) { | |
1150 | printf("ERROR: fOutput not available\n"); | |
1151 | return; | |
1152 | } | |
595cc7e2 | 1153 | fHistNEvents = dynamic_cast<TH1F*>(fOutput->FindObject("fHistNEvents")); |
82bb8d4b | 1154 | |
595cc7e2 | 1155 | TString hisname; |
1156 | Int_t index=0; | |
ba9ae5b2 | 1157 | |
595cc7e2 | 1158 | for(Int_t i=0;i<fNPtBins;i++){ |
82bb8d4b | 1159 | index=GetHistoIndex(i); |
ba9ae5b2 | 1160 | |
37fc80e6 | 1161 | hisname.Form("hMassPt%dTC",i); |
82bb8d4b | 1162 | fMassHistTC[index]=dynamic_cast<TH1F*>(fOutput->FindObject(hisname.Data())); |
37fc80e6 | 1163 | } |
ba9ae5b2 | 1164 | |
13808a30 | 1165 | TCanvas *c1=new TCanvas("c1","D+ invariant mass distribution",500,500); |
1166 | c1->cd(); | |
1167 | TH1F *hMassPt=(TH1F*)fOutput->FindObject("hMassPt3TC"); | |
1168 | hMassPt->SetLineColor(kBlue); | |
1169 | hMassPt->SetXTitle("M[GeV/c^{2}]"); | |
1170 | hMassPt->Draw(); | |
1171 | ||
595cc7e2 | 1172 | return; |
d486095a | 1173 | } |