]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/correlationHF/AliAnalysisTaskSEDplusCorrelations.cxx
Coverity fix, 8443
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliAnalysisTaskSEDplusCorrelations.cxx
CommitLineData
cb7c2594 1
35151011 2/**************************************************************************
3 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16
17/* $Id$ */
18
19//*************************************************************************
20// Class AliAnalysisTaskSEDplusCorrelations
21// AliAnalysisTaskSE for the D+ candidates Invariant Mass Histogram and
22//comparison of heavy-flavour decay candidates
23// to MC truth (kinematics stored in the AOD)
24// Authors: Sadhana Dash (correlation)
25/////////////////////////////////////////////////////////////
26
27#include <TClonesArray.h>
28#include <TNtuple.h>
29#include <TCanvas.h>
30#include <TList.h>
31#include <TString.h>
32#include <TDatabasePDG.h>
33
34#include <AliAnalysisDataSlot.h>
35#include <AliAnalysisDataContainer.h>
36#include "AliAnalysisManager.h"
37#include "AliRDHFCutsDplustoKpipi.h"
38#include "AliAODHandler.h"
39#include "AliAODEvent.h"
40#include "AliAODPidHF.h"
41#include "AliAODVertex.h"
42#include "AliAODTrack.h"
43#include "AliAODRecoDecayHF3Prong.h"
44#include "AliAnalysisVertexingHF.h"
45#include "AliAnalysisTaskSE.h"
cb7c2594 46#include "AliVertexingHFUtils.h"
35151011 47#include "AliAnalysisTaskSEDplusCorrelations.h"
48#include "AliNormalizationCounter.h"
49#include "AliVParticle.h"
50#include "AliHFAssociatedTrackCuts.h"
51#include "AliReducedParticle.h"
52#include "AliHFCorrelator.h"
53
54
55using std::cout;
56using std::endl;
57
58ClassImp(AliAnalysisTaskSEDplusCorrelations)
59
60
61//________________________________________________________________________
62AliAnalysisTaskSEDplusCorrelations::AliAnalysisTaskSEDplusCorrelations():
63AliAnalysisTaskSE(),
64 fOutput(0),
65 fCorrelator(0),
66 fSelect(0),
67 fDisplacement(0),
68 fHistNEvents(0),
cb7c2594 69 fTrig(kTRUE),
35151011 70 fEventMix(0),
35151011 71 fUpmasslimit(1.965),
72 fLowmasslimit(1.765),
73 fNPtBins(0),
74 fBinWidth(0.002),
75 fListCuts(0),
cb7c2594 76//fListCutsAsso(0),
35151011 77 fRDCutsAnalysis(0),
78 fCuts(0),
79 fCounter(0),
80 fReadMC(kFALSE),
81 fUseBit(kTRUE),
82 fMixing(kFALSE),
cb7c2594 83 fSystem(kFALSE),
84 fReco(kTRUE)
35151011 85{
86 // Default constructor
cb7c2594 87
baf235c6 88 for(Int_t i=0;i<3*kMaxPtBins;i++){
cb7c2594 89
90 if(fMassHistK0S[i])fMassHistK0S[i]=0;
91 if(fLeadPt[i])fLeadPt[i]=0;
92 if(fMassHist[i])fMassHist[i]=0;
93 if(fMassHistTC[i])fMassHistTC[i]=0;
94 if(fMassHistOrigC[i])fMassHistOrigC[i]=0;
95 if(fMassHistOrigB[i])fMassHistOrigB[i]=0;
96 if(fMassHistMC[i])fMassHistMC[i]=0;
baf235c6 97 }
cb7c2594 98
35151011 99 for(Int_t i=0;i<kMaxPtBins+1;i++){
100 fArrayBinLimits[i]=0;
101 }
102
103}
104
105//________________________________________________________________________
106AliAnalysisTaskSEDplusCorrelations::AliAnalysisTaskSEDplusCorrelations(const char *name,AliRDHFCutsDplustoKpipi *dpluscutsana, AliHFAssociatedTrackCuts *asstrkcuts):
107 AliAnalysisTaskSE(name),
108 fOutput(0),
109 fCorrelator(0),
110 fSelect(0),
111 fDisplacement(0),
112 fHistNEvents(0),
cb7c2594 113 fTrig(kTRUE),
35151011 114 fEventMix(0),
35151011 115 fUpmasslimit(1.965),
116 fLowmasslimit(1.765),
117 fNPtBins(0),
118 fBinWidth(0.002),
119 fListCuts(0),
cb7c2594 120 //fListCutsAsso(0),
35151011 121 fRDCutsAnalysis(dpluscutsana),
122 fCuts(asstrkcuts),
123 fCounter(0),
124 fReadMC(kFALSE),
125 fUseBit(kTRUE),
126 fMixing(kFALSE),
cb7c2594 127 fSystem(kFALSE),
128 fReco(kTRUE)
35151011 129{
130 //
131 // Standrd constructor
132 //
133 fNPtBins=fRDCutsAnalysis->GetNPtBins();
134
cb7c2594 135
baf235c6 136 for(Int_t i=0;i<3*kMaxPtBins;i++){
baf235c6 137
cb7c2594 138 if(fMassHistK0S[i])fMassHistK0S[i]=0;
139 if(fLeadPt[i])fLeadPt[i]=0;
140 if(fMassHist[i])fMassHist[i]=0;
141 if(fMassHistTC[i])fMassHistTC[i]=0;
142 if(fMassHistOrigC[i])fMassHistOrigC[i]=0;
143 if(fMassHistOrigB[i])fMassHistOrigB[i]=0;
144 if(fMassHistMC[i])fMassHistMC[i]=0;
145
146
147
148 }
35151011 149
150 for(Int_t i=0;i<kMaxPtBins+1;i++){
151 fArrayBinLimits[i]=0;
152 }
153
154
155 // Default constructor
156 // Output slot #1 writes into a TList container
157 DefineOutput(1,TList::Class()); //My private output
158 // Output slot #2 writes cut to private output
35151011 159 DefineOutput(2,TList::Class());
160 // Output slot #3 writes cut to private output
161 DefineOutput(3,AliNormalizationCounter::Class());
cb7c2594 162 //DefineOutput(4,AliHFAssociatedTrackCuts::Class());
35151011 163
164
165}
166
167//________________________________________________________________________
168AliAnalysisTaskSEDplusCorrelations::~AliAnalysisTaskSEDplusCorrelations()
169{
170 //
171 // Destructor
172 //
cb7c2594 173 if(fOutput) {delete fOutput; fOutput = 0;}
174 if(fListCuts) {delete fListCuts; fListCuts = 0;}
175 if(fRDCutsAnalysis) {delete fRDCutsAnalysis; fRDCutsAnalysis = 0;}
176 if(fCuts) {delete fCuts; fCuts = 0;}
177 if(fCounter) {delete fCounter; fCounter = 0;}
178 if(fCorrelator) {delete fCorrelator; fCorrelator=0;}
179
35151011 180
181
182}
183//_________________________________________________________________
184void AliAnalysisTaskSEDplusCorrelations::SetMassLimits(Float_t range){
185 // set invariant mass limits
186 Float_t bw=GetBinWidth();
187 fUpmasslimit = 1.865+range;
188 fLowmasslimit = 1.865-range;
189 SetBinWidth(bw);
190}
191//_________________________________________________________________
192void AliAnalysisTaskSEDplusCorrelations::SetMassLimits(Float_t lowlimit, Float_t uplimit){
193 // set invariant mass limits
194 if(uplimit>lowlimit)
195 {
196 Float_t bw=GetBinWidth();
197 fUpmasslimit = lowlimit;
198 fLowmasslimit = uplimit;
199 SetBinWidth(bw);
200 }
201}
202//________________________________________________________________
203void AliAnalysisTaskSEDplusCorrelations::SetBinWidth(Float_t w){
204 // Define width of mass bins
205 Float_t width=w;
206 Int_t nbins=(Int_t)((fUpmasslimit-fLowmasslimit)/width+0.5);
207 Int_t missingbins=4-nbins%4;
208 nbins=nbins+missingbins;
209 width=(fUpmasslimit-fLowmasslimit)/nbins;
210 if(missingbins!=0){
211 printf("AliAnalysisTaskSEDplusCorrelations::SetBinWidth: W-bin width of %f will produce histograms not rebinnable by 4. New width set to %f\n",w,width);
212 }
213 else{
214 if(fDebug>1) printf("AliAnalysisTaskSEDplusCorrelations::SetBinWidth: width set to %f\n",width);
215 }
216 fBinWidth=width;
217}
218//_________________________________________________________________
219Int_t AliAnalysisTaskSEDplusCorrelations::GetNBinsHistos(){
220 // Compute number of mass bins
221 return (Int_t)((fUpmasslimit-fLowmasslimit)/fBinWidth+0.5);
222}
223
224
225//__________________________________________
226void AliAnalysisTaskSEDplusCorrelations::Init(){
227 //
228 // Initialization
229 //
230 if(fDebug > 1) printf("AnalysisTaskSEDplusCorrelations::Init() \n");
231
cb7c2594 232
35151011 233 fListCuts=new TList();
cb7c2594 234
35151011 235 // fListCutsAsso=new TList();
236
237 AliRDHFCutsDplustoKpipi *analysis = new AliRDHFCutsDplustoKpipi(*fRDCutsAnalysis);
238 analysis->SetName("AnalysisCuts");
239
240 // AliHFAssociatedTrackCuts *trkcuts = new AliHFAssociatedTrackCuts(*fCuts);
241 //trkcuts->SetName("Assotrkcuts");
242
243 fListCuts->Add(analysis);
cb7c2594 244 //fListCutsAsso->Add(trkcuts);
35151011 245
246
247
248 PostData(2,fListCuts);
cb7c2594 249 //ŧ PostData(4,fListCutsAsso);
35151011 250
251 return;
252}
253
254//________________________________________________________________________
255void AliAnalysisTaskSEDplusCorrelations::UserCreateOutputObjects()
256{
257 // Create the output container
258 //
cb7c2594 259
35151011 260 if(fDebug > 1) printf("AnalysisTaskSEDplusCorrelations::UserCreateOutputObjects() \n");
cb7c2594 261 // Correlator creation and definition
35151011 262
263 Double_t Pi = TMath::Pi();
cb7c2594 264
265 // Set up the correlator
266
267
35151011 268 fCorrelator = new AliHFCorrelator("Correlator",fCuts,fSystem); // fCuts is the hadron cut object, fSystem to switch between pp or PbPb
cb7c2594 269
35151011 270 fCorrelator->SetDeltaPhiInterval((-0.5-1./32)*Pi,(1.5-1./32)*Pi); // set correct phi interval
cb7c2594 271
35151011 272 fCorrelator->SetEventMixing(fMixing); //set kFALSE/kTRUE for mixing Off/On
cb7c2594 273
35151011 274 fCorrelator->SetAssociatedParticleType(fSelect); // set 1/2/3 for hadron/kaons/kzeros
cb7c2594 275
35151011 276 fCorrelator->SetApplyDisplacementCut(fDisplacement); //set kFALSE/kTRUE for using the displacement cut
cb7c2594 277
35151011 278 fCorrelator->SetUseMC(fReadMC);
34538691 279 fCorrelator->SetPIDmode(2);
cb7c2594 280 fCorrelator->SetUseReco(fReco); // to analyse reco/kine
281
282 // For Event Mixing
283
35151011 284 Bool_t pooldef = fCorrelator->DefineEventPool();
285
286 if(!pooldef) AliInfo("Warning:: Event pool not defined properly");
287
288
289 // Several histograms are more conveniently managed in a TList
290 fOutput = new TList();
291 fOutput->SetOwner();
292 fOutput->SetName("OutputHistos");
293
294 TString hisname;
295 Int_t index=0;
296 Int_t nbins=GetNBinsHistos();
8d35b368 297
298
35151011 299
300 for(Int_t i=0;i<fNPtBins;i++){
301
302 index=GetHistoIndex(i);
35151011 303
35151011 304 hisname.Form("hMassPtK0S%d",i);
305 fMassHistK0S[index]=new TH1F(hisname.Data(),hisname.Data(),500,0.3,0.8);
306 fMassHistK0S[index]->Sumw2();
307
308 hisname.Form("hLeadPt%d",i);
309 fLeadPt[index]=new TH1F(hisname.Data(),hisname.Data(),500,0.0,50);
310 fLeadPt[index]->Sumw2();
311
cb7c2594 312
35151011 313 hisname.Form("hMassPt%d",i);
314 fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
315 fMassHist[index]->Sumw2();
cb7c2594 316
317
35151011 318 hisname.Form("hMassPt%dTC",i);
319 fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
320 fMassHistTC[index]->Sumw2();
321
cb7c2594 322
35151011 323 index=GetSignalHistoIndex(i);
35151011 324
35151011 325 hisname.Form("hSigPtK0S%d",i);
326 fMassHistK0S[index]=new TH1F(hisname.Data(),hisname.Data(),500,0.3,0.8);
327 fMassHistK0S[index]->Sumw2();
328
329 hisname.Form("hSigLeadPt%d",i);
330 fLeadPt[index]=new TH1F(hisname.Data(),hisname.Data(),500,0.0,50);
331 fLeadPt[index]->Sumw2();
332
333 hisname.Form("hSigPt%d",i);
334 fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
335 fMassHist[index]->Sumw2();
336
cb7c2594 337 hisname.Form("hSigOrigCPt%d",i);
338 fMassHistOrigC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
339 fMassHistOrigC[index]->Sumw2();
35151011 340
cb7c2594 341 hisname.Form("hSigOrigBPt%d",i);
342 fMassHistOrigB[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
343 fMassHistOrigB[index]->Sumw2();
35151011 344
cb7c2594 345
346 hisname.Form("hSigMCPt%d",i);
347 fMassHistMC[index]=new TH1F(hisname.Data(),hisname.Data(),nbins,fLowmasslimit,fUpmasslimit);
348 fMassHistMC[index]->Sumw2();
35151011 349
cb7c2594 350 }
35151011 351
352
353 for(Int_t i=0; i<3*fNPtBins; i++){
cb7c2594 354
35151011 355 fOutput->Add(fMassHistK0S[i]);
356 fOutput->Add(fLeadPt[i]);
357 fOutput->Add(fMassHist[i]);
358 fOutput->Add(fMassHistTC[i]);
cb7c2594 359 fOutput->Add(fMassHistOrigC[i]);
360 fOutput->Add(fMassHistOrigB[i]);
361 fOutput->Add(fMassHistMC[i]);
362
35151011 363 }
35151011 364
35151011 365
cb7c2594 366 TH1D * EventTypeMC = new TH1D("EventTypeMC","EventTypeMC",100,-0.5,99.5);
367 if(fReadMC) fOutput->Add(EventTypeMC);
368
369
370 //Event Mixing histos (for control plots)
371
372 Int_t NumberEvents = fCuts->GetMaxNEventsInPool();
373 Int_t NofTracks = fCuts->GetMinNTracksInPool();
374 Int_t NofCentBins = fCuts->GetNCentPoolBins();
375 Double_t * CentBins = fCuts->GetCentPoolBins();
376 Int_t NumberZVtxBins = fCuts->GetNZvtxPoolBins();
377 Double_t *ZVtxBins = fCuts->GetZvtxPoolBins();
378
379
380
381 fEventMix = new TH2D("EventMixingCheck","EventMixingCheck",100,0,600,100,-15,15);
382
383 fEventMix->GetXaxis()->SetTitle("Multiplicity ");
384 fEventMix->GetYaxis()->SetTitle("Z vertex [cm]");
385
35151011 386 if(fMixing)fOutput->Add(fEventMix);
35151011 387
cb7c2594 388 TH3D * EventsInPool = new TH3D("EventsInPool","Number of events in pool",NofCentBins,0,600,NumberZVtxBins,-15,15,1000000,0,1000000);
389
390 EventsInPool->GetXaxis()->SetTitle("Multiplicity ");
391 EventsInPool->GetYaxis()->SetTitle("Z vertex [cm]");
392 EventsInPool->GetZaxis()->SetTitle("Number of events in pool");
393 if(fMixing) fOutput->Add(EventsInPool);
394
395 Int_t MaxNofTracks = (NumberEvents+1)*NofTracks;
396
397
398 TH3D * NofTracksInPool = new TH3D("NofTracksInPool","Number of tracks in pool",NofCentBins,0,500,NumberZVtxBins,-15,15,MaxNofTracks,0,MaxNofTracks);
399 NofTracksInPool->GetXaxis()->SetTitle("Multiplicity ");
400 NofTracksInPool->GetYaxis()->SetTitle("Z vertex [cm]");
401 NofTracksInPool->GetZaxis()->SetTitle("Number of tracks");
402
403 if(fMixing) fOutput->Add(NofTracksInPool);
404
405 TH2D * NofPoolBinCalls = new TH2D("NofPoolBinCalls","Calls per pool bin",NofCentBins,CentBins,NumberZVtxBins,ZVtxBins);
406 NofPoolBinCalls->GetXaxis()->SetTitle("Multiplicity ");
407 NofPoolBinCalls->GetYaxis()->SetTitle("Z vertex [cm]");
408 if(fMixing) fOutput->Add(NofPoolBinCalls);
409
410
411
412 fHistNEvents = new TH1F("fHistNEvents", "number of events ",10,-0.5,10.5);
35151011 413 fHistNEvents->GetXaxis()->SetBinLabel(1,"nEventsAnal");
414 fHistNEvents->GetXaxis()->SetBinLabel(2,"nEvents accepted");
cb7c2594 415 fHistNEvents->GetXaxis()->SetBinLabel(3,"nEvent with good vertex");
416 fHistNEvents->GetXaxis()->SetBinLabel(4,"Total number of candidates");
417 fHistNEvents->GetXaxis()->SetBinLabel(5,"Number without bitmask");
418 fHistNEvents->GetXaxis()->SetBinLabel(6,"Number after Physics Selection");
419 fHistNEvents->GetXaxis()->SetBinLabel(7,"Total number in Fiducial Accpt");
420 fHistNEvents->GetXaxis()->SetBinLabel(8,"Total no. of good candidates");
421
35151011 422
423 fHistNEvents->GetXaxis()->SetNdivisions(1,kFALSE);
424 fHistNEvents->Sumw2();
425 fHistNEvents->SetMinimum(0);
426 fOutput->Add(fHistNEvents);
cb7c2594 427
35151011 428 // Counter for Normalization
429 TString normName="NormalizationCounter";
430 AliAnalysisDataContainer *cont = GetOutputSlot(3)->GetContainer();
cb7c2594 431
35151011 432 if(cont)normName=(TString)cont->GetName();
433 fCounter = new AliNormalizationCounter(normName.Data());
434 fCounter->Init();
435
cb7c2594 436 CreateCorrelationObjs();
35151011 437
438 PostData(1,fOutput);
439 PostData(3,fCounter);
440 return;
441}
442
443//________________________________________________________________________
444void AliAnalysisTaskSEDplusCorrelations::UserExec(Option_t */*option*/)
445{
446 // Do the analysis
447 AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
448 TClonesArray *array3Prong = 0;
449
cb7c2594 450 if(fReco) std::cout << "USING RECONSTRUCTION" << std::endl;
451 if(!fReco) std::cout << "USING MC TRUTH" << std::endl;
452
35151011 453 if(!fMixing){
454 if(fSelect==1) cout << "TASK::Correlation with hadrons on SE "<< endl;
455 if(fSelect==2) cout << "TASK::Correlation with kaons on SE "<< endl;
456 if(fSelect==3) cout << "TASK::Correlation with kzeros on SE "<< endl;
cb7c2594 457 }
35151011 458 if(fMixing){
459 if(fSelect==1) cout << "TASK::Correlation with hadrons on ME "<< endl;
460 if(fSelect==2) cout << "TASK::Correlation with kaons on ME "<< endl;
461 if(fSelect==3) cout << "TASK::Correlation with kzeros on ME "<< endl;
462 }
463
464
465 if(!aod && AODEvent() && IsStandardAOD()) {
466
467 aod = dynamic_cast<AliAODEvent*> (AODEvent());
468 AliAODHandler* aodHandler = (AliAODHandler*)
469 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
470 if(aodHandler->GetExtensions()) {
471 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
472 AliAODEvent *aodFromExt = ext->GetAOD();
473 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
474 }
475 } else if(aod) {
476 array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
477 }
478
479 if(!aod || !array3Prong) {
480 printf("AliAnalysisTaskSEDplusCorrelations::UserExec: Charm3Prong branch not found!\n");
481 return;
482 }
483
484
485 // the AODs with null vertex pointer didn't pass the PhysSel
cb7c2594 486
35151011 487 if(!aod->GetPrimaryVertex()||TMath::Abs(aod->GetMagneticField())<0.001) return;
488 fCounter->StoreEvent(aod,fRDCutsAnalysis,fReadMC);
cb7c2594 489
35151011 490 fHistNEvents->Fill(0); // count event
491
492
493 Bool_t isEvSel=fRDCutsAnalysis->IsEventSelected(aod);
494
495
496
497 PostData(1,fOutput);
cb7c2594 498
35151011 499 if(!isEvSel)return;
cb7c2594 500
35151011 501 fHistNEvents->Fill(1);
502
34538691 503 // set PIDResponse for associated tracks
cb7c2594 504
34538691 505 fCorrelator->SetPidAssociated();
35151011 506
507 TClonesArray *arrayMC=0;
508 AliAODMCHeader *mcHeader=0;
cb7c2594 509
35151011 510 // AOD primary vertex
511 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
cb7c2594 512
513
35151011 514 TString primTitle = vtx1->GetTitle();
cb7c2594 515
516 if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0){
517 fHistNEvents->Fill(2);
518 }
519
520
521
522
35151011 523 // load MC particles
524 if(fReadMC){
525
526 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
527 if(!arrayMC) {
528 printf("AliAnalysisTaskSEDplusCorrelations::UserExec: MC particles branch not found!\n");
529 return;
530 }
531
532 // load MC header
533 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
534 if(!mcHeader) {
535 printf("AliAnalysisTaskSEDplusCorrelations::UserExec: MC header branch not found!\n");
536 return;
537 }
cb7c2594 538
539 Bool_t isMCeventgood = kFALSE;
540
541
542 Int_t eventType = mcHeader->GetEventType();
543 Int_t NMCevents = fCuts->GetNofMCEventType();
544
545
546 for(Int_t k=0; k<NMCevents; k++){
547 Int_t * MCEventType = fCuts->GetMCEventType();
548
549 if(eventType == MCEventType[k]) isMCeventgood= kTRUE;
550
551 }
552 ((TH1D*)fOutput->FindObject("EventTypeMC"))->Fill(eventType);
553
554 if(NMCevents && !isMCeventgood){
555
556 std::cout << "The MC event " << eventType << " not interesting for this analysis: skipping" << std::endl;
557 return;
558 }
559
35151011 560 }
561
562 //HFCorrelators initialization (for this event)
563
cb7c2594 564 fCorrelator->SetAODEvent(aod); // set the event to be processed
565
35151011 566 Bool_t correlatorON = fCorrelator->Initialize(); //define the pool for mixing
cb7c2594 567
35151011 568 if(!correlatorON) {
569 AliInfo("AliHFCorrelator didn't initialize the pool correctly or processed a bad event");
570 return;
571 }
572 if(fReadMC) fCorrelator->SetMCArray(arrayMC);
573
cb7c2594 574 Int_t n3Prong = 0;
35151011 575
cb7c2594 576 if(fReco) n3Prong = array3Prong->GetEntriesFast();
577
578
579 if(!fReco) n3Prong = arrayMC->GetEntriesFast(); //for MC kine
580
581
8d35b368 582 printf("Number of D+->Kpipi: %d and of tracks: %d\n",n3Prong,aod->GetNumberOfTracks());
cb7c2594 583
35151011 584 Int_t index;
585 Int_t pdgDgDplustoKpipi[3]={321,211,211};
cb7c2594 586
35151011 587 Int_t nSelectedloose=0,nSelectedtight=0;
588
cb7c2594 589 Double_t ptCand;
590 Double_t phiCand;
591 Double_t etaCand;
592 Double_t invMass = -1;
593
594 Int_t nIDs[3] = {-9999999};
35151011 595
cb7c2594 596 Bool_t isDplus = kFALSE;
597
598 Int_t labDp = -1;
599
35151011 600 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
cb7c2594 601
602 AliAODMCParticle* DplusMC;
603
604 if(fReco){
35151011 605 AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong);
cb7c2594 606
607 fHistNEvents->Fill(3);
608
609
610
611 if(d->Pt()<2.0) continue; // Dplus below 2.0 not considered.
612
613
614
615 // cout<<multipli<<" multi"<<endl;
616
35151011 617
cb7c2594 618
35151011 619 if(fUseBit && !d->HasSelectionBit(AliRDHFCuts::kDplusCuts)){
cb7c2594 620 fHistNEvents->Fill(4);
35151011 621 continue;
622 }
623
624 Int_t passTightCuts=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kAll,aod);
cb7c2594 625
626 if(!fRDCutsAnalysis->GetIsSelectedCuts()) continue;
627
628 fHistNEvents->Fill(5);
629
630
35151011 631 if(fReadMC){
632 labDp = d->MatchToMC(411,arrayMC,3,pdgDgDplustoKpipi);
cb7c2594 633
634 // cout<<labDp<<"***"<<endl;
35151011 635 if(labDp>=0){
636 isDplus = kTRUE;
35151011 637
cb7c2594 638 }
639 }
640
641 invMass=d->InvMassDplus();
35151011 642 Double_t rapid=d->YDplus();
cb7c2594 643 etaCand = d->Eta();
644 phiCand = d->Phi();
645 ptCand = d->Pt();
646
35151011 647 Bool_t isFidAcc=fRDCutsAnalysis->IsInFiducialAcceptance(ptCand,rapid);
cb7c2594 648
35151011 649 if(isFidAcc){
cb7c2594 650 fHistNEvents->Fill(6);
651 nSelectedloose++;}
652 if(!isFidAcc) continue;
653 if(!passTightCuts)continue;
654
655 fHistNEvents->Fill(7);
656
657 nSelectedtight++;
658
659
660 nIDs[0] = ((AliAODTrack*)d->GetDaughter(0))->GetID();
661 nIDs[1] = ((AliAODTrack*)d->GetDaughter(1))->GetID();
662 nIDs[2] = ((AliAODTrack*)d->GetDaughter(2))->GetID();
663
35151011 664 }
cb7c2594 665
666 Int_t labDplus=-1;
667
668 if(!fReco){
669
670 DplusMC = dynamic_cast<AliAODMCParticle*>(arrayMC->At(i3Prong));
671
672 if (!DplusMC) {
673 AliWarning("Dplus MC Particle not found ");
674
675 continue;
676 }
677 labDplus = DplusMC->GetLabel();
678
679 Int_t PDG =TMath::Abs(DplusMC->PdgCode());
680
681 if(PDG !=411) continue; // not a Dplus
682 ptCand = DplusMC->Pt();
683 phiCand = DplusMC->Phi();
684 etaCand = DplusMC->Eta();
685
686 Bool_t isFidAccMC =fRDCutsAnalysis->IsInFiducialAcceptance(ptCand,DplusMC->Y());
687
688 if(!isFidAccMC)continue;
35151011 689
cb7c2594 690 }
691
692 //cout << "PHI D+ = " << phiCand << endl;
693 // cout << "ETA D+ = " << etaCand << endl;
694 // cout << "PT D+ = " << ptCand << endl;
695
696
697
698
699 Int_t iPtBin = fRDCutsAnalysis->PtBin(ptCand);
700
35151011 701 if(iPtBin>=0){
cb7c2594 702
35151011 703 index=GetHistoIndex(iPtBin);
cb7c2594 704
705 cout<<"*****"<<iPtBin<<endl;
706 Double_t effTrig;
707 if (fTrig){
35151011 708
cb7c2594 709 Double_t multipli = AliVertexingHFUtils::GetNumberOfTrackletsInEtaRange(aod,-1,1.);
710
711 effTrig = fCuts->GetTrigWeight(ptCand,multipli);
35151011 712
cb7c2594 713 // cout<<"*****"<<effTrig<<" "<<multipli<<" "<<iPtBin<<endl;
714
715 }
716 else
717 {
718
719 effTrig = 1.0;
720
721 }
722
723
724 Double_t trigweight = 1/effTrig ;
725
726 // cout<<"****"<<trigweight<<" ***"<<endl;
727
728 if(fReco && !fMixing){
729
730 fMassHist[index]->Fill(invMass); //without trig weight
731
732 fMassHistTC[index]->Fill(invMass,trigweight); //with trig wt
733 }
734
735 if( fReco && fReadMC && isDplus && !fMixing) {
736
737 index=GetSignalHistoIndex(iPtBin);
738
739 fMassHistMC[index]->Fill(invMass,trigweight);
35151011 740
cb7c2594 741 if(labDp>=0){
742
743 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
744 Int_t DplusSource = CheckOrigin(arrayMC,partDp);
745
746 if(DplusSource == 4){ // is from charm
35151011 747
cb7c2594 748 fMassHistOrigC[index]->Fill(invMass,trigweight);
749 }
750
751 if(DplusSource == 5){ // is from beauty
35151011 752
cb7c2594 753 fMassHistOrigB[index]->Fill(invMass,trigweight);
35151011 754
755
cb7c2594 756 }
757 }
758 }
759
760
761 if(!fReco && fReadMC && !fMixing){
35151011 762
cb7c2594 763
764 if(labDplus>=0){
765
766 fMassHist[index]->Fill(1.869);
767
768 AliAODMCParticle *kineDp = (AliAODMCParticle*)arrayMC->At(labDplus);
769
770 Int_t DplusSource = CheckOrigin(arrayMC,kineDp);
771
772
773 if(DplusSource==4){ // is from charm
774
775 ((TH1F*)fOutput->FindObject(Form("histOrig_Dplus_Bin%d",iPtBin)))->Fill(0.);
35151011 776 }
35151011 777
cb7c2594 778 if(DplusSource==5){ // is from beauty
35151011 779
cb7c2594 780
781 ((TH1F*)fOutput->FindObject(Form("histOrig_Dplus_Bin%d",iPtBin)))->Fill(1.);
782 }
783 }
784 }
35151011 785
cb7c2594 786
787 //Dplus info
35151011 788
cb7c2594 789 Double_t phiDplus = fCorrelator->SetCorrectPhiRange(phiCand);
790 fCorrelator->SetTriggerParticleProperties(ptCand,phiDplus,etaCand);
791
792
793
794 Double_t ptlead = 0;
795 Double_t philead = 0;
796 Double_t etalead = 0;
797 Double_t refpt = 0;
798
799 Int_t LeadSource = 0;
800
801
802
803 Bool_t execPool = fCorrelator->ProcessEventPool();
804
805 //printf("*************: %d\n",execPool);
806
807 if(fMixing && !execPool) {
808 AliInfo("Mixed event analysis: pool is not ready");
809 continue;
810 }
811
812 Int_t NofEventsinPool = 1;
813 if(fMixing) {
814 NofEventsinPool = fCorrelator->GetNofEventsInPool();
35151011 815
cb7c2594 816 //cout<<"*********"<<NofEventsinPool<<endl;
817 }
818
819
820
821 for (Int_t jMix =0; jMix < NofEventsinPool; jMix++){// loop on events in the pool; if it is SE analysis, it stops at 1
822
823 Bool_t analyzetracks = fCorrelator->ProcessAssociatedTracks(jMix);
824 if(!analyzetracks) {
825 AliInfo("AliHFCorrelator::Cannot process the track array");
826 continue;
827 }
828
35151011 829
cb7c2594 830 //Int_t NofTracks = fCorrelator->GetNofTracks();
831
832 //cout<<"***number of tracks****"<<fCorrelator->GetNofTracks()<<endl;
833
834 for (Int_t iTrack = 0;iTrack<fCorrelator->GetNofTracks();iTrack++) {
835 Bool_t runcorrelation = fCorrelator->Correlate(iTrack);
836
837 if(!runcorrelation) continue;
838
839 Double_t DeltaPhi = fCorrelator->GetDeltaPhi();
840
841
842 Double_t DeltaEta = fCorrelator->GetDeltaEta();
843
844 AliReducedParticle* redpart = fCorrelator->GetAssociatedParticle();
845 Double_t phiHad=redpart->Phi();
846 Double_t ptHad=redpart->Pt();
847 Double_t etaHad=redpart->Eta();
848 Int_t label = redpart->GetLabel();
849 Int_t trackid = redpart->GetID();
850
851 Double_t effi = redpart->GetWeight();
852 Double_t weight = (1/effi)*(trigweight);
853
854 phiHad = fCorrelator->SetCorrectPhiRange(phiHad);
855 // cout<<effi<<"******"<<endl;
856
35151011 857
35151011 858
cb7c2594 859 if (!fMixing && fReco){
860 if( trackid == nIDs[0] || trackid == nIDs[1] || trackid == nIDs[2]) continue; //discard the Dplus daughters
861 }
862
863 if(fReco && !fReadMC)
864 {
865 FillCorrelations(ptHad,invMass,DeltaPhi,DeltaEta,iPtBin,fSelect,weight);
866 }
867
868
869 if(fReco && fReadMC && isDplus){
870
871 if(label<0) continue;
872
873 AliAODMCParticle* mchad = (AliAODMCParticle*)arrayMC->At(label);
874
875 if (!mchad) continue;
876
877 if (!mchad->IsPhysicalPrimary()) continue; //reject the Reco track if correspondent Kine track is not primary
878
879 if(labDp < 0) continue;
880
881 AliAODMCParticle *reDp = (AliAODMCParticle*)arrayMC->At(labDp);
882
883 Int_t RDSource = CheckOrigin(arrayMC,reDp);
884
885 Int_t MCSource = CheckTrackOrigin(arrayMC,(AliAODMCParticle*)arrayMC->At(label)) ;// check source of associated particle (hadron/kaon/K0)
8d35b368 886
35151011 887
cb7c2594 888 FillMCRCorrelations(ptHad,invMass,DeltaPhi,DeltaEta,iPtBin,MCSource,RDSource,weight);
889
35151011 890 }
cb7c2594 891
892 // montecarlo kine
893 if( !fReco && fReadMC){
35151011 894
cb7c2594 895 if(label<0) continue;
35151011 896
cb7c2594 897 if(TMath::Abs(etaHad) > 0.8) continue;
35151011 898
cb7c2594 899 AliAODMCParticle *hadMC = (AliAODMCParticle*)arrayMC->At(label);
900 if(!hadMC) continue;
901 if (!hadMC->IsPhysicalPrimary()) continue;
902 if(labDplus<0) continue;
903
904 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDplus);
905 if(IsDDaughter(partDp,hadMC,arrayMC)) continue;
906
35151011 907
cb7c2594 908 AliAODMCParticle *trueDp = (AliAODMCParticle*)arrayMC->At(labDplus);
909 Int_t DSource = CheckOrigin(arrayMC,trueDp);
910
911 Int_t PartSource = CheckTrackOrigin(arrayMC,(AliAODMCParticle*)arrayMC->At(label)) ;// check source of associated particle (hadron/kaon/K0)
35151011 912
913
cb7c2594 914 FillMCTruthCorrelations(ptHad,DeltaPhi,DeltaEta,iPtBin,PartSource,DSource,fSelect);
915 }
916
917
918
919 // For leading particle
920
921 if (ptHad > refpt) {
922 //refpt = ptHad; ptlead = ptHad;
923
924 if(fReadMC){
925 if(label<0) continue;
926 if(!(AliAODMCParticle*)arrayMC->At(label))continue;
927
928 LeadSource = CheckTrackOrigin(arrayMC,(AliAODMCParticle*)arrayMC->At(label)) ;// check source of associated particle (hadron/kaon/K0)
929 }
930
931 philead = phiCand - phiHad;
932 etalead = etaCand - etaHad;
933 if (philead < (-1)*TMath::Pi()/2) philead += 2*TMath::Pi();
934
935 if (philead > 3*TMath::Pi()/2) philead -= 2*TMath::Pi();
936
937 refpt = ptHad; ptlead = ptHad;
938 }
939 }
940
941 /*if (fReco){
942 Double_t fillSparseLeadDplus[3] = {philead,invMass,etalead};
943 }
944 else{
945 Double_t fillSparseLeadDplus[3] = {philead,1.87,etalead};
946 }
947
948
949 if(fReco && !fReadMC && !fMixing){
950
951 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
952
953 }
954
955 if(fReco && fReadMC && isDplus && !fMixing){
956
957 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
958
959
960
961 if(LeadSource>=1&&LeadSource<=4){ // is from charm
962
963 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_c_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
964
965
966 }
967 if(LeadSource>=4&&LeadSource<=8){ // is from beauty
968
969
970 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_b_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
971
972
973
974 }
975
976 // from NHF
977 if(LeadSource==0){ // is from charm ->D
978
979
980 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_nhf_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
981
982 }
983
984 fLeadPt[index]->Fill(ptlead);
985 }
986
987 if(!fReco && fReadMC && !fMixing){
988
989 index=GetSignalHistoIndex(iPtBin);
990
991
992 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
993
994
995 if(LeadSource>=1&&LeadSource<=4){ // is from charm
996
997 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_c_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
998
999
1000
1001 }
1002 if(LeadSource>=4&&LeadSource<=8){ // is from beauty
1003
1004((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_b_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
1005
1006 }
1007
1008 // from NHF
1009 if(LeadSource==0){ // is from charm ->D
1010
1011((THnSparseF*)fOutput->FindObject(Form("hPhi_Lead_From_nhf_Bin%d",iPtBin)))->Fill(fillSparseLeadDplus,eweight);
1012
1013
1014 }
1015 fLeadPt[index]->Fill(ptlead);
1016
1017 }*/
1018
1019 } //jmix
35151011 1020
cb7c2594 1021
1022 } //pt bin
1023
1024
35151011 1025
1026 }
1027
1028 if(fMixing){
1029 Bool_t updated = fCorrelator->PoolUpdate();
1030
1031 if(!updated) AliInfo("Pool was not updated");
1032 }
1033 fCounter->StoreCandidates(aod,nSelectedloose,kTRUE);
1034 fCounter->StoreCandidates(aod,nSelectedtight,kFALSE);
1035
1036
1037 PostData(1,fOutput);
1038 PostData(2,fListCuts);
1039 PostData(3,fCounter);
cb7c2594 1040 // PostData(4,fListCutsAsso);
35151011 1041 return;
1042}
1043
1044//________________________________________________________________________
cb7c2594 1045
35151011 1046void AliAnalysisTaskSEDplusCorrelations::Terminate(Option_t */*option*/)
1047{
1048 // Terminate analysis
1049 //
1050 if(fDebug > 1) printf("AnalysisTaskSEDplusCorrelations: Terminate() \n");
1051
1052 fOutput = dynamic_cast<TList*> (GetOutputData(1));
1053 if (!fOutput) {
1054 printf("ERROR: fOutput not available\n");
1055 return;
1056 }
35151011 1057
1058 return;
1059}
1060
1061
1062//________________________________________________________________________
cb7c2594 1063void AliAnalysisTaskSEDplusCorrelations::FillCorrelations(Double_t ptTrack, Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t sel, Double_t eweight) const{
35151011 1064
35151011 1065
cb7c2594 1066 //Filling THnSparse for correlations , only for charged tracks
1067
1068
35151011 1069 if(sel==1){
cb7c2594 1070
1071 if(!fMixing){
1072
1073 Double_t ptLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(2)->GetXmax(); //all plots have same axes...
1074 Double_t EtaLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(3)->GetXmax();
1075
1076 if(ptTrack > ptLim_Sparse) ptTrack = ptLim_Sparse-0.01; if(deltaEta > EtaLim_Sparse) deltaEta = EtaLim_Sparse-0.01;
1077 if(deltaEta < -EtaLim_Sparse) deltaEta = -EtaLim_Sparse+0.01;
1078
1079 //variables for filling histos
1080
1081 Double_t fillSparseDplus[4] = {deltaPhi,mass,ptTrack,deltaEta};
1082
1083
1084
1085
1086 //sparse fill for data (tracks) + weighted
1087
1088 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->Fill(fillSparseDplus,eweight);
1089
1090 }
1091
1092 if(fMixing) {
1093
1094
1095 //variables for filling histos
1096
1097 Double_t fillSparseDplusMix[3] = {deltaPhi,mass,deltaEta};
1098
1099
1100 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d_EvMix",ind)))->Fill(fillSparseDplusMix,eweight);
1101 }
1102
35151011 1103 }
cb7c2594 1104
35151011 1105 if(sel==2){
cb7c2594 1106
35151011 1107 }
1108 if(sel==3){
cb7c2594 1109
35151011 1110 }
cb7c2594 1111
35151011 1112 return;
1113}
1114
1115
1116
1117//________________________________________________________________________
35151011 1118
cb7c2594 1119
1120
1121void AliAnalysisTaskSEDplusCorrelations::FillMCTruthCorrelations( Double_t ptTrack,Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus, Int_t sel) const{
1122
1123 // Filling histos with MC Kine information
1124
1125 Double_t invm = 1.876;
1126
1127 Double_t ptLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(2)->GetXmax(); //all plots have same axes...
1128 Double_t EtaLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(3)->GetXmax();
1129 if(ptTrack > ptLim_Sparse) ptTrack = ptLim_Sparse-0.01;
1130 if(deltaEta > EtaLim_Sparse) deltaEta = EtaLim_Sparse-0.01;
1131 if(deltaEta < -EtaLim_Sparse) deltaEta = -EtaLim_Sparse+0.01;
1132
1133
35151011 1134
cb7c2594 1135 //variables for filling histos
1136
1137 Double_t fillSparseDplus[4] = {deltaPhi,invm,ptTrack,deltaEta};
1138
35151011 1139
1140 if(sel==1){
cb7c2594 1141
1142 if(!fMixing){
1143
1144 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->Fill(fillSparseDplus);
1145
1146 if(origDplus==4&&mcSource>=1&&mcSource<=3){ // is from charm
1147
1148 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_HFC_Bin%d",ind)))->Fill(fillSparseDplus);
1149 }
1150 if(origDplus==5&&mcSource>=4&&mcSource<=8){ // is from beauty
1151
1152 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_HFB_Bin%d",ind)))->Fill(fillSparseDplus);
1153 }
1154
1155 if(mcSource==0){ // is from NHF
1156
1157 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_NHF_Bin%d",ind)))->Fill(fillSparseDplus);
1158 }
1159
1160 }
1161
1162 if(fMixing) {
35151011 1163
cb7c2594 1164
1165 //variables for filling histos
1166 Double_t fillSparseDplusMix[3] = {deltaPhi,invm,deltaEta};
1167
1168 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d_EvMix",ind)))->Fill(fillSparseDplusMix);
1169 }
1170
1171 }
1172
1173 if(sel==2){
1174
1175 }
1176
1177 if(sel==3){
1178
1179 }
1180
1181
1182 return;
1183}
1184
1185
1186void AliAnalysisTaskSEDplusCorrelations::FillMCRCorrelations(Double_t ptTrack, Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus, Double_t eweight) const{
1187
1188 // Filling histos with MC information
1189
1190
1191 Double_t ptLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(2)->GetXmax(); //all plots have same axes...
1192 Double_t EtaLim_Sparse = ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->GetAxis(3)->GetXmax();
1193 if(ptTrack > ptLim_Sparse) ptTrack = ptLim_Sparse-0.01;
1194 if(deltaEta > EtaLim_Sparse) deltaEta = EtaLim_Sparse-0.01;
1195 if(deltaEta < -EtaLim_Sparse) deltaEta = -EtaLim_Sparse+0.01;
1196
1197
1198 if(!fMixing){
1199
1200 Double_t fillSparseDplus[4] = {deltaPhi,mass,ptTrack,deltaEta};
1201
1202
1203
1204 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d",ind)))->Fill(fillSparseDplus,eweight);
1205
1206 if(origDplus==4&&mcSource>=1&&mcSource<=3){ // is from charm
1207
1208 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_HFC_Bin%d",ind)))->Fill(fillSparseDplus,eweight);
1209 }
1210 if(origDplus==5&&mcSource>=4&&mcSource<=8){ // is from beauty
1211
1212 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_HFB_Bin%d",ind)))->Fill(fillSparseDplus,eweight);
1213 }
1214
1215 if(mcSource==0){ // is from NHF
1216
1217 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_NHF_Bin%d",ind)))->Fill(fillSparseDplus,eweight);
1218 }
1219 }
1220
1221 if(fMixing) {
1222
1223 //variables for filling histos
1224 Double_t fillSparseDplusMix[3] = {deltaPhi,mass,deltaEta};
1225
1226 ((THnSparseF*)fOutput->FindObject(Form("hPhi_Charg_Bin%d_EvMix",ind)))->Fill(fillSparseDplusMix,eweight);
1227 }
1228
1229
1230 return;
1231}
1232
1233Bool_t AliAnalysisTaskSEDplusCorrelations::IsDDaughter(AliAODMCParticle* d, AliAODMCParticle* track, TClonesArray* mcArray) const {
1234
1235 //Daughter removal in MCKine case
1236 Bool_t isDaughter = kFALSE;
1237 Int_t labelDplus = d->GetLabel();
1238
1239 Int_t mother = track->GetMother();
1240
1241
1242 while (mother > 0){
1243 AliAODMCParticle* mcMoth = dynamic_cast<AliAODMCParticle*>(mcArray->At(mother));
1244 if (mcMoth){
1245 if (mcMoth->GetLabel() == labelDplus) isDaughter = kTRUE;
1246 mother = mcMoth->GetMother(); //goes back to last generation
1247 } else{
1248 AliError(" mother particle not found!");
1249 break;
1250 }
1251 }
1252
1253 return isDaughter;
1254}
1255
1256
1257Int_t AliAnalysisTaskSEDplusCorrelations::CheckTrackOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const {
1258 //
1259 // checks on particle (#) origin:
1260 // 0) Not HF
1261 // 1) D->#
1262 // 2) D->X->#
1263 // 3) c hadronization
1264 // 4) B->#
1265 // 5) B->X-># (X!=D)
1266 // 6) B->D->#
1267 // 7) B->D->X->#
1268 // 8) b hadronization
1269 //
1270 if(fDebug>2) printf("AliAnalysisTaskSEDplusCorrelations::CheckTrkOrigin() \n");
35151011 1271
cb7c2594 1272 Int_t pdgGranma = 0;
1273 Int_t mother = 0;
1274 mother = mcPartCandidate->GetMother();
1275 Int_t istep = 0;
1276 Int_t abspdgGranma =0;
1277 Bool_t isFromB=kFALSE;
1278 Bool_t isDdaugh=kFALSE;
1279 Bool_t isDchaindaugh=kFALSE;
1280 Bool_t isBdaugh=kFALSE;
1281 Bool_t isBchaindaugh=kFALSE;
1282 Bool_t isQuarkFound=kFALSE;
1283
1284 while (mother > 0){
1285 istep++;
1286 AliAODMCParticle* mcMoth = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mother));
1287 if (mcMoth){
1288 pdgGranma = mcMoth->GetPdgCode();
1289 abspdgGranma = TMath::Abs(pdgGranma);
1290 if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
1291 isBchaindaugh=kTRUE;
1292 if(istep==1) isBdaugh=kTRUE;
1293 }
1294 if ((abspdgGranma > 400 && abspdgGranma < 500) || (abspdgGranma > 4000 && abspdgGranma < 5000)){
1295 isDchaindaugh=kTRUE;
1296 if(istep==1) isDdaugh=kTRUE;
1297 }
1298 if(abspdgGranma==4 || abspdgGranma==5) {isQuarkFound=kTRUE; if(abspdgGranma==5) isFromB = kTRUE;}
1299 mother = mcMoth->GetMother();
1300 }else{
1301 AliError("Failed casting the mother particle!");
1302 break;
35151011 1303 }
cb7c2594 1304 }
1305
1306 //decides what to return based on the flag status
1307 if(isQuarkFound) {
1308 if(!isFromB) { //charm
1309 if(isDdaugh) return 1; //charm immediate
1310 else if(isDchaindaugh) return 2; //charm chain
1311 else return 3; //charm hadronization
1312 }
1313 else { //beauty
1314 if(isBdaugh) return 4; //b immediate
1315 else if(isBchaindaugh) { //b chain
1316 if(isDchaindaugh) {
1317 if(isDdaugh) return 6; //d immediate
1318 return 7; //d chain
1319 }
1320 else return 5; //b, not d
1321 }
1322 else return 8; //b hadronization
35151011 1323 }
1324 }
cb7c2594 1325 else return 0; //no HF quark
1326}
35151011 1327
cb7c2594 1328Int_t AliAnalysisTaskSEDplusCorrelations::CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const {
1329 //
1330 // checking whether the mother of the particles come from a charm or a bottom quark
1331 //
1332
1333 Int_t pdgGranma = 0;
1334 Int_t mother = 0;
1335 mother = mcPartCandidate->GetMother();
1336 Int_t istep = 0;
1337 Int_t abspdgGranma =0;
1338 Bool_t isFromB=kFALSE;
1339 Bool_t isQuarkFound=kFALSE;
1340 while (mother >0 ){
1341 istep++;
1342 AliAODMCParticle* mcGranma = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mother));
1343 if (mcGranma){
1344 pdgGranma = mcGranma->GetPdgCode();
1345 abspdgGranma = TMath::Abs(pdgGranma);
1346 if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
1347 isFromB=kTRUE;
1348 }
1349 if(abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE;
1350 mother = mcGranma->GetMother();
1351 }else{
1352 AliError("Failed casting the mother particle!");
1353 break;
35151011 1354 }
1355 }
cb7c2594 1356
1357 if(isFromB) return 5;
1358 else return 4;
1359}
1360
1361
1362void AliAnalysisTaskSEDplusCorrelations::CreateCorrelationObjs() {
1363//
1364
1365 TString namePlot = "";
1366 Int_t nbinsmass=GetNBinsHistos();
1367 //These for limits in THnSparse (one per bin, same limits).
1368 //Vars: DeltaPhi, InvMass, PtTrack, Displacement, DeltaEta
1369 Int_t nBinsPhi[4] = {32,nbinsmass,30,16};
1370 Double_t binMinPhi[4] = {-TMath::Pi()/2.+TMath::Pi()/32.,fLowmasslimit,0.,-1.6}; //is the minimum for all the bins
1371 Double_t binMaxPhi[4] = {3*TMath::Pi()/2.+TMath::Pi()/32.,fUpmasslimit,30.0,1.6}; //is the maximum for all the bins
1372
1373 //Vars: DeltaPhi, InvMass, DeltaEta
1374 Int_t nBinsMix[3] = {32,nbinsmass,16};
1375 Double_t binMinMix[3] = {-TMath::Pi()/2.+TMath::Pi()/32.,fLowmasslimit,-1.6}; //is the minimum for all the bins
1376 Double_t binMaxMix[3] = {3*TMath::Pi()/2.+TMath::Pi()/32.,fUpmasslimit,1.6}; //is the maximum for all the bins
1377
1378 for(Int_t i=0;i<fNPtBins;i++){
1379
1380 if(!fMixing) {
1381 //THnSparse plots: correlations for various invariant mass (MC and data)
1382 namePlot="hPhi_Charg_Bin";
1383 namePlot+=i;
1384
1385 THnSparseF *hPhi = new THnSparseF(namePlot.Data(), "Azimuthal correlation; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1386 hPhi->Sumw2();
1387 fOutput->Add(hPhi);
1388
1389 namePlot="hPhi_Kaon_Bin";
1390 namePlot+=i;
1391
1392 THnSparseF *hPhiK = new THnSparseF(namePlot.Data(), "Azimuthal correlation; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1393 hPhiK->Sumw2();
1394 fOutput->Add(hPhiK);
1395
1396 namePlot="hPhi_K0_Bin";
1397 namePlot+=i;
1398
1399 THnSparseF *hPhiK0 = new THnSparseF(namePlot.Data(), "Azimuthal correlation; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1400 hPhiK0->Sumw2();
1401 fOutput->Add(hPhiK0);
1402
1403 //histos for c/b origin for D+ (MC only)
1404 if (fReadMC) {
1405
1406 //generic origin for tracks
1407 namePlot="hPhi_Charg_HFC_Bin";
1408 namePlot+=i;
1409
1410 THnSparseF *hPhiH_c = new THnSparseF(namePlot.Data(), "Azimuthal correlation - c origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1411 hPhiH_c->Sumw2();
1412 fOutput->Add(hPhiH_c);
1413
1414 namePlot="hPhi_Kaon_HFC_Bin";
1415 namePlot+=i;
1416
1417 THnSparseF *hPhiK_c = new THnSparseF(namePlot.Data(), "Azimuthal correlation - c origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1418 hPhiK_c->Sumw2();
1419 fOutput->Add(hPhiK_c);
1420
1421 namePlot="hPhi_K0_HFC_Bin";
1422 namePlot+=i;
1423
1424 THnSparseF *hPhiK0_c = new THnSparseF(namePlot.Data(), "Azimuthal correlation - c origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1425 hPhiK0_c->Sumw2();
1426 fOutput->Add(hPhiK0_c);
1427
1428 namePlot="hPhi_Charg_HFB_Bin";
1429 namePlot+=i;
1430
1431 THnSparseF *hPhiH_b = new THnSparseF(namePlot.Data(), "Azimuthal correlation - b origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1432 hPhiH_b->Sumw2();
1433 fOutput->Add(hPhiH_b);
1434
1435 namePlot="hPhi_Kaon_HFB_Bin";
1436 namePlot+=i;
1437
1438 THnSparseF *hPhiK_b = new THnSparseF(namePlot.Data(), "Azimuthal correlation - b origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1439 hPhiK_b->Sumw2();
1440 fOutput->Add(hPhiK_b);
1441
1442 namePlot="hPhi_K0_HFB_Bin";
1443 namePlot+=i;
1444
1445 THnSparseF *hPhiK0_b = new THnSparseF(namePlot.Data(), "Azimuthal correlation - b origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1446 hPhiK0_b->Sumw2();
1447 fOutput->Add(hPhiK0_b);
1448
1449 namePlot="hPhi_Charg_NHF_Bin";
1450 namePlot+=i;
1451
1452 THnSparseF *hPhiH_NHF = new THnSparseF(namePlot.Data(), "Azimuthal correlation - Non HF; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1453 hPhiH_NHF->Sumw2();
1454 fOutput->Add(hPhiH_NHF);
1455
1456 namePlot="hPhi_Kaon_NHF_Bin";
1457 namePlot+=i;
1458
1459 THnSparseF *hPhiK_Non = new THnSparseF(namePlot.Data(), "Azimuthal correlation - Non HF; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1460 hPhiK_Non->Sumw2();
1461 fOutput->Add(hPhiK_Non);
1462
1463 namePlot="hPhi_K0_NHF_Bin";
1464 namePlot+=i;
1465
1466 THnSparseF *hPhiK0_Non = new THnSparseF(namePlot.Data(), "Azimuthal correlation - Non HF; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",4,nBinsPhi,binMinPhi,binMaxPhi);
1467 hPhiK0_Non->Sumw2();
1468 fOutput->Add(hPhiK0_Non);
1469 }
1470
1471 //leading hadron correlations
1472 namePlot="hPhi_Lead_Bin";
1473 namePlot+=i;
1474
1475 THnSparseF *hCorrLead = new THnSparseF(namePlot.Data(), "Leading particle correlations; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1476 hCorrLead->Sumw2();
1477 fOutput->Add(hCorrLead);
1478
1479 if (fReadMC) {
1480 namePlot="hPhi_Lead_From_c_Bin";
1481 namePlot+=i;
1482
1483 THnSparseF *hCorrLead_c = new THnSparseF(namePlot.Data(), "Leading particle correlations - c origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1484 hCorrLead_c->Sumw2();
1485 fOutput->Add(hCorrLead_c);
1486
1487 namePlot="hPhi_Lead_From_b_Bin";
1488 namePlot+=i;
1489
1490 THnSparseF *hCorrLead_b = new THnSparseF(namePlot.Data(), "Leading particle correlations - b origin; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1491 hCorrLead_b->Sumw2();
1492 fOutput->Add(hCorrLead_b);
1493
1494
1495
1496 namePlot="hPhi_Lead_From_nhf_Bin";
1497 namePlot+=i;
1498
1499 THnSparseF *hCorrLead_Non = new THnSparseF(namePlot.Data(), "Leading particle correlations - Non HF; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1500 hCorrLead_Non->Sumw2();
1501 fOutput->Add(hCorrLead_Non);
1502 }
1503
1504
1505
1506 //pT distribution histos
1507 namePlot = "hist_Pt_Charg_Bin"; namePlot+=i;
1508 TH1F *hPtHad = new TH1F(namePlot.Data(), "Charged track pT (in D+ events); p_{T} (GeV/c)",240,0.,20.);
1509 hPtHad->SetMinimum(0);
1510 fOutput->Add(hPtHad);
1511
1512 namePlot = "hist_Pt_Kcharg_Bin"; namePlot+=i;
1513 TH1F *hPtH = new TH1F(namePlot.Data(), "Hadrons pT (in D+ events); p_{T} (GeV/c)",240,0.,12.);
1514 hPtH->SetMinimum(0);
1515 fOutput->Add(hPtH);
1516
1517 namePlot = "hist_Pt_K0_Bin"; namePlot+=i;
1518 TH1F *hPtK = new TH1F(namePlot.Data(), "Kaons pT (in D+ events); p_{T} (GeV/c)",240,0.,12.);
1519 hPtK->SetMinimum(0);
1520 fOutput->Add(hPtK);
1521
1522
35151011 1523 }
cb7c2594 1524
1525 if(fMixing) {
1526 //THnSparse plots for event mixing!
1527
1528
1529 namePlot="hPhi_K0_Bin";
1530 namePlot+=i;namePlot+="_EvMix";
1531
1532 THnSparseF *hPhiK_EvMix = new THnSparseF(namePlot.Data(), "Az. corr. EvMix; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1533 hPhiK_EvMix->Sumw2();
1534 fOutput->Add(hPhiK_EvMix);
1535
1536 namePlot="hPhi_Kcharg_Bin";
1537 namePlot+=i;namePlot+="_EvMix";
1538
1539 THnSparseF *hPhiH_EvMix = new THnSparseF(namePlot.Data(), "Az. corr. EvMix; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1540 hPhiK_EvMix->Sumw2();
1541 fOutput->Add(hPhiH_EvMix);
1542
1543 namePlot="hPhi_Charg_Bin";
1544 namePlot+=i;namePlot+="_EvMix";
1545
1546 THnSparseF *hPhiC_EvMix = new THnSparseF(namePlot.Data(), "Az. corr. EvMix; #Delta#phi; Inv. Mass (GeV/c^{2}); p_{t} (GeV/c)",3,nBinsMix,binMinMix,binMaxMix);
1547 hPhiC_EvMix->Sumw2();
1548 fOutput->Add(hPhiC_EvMix);
35151011 1549 }
35151011 1550 }
1551
cb7c2594 1552 //out of bin loop
1553 if(!fMixing) {
1554 TH1F *hCountC = new TH1F("hist_Count_Charg", "Charged track counter; # Tracks",100,0.,100.);
1555 hCountC->SetMinimum(0);
1556 fOutput->Add(hCountC);
1557
1558 TH1F *hCountH = new TH1F("hist_Count_Kcharg", "Hadrons counter; # Tracks",20,0.,20.);
1559 hCountH->SetMinimum(0);
1560 fOutput->Add(hCountH);
1561
1562 TH1F *hCountK = new TH1F("hist_Count_K0", "Kaons counter; # Tracks",20,0.,20.);
1563 hCountK->SetMinimum(0);
1564 fOutput->Add(hCountK);
1565 }
1566
1567 if (fReadMC) {
1568 TH1D *hEventTypeMC = new TH1D("EventTypeMC","EventTypeMC",100,-0.5,99.5);
1569 fOutput->Add(hEventTypeMC);
1570 }
1571
1572 // if (fFillGlobal) { //all-events plots
1573 //pt distributions
35151011 1574
cb7c2594 1575 if(!fMixing) {
1576 TH1F *hPtHAll = new TH1F("hist_Pt_Charg_AllEv", "Charged track pT (All); p_{T} (GeV/c)",240,0.,12.);
1577 hPtHAll->SetMinimum(0);
1578 fOutput->Add(hPtHAll);
1579
1580 TH1F *hPtKAll = new TH1F("hist_Pt_Kaons_AllEv", "Kaons pT (All); p_{T} (GeV/c)",240,0.,12.);
1581 hPtKAll->SetMinimum(0);
1582 fOutput->Add(hPtKAll);
1583
1584 TH1F *hPtK0All = new TH1F("hist_Pt_K0_AllEv", "K0 pT (All); p_{T} (GeV/c)",240,0.,12.);
1585 hPtK0All->SetMinimum(0);
1586 fOutput->Add(hPtK0All);
1587
1588
1589 //phi distributions
1590 TH1F *hPhiDistHAll = new TH1F("hist_PhiDistr_Charg", "Charged track phi distr. (All); p_{T} (GeV/c)",64,0,6.283);
1591 hPhiDistHAll->SetMinimum(0);
1592 fOutput->Add(hPhiDistHAll);
1593
1594 TH1F *hPhiDistKAll = new TH1F("hist_PhiDistr_Kcharg", "Kaons phi distr. (All); p_{T} (GeV/c)",64,0,6.283);
1595 hPhiDistKAll->SetMinimum(0);
1596 fOutput->Add(hPhiDistKAll);
1597
1598 TH1F *hPhiDistK0All = new TH1F("hist_PhiDistr_K0", "K0 phi distr. (All); p_{T} (GeV/c)",64,0,6.283);
1599 hPhiDistK0All->SetMinimum(0);
1600 fOutput->Add(hPhiDistK0All);
1601
1602 TH1F *hPhiDistDAll = new TH1F("hist_PhiDistr_Dplus", "D^{+} phi distr. (All); p_{T} (GeV/c)",64,0,6.283);
1603 hPhiDistDAll->SetMinimum(0);
1604 fOutput->Add(hPhiDistDAll);
1605 }
1606 //}
1607
1608 //for MC analysis only
1609 for(Int_t i=0;i<fNPtBins;i++) {
1610
1611 if (fReadMC && !fMixing) {
1612
1613
1614 //origin of tracks histos
1615 namePlot="histOrig_Had_Bin"; namePlot+=i;
1616 TH1F *hOrigin_had = new TH1F(namePlot.Data(), "Origin of associated tracksin MC",10,-0.5,9.5);
1617 hOrigin_had->SetMinimum(0);
1618
1619 hOrigin_had->GetXaxis()->SetBinLabel(1,"All ");
1620 hOrigin_had->GetXaxis()->SetBinLabel(2," from Heavy flavour");
1621 hOrigin_had->GetXaxis()->SetBinLabel(3," from c->D");
1622 hOrigin_had->GetXaxis()->SetBinLabel(4," from b->D");
1623 hOrigin_had->GetXaxis()->SetBinLabel(5," from b->B");
1624 hOrigin_had->GetXaxis()->SetBinLabel(6," from NHF");
1625 if(fReadMC) fOutput->Add(hOrigin_had);
1626
1627 namePlot="histOrig_Kaon_Bin"; namePlot+=i;
1628 TH1F *hOrigin_kaon = new TH1F(namePlot.Data(), "Origin of kaons in MC",10,-0.5,9.5);
1629 hOrigin_kaon->SetMinimum(0);
1630 hOrigin_kaon->GetXaxis()->SetBinLabel(1,"All Kaons");
1631 hOrigin_kaon->GetXaxis()->SetBinLabel(2,"Kaons from Heavy flavour");
1632 hOrigin_kaon->GetXaxis()->SetBinLabel(3,"Kaons from Charm");
1633 hOrigin_kaon->GetXaxis()->SetBinLabel(4,"Kaons from Beauty");
1634 hOrigin_kaon->GetXaxis()->SetBinLabel(5,"Kaons from NHF");
1635 if(fReadMC) fOutput->Add(hOrigin_kaon);
1636
1637
1638 namePlot="histOrig_K0_Bin"; namePlot+=i;
1639 TH1F *hOrigin_K0 = new TH1F(namePlot.Data(), "Origin of Kshorts in MC",10,-0.5,9.5);
1640 hOrigin_K0->SetMinimum(0);
1641
1642 hOrigin_K0->GetXaxis()->SetBinLabel(1,"All K0s");
1643 hOrigin_K0->GetXaxis()->SetBinLabel(2,"K0s from Heavy flavour");
1644 hOrigin_K0->GetXaxis()->SetBinLabel(3,"K0s from Charm");
1645 hOrigin_K0->GetXaxis()->SetBinLabel(4,"K0s from Beauty");
1646 hOrigin_K0->GetXaxis()->SetBinLabel(5,"K0s from NHF");
1647 if(fReadMC) fOutput->Add(hOrigin_K0);
1648 }
1649
1650 if (fReadMC) {
1651 //origin of Dplus histos
1652 namePlot="histOrig_Dplus_Bin"; namePlot+=i;
1653 TH1F *hOrigin_Dplus = new TH1F(namePlot.Data(),"Origin of D+ in MC",2,0.,2.);
1654 hOrigin_Dplus->SetMinimum(0);
1655 hOrigin_Dplus->GetXaxis()->SetBinLabel(1,"From c");
1656 hOrigin_Dplus->GetXaxis()->SetBinLabel(2,"From b");
1657 fOutput->Add(hOrigin_Dplus);
1658 }
1659 }
1660}
35151011 1661
1662
1663
1664
1665
1666
1667
1668
1669