Fill ntuple only on request; more mass histos (Francesco, Renu)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSECharmFraction.cxx
CommitLineData
624c07ab 1/**************************************************************************
2 * Copyright(c) 1998-2009, 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
16/////////////////////////////////////////////////////////////
17//
18// Class AliAnalysisTaskSECharmFraction
19// AliAnalysisTaskSE for the extraction of the fraction of prompt charm
20// using the charm hadron impact parameter to the primary vertex
21//
22// Author: Andrea Rossi, andrea.rossi@ts.infn.it
23/////////////////////////////////////////////////////////////
24
ac4c229c 25
624c07ab 26#include <TH1F.h>
27#include <TH2F.h>
624c07ab 28#include <TDatabasePDG.h>
29#include <TMath.h>
30#include <TROOT.h>
624c07ab 31#include "AliAODEvent.h"
624c07ab 32#include "AliAODRecoDecayHF2Prong.h"
33#include "AliAODRecoDecayHF.h"
34#include "AliAODRecoDecay.h"
35#include "AliAODTrack.h"
36#include "AliAODVertex.h"
37#include "AliAODMCParticle.h"
38#include "AliAODMCHeader.h"
ac4c229c 39#include "AliAnalysisVertexingHF.h"
624c07ab 40#include "AliAnalysisTaskSECharmFraction.h"
41
ac4c229c 42
43class TCanvas;
44class TTree;
45class TChain;
46class AliAODInputHandler;
47class AliAnalysisManager;
48class AliAnalysisTaskSE;
49
50
624c07ab 51ClassImp(AliAnalysisTaskSECharmFraction)
52
53//________________________________________________________________________
54 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction()
55 : AliAnalysisTaskSE(),
56 fVHFloose(0),
57 fVHFtight(0),
58 fmD0PDG(),
59 fnbins(),
60 fptbins(0),
ac4c229c 61 fAcceptanceCuts(0),
624c07ab 62 fsignalInvMassCut(),
63 flargeInvMassCut(),
64 fsidebandInvMassCut(),
65 fsidebandInvMassWindow(),
66 fUseMC(kTRUE),
67 fNentries(0),
68 fSignalType(0),
69 fSignalTypeLsCuts(0),
70 fSignalTypeTghCuts(0),
ac4c229c 71 flistNoCutsSignal(0),
72 flistNoCutsBack(0),
73 flistNoCutsFromB(0),
74 flistNoCutsFromDstar(0),
75 flistNoCutsOther(0),
76 flistLsCutsSignal(0),
77 flistLsCutsBack(0),
78 flistLsCutsFromB(0),
79 flistLsCutsFromDstar(0),
80 flistLsCutsOther(0),
81 flistTghCutsSignal(0),
82 flistTghCutsBack(0),
83 flistTghCutsFromB(0),
84 flistTghCutsFromDstar(0),
85 flistTghCutsOther(0)
624c07ab 86
87{
88 //Default constructor
89}
90//________________________________________________________________________
91 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name)
92 : AliAnalysisTaskSE(name),
93 fVHFloose(0),
94 fVHFtight(0),
95 fmD0PDG(),
96 fnbins(),
97 fptbins(0),
ac4c229c 98 fAcceptanceCuts(0),
624c07ab 99 fsignalInvMassCut(),
100 flargeInvMassCut(),
101 fsidebandInvMassCut(),
102 fsidebandInvMassWindow(),
103 fUseMC(kTRUE),
104 fNentries(0),
105 fSignalType(0),
106 fSignalTypeLsCuts(0),
107 fSignalTypeTghCuts(0),
ac4c229c 108 flistNoCutsSignal(0),
109 flistNoCutsBack(0),
110 flistNoCutsFromB(0),
111 flistNoCutsFromDstar(0),
112 flistNoCutsOther(0),
113 flistLsCutsSignal(0),
114 flistLsCutsBack(0),
115 flistLsCutsFromB(0),
116 flistLsCutsFromDstar(0),
117 flistLsCutsOther(0),
118 flistTghCutsSignal(0),
119 flistTghCutsBack(0),
120 flistTghCutsFromB(0),
121 flistTghCutsFromDstar(0),
122 flistTghCutsOther(0)
624c07ab 123
124{
125 // Constructor
126
127 // Define input and output slots here
128 // Input slot #0 works with a TChain
129 // Output slot #0 writes into a TH1 container
130
131 //Standard pt bin
132 fnbins=4;
133 fptbins=new Double_t[fnbins+1];
134 fptbins[0]=0.;
135 fptbins[1]=1.;
136 fptbins[2]=3.;
137 fptbins[3]=5.;
138 fptbins[4]=1000.;
ac4c229c 139 fAcceptanceCuts=new Double_t[3];
140 SetAcceptanceCut();
624c07ab 141 SetStandardMassSelection();
142 DefineOutput(1, TH1F::Class());
143 DefineOutput(2, TH1F::Class());
144 DefineOutput(3, TH1F::Class());
145 DefineOutput(4, TH1F::Class());
146 for(Int_t j=5;j<20;j++){
147 DefineOutput(j, TList::Class());
148 }
149
150
151}
152
153
154AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name,Int_t nptbins,Double_t *ptbins)
155 : AliAnalysisTaskSE(name),
156 fVHFloose(0),
157 fVHFtight(0),
158 fmD0PDG(),
159 fnbins(),
160 fptbins(0),
ac4c229c 161 fAcceptanceCuts(0),
624c07ab 162 fsignalInvMassCut(),
163 flargeInvMassCut(),
164 fsidebandInvMassCut(),
165 fsidebandInvMassWindow(),
166 fUseMC(kTRUE),
167 fNentries(0),
168 fSignalType(0),
169 fSignalTypeLsCuts(0),
170 fSignalTypeTghCuts(0),
ac4c229c 171 flistNoCutsSignal(0),
172 flistNoCutsBack(0),
173 flistNoCutsFromB(0),
174 flistNoCutsFromDstar(0),
175 flistNoCutsOther(0),
176 flistLsCutsSignal(0),
177 flistLsCutsBack(0),
178 flistLsCutsFromB(0),
179 flistLsCutsFromDstar(0),
180 flistLsCutsOther(0),
181 flistTghCutsSignal(0),
182 flistTghCutsBack(0),
183 flistTghCutsFromB(0),
184 flistTghCutsFromDstar(0),
185 flistTghCutsOther(0)
624c07ab 186{
187 // Constructor
188 // ptbins must be of dimension nptbins +1
189
190 SetNPtBins(nptbins,ptbins);
191 SetStandardMassSelection();
ac4c229c 192 fAcceptanceCuts=new Double_t[3];
193 SetAcceptanceCut();
624c07ab 194 // Define input and output slots here
195
196 // Output slot #0 writes into a TH1 container
197 DefineOutput(1, TH1F::Class());
198 DefineOutput(2, TH1F::Class());
199 DefineOutput(3, TH1F::Class());
200 DefineOutput(4, TH1F::Class());
201 for(Int_t j=5;j<20;j++){
202
203 DefineOutput(j, TList::Class());
204 }
205
206
207}
208
209//________________________________________________________________________
210AliAnalysisTaskSECharmFraction::~AliAnalysisTaskSECharmFraction()
211{ //Destructor
212
213 if (fVHFtight) {
214 delete fVHFtight;
215 fVHFtight = 0;
216 }
217 if (fVHFloose) {
218 delete fVHFloose;
219 fVHFloose = 0;
220 }
ac4c229c 221 if(fptbins){
222 delete fptbins;
223 fptbins =0;
224 }
225 if(fAcceptanceCuts){
226 delete fAcceptanceCuts;
227 fAcceptanceCuts=0;
228 }
624c07ab 229 if (fNentries) {
230 delete fNentries;
231 fNentries = 0;
232 }
233 if (fSignalType) {
234 delete fSignalType;
235 fSignalType = 0;
236 }
237 if (fSignalTypeLsCuts) {
238 delete fSignalTypeLsCuts;
239 fSignalTypeLsCuts = 0;
240 }
241 if (fSignalTypeTghCuts) {
242 delete fSignalTypeTghCuts;
243 fSignalTypeTghCuts = 0;
244 }
ac4c229c 245 if(flistNoCutsSignal){
246 delete flistNoCutsSignal;
247 flistNoCutsSignal=0;
624c07ab 248 }
ac4c229c 249 if(flistNoCutsBack){
250 delete flistNoCutsBack;
251 flistNoCutsBack=0;
624c07ab 252 }
ac4c229c 253 if(flistNoCutsFromB){
254 delete flistNoCutsFromB;
255 flistNoCutsFromB=0;
624c07ab 256 }
ac4c229c 257 if(flistNoCutsFromDstar){
258 delete flistNoCutsFromDstar;
259 flistNoCutsFromDstar=0;
624c07ab 260 }
ac4c229c 261 if(flistNoCutsOther){
262 delete flistNoCutsOther;
263 flistNoCutsOther=0;
624c07ab 264 }
265
ac4c229c 266 if(flistLsCutsSignal){
267 delete flistLsCutsSignal;
268 flistLsCutsSignal=0;
624c07ab 269 }
ac4c229c 270 if(flistLsCutsBack){
271 delete flistLsCutsBack;
272 flistLsCutsBack=0;
624c07ab 273 }
ac4c229c 274 if(flistLsCutsFromB){
275 delete flistLsCutsFromB;
276 flistLsCutsFromB=0;
624c07ab 277 }
ac4c229c 278 if(flistLsCutsFromDstar){
279 delete flistLsCutsFromDstar;
280 flistLsCutsFromDstar=0;
624c07ab 281 }
ac4c229c 282 if(flistLsCutsOther){
283 delete flistLsCutsOther;
284 flistLsCutsOther=0;
624c07ab 285 }
286
ac4c229c 287 if(flistTghCutsSignal){
288 delete flistTghCutsSignal;
289 flistTghCutsSignal=0;
624c07ab 290 }
ac4c229c 291 if(flistTghCutsBack){
292 delete flistTghCutsBack;
293 flistTghCutsBack=0;
624c07ab 294 }
ac4c229c 295 if(flistTghCutsFromB){
296 delete flistTghCutsFromB;
297 flistTghCutsFromB=0;
624c07ab 298 }
ac4c229c 299 if(flistTghCutsFromDstar){
300 delete flistTghCutsFromDstar;
301 flistTghCutsFromDstar=0;
624c07ab 302 }
ac4c229c 303 if(flistTghCutsOther){
304 delete flistTghCutsOther;
305 flistTghCutsOther=0;
624c07ab 306 }
307
308
309}
310
311
312//________________________________________________________________________
313void AliAnalysisTaskSECharmFraction::Init()
314{
315 // Initialization
316
317 if(fDebug > 1) printf("AnalysisTaskSED0Mass::Init() \n");
318 fmD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
319
320 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C");
321
322 // 2 sets of dedidcated cuts -- defined in UserExec
323 // the config file and the way the cuts are set is for further development
324 // (to be interfaced with AliAnalsysTaskSETuneCuts)
325
326 fVHFtight = (AliAnalysisVertexingHF*)gROOT->ProcessLine("ConfigVertexingHF()");
327 fVHFloose = (AliAnalysisVertexingHF*)gROOT->ProcessLine("ConfigVertexingHF()");
328 if(!fptbins){
329 //SET STANDARD PT BINNING
330 fnbins=4;
331 fptbins=new Double_t[fnbins+1];
332 fptbins[0]=0.;
333 fptbins[1]=1.;
334 fptbins[2]=3.;
335 fptbins[3]=5.;
336 fptbins[4]=1000.;
337 }
338 return;
339}
340
341//________________________________________________________________________
342void AliAnalysisTaskSECharmFraction::UserCreateOutputObjects()
343{
344 // Create histograms
345 // Called once
346
347
348 TString namehist;
349 TString titlehist;
350 TString strnamept,strtitlept;
351
352 fNentries=new TH1F("nentriesChFr", "Look at the number of entries! = number of AODs", 2,1.,2.);
353 fSignalType=new TH1F("hsignaltype", "Histo for type of MC signal", 21,-1.,20.);
354 fSignalTypeLsCuts=new TH1F("hsignaltypeLsCuts", "Histo for type of MC signal with loose cuts", 21,-1.,20.);
355 fSignalTypeTghCuts=new TH1F("hsignaltypeTghCuts", "Histo for type of MC signal with tight cuts", 21,-1.,20.);
356
357 //########## DEFINE THE TLISTS ##################
358
ac4c229c 359 flistNoCutsSignal = new TList();
360 flistNoCutsSignal->SetOwner();
361 flistNoCutsSignal->SetName("listNCsign");
624c07ab 362
ac4c229c 363 flistNoCutsBack = new TList();
364 flistNoCutsBack->SetOwner();
365 flistNoCutsBack->SetName("listNCback");
624c07ab 366
ac4c229c 367 flistNoCutsFromB = new TList();
368 flistNoCutsFromB->SetOwner();
369 flistNoCutsFromB->SetName("listNCfromB");
624c07ab 370
ac4c229c 371 flistNoCutsFromDstar = new TList();
372 flistNoCutsFromDstar->SetOwner();
373 flistNoCutsFromDstar->SetName("listNCfromDstar");
624c07ab 374
ac4c229c 375 flistNoCutsOther = new TList();
376 flistNoCutsOther->SetOwner();
377 flistNoCutsOther->SetName("listNCother");
624c07ab 378
379
ac4c229c 380 flistLsCutsSignal = new TList();
381 flistLsCutsSignal->SetOwner();
382 flistLsCutsSignal->SetName("listLSCsign");
624c07ab 383
ac4c229c 384 flistLsCutsBack = new TList();
385 flistLsCutsBack->SetOwner();
386 flistLsCutsBack->SetName("listLSCback");
624c07ab 387
ac4c229c 388 flistLsCutsFromB = new TList();
389 flistLsCutsFromB->SetOwner();
390 flistLsCutsFromB->SetName("listLSCfromB");
624c07ab 391
ac4c229c 392 flistLsCutsFromDstar = new TList();
393 flistLsCutsFromDstar->SetOwner();
394 flistLsCutsFromDstar->SetName("listLSCfromDstar");
624c07ab 395
ac4c229c 396 flistLsCutsOther = new TList();
397 flistLsCutsOther->SetOwner();
398 flistLsCutsOther->SetName("listLSCother");
624c07ab 399
400
ac4c229c 401 flistTghCutsSignal = new TList();
402 flistTghCutsSignal->SetOwner();
403 flistTghCutsSignal->SetName("listTGHCsign");
624c07ab 404
ac4c229c 405 flistTghCutsBack = new TList();
406 flistTghCutsBack->SetOwner();
407 flistTghCutsBack->SetName("listTGHCback");
624c07ab 408
ac4c229c 409 flistTghCutsFromB = new TList();
410 flistTghCutsFromB->SetOwner();
411 flistTghCutsFromB->SetName("listTGHCfromB");
624c07ab 412
ac4c229c 413 flistTghCutsFromDstar = new TList();
414 flistTghCutsFromDstar->SetOwner();
415 flistTghCutsFromDstar->SetName("listTGHCfromDstar");
624c07ab 416
ac4c229c 417 flistTghCutsOther = new TList();
418 flistTghCutsOther->SetOwner();
419 flistTghCutsOther->SetName("listTGHCother");
624c07ab 420
421
422
423
424 //################################################################################################
425 // #
426 // HISTOS FOR NO CUTS CASE #
427 // #
428 //################################################################################################
429
430
431 //############ NO CUTS SIGNAL HISTOGRAMS ###############
432 //
433 // ####### global properties histo ############
434
ac4c229c 435 TH2F *hCPtaVSd0d0NCsign=new TH2F("hCPtaVSd0d0NCsign","hCPtaVSd0d0_NoCuts_Signal",1000,-100000.,100000.,100,0.,1.);
436 TH1F *hSecVtxZNCsign=new TH1F("hSecVtxZNCsign","hSecVtxZ_NoCuts_Signal",1000,-8.,8.);
437 TH1F *hSecVtxXNCsign=new TH1F("hSecVtxXNCsign","hSecVtxX_NoCuts_Signal",1000,-3000.,3000.);
438 TH1F *hSecVtxYNCsign=new TH1F("hSecVtxYNCsign","hSecVtxY_NoCuts_Signal",1000,-3000.,3000.);
439 TH2F *hSecVtxXYNCsign=new TH2F("hSecVtxXYNCsign","hSecVtxXY_NoCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
440 TH1F *hSecVtxPhiNCsign=new TH1F("hSecVtxPhiNCsign","hSecVtxPhi_NoCuts_Signal",180,-180.1,180.1);
441 TH1F *hCPtaNCsign=new TH1F("hCPtaNCsign","hCPta_NoCuts_Signal",100,0.,1.);
442 TH1F *hd0xd0NCsign=new TH1F("hd0xd0NCsign","hd0xd0_NoCuts_Signal",1000,-100000.,100000.);
443 TH1F *hMassTrueNCsign=new TH1F("hMassTrueNCsign","D^{0} MC inv. Mass No Cuts Signal(All momenta)",600,1.600,2.200);
444 TH1F *hMassNCsign=new TH1F("hMassNCsign","D^{0} inv. Mass No Cuts Signal (All momenta)",600,1.600,2.200);
445 hMassNCsign->Sumw2();
446 TH1F *hMassTrueNCsignPM=new TH1F("hMassTrueNCsignPM","D^{0} MC inv. Mass No Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
447 TH1F *hMassNCsignPM=new TH1F("hMassNCsignPM","D^{0} inv. Mass No Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
448 hMassNCsignPM->Sumw2();
449
450 TH1F *hMassTrueNCsignSB=new TH1F("hMassTrueNCsignSB","D^{0} MC inv. Mass in Side Bands No Cuts Signal(All momenta)",600,1.600,2.200);
451 TH1F *hMassNCsignSB=new TH1F("hMassNCsignSB","D^{0} inv. Mass in Side Bands No Cuts Signal (All momenta)",600,1.600,2.200);
452 hMassNCsignSB->Sumw2();
453
454 flistNoCutsSignal->Add(hCPtaVSd0d0NCsign);
455 flistNoCutsSignal->Add(hSecVtxZNCsign);
456 flistNoCutsSignal->Add(hSecVtxYNCsign);
457 flistNoCutsSignal->Add(hSecVtxXNCsign);
458 flistNoCutsSignal->Add(hSecVtxXYNCsign);
459 flistNoCutsSignal->Add(hSecVtxPhiNCsign);
460 flistNoCutsSignal->Add(hCPtaNCsign);
461 flistNoCutsSignal->Add(hd0xd0NCsign);
462 flistNoCutsSignal->Add(hMassTrueNCsign);
463 flistNoCutsSignal->Add(hMassNCsign);
464 flistNoCutsSignal->Add(hMassTrueNCsignPM);
465 flistNoCutsSignal->Add(hMassNCsignPM);
466 flistNoCutsSignal->Add(hMassTrueNCsignSB);
467 flistNoCutsSignal->Add(hMassNCsignSB);
624c07ab 468
469 // ####### d0 D0 histos ############
ac4c229c 470 TH1F *hd0D0NCsignPM = new TH1F("hd0D0NCsignPM","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
471 hd0D0NCsignPM->SetXTitle("Impact parameter [#mum]");
472 hd0D0NCsignPM->SetYTitle("Entries");
473
474 TH1F *hd0D0VtxTrueNCsignPM = new TH1F("hd0D0VtxTrueNCsignPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
475 hd0D0VtxTrueNCsignPM->SetXTitle("Impact parameter [#mum]");
476 hd0D0VtxTrueNCsignPM->SetYTitle("Entries");
477
478 TH1F *hMCd0D0NCsignPM = new TH1F("hMCd0D0NCsignPM","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
479 hMCd0D0NCsignPM->SetXTitle("MC Impact parameter [#mum]");
480 hMCd0D0NCsignPM->SetYTitle("Entries");
481
482 TH1F *hd0D0NCsignSB = new TH1F("hd0D0NCsignSB","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
483 hd0D0NCsignSB->SetXTitle("Impact parameter [#mum]");
484 hd0D0NCsignSB->SetYTitle("Entries");
485
486 TH1F *hd0D0VtxTrueNCsignSB = new TH1F("hd0D0VtxTrueNCsignSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
487 hd0D0VtxTrueNCsignSB->SetXTitle("Impact parameter [#mum]");
488 hd0D0VtxTrueNCsignSB->SetYTitle("Entries");
489
490 TH1F *hMCd0D0NCsignSB = new TH1F("hMCd0D0NCsignSB","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
491 hMCd0D0NCsignSB->SetXTitle("MC Impact parameter [#mum]");
492 hMCd0D0NCsignSB->SetYTitle("Entries");
493
494 flistNoCutsSignal->Add(hd0D0NCsignPM);
495 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignPM);
496 flistNoCutsSignal->Add(hMCd0D0NCsignPM);
497 flistNoCutsSignal->Add(hd0D0NCsignSB);
498 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignSB);
499 flistNoCutsSignal->Add(hMCd0D0NCsignSB);
500
501 TH1F **hd0D0ptNCsignPM=new TH1F*[fnbins];
502 TH1F **hMCd0D0ptNCsignPM=new TH1F*[fnbins];
503 TH1F ** hd0D0VtxTrueptNCsignPM=new TH1F*[fnbins];
504 TH1F **hd0D0ptNCsignSB=new TH1F*[fnbins];
505 TH1F **hMCd0D0ptNCsignSB=new TH1F*[fnbins];
506 TH1F ** hd0D0VtxTrueptNCsignSB=new TH1F*[fnbins];
507 namehist="hd0D0ptNCsign_";
624c07ab 508 titlehist="D^{0} impact par. plot, No Cuts, Signal, ";
509 for(Int_t i=0;i<fnbins;i++){
510 strnamept=namehist;
511 strnamept.Append("PkMss_pt");
512 strnamept+=i;
513
514 strtitlept=titlehist;
515 strtitlept.Append(" Mass Peak, ");
516 strtitlept+=fptbins[i];
517 strtitlept.Append("<= pt <");
518 strtitlept+=fptbins[i+1];
519 strtitlept.Append(" [GeV/c]");
520
ac4c229c 521 hd0D0ptNCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
522 hd0D0ptNCsignPM[i]->SetXTitle("Impact parameter [#mum] ");
523 hd0D0ptNCsignPM[i]->SetYTitle("Entries");
524 flistNoCutsSignal->Add(hd0D0ptNCsignPM[i]);
624c07ab 525
526 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 527 hMCd0D0ptNCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
528 hMCd0D0ptNCsignPM[i]->SetXTitle("MC Impact parameter [#mum] ");
529 hMCd0D0ptNCsignPM[i]->SetYTitle("Entries");
530 flistNoCutsSignal->Add(hMCd0D0ptNCsignPM[i]);
624c07ab 531
532
533 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 534 hd0D0VtxTrueptNCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
535 hd0D0VtxTrueptNCsignPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
536 hd0D0VtxTrueptNCsignPM[i]->SetYTitle("Entries");
537 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignPM[i]);
624c07ab 538
539 strnamept=namehist;
540 strnamept.Append("SBMss_pt");
541 strnamept+=i;
542
543 strtitlept=titlehist;
544 strtitlept.Append(" Side Bands, ");
545 strtitlept+=fptbins[i];
546 strtitlept.Append("<= pt <");
547 strtitlept+=fptbins[i+1];
548 strtitlept.Append(" [GeV/c]");
549
ac4c229c 550 hd0D0ptNCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
551 hd0D0ptNCsignSB[i]->SetXTitle("Impact parameter [#mum] ");
552 hd0D0ptNCsignSB[i]->SetYTitle("Entries");
553 flistNoCutsSignal->Add(hd0D0ptNCsignSB[i]);
624c07ab 554
555 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 556 hMCd0D0ptNCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
557 hMCd0D0ptNCsignSB[i]->SetXTitle("MC Impact parameter [#mum] ");
558 hMCd0D0ptNCsignSB[i]->SetYTitle("Entries");
559 flistNoCutsSignal->Add(hMCd0D0ptNCsignSB[i]);
624c07ab 560
561 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 562 hd0D0VtxTrueptNCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
563 hd0D0VtxTrueptNCsignSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
564 hd0D0VtxTrueptNCsignSB[i]->SetYTitle("Entries");
565 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignSB[i]);
624c07ab 566 }
567
568
569 //############ NO CUTS BACKGROUND HISTOGRAMS ###########
570 //
571 // ######## global properties histos #######
ac4c229c 572 TH2F *hCPtaVSd0d0NCback=new TH2F("hCPtaVSd0d0NCback","hCPtaVSd0d0_NoCuts_Background",1000,-100000.,100000.,100,0.,1.);
573 TH1F *hSecVtxZNCback=new TH1F("hSecVtxZNCback","hSecVtxZ_NoCuts_Background",1000,-8.,8.);
574 TH1F *hSecVtxXNCback=new TH1F("hSecVtxXNCback","hSecVtxX_NoCuts_Background",1000,-3000.,3000.);
575 TH1F *hSecVtxYNCback=new TH1F("hSecVtxYNCback","hSecVtxY_NoCuts_Background",1000,-3000.,3000.);
576 TH2F *hSecVtxXYNCback=new TH2F("hSecVtxXYNCback","hSecVtxXY_NoCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
577 TH1F *hSecVtxPhiNCback=new TH1F("hSecVtxPhiNCback","hSecVtxPhi_NoCuts_Background",180,-180.1,180.1);
578 TH1F *hCPtaNCback=new TH1F("hCPtaNCback","hCPta_NoCuts_Background",100,0.,1.);
579 TH1F *hd0xd0NCback=new TH1F("hd0xd0NCback","hd0xd0_NoCuts_Background",1000,-100000.,100000.);
580 TH1F *hMassTrueNCback=new TH1F("hMassTrueNCback","D^{0} MC inv. Mass No Cuts Background(All momenta)",600,1.600,2.200);
581 TH1F *hMassNCback=new TH1F("hMassNCback","D^{0} inv. Mass No Cuts Background (All momenta)",600,1.600,2.200);
582 hMassNCback->Sumw2();
583 TH1F *hMassTrueNCbackPM=new TH1F("hMassTrueNCbackPM","D^{0} MC inv. Mass No Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
584 TH1F *hMassNCbackPM=new TH1F("hMassNCbackPM","D^{0} inv. Mass No Cuts Background (All momenta), MassPeak",600,1.600,2.200);
585 hMassNCbackPM->Sumw2();
586 TH1F *hMassTrueNCbackSB=new TH1F("hMassTrueNCbackSB","D^{0} MC inv. Mass in Side Bands No Cuts Background(All momenta)",600,1.600,2.200);
587 TH1F *hMassNCbackSB=new TH1F("hMassNCbackSB","D^{0} inv. Mass in Side Bands No Cuts Background (All momenta)",600,1.600,2.200);
588 hMassNCbackSB->Sumw2();
589
590 flistNoCutsBack->Add(hCPtaVSd0d0NCback);
591 flistNoCutsBack->Add(hSecVtxZNCback);
592 flistNoCutsBack->Add(hSecVtxYNCback);
593 flistNoCutsBack->Add(hSecVtxXNCback);
594 flistNoCutsBack->Add(hSecVtxXYNCback);
595 flistNoCutsBack->Add(hSecVtxPhiNCback);
596 flistNoCutsBack->Add(hCPtaNCback);
597 flistNoCutsBack->Add(hd0xd0NCback);
598 flistNoCutsBack->Add(hMassTrueNCback);
599 flistNoCutsBack->Add(hMassNCback);
600 flistNoCutsBack->Add(hMassTrueNCbackPM);
601 flistNoCutsBack->Add(hMassNCbackPM);
602 flistNoCutsBack->Add(hMassTrueNCbackSB);
603 flistNoCutsBack->Add(hMassNCbackSB);
624c07ab 604
605
606 // ####### d0 D0 histos ############
607
ac4c229c 608 TH1F *hd0D0NCbackPM = new TH1F("hd0D0NCbackPM","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
609 hd0D0NCbackPM->SetXTitle("Impact parameter [#mum]");
610 hd0D0NCbackPM->SetYTitle("Entries");
611
612 TH1F *hd0D0VtxTrueNCbackPM = new TH1F("hd0D0VtxTrueNCbackPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
613 hd0D0VtxTrueNCbackPM->SetXTitle("Impact parameter [#mum]");
614 hd0D0VtxTrueNCbackPM->SetYTitle("Entries");
615
616 TH1F *hMCd0D0NCbackPM = new TH1F("hMCd0D0NCbackPM","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
617 hMCd0D0NCbackPM->SetXTitle("MC Impact parameter [#mum]");
618 hMCd0D0NCbackPM->SetYTitle("Entries");
619
620 TH1F *hd0D0NCbackSB = new TH1F("hd0D0NCbackSB","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
621 hd0D0NCbackSB->SetXTitle("Impact parameter [#mum]");
622 hd0D0NCbackSB->SetYTitle("Entries");
623
624 TH1F *hd0D0VtxTrueNCbackSB = new TH1F("hd0D0VtxTrueNCbackSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
625 hd0D0VtxTrueNCbackSB->SetXTitle("Impact parameter [#mum]");
626 hd0D0VtxTrueNCbackSB->SetYTitle("Entries");
627
628 TH1F *hMCd0D0NCbackSB = new TH1F("hMCd0D0NCbackSB","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
629 hMCd0D0NCbackSB->SetXTitle("MC Impact parameter [#mum]");
630 hMCd0D0NCbackSB->SetYTitle("Entries");
631
632 flistNoCutsBack->Add(hd0D0NCbackPM);
633 flistNoCutsBack->Add(hd0D0VtxTrueNCbackPM);
634 flistNoCutsBack->Add(hMCd0D0NCbackPM);
635 flistNoCutsBack->Add(hd0D0NCbackSB);
636 flistNoCutsBack->Add(hd0D0VtxTrueNCbackSB);
637 flistNoCutsBack->Add(hMCd0D0NCbackSB);
638
639 TH1F **hd0D0ptNCbackPM=new TH1F*[fnbins];
640 TH1F **hMCd0D0ptNCbackPM=new TH1F*[fnbins];
641 TH1F ** hd0D0VtxTrueptNCbackPM=new TH1F*[fnbins];
642 TH1F **hd0D0ptNCbackSB=new TH1F*[fnbins];
643 TH1F **hMCd0D0ptNCbackSB=new TH1F*[fnbins];
644 TH1F ** hd0D0VtxTrueptNCbackSB=new TH1F*[fnbins];
645 namehist="hd0D0ptNCback_";
624c07ab 646 titlehist="D^{0} impact par. plot, No Cuts, Background, ";
647 for(Int_t i=0;i<fnbins;i++){
648 strnamept=namehist;
649 strnamept.Append("PkMss_pt");
650 strnamept+=i;
651
652 strtitlept=titlehist;
653 strtitlept.Append(" Mass Peak, ");
654 strtitlept+=fptbins[i];
655 strtitlept.Append("<= pt <");
656 strtitlept+=fptbins[i+1];
657 strtitlept.Append(" [GeV/c]");
658
ac4c229c 659 hd0D0ptNCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
660 hd0D0ptNCbackPM[i]->SetXTitle("Impact parameter [#mum] ");
661 hd0D0ptNCbackPM[i]->SetYTitle("Entries");
662 flistNoCutsBack->Add(hd0D0ptNCbackPM[i]);
624c07ab 663
664 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 665 hMCd0D0ptNCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
666 hMCd0D0ptNCbackPM[i]->SetXTitle("MC Impact parameter [#mum] ");
667 hMCd0D0ptNCbackPM[i]->SetYTitle("Entries");
668 flistNoCutsBack->Add(hMCd0D0ptNCbackPM[i]);
624c07ab 669
670
671 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 672 hd0D0VtxTrueptNCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
673 hd0D0VtxTrueptNCbackPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
674 hd0D0VtxTrueptNCbackPM[i]->SetYTitle("Entries");
675 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackPM[i]);
624c07ab 676
677 strnamept=namehist;
678 strnamept.Append("SBMss_pt");
679 strnamept+=i;
680
681 strtitlept=titlehist;
682 strtitlept.Append(" Side Bands, ");
683 strtitlept+=fptbins[i];
684 strtitlept.Append("<= pt <");
685 strtitlept+=fptbins[i+1];
686 strtitlept.Append(" [GeV/c]");
687
ac4c229c 688 hd0D0ptNCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
689 hd0D0ptNCbackSB[i]->SetXTitle("Impact parameter [#mum] ");
690 hd0D0ptNCbackSB[i]->SetYTitle("Entries");
691 flistNoCutsBack->Add(hd0D0ptNCbackSB[i]);
624c07ab 692
693 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 694 hMCd0D0ptNCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
695 hMCd0D0ptNCbackSB[i]->SetXTitle("MC Impact parameter [#mum] ");
696 hMCd0D0ptNCbackSB[i]->SetYTitle("Entries");
697 flistNoCutsBack->Add(hMCd0D0ptNCbackSB[i]);
624c07ab 698
699 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 700 hd0D0VtxTrueptNCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
701 hd0D0VtxTrueptNCbackSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
702 hd0D0VtxTrueptNCbackSB[i]->SetYTitle("Entries");
703 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackSB[i]);
624c07ab 704 }
705
706
707
708 //############ NO CUTS FROMB HISTOGRAMS ###########
709 //
710 //####### global properties histos
711
ac4c229c 712 TH2F *hCPtaVSd0d0NCfromB=new TH2F("hCPtaVSd0d0NCfromB","hCPtaVSd0d0_NoCuts_FromB",1000,-100000.,100000.,100,0.,1.);
713 TH1F *hSecVtxZNCfromB=new TH1F("hSecVtxZNCfromB","hSecVtxZ_NoCuts_FromB",1000,-8.,8.);
714 TH1F *hSecVtxXNCfromB=new TH1F("hSecVtxXNCfromB","hSecVtxX_NoCuts_FromB",1000,-3000.,3000.);
715 TH1F *hSecVtxYNCfromB=new TH1F("hSecVtxYNCfromB","hSecVtxY_NoCuts_FromB",1000,-3000.,3000.);
716 TH2F *hSecVtxXYNCfromB=new TH2F("hSecVtxXYNCfromB","hSecVtxXY_NoCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
717 TH1F *hSecVtxPhiNCfromB=new TH1F("hSecVtxPhiNCfromB","hSecVtxPhi_NoCuts_FromB",180,-180.1,180.1);
718 TH1F *hCPtaNCfromB=new TH1F("hCPtaNCfromB","hCPta_NoCuts_FromB",100,0.,1.);
719 TH1F *hd0xd0NCfromB=new TH1F("hd0xd0NCfromB","hd0xd0_NoCuts_FromB",1000,-100000.,100000.);
720 TH1F *hMassTrueNCfromB=new TH1F("hMassTrueNCfromB","D^{0} MC inv. Mass No Cuts FromB(All momenta)",600,1.600,2.200);
721 TH1F *hMassNCfromB=new TH1F("hMassNCfromB","D^{0} inv. Mass No Cuts FromB (All momenta)",600,1.600,2.200);
722 hMassNCfromB->Sumw2();
723 TH1F *hMassTrueNCfromBPM=new TH1F("hMassTrueNCfromBPM","D^{0} MC inv. Mass No Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
724 TH1F *hMassNCfromBPM=new TH1F("hMassNCfromBPM","D^{0} inv. Mass No Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
725 hMassNCfromB->Sumw2();
726 TH1F *hMassTrueNCfromBSB=new TH1F("hMassTrueNCfromBSB","D^{0} MC inv. Mass in Side Bands No Cuts FromB(All momenta)",600,1.600,2.200);
727 TH1F *hMassNCfromBSB=new TH1F("hMassNCfromBSB","D^{0} inv. Mass in Side Bands No Cuts FromB (All momenta)",600,1.600,2.200);
728 hMassNCfromBSB->Sumw2();
729
730 flistNoCutsFromB->Add(hCPtaVSd0d0NCfromB);
731 flistNoCutsFromB->Add(hSecVtxZNCfromB);
732 flistNoCutsFromB->Add(hSecVtxYNCfromB);
733 flistNoCutsFromB->Add(hSecVtxXNCfromB);
734 flistNoCutsFromB->Add(hSecVtxXYNCfromB);
735 flistNoCutsFromB->Add(hSecVtxPhiNCfromB);
736 flistNoCutsFromB->Add(hCPtaNCfromB);
737 flistNoCutsFromB->Add(hd0xd0NCfromB);
738 flistNoCutsFromB->Add(hMassTrueNCfromB);
739 flistNoCutsFromB->Add(hMassNCfromB);
740 flistNoCutsFromB->Add(hMassTrueNCfromBPM);
741 flistNoCutsFromB->Add(hMassNCfromBPM);
742 flistNoCutsFromB->Add(hMassTrueNCfromBSB);
743 flistNoCutsFromB->Add(hMassNCfromBSB);
624c07ab 744
745 // ######### d0 D0 histos ##############
ac4c229c 746 TH1F *hd0D0NCfromBPM = new TH1F("hd0D0NCfromBPM","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
747 hd0D0NCfromBPM->SetXTitle("Impact parameter [#mum]");
748 hd0D0NCfromBPM->SetYTitle("Entries");
749
750 TH1F *hd0D0VtxTrueNCfromBPM = new TH1F("hd0D0VtxTrueNCfromBPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
751 hd0D0VtxTrueNCfromBPM->SetXTitle("Impact parameter [#mum]");
752 hd0D0VtxTrueNCfromBPM->SetYTitle("Entries");
753
754 TH1F *hMCd0D0NCfromBPM = new TH1F("hMCd0D0NCfromBPM","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
755 hMCd0D0NCfromBPM->SetXTitle("MC Impact parameter [#mum]");
756 hMCd0D0NCfromBPM->SetYTitle("Entries");
757
758 TH1F *hd0D0NCfromBSB = new TH1F("hd0D0NCfromBSB","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
759 hd0D0NCfromBSB->SetXTitle("Impact parameter [#mum]");
760 hd0D0NCfromBSB->SetYTitle("Entries");
761
762 TH1F *hd0D0VtxTrueNCfromBSB = new TH1F("hd0D0VtxTrueNCfromBSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
763 hd0D0VtxTrueNCfromBSB->SetXTitle("Impact parameter [#mum]");
764 hd0D0VtxTrueNCfromBSB->SetYTitle("Entries");
765
766 TH1F *hMCd0D0NCfromBSB = new TH1F("hMCd0D0NCfromBSB","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
767 hMCd0D0NCfromBSB->SetXTitle("MC Impact parameter [#mum]");
768 hMCd0D0NCfromBSB->SetYTitle("Entries");
769
770 flistNoCutsFromB->Add(hd0D0NCfromBPM);
771 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBPM);
772 flistNoCutsFromB->Add(hMCd0D0NCfromBPM);
773 flistNoCutsFromB->Add(hd0D0NCfromBSB);
774 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBSB);
775 flistNoCutsFromB->Add(hMCd0D0NCfromBSB);
776
777 TH1F **hd0D0ptNCfromBPM=new TH1F*[fnbins];
778 TH1F **hMCd0D0ptNCfromBPM=new TH1F*[fnbins];
779 TH1F ** hd0D0VtxTrueptNCfromBPM=new TH1F*[fnbins];
780 TH1F **hd0D0ptNCfromBSB=new TH1F*[fnbins];
781 TH1F **hMCd0D0ptNCfromBSB=new TH1F*[fnbins];
782 TH1F ** hd0D0VtxTrueptNCfromBSB=new TH1F*[fnbins];
783 namehist="hd0D0ptNCfromB_";
624c07ab 784 titlehist="D^{0} impact par. plot, No Cuts, FromB, ";
785 for(Int_t i=0;i<fnbins;i++){
786 strnamept=namehist;
787 strnamept.Append("PkMss_pt");
788 strnamept+=i;
789
790 strtitlept=titlehist;
791 strtitlept.Append(" Mass Peak, ");
792 strtitlept+=fptbins[i];
793 strtitlept.Append("<= pt <");
794 strtitlept+=fptbins[i+1];
795 strtitlept.Append(" [GeV/c]");
796
ac4c229c 797 hd0D0ptNCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
798 hd0D0ptNCfromBPM[i]->SetXTitle("Impact parameter [#mum] ");
799 hd0D0ptNCfromBPM[i]->SetYTitle("Entries");
800 flistNoCutsFromB->Add(hd0D0ptNCfromBPM[i]);
624c07ab 801
802 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 803 hMCd0D0ptNCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
804 hMCd0D0ptNCfromBPM[i]->SetXTitle("MC Impact parameter [#mum] ");
805 hMCd0D0ptNCfromBPM[i]->SetYTitle("Entries");
806 flistNoCutsFromB->Add(hMCd0D0ptNCfromBPM[i]);
624c07ab 807
808
809 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 810 hd0D0VtxTrueptNCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
811 hd0D0VtxTrueptNCfromBPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
812 hd0D0VtxTrueptNCfromBPM[i]->SetYTitle("Entries");
813 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBPM[i]);
624c07ab 814
815 strnamept=namehist;
816 strnamept.Append("SBMss_pt");
817 strnamept+=i;
818
819 strtitlept=titlehist;
820 strtitlept.Append(" Side Bands, ");
821 strtitlept+=fptbins[i];
822 strtitlept.Append("<= pt <");
823 strtitlept+=fptbins[i+1];
824 strtitlept.Append(" [GeV/c]");
825
ac4c229c 826 hd0D0ptNCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
827 hd0D0ptNCfromBSB[i]->SetXTitle("Impact parameter [#mum] ");
828 hd0D0ptNCfromBSB[i]->SetYTitle("Entries");
829 flistNoCutsFromB->Add(hd0D0ptNCfromBSB[i]);
624c07ab 830
831 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 832 hMCd0D0ptNCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
833 hMCd0D0ptNCfromBSB[i]->SetXTitle("MC Impact parameter [#mum] ");
834 hMCd0D0ptNCfromBSB[i]->SetYTitle("Entries");
835 flistNoCutsFromB->Add(hMCd0D0ptNCfromBSB[i]);
624c07ab 836
837 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 838 hd0D0VtxTrueptNCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
839 hd0D0VtxTrueptNCfromBSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
840 hd0D0VtxTrueptNCfromBSB[i]->SetYTitle("Entries");
841 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBSB[i]);
624c07ab 842 }
843
844
845
846 //############ NO CUTS FROM DSTAR HISTOGRAMS ###########
847 //
848 //############# global properties histos #######
849
ac4c229c 850 TH2F *hCPtaVSd0d0NCfromDstar=new TH2F("hCPtaVSd0d0NCfromDstar","hCPtaVSd0d0_NoCuts_FromDStar",1000,-100000.,100000.,100,0.,1.);
851 TH1F *hSecVtxZNCfromDstar=new TH1F("hSecVtxZNCfromDstar","hSecVtxZ_NoCuts_FromDStar",1000,-8.,8.);
852 TH1F *hSecVtxXNCfromDstar=new TH1F("hSecVtxXNCfromDstar","hSecVtxX_NoCuts_FromDStar",1000,-3000.,3000.);
853 TH1F *hSecVtxYNCfromDstar=new TH1F("hSecVtxYNCfromDstar","hSecVtxY_NoCuts_FromDStar",1000,-3000.,3000.);
854 TH2F *hSecVtxXYNCfromDstar=new TH2F("hSecVtxXYNCfromDstar","hSecVtxXY_NoCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
855 TH1F *hSecVtxPhiNCfromDstar=new TH1F("hSecVtxPhiNCfromDstar","hSecVtxPhi_NoCuts_FromDStar",180,-180.1,180.1);
856 TH1F *hCPtaNCfromDstar=new TH1F("hCPtaNCfromDstar","hCPta_NoCuts_FromDStar",100,0.,1.);
857 TH1F *hd0xd0NCfromDstar=new TH1F("hd0xd0NCfromDstar","hd0xd0_NoCuts_FromDStar",1000,-100000.,100000.);
858 TH1F *hMassTrueNCfromDstar=new TH1F("hMassTrueNCfromDstar","D^{0} MC inv. Mass No Cuts FromDStar(All momenta)",600,1.600,2.200);
859 TH1F *hMassNCfromDstar=new TH1F("hMassNCfromDstar","D^{0} inv. Mass No Cuts FromDStar (All momenta)",600,1.600,2.200);
860 hMassNCfromDstar->Sumw2();
861 TH1F *hMassTrueNCfromDstarPM=new TH1F("hMassTrueNCfromDstarPM","D^{0} MC inv. Mass No Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
862 TH1F *hMassNCfromDstarPM=new TH1F("hMassNCfromDstarPM","D^{0} inv. Mass No Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
863 hMassNCfromDstarPM->Sumw2();
864 TH1F *hMassTrueNCfromDstarSB=new TH1F("hMassTrueNCfromDstarSB","D^{0} MC inv. Mass in Side Bands No Cuts FromDStar(All momenta)",600,1.600,2.200);
865 TH1F *hMassNCfromDstarSB=new TH1F("hMassNCfromDstarSB","D^{0} inv. Mass in Side Bands No Cuts FromDStar (All momenta)",600,1.600,2.200);
866 hMassNCfromDstarSB->Sumw2();
867
868 flistNoCutsFromDstar->Add(hCPtaVSd0d0NCfromDstar);
869 flistNoCutsFromDstar->Add(hSecVtxZNCfromDstar);
870 flistNoCutsFromDstar->Add(hSecVtxYNCfromDstar);
871 flistNoCutsFromDstar->Add(hSecVtxXNCfromDstar);
872 flistNoCutsFromDstar->Add(hSecVtxXYNCfromDstar);
873 flistNoCutsFromDstar->Add(hSecVtxPhiNCfromDstar);
874 flistNoCutsFromDstar->Add(hCPtaNCfromDstar);
875 flistNoCutsFromDstar->Add(hd0xd0NCfromDstar);
876 flistNoCutsFromDstar->Add(hMassTrueNCfromDstar);
877 flistNoCutsFromDstar->Add(hMassNCfromDstar);
878 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarPM);
879 flistNoCutsFromDstar->Add(hMassNCfromDstarPM);
880 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarSB);
881 flistNoCutsFromDstar->Add(hMassNCfromDstarSB);
624c07ab 882
883 //########## d0 D0 histos #############
ac4c229c 884 TH1F *hd0D0NCfromDstPM = new TH1F("hd0D0NCfromDstarPM","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
885 hd0D0NCfromDstPM->SetXTitle("Impact parameter [#mum]");
886 hd0D0NCfromDstPM->SetYTitle("Entries");
887
888 TH1F *hd0D0VtxTrueNCfromDstPM = new TH1F("hd0D0VtxTrueNCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
889 hd0D0VtxTrueNCfromDstPM->SetXTitle("Impact parameter [#mum]");
890 hd0D0VtxTrueNCfromDstPM->SetYTitle("Entries");
891
892 TH1F *hMCd0D0NCfromDstPM = new TH1F("hMCd0D0NCfromDstarPM","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
893 hMCd0D0NCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
894 hMCd0D0NCfromDstPM->SetYTitle("Entries");
895
896 TH1F *hd0D0NCfromDstSB = new TH1F("hd0D0NCfromDstarSB","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
897 hd0D0NCfromDstSB->SetXTitle("Impact parameter [#mum]");
898 hd0D0NCfromDstSB->SetYTitle("Entries");
899
900 TH1F *hd0D0VtxTrueNCfromDstSB = new TH1F("hd0D0VtxTrueNCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
901 hd0D0VtxTrueNCfromDstSB->SetXTitle("Impact parameter [#mum]");
902 hd0D0VtxTrueNCfromDstSB->SetYTitle("Entries");
903
904 TH1F *hMCd0D0NCfromDstSB = new TH1F("hMCd0D0NCfromDstarSB","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
905 hMCd0D0NCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
906 hMCd0D0NCfromDstSB->SetYTitle("Entries");
907
908 flistNoCutsFromDstar->Add(hd0D0NCfromDstPM);
909 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstPM);
910 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstPM);
911 flistNoCutsFromDstar->Add(hd0D0NCfromDstSB);
912 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstSB);
913 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstSB);
914
915 TH1F **hd0D0ptNCfromDstPM=new TH1F*[fnbins];
916 TH1F **hMCd0D0ptNCfromDstPM=new TH1F*[fnbins];
917 TH1F ** hd0D0VtxTrueptNCfromDstPM=new TH1F*[fnbins];
918 TH1F **hd0D0ptNCfromDstSB=new TH1F*[fnbins];
919 TH1F **hMCd0D0ptNCfromDstSB=new TH1F*[fnbins];
920 TH1F ** hd0D0VtxTrueptNCfromDstSB=new TH1F*[fnbins];
921 namehist="hd0D0ptNCfromDstar_";
624c07ab 922 titlehist="D^{0} impact par. plot, No Cuts, FromDStar, ";
923 for(Int_t i=0;i<fnbins;i++){
924 strnamept=namehist;
925 strnamept.Append("PkMss_pt");
926 strnamept+=i;
927
928 strtitlept=titlehist;
929 strtitlept.Append(" Mass Peak, ");
930 strtitlept+=fptbins[i];
931 strtitlept.Append("<= pt <");
932 strtitlept+=fptbins[i+1];
933 strtitlept.Append(" [GeV/c]");
934
ac4c229c 935 hd0D0ptNCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
936 hd0D0ptNCfromDstPM[i]->SetXTitle("Impact parameter [#mum] ");
937 hd0D0ptNCfromDstPM[i]->SetYTitle("Entries");
938 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstPM[i]);
624c07ab 939
940 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 941 hMCd0D0ptNCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
942 hMCd0D0ptNCfromDstPM[i]->SetXTitle("MC Impact parameter [#mum] ");
943 hMCd0D0ptNCfromDstPM[i]->SetYTitle("Entries");
944 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstPM[i]);
624c07ab 945
946
947 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 948 hd0D0VtxTrueptNCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
949 hd0D0VtxTrueptNCfromDstPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
950 hd0D0VtxTrueptNCfromDstPM[i]->SetYTitle("Entries");
951 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstPM[i]);
624c07ab 952
953 strnamept=namehist;
954 strnamept.Append("SBMss_pt");
955 strnamept+=i;
956
957 strtitlept=titlehist;
958 strtitlept.Append(" Side Bands, ");
959 strtitlept+=fptbins[i];
960 strtitlept.Append("<= pt <");
961 strtitlept+=fptbins[i+1];
962 strtitlept.Append(" [GeV/c]");
963
ac4c229c 964 hd0D0ptNCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
965 hd0D0ptNCfromDstSB[i]->SetXTitle("Impact parameter [#mum] ");
966 hd0D0ptNCfromDstSB[i]->SetYTitle("Entries");
967 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstSB[i]);
624c07ab 968
969 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 970 hMCd0D0ptNCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
971 hMCd0D0ptNCfromDstSB[i]->SetXTitle("MC Impact parameter [#mum] ");
972 hMCd0D0ptNCfromDstSB[i]->SetYTitle("Entries");
973 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstSB[i]);
624c07ab 974
975 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 976 hd0D0VtxTrueptNCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
977 hd0D0VtxTrueptNCfromDstSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
978 hd0D0VtxTrueptNCfromDstSB[i]->SetYTitle("Entries");
979 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstSB[i]);
624c07ab 980 }
981
982
983 //############ NO CUTS OTHER HISTOGRAMS ###########
984 //
985 //########### global properties histos ###########
986
ac4c229c 987 TH2F *hCPtaVSd0d0NCother=new TH2F("hCPtaVSd0d0NCother","hCPtaVSd0d0_NoCuts_other",1000,-100000.,100000.,100,0.,1.);
988 TH1F *hSecVtxZNCother=new TH1F("hSecVtxZNCother","hSecVtxZ_NoCuts_other",1000,-8.,8.);
989 TH1F *hSecVtxXNCother=new TH1F("hSecVtxXNCother","hSecVtxX_NoCuts_other",1000,-3000.,3000.);
990 TH1F *hSecVtxYNCother=new TH1F("hSecVtxYNCother","hSecVtxY_NoCuts_other",1000,-3000.,3000.);
991 TH2F *hSecVtxXYNCother=new TH2F("hSecVtxXYNCother","hSecVtxXY_NoCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
992 TH1F *hSecVtxPhiNCother=new TH1F("hSecVtxPhiNCother","hSecVtxPhi_NoCuts_other",180,-180.1,180.1);
993 TH1F *hCPtaNCother=new TH1F("hCPtaNCother","hCPta_NoCuts_other",100,0.,1.);
994 TH1F *hd0xd0NCother=new TH1F("hd0xd0NCother","hd0xd0_NoCuts_other",1000,-100000.,100000.);
995 TH1F *hMassTrueNCother=new TH1F("hMassTrueNCother","D^{0} MC inv. Mass No Cuts other(All momenta)",600,1.600,2.200);
996 TH1F *hMassNCother=new TH1F("hMassNCother","D^{0} inv. Mass No Cuts other (All momenta)",600,1.600,2.200);
997 hMassNCother->Sumw2();
998 TH1F *hMassTrueNCotherPM=new TH1F("hMassTrueNCotherPM","D^{0} MC inv. Mass No Cuts Other, Mass Peak. (All momenta)",600,1.600,2.200);
999 TH1F *hMassNCotherPM=new TH1F("hMassNCotherPM","D^{0} inv. Mass No Cuts Other (All momenta), MassPeak",600,1.600,2.200);
1000 hMassNCotherPM->Sumw2();
1001 TH1F *hMassTrueNCotherSB=new TH1F("hMassTrueNCotherSB","D^{0} MC inv. Mass in Side Bands No Cuts other(All momenta)",600,1.600,2.200);
1002 TH1F *hMassNCotherSB=new TH1F("hMassNCotherSB","D^{0} inv. Mass in Side Bands No Cuts other (All momenta)",600,1.600,2.200);
1003 hMassNCotherSB->Sumw2();
1004
1005 flistNoCutsOther->Add(hCPtaVSd0d0NCother);
1006 flistNoCutsOther->Add(hSecVtxZNCother);
1007 flistNoCutsOther->Add(hSecVtxYNCother);
1008 flistNoCutsOther->Add(hSecVtxXNCother);
1009 flistNoCutsOther->Add(hSecVtxXYNCother);
1010 flistNoCutsOther->Add(hSecVtxPhiNCother);
1011 flistNoCutsOther->Add(hCPtaNCother);
1012 flistNoCutsOther->Add(hd0xd0NCother);
1013 flistNoCutsOther->Add(hMassTrueNCother);
1014 flistNoCutsOther->Add(hMassNCother);
1015 flistNoCutsOther->Add(hMassTrueNCotherPM);
1016 flistNoCutsOther->Add(hMassNCotherPM);
1017 flistNoCutsOther->Add(hMassTrueNCotherSB);
1018 flistNoCutsOther->Add(hMassNCotherSB);
624c07ab 1019
1020 //############# d0 D0 histos ###############à
ac4c229c 1021 TH1F *hd0D0NCotherPM = new TH1F("hd0D0NCotherPM","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1022 hd0D0NCotherPM->SetXTitle("Impact parameter [#mum]");
1023 hd0D0NCotherPM->SetYTitle("Entries");
1024
1025 TH1F *hd0D0VtxTrueNCotherPM = new TH1F("hd0D0VtxTrueNCotherPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1026 hd0D0VtxTrueNCotherPM->SetXTitle("Impact parameter [#mum]");
1027 hd0D0VtxTrueNCotherPM->SetYTitle("Entries");
1028
1029 TH1F *hMCd0D0NCotherPM = new TH1F("hMCd0D0NCotherPM","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1030 hMCd0D0NCotherPM->SetXTitle("MC Impact parameter [#mum]");
1031 hMCd0D0NCotherPM->SetYTitle("Entries");
1032
1033 TH1F *hd0D0NCotherSB = new TH1F("hd0D0NCotherSB","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1034 hd0D0NCotherSB->SetXTitle("Impact parameter [#mum]");
1035 hd0D0NCotherSB->SetYTitle("Entries");
1036
1037 TH1F *hd0D0VtxTrueNCotherSB = new TH1F("hd0D0VtxTrueNCotherSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1038 hd0D0VtxTrueNCotherSB->SetXTitle("Impact parameter [#mum]");
1039 hd0D0VtxTrueNCotherSB->SetYTitle("Entries");
1040
1041 TH1F *hMCd0D0NCotherSB = new TH1F("hMCd0D0NCotherSB","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1042 hMCd0D0NCotherSB->SetXTitle("MC Impact parameter [#mum]");
1043 hMCd0D0NCotherSB->SetYTitle("Entries");
1044
1045 flistNoCutsOther->Add(hd0D0NCotherPM);
1046 flistNoCutsOther->Add(hd0D0VtxTrueNCotherPM);
1047 flistNoCutsOther->Add(hMCd0D0NCotherPM);
1048 flistNoCutsOther->Add(hd0D0NCotherSB);
1049 flistNoCutsOther->Add(hd0D0VtxTrueNCotherSB);
1050 flistNoCutsOther->Add(hMCd0D0NCotherSB);
1051
1052 TH1F **hd0D0ptNCotherPM=new TH1F*[fnbins];
1053 TH1F **hMCd0D0ptNCotherPM=new TH1F*[fnbins];
1054 TH1F ** hd0D0VtxTrueptNCotherPM=new TH1F*[fnbins];
1055 TH1F **hd0D0ptNCotherSB=new TH1F*[fnbins];
1056 TH1F **hMCd0D0ptNCotherSB=new TH1F*[fnbins];
1057 TH1F ** hd0D0VtxTrueptNCotherSB=new TH1F*[fnbins];
1058 namehist="hd0D0ptNCother_";
624c07ab 1059 titlehist="D^{0} impact par. plot, No Cuts, Other, ";
1060 for(Int_t i=0;i<fnbins;i++){
1061 strnamept=namehist;
1062 strnamept.Append("PkMss_pt");
1063 strnamept+=i;
1064
1065 strtitlept=titlehist;
1066 strtitlept.Append(" Mass Peak, ");
1067 strtitlept+=fptbins[i];
1068 strtitlept.Append("<= pt <");
1069 strtitlept+=fptbins[i+1];
1070 strtitlept.Append(" [GeV/c]");
1071
ac4c229c 1072 hd0D0ptNCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1073 hd0D0ptNCotherPM[i]->SetXTitle("Impact parameter [#mum] ");
1074 hd0D0ptNCotherPM[i]->SetYTitle("Entries");
1075 flistNoCutsOther->Add(hd0D0ptNCotherPM[i]);
624c07ab 1076
1077 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1078 hMCd0D0ptNCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1079 hMCd0D0ptNCotherPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1080 hMCd0D0ptNCotherPM[i]->SetYTitle("Entries");
1081 flistNoCutsOther->Add(hMCd0D0ptNCotherPM[i]);
624c07ab 1082
1083
1084 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1085 hd0D0VtxTrueptNCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1086 hd0D0VtxTrueptNCotherPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1087 hd0D0VtxTrueptNCotherPM[i]->SetYTitle("Entries");
1088 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherPM[i]);
624c07ab 1089
1090 strnamept=namehist;
1091 strnamept.Append("SBMss_pt");
1092 strnamept+=i;
1093
1094 strtitlept=titlehist;
1095 strtitlept.Append(" Side Bands, ");
1096 strtitlept+=fptbins[i];
1097 strtitlept.Append("<= pt <");
1098 strtitlept+=fptbins[i+1];
1099 strtitlept.Append(" [GeV/c]");
1100
ac4c229c 1101 hd0D0ptNCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1102 hd0D0ptNCotherSB[i]->SetXTitle("Impact parameter [#mum] ");
1103 hd0D0ptNCotherSB[i]->SetYTitle("Entries");
1104 flistNoCutsOther->Add(hd0D0ptNCotherSB[i]);
624c07ab 1105
1106 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1107 hMCd0D0ptNCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1108 hMCd0D0ptNCotherSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1109 hMCd0D0ptNCotherSB[i]->SetYTitle("Entries");
1110 flistNoCutsOther->Add(hMCd0D0ptNCotherSB[i]);
624c07ab 1111
1112 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1113 hd0D0VtxTrueptNCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1114 hd0D0VtxTrueptNCotherSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1115 hd0D0VtxTrueptNCotherSB[i]->SetYTitle("Entries");
1116 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherSB[i]);
624c07ab 1117 }
1118
1119
1120 //################################################################################################
1121 // #
1122 // HISTOS FOR LOOSE CUTS #
1123 // #
1124 //################################################################################################
1125
1126 //############ LOOSE CUTS SIGNAL HISTOGRAMS ###############
1127 //
1128 // ####### global properties histo ############
1129
ac4c229c 1130 TH2F *hCPtaVSd0d0LSCsign=new TH2F("hCPtaVSd0d0LSCsign","hCPtaVSd0d0_LooseCuts_Signal",1000,-100000.,100000.,100,0.,1.);
1131 TH1F *hSecVtxZLSCsign=new TH1F("hSecVtxZLSCsign","hSecVtxZ_LooseCuts_Signal",1000,-8.,8.);
1132 TH1F *hSecVtxXLSCsign=new TH1F("hSecVtxXLSCsign","hSecVtxX_LooseCuts_Signal",1000,-3000.,3000.);
1133 TH1F *hSecVtxYLSCsign=new TH1F("hSecVtxYLSCsign","hSecVtxY_LooseCuts_Signal",1000,-3000.,3000.);
1134 TH2F *hSecVtxXYLSCsign=new TH2F("hSecVtxXYLSCsign","hSecVtxXY_LooseCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
1135 TH1F *hSecVtxPhiLSCsign=new TH1F("hSecVtxPhiLSCsign","hSecVtxPhi_LooseCuts_Signal",180,-180.1,180.1);
1136 TH1F *hCPtaLSCsign=new TH1F("hCPtaLSCsign","hCPta_LooseCuts_Signal",100,0.,1.);
1137 TH1F *hd0xd0LSCsign=new TH1F("hd0xd0LSCsign","hd0xd0_LooseCuts_Signal",1000,-100000.,100000.);
1138 TH1F *hMassTrueLSCsign=new TH1F("hMassTrueLSCsign","D^{0} MC inv. Mass Loose Cuts Signal(All momenta)",600,1.600,2.200);
1139 TH1F *hMassLSCsign=new TH1F("hMassLSCsign","D^{0} inv. Mass Loose Cuts Signal (All momenta)",600,1.600,2.200);
1140 hMassLSCsign->Sumw2();
1141 TH1F *hMassTrueLSCsignPM=new TH1F("hMassTrueLSCsignPM","D^{0} MC inv. Mass Loose Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
1142 TH1F *hMassLSCsignPM=new TH1F("hMassLSCsignPM","D^{0} inv. Mass Loose Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
1143 hMassLSCsignPM->Sumw2();
1144 TH1F *hMassTrueLSCsignSB=new TH1F("hMassTrueLSCsignSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Signal(All momenta)",600,1.600,2.200);
1145 TH1F *hMassLSCsignSB=new TH1F("hMassLSCsignSB","D^{0} inv. Mass in Side Bands Loose Cuts Signal (All momenta)",600,1.600,2.200);
1146 hMassLSCsignSB->Sumw2();
1147
1148 flistLsCutsSignal->Add(hCPtaVSd0d0LSCsign);
1149 flistLsCutsSignal->Add(hSecVtxZLSCsign);
1150 flistLsCutsSignal->Add(hSecVtxYLSCsign);
1151 flistLsCutsSignal->Add(hSecVtxXLSCsign);
1152 flistLsCutsSignal->Add(hSecVtxXYLSCsign);
1153 flistLsCutsSignal->Add(hSecVtxPhiLSCsign);
1154 flistLsCutsSignal->Add(hCPtaLSCsign);
1155 flistLsCutsSignal->Add(hd0xd0LSCsign);
1156 flistLsCutsSignal->Add(hMassTrueLSCsign);
1157 flistLsCutsSignal->Add(hMassLSCsign);
1158 flistLsCutsSignal->Add(hMassTrueLSCsignPM);
1159 flistLsCutsSignal->Add(hMassLSCsignPM);
1160 flistLsCutsSignal->Add(hMassTrueLSCsignSB);
1161 flistLsCutsSignal->Add(hMassLSCsignSB);
624c07ab 1162
1163 // ####### d0 D0 histos ############
ac4c229c 1164 TH1F *hd0D0LSCsignPM = new TH1F("hd0D0LSCsignPM","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1165 hd0D0LSCsignPM->SetXTitle("Impact parameter [#mum]");
1166 hd0D0LSCsignPM->SetYTitle("Entries");
1167
1168 TH1F *hd0D0VtxTrueLSCsignPM = new TH1F("hd0D0VtxTrueLSCsignPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1169 hd0D0VtxTrueLSCsignPM->SetXTitle("Impact parameter [#mum]");
1170 hd0D0VtxTrueLSCsignPM->SetYTitle("Entries");
1171
1172 TH1F *hMCd0D0LSCsignPM = new TH1F("hMCd0D0LSCsignPM","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1173 hMCd0D0LSCsignPM->SetXTitle("MC Impact parameter [#mum]");
1174 hMCd0D0LSCsignPM->SetYTitle("Entries");
1175
1176 TH1F *hd0D0LSCsignSB = new TH1F("hd0D0LSCsignSB","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1177 hd0D0LSCsignSB->SetXTitle("Impact parameter [#mum]");
1178 hd0D0LSCsignSB->SetYTitle("Entries");
1179
1180 TH1F *hd0D0VtxTrueLSCsignSB = new TH1F("hd0D0VtxTrueLSCsignSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1181 hd0D0VtxTrueLSCsignSB->SetXTitle("Impact parameter [#mum]");
1182 hd0D0VtxTrueLSCsignSB->SetYTitle("Entries");
1183
1184 TH1F *hMCd0D0LSCsignSB = new TH1F("hMCd0D0LSCsignSB","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1185 hMCd0D0LSCsignSB->SetXTitle("MC Impact parameter [#mum]");
1186 hMCd0D0LSCsignSB->SetYTitle("Entries");
1187
1188 flistLsCutsSignal->Add(hd0D0LSCsignPM);
1189 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignPM);
1190 flistLsCutsSignal->Add(hMCd0D0LSCsignPM);
1191 flistLsCutsSignal->Add(hd0D0LSCsignSB);
1192 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignSB);
1193 flistLsCutsSignal->Add(hMCd0D0LSCsignSB);
1194
1195 TH1F **hd0D0ptLSCsignPM=new TH1F*[fnbins];
1196 TH1F **hMCd0D0ptLSCsignPM=new TH1F*[fnbins];
1197 TH1F ** hd0D0VtxTrueptLSCsignPM=new TH1F*[fnbins];
1198 TH1F **hd0D0ptLSCsignSB=new TH1F*[fnbins];
1199 TH1F **hMCd0D0ptLSCsignSB=new TH1F*[fnbins];
1200 TH1F ** hd0D0VtxTrueptLSCsignSB=new TH1F*[fnbins];
1201 namehist="hd0D0ptLSCsign_";
624c07ab 1202 titlehist="D^{0} impact par. plot, Loose Cuts, Signal, ";
1203 for(Int_t i=0;i<fnbins;i++){
1204 strnamept=namehist;
1205 strnamept.Append("PkMss_pt");
1206 strnamept+=i;
1207
1208 strtitlept=titlehist;
1209 strtitlept.Append(" Mass Peak, ");
1210 strtitlept+=fptbins[i];
1211 strtitlept.Append("<= pt <");
1212 strtitlept+=fptbins[i+1];
1213 strtitlept.Append(" [GeV/c]");
1214
ac4c229c 1215 hd0D0ptLSCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1216 hd0D0ptLSCsignPM[i]->SetXTitle("Impact parameter [#mum] ");
1217 hd0D0ptLSCsignPM[i]->SetYTitle("Entries");
1218 flistLsCutsSignal->Add(hd0D0ptLSCsignPM[i]);
624c07ab 1219
1220 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1221 hMCd0D0ptLSCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1222 hMCd0D0ptLSCsignPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1223 hMCd0D0ptLSCsignPM[i]->SetYTitle("Entries");
1224 flistLsCutsSignal->Add(hMCd0D0ptLSCsignPM[i]);
624c07ab 1225
1226
1227 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1228 hd0D0VtxTrueptLSCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1229 hd0D0VtxTrueptLSCsignPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1230 hd0D0VtxTrueptLSCsignPM[i]->SetYTitle("Entries");
1231 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignPM[i]);
624c07ab 1232
1233 strnamept=namehist;
1234 strnamept.Append("SBMss_pt");
1235 strnamept+=i;
1236
1237 strtitlept=titlehist;
1238 strtitlept.Append(" Side Bands, ");
1239 strtitlept+=fptbins[i];
1240 strtitlept.Append("<= pt <");
1241 strtitlept+=fptbins[i+1];
1242 strtitlept.Append(" [GeV/c]");
1243
ac4c229c 1244 hd0D0ptLSCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1245 hd0D0ptLSCsignSB[i]->SetXTitle("Impact parameter [#mum] ");
1246 hd0D0ptLSCsignSB[i]->SetYTitle("Entries");
1247 flistLsCutsSignal->Add(hd0D0ptLSCsignSB[i]);
624c07ab 1248
1249 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1250 hMCd0D0ptLSCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1251 hMCd0D0ptLSCsignSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1252 hMCd0D0ptLSCsignSB[i]->SetYTitle("Entries");
1253 flistLsCutsSignal->Add(hMCd0D0ptLSCsignSB[i]);
624c07ab 1254
1255 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1256 hd0D0VtxTrueptLSCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1257 hd0D0VtxTrueptLSCsignSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1258 hd0D0VtxTrueptLSCsignSB[i]->SetYTitle("Entries");
1259 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignSB[i]);
624c07ab 1260 }
1261
1262
1263 //############ LOOSE CUTS BACKGROUND HISTOGRAMS ###########
1264 //
1265 // ######## global properties histos #######
ac4c229c 1266 TH2F *hCPtaVSd0d0LSCback=new TH2F("hCPtaVSd0d0LSCback","hCPtaVSd0d0_LooseCuts_Background",1000,-100000.,100000.,100,0.,1.);
1267 TH1F *hSecVtxZLSCback=new TH1F("hSecVtxZLSCback","hSecVtxZ_LooseCuts_Background",1000,-8.,8.);
1268 TH1F *hSecVtxXLSCback=new TH1F("hSecVtxXLSCback","hSecVtxX_LooseCuts_Background",1000,-3000.,3000.);
1269 TH1F *hSecVtxYLSCback=new TH1F("hSecVtxYLSCback","hSecVtxY_LooseCuts_Background",1000,-3000.,3000.);
1270 TH2F *hSecVtxXYLSCback=new TH2F("hSecVtxXYLSCback","hSecVtxXY_LooseCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
1271 TH1F *hSecVtxPhiLSCback=new TH1F("hSecVtxPhiLSCback","hSecVtxPhi_LooseCuts_Background",180,-180.1,180.1);
1272 TH1F *hCPtaLSCback=new TH1F("hCPtaLSCback","hCPta_LooseCuts_Background",100,0.,1.);
1273 TH1F *hd0xd0LSCback=new TH1F("hd0xd0LSCback","hd0xd0_LooseCuts_Background",1000,-100000.,100000.);
1274 TH1F *hMassTrueLSCback=new TH1F("hMassTrueLSCback","D^{0} MC inv. Mass Loose Cuts Background(All momenta)",600,1.600,2.200);
1275 TH1F *hMassLSCback=new TH1F("hMassLSCback","D^{0} inv. Mass Loose Cuts Background (All momenta)",600,1.600,2.200);
1276 hMassLSCback->Sumw2();
1277 TH1F *hMassTrueLSCbackPM=new TH1F("hMassTrueLSCbackPM","D^{0} MC inv. Mass Loose Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
1278 TH1F *hMassLSCbackPM=new TH1F("hMassLSCbackPM","D^{0} inv. Mass Loose Cuts Background (All momenta), MassPeak",600,1.600,2.200);
1279 hMassLSCbackPM->Sumw2();
1280 TH1F *hMassTrueLSCbackSB=new TH1F("hMassTrueLSCbackSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Background(All momenta)",600,1.600,2.200);
1281 TH1F *hMassLSCbackSB=new TH1F("hMassLSCbackSB","D^{0} inv. Mass in Side Bands Loose Cuts Background (All momenta)",600,1.600,2.200);
1282 hMassLSCbackSB->Sumw2();
1283
1284 flistLsCutsBack->Add(hCPtaVSd0d0LSCback);
1285 flistLsCutsBack->Add(hSecVtxZLSCback);
1286 flistLsCutsBack->Add(hSecVtxYLSCback);
1287 flistLsCutsBack->Add(hSecVtxXLSCback);
1288 flistLsCutsBack->Add(hSecVtxXYLSCback);
1289 flistLsCutsBack->Add(hSecVtxPhiLSCback);
1290 flistLsCutsBack->Add(hCPtaLSCback);
1291 flistLsCutsBack->Add(hd0xd0LSCback);
1292 flistLsCutsBack->Add(hMassTrueLSCback);
1293 flistLsCutsBack->Add(hMassLSCback);
1294 flistLsCutsBack->Add(hMassTrueLSCbackPM);
1295 flistLsCutsBack->Add(hMassLSCbackPM);
1296 flistLsCutsBack->Add(hMassTrueLSCbackSB);
1297 flistLsCutsBack->Add(hMassLSCbackSB);
624c07ab 1298
1299
1300 // ####### d0 D0 histos ############
1301
ac4c229c 1302 TH1F *hd0D0LSCbackPM = new TH1F("hd0D0LSCbackPM","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1303 hd0D0LSCbackPM->SetXTitle("Impact parameter [#mum]");
1304 hd0D0LSCbackPM->SetYTitle("Entries");
1305
1306 TH1F *hd0D0VtxTrueLSCbackPM = new TH1F("hd0D0VtxTrueLSCbackPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1307 hd0D0VtxTrueLSCbackPM->SetXTitle("Impact parameter [#mum]");
1308 hd0D0VtxTrueLSCbackPM->SetYTitle("Entries");
1309
1310 TH1F *hMCd0D0LSCbackPM = new TH1F("hMCd0D0LSCbackPM","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1311 hMCd0D0LSCbackPM->SetXTitle("MC Impact parameter [#mum]");
1312 hMCd0D0LSCbackPM->SetYTitle("Entries");
1313
1314 TH1F *hd0D0LSCbackSB = new TH1F("hd0D0LSCbackSB","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1315 hd0D0LSCbackSB->SetXTitle("Impact parameter [#mum]");
1316 hd0D0LSCbackSB->SetYTitle("Entries");
1317
1318 TH1F *hd0D0VtxTrueLSCbackSB = new TH1F("hd0D0VtxTrueLSCbackSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1319 hd0D0VtxTrueLSCbackSB->SetXTitle("Impact parameter [#mum]");
1320 hd0D0VtxTrueLSCbackSB->SetYTitle("Entries");
1321
1322 TH1F *hMCd0D0LSCbackSB = new TH1F("hMCd0D0LSCbackSB","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1323 hMCd0D0LSCbackSB->SetXTitle("MC Impact parameter [#mum]");
1324 hMCd0D0LSCbackSB->SetYTitle("Entries");
1325
1326 flistLsCutsBack->Add(hd0D0LSCbackPM);
1327 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackPM);
1328 flistLsCutsBack->Add(hMCd0D0LSCbackPM);
1329 flistLsCutsBack->Add(hd0D0LSCbackSB);
1330 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackSB);
1331 flistLsCutsBack->Add(hMCd0D0LSCbackSB);
1332
1333 TH1F **hd0D0ptLSCbackPM=new TH1F*[fnbins];
1334 TH1F **hMCd0D0ptLSCbackPM=new TH1F*[fnbins];
1335 TH1F ** hd0D0VtxTrueptLSCbackPM=new TH1F*[fnbins];
1336 TH1F **hd0D0ptLSCbackSB=new TH1F*[fnbins];
1337 TH1F **hMCd0D0ptLSCbackSB=new TH1F*[fnbins];
1338 TH1F ** hd0D0VtxTrueptLSCbackSB=new TH1F*[fnbins];
1339 namehist="hd0D0ptLSCback_";
624c07ab 1340 titlehist="D^{0} impact par. plot, Loose Cuts, Background, ";
1341 for(Int_t i=0;i<fnbins;i++){
1342 strnamept=namehist;
1343 strnamept.Append("PkMss_pt");
1344 strnamept+=i;
1345
1346 strtitlept=titlehist;
1347 strtitlept.Append(" Mass Peak, ");
1348 strtitlept+=fptbins[i];
1349 strtitlept.Append("<= pt <");
1350 strtitlept+=fptbins[i+1];
1351 strtitlept.Append(" [GeV/c]");
1352
ac4c229c 1353 hd0D0ptLSCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1354 hd0D0ptLSCbackPM[i]->SetXTitle("Impact parameter [#mum] ");
1355 hd0D0ptLSCbackPM[i]->SetYTitle("Entries");
1356 flistLsCutsBack->Add(hd0D0ptLSCbackPM[i]);
624c07ab 1357
1358 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1359 hMCd0D0ptLSCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1360 hMCd0D0ptLSCbackPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1361 hMCd0D0ptLSCbackPM[i]->SetYTitle("Entries");
1362 flistLsCutsBack->Add(hMCd0D0ptLSCbackPM[i]);
624c07ab 1363
1364
1365 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1366 hd0D0VtxTrueptLSCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1367 hd0D0VtxTrueptLSCbackPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1368 hd0D0VtxTrueptLSCbackPM[i]->SetYTitle("Entries");
1369 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackPM[i]);
624c07ab 1370
1371 strnamept=namehist;
1372 strnamept.Append("SBMss_pt");
1373 strnamept+=i;
1374
1375 strtitlept=titlehist;
1376 strtitlept.Append(" Side Bands, ");
1377 strtitlept+=fptbins[i];
1378 strtitlept.Append("<= pt <");
1379 strtitlept+=fptbins[i+1];
1380 strtitlept.Append(" [GeV/c]");
1381
ac4c229c 1382 hd0D0ptLSCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1383 hd0D0ptLSCbackSB[i]->SetXTitle("Impact parameter [#mum] ");
1384 hd0D0ptLSCbackSB[i]->SetYTitle("Entries");
1385 flistLsCutsBack->Add(hd0D0ptLSCbackSB[i]);
624c07ab 1386
1387 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1388 hMCd0D0ptLSCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1389 hMCd0D0ptLSCbackSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1390 hMCd0D0ptLSCbackSB[i]->SetYTitle("Entries");
1391 flistLsCutsBack->Add(hMCd0D0ptLSCbackSB[i]);
624c07ab 1392
1393 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1394 hd0D0VtxTrueptLSCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1395 hd0D0VtxTrueptLSCbackSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1396 hd0D0VtxTrueptLSCbackSB[i]->SetYTitle("Entries");
1397 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackSB[i]);
624c07ab 1398 }
1399
1400
1401
1402 //############ LOOSE CUTS FROMB HISTOGRAMS ###########
1403 //
1404 //####### global properties histos
1405
ac4c229c 1406 TH2F *hCPtaVSd0d0LSCfromB=new TH2F("hCPtaVSd0d0LSCfromB","hCPtaVSd0d0_LooseCuts_FromB",1000,-100000.,100000.,100,0.,1.);
1407 TH1F *hSecVtxZLSCfromB=new TH1F("hSecVtxZLSCfromB","hSecVtxZ_LooseCuts_FromB",1000,-8.,8.);
1408 TH1F *hSecVtxXLSCfromB=new TH1F("hSecVtxXLSCfromB","hSecVtxX_LooseCuts_FromB",1000,-3000.,3000.);
1409 TH1F *hSecVtxYLSCfromB=new TH1F("hSecVtxYLSCfromB","hSecVtxY_LooseCuts_FromB",1000,-3000.,3000.);
1410 TH2F *hSecVtxXYLSCfromB=new TH2F("hSecVtxXYLSCfromB","hSecVtxXY_LooseCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
1411 TH1F *hSecVtxPhiLSCfromB=new TH1F("hSecVtxPhiLSCfromB","hSecVtxPhi_LooseCuts_FromB",180,-180.1,180.1);
1412 TH1F *hCPtaLSCfromB=new TH1F("hCPtaLSCfromB","hCPta_LooseCuts_FromB",100,0.,1.);
1413 TH1F *hd0xd0LSCfromB=new TH1F("hd0xd0LSCfromB","hd0xd0_LooseCuts_FromB",1000,-100000.,100000.);
1414 TH1F *hMassTrueLSCfromB=new TH1F("hMassTrueLSCfromB","D^{0} MC inv. Mass Loose Cuts FromB(All momenta)",600,1.600,2.200);
1415 TH1F *hMassLSCfromB=new TH1F("hMassLSCfromB","D^{0} inv. Mass Loose Cuts FromB (All momenta)",600,1.600,2.200);
1416 hMassLSCfromB->Sumw2();
1417 TH1F *hMassTrueLSCfromBPM=new TH1F("hMassTrueLSCfromBPM","D^{0} MC inv. Mass Loose Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
1418 TH1F *hMassLSCfromBPM=new TH1F("hMassLSCfromBPM","D^{0} inv. Mass Loose Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
1419 hMassLSCfromBPM->Sumw2();
1420 TH1F *hMassTrueLSCfromBSB=new TH1F("hMassTrueLSCfromBSB","D^{0} MC inv. Mass in Side Bands Loose Cuts FromB(All momenta)",600,1.600,2.200);
1421 TH1F *hMassLSCfromBSB=new TH1F("hMassLSCfromBSB","D^{0} inv. Mass in Side Bands Loose Cuts FromB (All momenta)",600,1.600,2.200);
1422 hMassLSCfromBSB->Sumw2();
1423
1424 flistLsCutsFromB->Add(hCPtaVSd0d0LSCfromB);
1425 flistLsCutsFromB->Add(hSecVtxZLSCfromB);
1426 flistLsCutsFromB->Add(hSecVtxYLSCfromB);
1427 flistLsCutsFromB->Add(hSecVtxXLSCfromB);
1428 flistLsCutsFromB->Add(hSecVtxXYLSCfromB);
1429 flistLsCutsFromB->Add(hSecVtxPhiLSCfromB);
1430 flistLsCutsFromB->Add(hCPtaLSCfromB);
1431 flistLsCutsFromB->Add(hd0xd0LSCfromB);
1432 flistLsCutsFromB->Add(hMassTrueLSCfromB);
1433 flistLsCutsFromB->Add(hMassLSCfromB);
1434 flistLsCutsFromB->Add(hMassTrueLSCfromBPM);
1435 flistLsCutsFromB->Add(hMassLSCfromBPM);
1436 flistLsCutsFromB->Add(hMassTrueLSCfromBSB);
1437 flistLsCutsFromB->Add(hMassLSCfromBSB);
624c07ab 1438
1439 // ######### d0 D0 histos ##############
ac4c229c 1440 TH1F *hd0D0LSCfromBPM = new TH1F("hd0D0LSCfromBPM","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1441 hd0D0LSCfromBPM->SetXTitle("Impact parameter [#mum]");
1442 hd0D0LSCfromBPM->SetYTitle("Entries");
1443
1444 TH1F *hd0D0VtxTrueLSCfromBPM = new TH1F("hd0D0VtxTrueLSCfromBPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1445 hd0D0VtxTrueLSCfromBPM->SetXTitle("Impact parameter [#mum]");
1446 hd0D0VtxTrueLSCfromBPM->SetYTitle("Entries");
1447
1448 TH1F *hMCd0D0LSCfromBPM = new TH1F("hMCd0D0LSCfromBPM","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1449 hMCd0D0LSCfromBPM->SetXTitle("MC Impact parameter [#mum]");
1450 hMCd0D0LSCfromBPM->SetYTitle("Entries");
1451
1452 TH1F *hd0D0LSCfromBSB = new TH1F("hd0D0LSCfromBSB","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1453 hd0D0LSCfromBSB->SetXTitle("Impact parameter [#mum]");
1454 hd0D0LSCfromBSB->SetYTitle("Entries");
1455
1456 TH1F *hd0D0VtxTrueLSCfromBSB = new TH1F("hd0D0VtxTrueLSCfromBSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1457 hd0D0VtxTrueLSCfromBSB->SetXTitle("Impact parameter [#mum]");
1458 hd0D0VtxTrueLSCfromBSB->SetYTitle("Entries");
1459
1460 TH1F *hMCd0D0LSCfromBSB = new TH1F("hMCd0D0LSCfromBSB","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1461 hMCd0D0LSCfromBSB->SetXTitle("MC Impact parameter [#mum]");
1462 hMCd0D0LSCfromBSB->SetYTitle("Entries");
1463
1464 flistLsCutsFromB->Add(hd0D0LSCfromBPM);
1465 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBPM);
1466 flistLsCutsFromB->Add(hMCd0D0LSCfromBPM);
1467 flistLsCutsFromB->Add(hd0D0LSCfromBSB);
1468 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBSB);
1469 flistLsCutsFromB->Add(hMCd0D0LSCfromBSB);
1470
1471 TH1F **hd0D0ptLSCfromBPM=new TH1F*[fnbins];
1472 TH1F **hMCd0D0ptLSCfromBPM=new TH1F*[fnbins];
1473 TH1F ** hd0D0VtxTrueptLSCfromBPM=new TH1F*[fnbins];
1474 TH1F **hd0D0ptLSCfromBSB=new TH1F*[fnbins];
1475 TH1F **hMCd0D0ptLSCfromBSB=new TH1F*[fnbins];
1476 TH1F ** hd0D0VtxTrueptLSCfromBSB=new TH1F*[fnbins];
1477 namehist="hd0D0ptLSCfromB_";
624c07ab 1478 titlehist="D^{0} impact par. plot, Loose Cuts, FromB, ";
1479 for(Int_t i=0;i<fnbins;i++){
1480 strnamept=namehist;
1481 strnamept.Append("PkMss_pt");
1482 strnamept+=i;
1483
1484 strtitlept=titlehist;
1485 strtitlept.Append(" Mass Peak, ");
1486 strtitlept+=fptbins[i];
1487 strtitlept.Append("<= pt <");
1488 strtitlept+=fptbins[i+1];
1489 strtitlept.Append(" [GeV/c]");
1490
ac4c229c 1491 hd0D0ptLSCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1492 hd0D0ptLSCfromBPM[i]->SetXTitle("Impact parameter [#mum] ");
1493 hd0D0ptLSCfromBPM[i]->SetYTitle("Entries");
1494 flistLsCutsFromB->Add(hd0D0ptLSCfromBPM[i]);
624c07ab 1495
1496 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1497 hMCd0D0ptLSCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1498 hMCd0D0ptLSCfromBPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1499 hMCd0D0ptLSCfromBPM[i]->SetYTitle("Entries");
1500 flistLsCutsFromB->Add(hMCd0D0ptLSCfromBPM[i]);
624c07ab 1501
1502
1503 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1504 hd0D0VtxTrueptLSCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1505 hd0D0VtxTrueptLSCfromBPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1506 hd0D0VtxTrueptLSCfromBPM[i]->SetYTitle("Entries");
1507 flistLsCutsFromB->Add(hd0D0VtxTrueptLSCfromBPM[i]);
624c07ab 1508
1509 strnamept=namehist;
1510 strnamept.Append("SBMss_pt");
1511 strnamept+=i;
1512
1513 strtitlept=titlehist;
1514 strtitlept.Append(" Side Bands, ");
1515 strtitlept+=fptbins[i];
1516 strtitlept.Append("<= pt <");
1517 strtitlept+=fptbins[i+1];
1518 strtitlept.Append(" [GeV/c]");
1519
ac4c229c 1520 hd0D0ptLSCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1521 hd0D0ptLSCfromBSB[i]->SetXTitle("Impact parameter [#mum] ");
1522 hd0D0ptLSCfromBSB[i]->SetYTitle("Entries");
1523 flistLsCutsFromB->Add(hd0D0ptLSCfromBSB[i]);
624c07ab 1524
1525 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1526 hMCd0D0ptLSCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1527 hMCd0D0ptLSCfromBSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1528 hMCd0D0ptLSCfromBSB[i]->SetYTitle("Entries");
1529 flistLsCutsFromB->Add(hMCd0D0ptLSCfromBSB[i]);
624c07ab 1530
1531 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1532 hd0D0VtxTrueptLSCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1533 hd0D0VtxTrueptLSCfromBSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1534 hd0D0VtxTrueptLSCfromBSB[i]->SetYTitle("Entries");
1535 flistLsCutsFromB->Add(hd0D0VtxTrueptLSCfromBSB[i]);
624c07ab 1536 }
1537
1538
1539
1540 //############ LOOSE CUTS FROM DSTAR HISTOGRAMS ###########
1541 //
1542 //############## global properties histos
ac4c229c 1543 TH2F *hCPtaVSd0d0LSCfromDstar=new TH2F("hCPtaVSd0d0LSCfromDstar","hCPtaVSd0d0_LooseCuts_FromDStar",1000,-100000.,100000.,100,0.,1.);
1544 TH1F *hSecVtxZLSCfromDstar=new TH1F("hSecVtxZLSCfromDstar","hSecVtxZ_LooseCuts_FromDStar",1000,-8.,8.);
1545 TH1F *hSecVtxXLSCfromDstar=new TH1F("hSecVtxXLSCfromDstar","hSecVtxX_LooseCuts_FromDStar",1000,-3000.,3000.);
1546 TH1F *hSecVtxYLSCfromDstar=new TH1F("hSecVtxYLSCfromDstar","hSecVtxY_LooseCuts_FromDStar",1000,-3000.,3000.);
1547 TH2F *hSecVtxXYLSCfromDstar=new TH2F("hSecVtxXYLSCfromDstar","hSecVtxXY_LooseCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
1548 TH1F *hSecVtxPhiLSCfromDstar=new TH1F("hSecVtxPhiLSCfromDstar","hSecVtxPhi_LooseCuts_FromDStar",180,-180.1,180.1);
1549 TH1F *hCPtaLSCfromDstar=new TH1F("hCPtaLSCfromDstar","hCPta_LooseCuts_FromDStar",100,0.,1.);
1550 TH1F *hd0xd0LSCfromDstar=new TH1F("hd0xd0LSCfromDstar","hd0xd0_LooseCuts_FromDStar",1000,-100000.,100000.);
1551 TH1F *hMassTrueLSCfromDstar=new TH1F("hMassTrueLSCfromDstar","D^{0} MC inv. Mass Loose Cuts FromDStar(All momenta)",600,1.600,2.200);
1552 TH1F *hMassLSCfromDstar=new TH1F("hMassLSCfromDstar","D^{0} inv. Mass Loose Cuts FromDStar (All momenta)",600,1.600,2.200);
1553 hMassLSCfromDstar->Sumw2();
1554 TH1F *hMassTrueLSCfromDstarPM=new TH1F("hMassTrueLSCfromDstarPM","D^{0} MC inv. Mass Loose Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
1555 TH1F *hMassLSCfromDstarPM=new TH1F("hMassLSCfromDstarPM","D^{0} inv. Mass Loose Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
1556 hMassLSCfromDstarPM->Sumw2();
1557 TH1F *hMassTrueLSCfromDstarSB=new TH1F("hMassTrueLSCfromDstarSB","D^{0} MC inv. Mass in Side Bands Loose Cuts FromDStar(All momenta)",600,1.600,2.200);
1558 TH1F *hMassLSCfromDstarSB=new TH1F("hMassLSCfromDstarSB","D^{0} inv. Mass in Side Bands Loose Cuts FromDStar (All momenta)",600,1.600,2.200);
1559 hMassLSCfromDstarSB->Sumw2();
1560
1561 flistLsCutsFromDstar->Add(hCPtaVSd0d0LSCfromDstar);
1562 flistLsCutsFromDstar->Add(hSecVtxZLSCfromDstar);
1563 flistLsCutsFromDstar->Add(hSecVtxYLSCfromDstar);
1564 flistLsCutsFromDstar->Add(hSecVtxXLSCfromDstar);
1565 flistLsCutsFromDstar->Add(hSecVtxXYLSCfromDstar);
1566 flistLsCutsFromDstar->Add(hSecVtxPhiLSCfromDstar);
1567 flistLsCutsFromDstar->Add(hCPtaLSCfromDstar);
1568 flistLsCutsFromDstar->Add(hd0xd0LSCfromDstar);
1569 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstar);
1570 flistLsCutsFromDstar->Add(hMassLSCfromDstar);
1571 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstarPM);
1572 flistLsCutsFromDstar->Add(hMassLSCfromDstarPM);
1573 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstarSB);
1574 flistLsCutsFromDstar->Add(hMassLSCfromDstarSB);
624c07ab 1575
1576 //########## d0 D0 histos #############
ac4c229c 1577 TH1F *hd0D0LSCfromDstPM = new TH1F("hd0D0LSCfromDstarPM","D^{0} impact par. plot , Loose Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1578 hd0D0LSCfromDstPM->SetXTitle("Impact parameter [#mum]");
1579 hd0D0LSCfromDstPM->SetYTitle("Entries");
1580
1581 TH1F *hd0D0VtxTrueLSCfromDstPM = new TH1F("hd0D0VtxTrueLSCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1582 hd0D0VtxTrueLSCfromDstPM->SetXTitle("Impact parameter [#mum]");
1583 hd0D0VtxTrueLSCfromDstPM->SetYTitle("Entries");
1584
1585 TH1F *hMCd0D0LSCfromDstPM = new TH1F("hMCd0D0LSCfromDstarPM","D^{0} impact par. plot, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1586 hMCd0D0LSCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
1587 hMCd0D0LSCfromDstPM->SetYTitle("Entries");
1588
1589 TH1F *hd0D0LSCfromDstSB = new TH1F("hd0D0LSCfromDstarSB","D^{0} impact par. plot , Loose Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1590 hd0D0LSCfromDstSB->SetXTitle("Impact parameter [#mum]");
1591 hd0D0LSCfromDstSB->SetYTitle("Entries");
1592
1593 TH1F *hd0D0VtxTrueLSCfromDstSB = new TH1F("hd0D0VtxTrueLSCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1594 hd0D0VtxTrueLSCfromDstSB->SetXTitle("Impact parameter [#mum]");
1595 hd0D0VtxTrueLSCfromDstSB->SetYTitle("Entries");
1596
1597 TH1F *hMCd0D0LSCfromDstSB = new TH1F("hMCd0D0LSCfromDstarSB","D^{0} impact par. plot, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1598 hMCd0D0LSCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
1599 hMCd0D0LSCfromDstSB->SetYTitle("Entries");
1600
1601 flistLsCutsFromDstar->Add(hd0D0LSCfromDstPM);
1602 flistLsCutsFromDstar->Add(hd0D0VtxTrueLSCfromDstPM);
1603 flistLsCutsFromDstar->Add(hMCd0D0LSCfromDstPM);
1604 flistLsCutsFromDstar->Add(hd0D0LSCfromDstSB);
1605 flistLsCutsFromDstar->Add(hd0D0VtxTrueLSCfromDstSB);
1606 flistLsCutsFromDstar->Add(hMCd0D0LSCfromDstSB);
1607
1608 TH1F **hd0D0ptLSCfromDstPM=new TH1F*[fnbins];
1609 TH1F **hMCd0D0ptLSCfromDstPM=new TH1F*[fnbins];
1610 TH1F ** hd0D0VtxTrueptLSCfromDstPM=new TH1F*[fnbins];
1611 TH1F **hd0D0ptLSCfromDstSB=new TH1F*[fnbins];
1612 TH1F **hMCd0D0ptLSCfromDstSB=new TH1F*[fnbins];
1613 TH1F ** hd0D0VtxTrueptLSCfromDstSB=new TH1F*[fnbins];
1614 namehist="hd0D0ptLSCfromDstar_";
624c07ab 1615 titlehist="D^{0} impact par. plot, Loose Cuts, FromDStar, ";
1616 for(Int_t i=0;i<fnbins;i++){
1617 strnamept=namehist;
1618 strnamept.Append("PkMss_pt");
1619 strnamept+=i;
1620
1621 strtitlept=titlehist;
1622 strtitlept.Append(" Mass Peak, ");
1623 strtitlept+=fptbins[i];
1624 strtitlept.Append("<= pt <");
1625 strtitlept+=fptbins[i+1];
1626 strtitlept.Append(" [GeV/c]");
1627
ac4c229c 1628 hd0D0ptLSCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1629 hd0D0ptLSCfromDstPM[i]->SetXTitle("Impact parameter [#mum] ");
1630 hd0D0ptLSCfromDstPM[i]->SetYTitle("Entries");
1631 flistLsCutsFromDstar->Add(hd0D0ptLSCfromDstPM[i]);
624c07ab 1632
1633 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1634 hMCd0D0ptLSCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1635 hMCd0D0ptLSCfromDstPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1636 hMCd0D0ptLSCfromDstPM[i]->SetYTitle("Entries");
1637 flistLsCutsFromDstar->Add(hMCd0D0ptLSCfromDstPM[i]);
624c07ab 1638
1639
1640 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1641 hd0D0VtxTrueptLSCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1642 hd0D0VtxTrueptLSCfromDstPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1643 hd0D0VtxTrueptLSCfromDstPM[i]->SetYTitle("Entries");
1644 flistLsCutsFromDstar->Add(hd0D0VtxTrueptLSCfromDstPM[i]);
624c07ab 1645
1646 strnamept=namehist;
1647 strnamept.Append("SBMss_pt");
1648 strnamept+=i;
1649
1650 strtitlept=titlehist;
1651 strtitlept.Append(" Side Bands, ");
1652 strtitlept+=fptbins[i];
1653 strtitlept.Append("<= pt <");
1654 strtitlept+=fptbins[i+1];
1655 strtitlept.Append(" [GeV/c]");
1656
ac4c229c 1657 hd0D0ptLSCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1658 hd0D0ptLSCfromDstSB[i]->SetXTitle("Impact parameter [#mum] ");
1659 hd0D0ptLSCfromDstSB[i]->SetYTitle("Entries");
1660 flistLsCutsFromDstar->Add(hd0D0ptLSCfromDstSB[i]);
624c07ab 1661
1662 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1663 hMCd0D0ptLSCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1664 hMCd0D0ptLSCfromDstSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1665 hMCd0D0ptLSCfromDstSB[i]->SetYTitle("Entries");
1666 flistLsCutsFromDstar->Add(hMCd0D0ptLSCfromDstSB[i]);
624c07ab 1667
1668 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1669 hd0D0VtxTrueptLSCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1670 hd0D0VtxTrueptLSCfromDstSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1671 hd0D0VtxTrueptLSCfromDstSB[i]->SetYTitle("Entries");
1672 flistLsCutsFromDstar->Add(hd0D0VtxTrueptLSCfromDstSB[i]);
624c07ab 1673 }
1674
1675
1676 //############ LOOSE CUTS OTHER HISTOGRAMS ###########
1677 //
1678 //########### global properties histos ###########
1679
ac4c229c 1680 TH2F *hCPtaVSd0d0LSCother=new TH2F("hCPtaVSd0d0LSCother","hCPtaVSd0d0_LooseCuts_other",1000,-100000.,100000.,100,0.,1.);
1681 TH1F *hSecVtxZLSCother=new TH1F("hSecVtxZLSCother","hSecVtxZ_LooseCuts_other",1000,-8.,8.);
1682 TH1F *hSecVtxXLSCother=new TH1F("hSecVtxXLSCother","hSecVtxX_LooseCuts_other",1000,-3000.,3000.);
1683 TH1F *hSecVtxYLSCother=new TH1F("hSecVtxYLSCother","hSecVtxY_LooseCuts_other",1000,-3000.,3000.);
1684 TH2F *hSecVtxXYLSCother=new TH2F("hSecVtxXYLSCother","hSecVtxXY_LooseCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
1685 TH1F *hSecVtxPhiLSCother=new TH1F("hSecVtxPhiLSCother","hSecVtxPhi_LooseCuts_other",180,-180.1,180.1);
1686 TH1F *hCPtaLSCother=new TH1F("hCPtaLSCother","hCPta_LooseCuts_other",100,0.,1.);
1687 TH1F *hd0xd0LSCother=new TH1F("hd0xd0LSCother","hd0xd0_LooseCuts_other",1000,-100000.,100000.);
1688 TH1F *hMassTrueLSCother=new TH1F("hMassTrueLSCother","D^{0} MC inv. Mass Loose Cuts other(All momenta)",600,1.600,2.200);
1689 TH1F *hMassLSCother=new TH1F("hMassLSCother","D^{0} inv. Mass Loose Cuts other (All momenta)",600,1.600,2.200);
1690 hMassLSCother->Sumw2();
1691 TH1F *hMassTrueLSCotherPM=new TH1F("hMassTrueLSCotherPM","D^{0} MC inv. Mass Loose Cuts other, Mass Peak. (All momenta)",600,1.600,2.200);
1692 TH1F *hMassLSCotherPM=new TH1F("hMassLSCotherPM","D^{0} inv. Mass Loose Cuts other (All momenta), MassPeak",600,1.600,2.200);
1693 hMassLSCotherPM->Sumw2();
1694 TH1F *hMassTrueLSCotherSB=new TH1F("hMassTrueLSCotherSB","D^{0} MC inv. Mass in Side Bands Loose Cuts other(All momenta)",600,1.600,2.200);
1695 TH1F *hMassLSCotherSB=new TH1F("hMassLSCotherSB","D^{0} inv. Mass in Side Bands Loose Cuts other (All momenta)",600,1.600,2.200);
1696 hMassLSCotherSB->Sumw2();
1697
1698 flistLsCutsOther->Add(hCPtaVSd0d0LSCother);
1699 flistLsCutsOther->Add(hSecVtxZLSCother);
1700 flistLsCutsOther->Add(hSecVtxYLSCother);
1701 flistLsCutsOther->Add(hSecVtxXLSCother);
1702 flistLsCutsOther->Add(hSecVtxXYLSCother);
1703 flistLsCutsOther->Add(hSecVtxPhiLSCother);
1704 flistLsCutsOther->Add(hCPtaLSCother);
1705 flistLsCutsOther->Add(hd0xd0LSCother);
1706 flistLsCutsOther->Add(hMassTrueLSCother);
1707 flistLsCutsOther->Add(hMassLSCother);
1708 flistLsCutsOther->Add(hMassTrueLSCotherPM);
1709 flistLsCutsOther->Add(hMassLSCotherPM);
1710 flistLsCutsOther->Add(hMassTrueLSCotherSB);
1711 flistLsCutsOther->Add(hMassLSCotherSB);
624c07ab 1712
1713 //############# d0 D0 histos ###############à
ac4c229c 1714 TH1F *hd0D0LSCotherPM = new TH1F("hd0D0LSCotherPM","D^{0} impact par. plot , Loose Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1715 hd0D0LSCotherPM->SetXTitle("Impact parameter [#mum]");
1716 hd0D0LSCotherPM->SetYTitle("Entries");
1717
1718 TH1F *hd0D0VtxTrueLSCotherPM = new TH1F("hd0D0VtxTrueLSCotherPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1719 hd0D0VtxTrueLSCotherPM->SetXTitle("Impact parameter [#mum]");
1720 hd0D0VtxTrueLSCotherPM->SetYTitle("Entries");
1721
1722 TH1F *hMCd0D0LSCotherPM = new TH1F("hMCd0D0LSCotherPM","D^{0} impact par. plot, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1723 hMCd0D0LSCotherPM->SetXTitle("MC Impact parameter [#mum]");
1724 hMCd0D0LSCotherPM->SetYTitle("Entries");
1725
1726 TH1F *hd0D0LSCotherSB = new TH1F("hd0D0LSCotherSB","D^{0} impact par. plot , Loose Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1727 hd0D0LSCotherSB->SetXTitle("Impact parameter [#mum]");
1728 hd0D0LSCotherSB->SetYTitle("Entries");
1729
1730 TH1F *hd0D0VtxTrueLSCotherSB = new TH1F("hd0D0VtxTrueLSCotherSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1731 hd0D0VtxTrueLSCotherSB->SetXTitle("Impact parameter [#mum]");
1732 hd0D0VtxTrueLSCotherSB->SetYTitle("Entries");
1733
1734 TH1F *hMCd0D0LSCotherSB = new TH1F("hMCd0D0LSCotherSB","D^{0} impact par. plot, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1735 hMCd0D0LSCotherSB->SetXTitle("MC Impact parameter [#mum]");
1736 hMCd0D0LSCotherSB->SetYTitle("Entries");
1737
1738 flistLsCutsOther->Add(hd0D0LSCotherPM);
1739 flistLsCutsOther->Add(hd0D0VtxTrueLSCotherPM);
1740 flistLsCutsOther->Add(hMCd0D0LSCotherPM);
1741 flistLsCutsOther->Add(hd0D0LSCotherSB);
1742 flistLsCutsOther->Add(hd0D0VtxTrueLSCotherSB);
1743 flistLsCutsOther->Add(hMCd0D0LSCotherSB);
1744
1745 TH1F **hd0D0ptLSCotherPM=new TH1F*[fnbins];
1746 TH1F **hMCd0D0ptLSCotherPM=new TH1F*[fnbins];
1747 TH1F ** hd0D0VtxTrueptLSCotherPM=new TH1F*[fnbins];
1748 TH1F **hd0D0ptLSCotherSB=new TH1F*[fnbins];
1749 TH1F **hMCd0D0ptLSCotherSB=new TH1F*[fnbins];
1750 TH1F ** hd0D0VtxTrueptLSCotherSB=new TH1F*[fnbins];
1751 namehist="hd0D0ptLSCother_";
624c07ab 1752 titlehist="D^{0} impact par. plot, Loose Cuts, Other, ";
1753 for(Int_t i=0;i<fnbins;i++){
1754 strnamept=namehist;
1755 strnamept.Append("PkMss_pt");
1756 strnamept+=i;
1757
1758 strtitlept=titlehist;
1759 strtitlept.Append(" Mass Peak, ");
1760 strtitlept+=fptbins[i];
1761 strtitlept.Append("<= pt <");
1762 strtitlept+=fptbins[i+1];
1763 strtitlept.Append(" [GeV/c]");
1764
ac4c229c 1765 hd0D0ptLSCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1766 hd0D0ptLSCotherPM[i]->SetXTitle("Impact parameter [#mum] ");
1767 hd0D0ptLSCotherPM[i]->SetYTitle("Entries");
1768 flistLsCutsOther->Add(hd0D0ptLSCotherPM[i]);
624c07ab 1769
1770 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1771 hMCd0D0ptLSCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1772 hMCd0D0ptLSCotherPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1773 hMCd0D0ptLSCotherPM[i]->SetYTitle("Entries");
1774 flistLsCutsOther->Add(hMCd0D0ptLSCotherPM[i]);
624c07ab 1775
1776
1777 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1778 hd0D0VtxTrueptLSCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1779 hd0D0VtxTrueptLSCotherPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1780 hd0D0VtxTrueptLSCotherPM[i]->SetYTitle("Entries");
1781 flistLsCutsOther->Add(hd0D0VtxTrueptLSCotherPM[i]);
624c07ab 1782
1783 strnamept=namehist;
1784 strnamept.Append("SBMss_pt");
1785 strnamept+=i;
1786
1787 strtitlept=titlehist;
1788 strtitlept.Append(" Side Bands, ");
1789 strtitlept+=fptbins[i];
1790 strtitlept.Append("<= pt <");
1791 strtitlept+=fptbins[i+1];
1792 strtitlept.Append(" [GeV/c]");
1793
ac4c229c 1794 hd0D0ptLSCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1795 hd0D0ptLSCotherSB[i]->SetXTitle("Impact parameter [#mum] ");
1796 hd0D0ptLSCotherSB[i]->SetYTitle("Entries");
1797 flistLsCutsOther->Add(hd0D0ptLSCotherSB[i]);
624c07ab 1798
1799 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1800 hMCd0D0ptLSCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1801 hMCd0D0ptLSCotherSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1802 hMCd0D0ptLSCotherSB[i]->SetYTitle("Entries");
1803 flistLsCutsOther->Add(hMCd0D0ptLSCotherSB[i]);
624c07ab 1804
1805 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1806 hd0D0VtxTrueptLSCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1807 hd0D0VtxTrueptLSCotherSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1808 hd0D0VtxTrueptLSCotherSB[i]->SetYTitle("Entries");
1809 flistLsCutsOther->Add(hd0D0VtxTrueptLSCotherSB[i]);
624c07ab 1810 }
1811
1812
1813
1814
1815 //################################################################################################
1816 // #
1817 // HISTOS FOR TIGHT CUTS #
1818 // #
1819 //################################################################################################
1820
1821 //############ TIGHT CUTS SIGNAL HISTOGRAMS ###############
1822 //
1823 // ####### global properties histo ############
1824
ac4c229c 1825 TH2F *hCPtaVSd0d0TGHCsign=new TH2F("hCPtaVSd0d0TGHCsign","hCPtaVSd0d0_TightCuts_Signal",1000,-100000.,100000.,100,0.,1.);
1826 TH1F *hSecVtxZTGHCsign=new TH1F("hSecVtxZTGHCsign","hSecVtxZ_TightCuts_Signal",1000,-8.,8.);
1827 TH1F *hSecVtxXTGHCsign=new TH1F("hSecVtxXTGHCsign","hSecVtxX_TightCuts_Signal",1000,-3000.,3000.);
1828 TH1F *hSecVtxYTGHCsign=new TH1F("hSecVtxYTGHCsign","hSecVtxY_TightCuts_Signal",1000,-3000.,3000.);
1829 TH2F *hSecVtxXYTGHCsign=new TH2F("hSecVtxXYTGHCsign","hSecVtxXY_TightCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
1830 TH1F *hSecVtxPhiTGHCsign=new TH1F("hSecVtxPhiTGHCsign","hSecVtxPhi_TightCuts_Signal",180,-180.1,180.1);
1831 TH1F *hCPtaTGHCsign=new TH1F("hCPtaTGHCsign","hCPta_TightCuts_Signal",100,0.,1.);
1832 TH1F *hd0xd0TGHCsign=new TH1F("hd0xd0TGHCsign","hd0xd0_TightCuts_Signal",1000,-100000.,100000.);
1833 TH1F *hMassTrueTGHCsign=new TH1F("hMassTrueTGHCsign","D^{0} MC inv. Mass Tight Cuts Signal(All momenta)",600,1.600,2.200);
1834 TH1F *hMassTGHCsign=new TH1F("hMassTGHCsign","D^{0} inv. Mass Tight Cuts Signal (All momenta)",600,1.600,2.200);
1835 hMassTGHCsign->Sumw2();
1836 TH1F *hMassTrueTGHCsignPM=new TH1F("hMassTrueTGHCsignPM","D^{0} MC inv. Mass Tight Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
1837 TH1F *hMassTGHCsignPM=new TH1F("hMassTGHCsignPM","D^{0} inv. Mass Tight Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
1838 hMassTGHCsignPM->Sumw2();
1839 TH1F *hMassTrueTGHCsignSB=new TH1F("hMassTrueTGHCsignSB","D^{0} MC inv. Mass in Side Bands Tight Cuts Signal(All momenta)",600,1.600,2.200);
1840 TH1F *hMassTGHCsignSB=new TH1F("hMassTGHCsignSB","D^{0} inv. Mass in Side Bands Tight Cuts Signal (All momenta)",600,1.600,2.200);
1841 hMassTGHCsignSB->Sumw2();
1842
1843 flistTghCutsSignal->Add(hCPtaVSd0d0TGHCsign);
1844 flistTghCutsSignal->Add(hSecVtxZTGHCsign);
1845 flistTghCutsSignal->Add(hSecVtxYTGHCsign);
1846 flistTghCutsSignal->Add(hSecVtxXTGHCsign);
1847 flistTghCutsSignal->Add(hSecVtxXYTGHCsign);
1848 flistTghCutsSignal->Add(hSecVtxPhiTGHCsign);
1849 flistTghCutsSignal->Add(hCPtaTGHCsign);
1850 flistTghCutsSignal->Add(hd0xd0TGHCsign);
1851 flistTghCutsSignal->Add(hMassTrueTGHCsign);
1852 flistTghCutsSignal->Add(hMassTGHCsign);
1853 flistTghCutsSignal->Add(hMassTrueTGHCsignPM);
1854 flistTghCutsSignal->Add(hMassTGHCsignPM);
1855 flistTghCutsSignal->Add(hMassTrueTGHCsignSB);
1856 flistTghCutsSignal->Add(hMassTGHCsignSB);
624c07ab 1857
1858 // ####### d0 D0 histos ############
ac4c229c 1859 TH1F *hd0D0TGHCsignPM = new TH1F("hd0D0TGHCsignPM","D^{0} impact par. plot , Tight Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1860 hd0D0TGHCsignPM->SetXTitle("Impact parameter [#mum]");
1861 hd0D0TGHCsignPM->SetYTitle("Entries");
1862
1863 TH1F *hd0D0VtxTrueTGHCsignPM = new TH1F("hd0D0VtxTrueTGHCsignPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1864 hd0D0VtxTrueTGHCsignPM->SetXTitle("Impact parameter [#mum]");
1865 hd0D0VtxTrueTGHCsignPM->SetYTitle("Entries");
1866
1867 TH1F *hMCd0D0TGHCsignPM = new TH1F("hMCd0D0TGHCsignPM","D^{0} impact par. plot, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1868 hMCd0D0TGHCsignPM->SetXTitle("MC Impact parameter [#mum]");
1869 hMCd0D0TGHCsignPM->SetYTitle("Entries");
1870
1871 TH1F *hd0D0TGHCsignSB = new TH1F("hd0D0TGHCsignSB","D^{0} impact par. plot , Tight Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1872 hd0D0TGHCsignSB->SetXTitle("Impact parameter [#mum]");
1873 hd0D0TGHCsignSB->SetYTitle("Entries");
1874
1875 TH1F *hd0D0VtxTrueTGHCsignSB = new TH1F("hd0D0VtxTrueTGHCsignSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1876 hd0D0VtxTrueTGHCsignSB->SetXTitle("Impact parameter [#mum]");
1877 hd0D0VtxTrueTGHCsignSB->SetYTitle("Entries");
1878
1879 TH1F *hMCd0D0TGHCsignSB = new TH1F("hMCd0D0TGHCsignSB","D^{0} impact par. plot, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
1880 hMCd0D0TGHCsignSB->SetXTitle("MC Impact parameter [#mum]");
1881 hMCd0D0TGHCsignSB->SetYTitle("Entries");
1882
1883 flistTghCutsSignal->Add(hd0D0TGHCsignPM);
1884 flistTghCutsSignal->Add(hd0D0VtxTrueTGHCsignPM);
1885 flistTghCutsSignal->Add(hMCd0D0TGHCsignPM);
1886 flistTghCutsSignal->Add(hd0D0TGHCsignSB);
1887 flistTghCutsSignal->Add(hd0D0VtxTrueTGHCsignSB);
1888 flistTghCutsSignal->Add(hMCd0D0TGHCsignSB);
1889
1890 TH1F **hd0D0ptTGHCsignPM=new TH1F*[fnbins];
1891 TH1F **hMCd0D0ptTGHCsignPM=new TH1F*[fnbins];
1892 TH1F ** hd0D0VtxTrueptTGHCsignPM=new TH1F*[fnbins];
1893 TH1F **hd0D0ptTGHCsignSB=new TH1F*[fnbins];
1894 TH1F **hMCd0D0ptTGHCsignSB=new TH1F*[fnbins];
1895 TH1F ** hd0D0VtxTrueptTGHCsignSB=new TH1F*[fnbins];
1896 namehist="hd0D0ptTGHCsign_";
624c07ab 1897 titlehist="D^{0} impact par. plot, Tight Cuts, Signal, ";
1898 for(Int_t i=0;i<fnbins;i++){
1899 strnamept=namehist;
1900 strnamept.Append("PkMss_pt");
1901 strnamept+=i;
1902
1903 strtitlept=titlehist;
1904 strtitlept.Append(" Mass Peak, ");
1905 strtitlept+=fptbins[i];
1906 strtitlept.Append("<= pt <");
1907 strtitlept+=fptbins[i+1];
1908 strtitlept.Append(" [GeV/c]");
1909
ac4c229c 1910 hd0D0ptTGHCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1911 hd0D0ptTGHCsignPM[i]->SetXTitle("Impact parameter [#mum] ");
1912 hd0D0ptTGHCsignPM[i]->SetYTitle("Entries");
1913 flistTghCutsSignal->Add(hd0D0ptTGHCsignPM[i]);
624c07ab 1914
1915 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1916 hMCd0D0ptTGHCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1917 hMCd0D0ptTGHCsignPM[i]->SetXTitle("MC Impact parameter [#mum] ");
1918 hMCd0D0ptTGHCsignPM[i]->SetYTitle("Entries");
1919 flistTghCutsSignal->Add(hMCd0D0ptTGHCsignPM[i]);
624c07ab 1920
1921
1922 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1923 hd0D0VtxTrueptTGHCsignPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1924 hd0D0VtxTrueptTGHCsignPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1925 hd0D0VtxTrueptTGHCsignPM[i]->SetYTitle("Entries");
1926 flistTghCutsSignal->Add(hd0D0VtxTrueptTGHCsignPM[i]);
624c07ab 1927
1928 strnamept=namehist;
1929 strnamept.Append("SBMss_pt");
1930 strnamept+=i;
1931
1932 strtitlept=titlehist;
1933 strtitlept.Append(" Side Bands, ");
1934 strtitlept+=fptbins[i];
1935 strtitlept.Append("<= pt <");
1936 strtitlept+=fptbins[i+1];
1937 strtitlept.Append(" [GeV/c]");
1938
ac4c229c 1939 hd0D0ptTGHCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1940 hd0D0ptTGHCsignSB[i]->SetXTitle("Impact parameter [#mum] ");
1941 hd0D0ptTGHCsignSB[i]->SetYTitle("Entries");
1942 flistTghCutsSignal->Add(hd0D0ptTGHCsignSB[i]);
624c07ab 1943
1944 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 1945 hMCd0D0ptTGHCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1946 hMCd0D0ptTGHCsignSB[i]->SetXTitle("MC Impact parameter [#mum] ");
1947 hMCd0D0ptTGHCsignSB[i]->SetYTitle("Entries");
1948 flistTghCutsSignal->Add(hMCd0D0ptTGHCsignSB[i]);
624c07ab 1949
1950 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 1951 hd0D0VtxTrueptTGHCsignSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1952 hd0D0VtxTrueptTGHCsignSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1953 hd0D0VtxTrueptTGHCsignSB[i]->SetYTitle("Entries");
1954 flistTghCutsSignal->Add(hd0D0VtxTrueptTGHCsignSB[i]);
624c07ab 1955 }
1956
1957
1958 //############ TIGHT CUTS BACKGROUND HISTOGRAMS ###########
1959 //
1960 // ######## global properties histos #######
ac4c229c 1961 TH2F *hCPtaVSd0d0TGHCback=new TH2F("hCPtaVSd0d0TGHCback","hCPtaVSd0d0_TightCuts_Background",1000,-100000.,100000.,100,0.,1.);
1962 TH1F *hSecVtxZTGHCback=new TH1F("hSecVtxZTGHCback","hSecVtxZ_TightCuts_Background",1000,-8.,8.);
1963 TH1F *hSecVtxXTGHCback=new TH1F("hSecVtxXTGHCback","hSecVtxX_TightCuts_Background",1000,-3000.,3000.);
1964 TH1F *hSecVtxYTGHCback=new TH1F("hSecVtxYTGHCback","hSecVtxY_TightCuts_Background",1000,-3000.,3000.);
1965 TH2F *hSecVtxXYTGHCback=new TH2F("hSecVtxXYTGHCback","hSecVtxXY_TightCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
1966 TH1F *hSecVtxPhiTGHCback=new TH1F("hSecVtxPhiTGHCback","hSecVtxPhi_TightCuts_Background",180,-180.1,180.1);
1967 TH1F *hCPtaTGHCback=new TH1F("hCPtaTGHCback","hCPta_TightCuts_Background",100,0.,1.);
1968 TH1F *hd0xd0TGHCback=new TH1F("hd0xd0TGHCback","hd0xd0_TightCuts_Background",1000,-100000.,100000.);
1969 TH1F *hMassTrueTGHCback=new TH1F("hMassTrueTGHCback","D^{0} MC inv. Mass Tight Cuts Background(All momenta)",600,1.600,2.200);
1970 TH1F *hMassTGHCback=new TH1F("hMassTGHCback","D^{0} inv. Mass Tight Cuts Background (All momenta)",600,1.600,2.200);
1971 hMassTGHCback->Sumw2();
1972 TH1F *hMassTrueTGHCbackPM=new TH1F("hMassTrueTGHCbackPM","D^{0} MC inv. Mass Tight Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
1973 TH1F *hMassTGHCbackPM=new TH1F("hMassTGHCbackPM","D^{0} inv. Mass Tight Cuts Background (All momenta), MassPeak",600,1.600,2.200);
1974 hMassTGHCbackPM->Sumw2();
1975 TH1F *hMassTrueTGHCbackSB=new TH1F("hMassTrueTGHCbackSB","D^{0} MC inv. Mass in Side Bands Tight Cuts Backgrround(All momenta)",600,1.600,2.200);
1976 TH1F *hMassTGHCbackSB=new TH1F("hMassTGHCbackSB","D^{0} inv. Mass in Side Bands Tight Cuts Background (All momenta)",600,1.600,2.200);
1977 hMassTGHCbackSB->Sumw2();
1978
1979 flistTghCutsBack->Add(hCPtaVSd0d0TGHCback);
1980 flistTghCutsBack->Add(hSecVtxZTGHCback);
1981 flistTghCutsBack->Add(hSecVtxYTGHCback);
1982 flistTghCutsBack->Add(hSecVtxXTGHCback);
1983 flistTghCutsBack->Add(hSecVtxXYTGHCback);
1984 flistTghCutsBack->Add(hSecVtxPhiTGHCback);
1985 flistTghCutsBack->Add(hCPtaTGHCback);
1986 flistTghCutsBack->Add(hd0xd0TGHCback);
1987 flistTghCutsBack->Add(hMassTrueTGHCback);
1988 flistTghCutsBack->Add(hMassTGHCback);
1989 flistTghCutsBack->Add(hMassTrueTGHCbackPM);
1990 flistTghCutsBack->Add(hMassTGHCbackPM);
1991 flistTghCutsBack->Add(hMassTrueTGHCbackSB);
1992 flistTghCutsBack->Add(hMassTGHCbackSB);
624c07ab 1993
1994
1995 // ####### d0 D0 histos ############
1996
ac4c229c 1997 TH1F *hd0D0TGHCbackPM = new TH1F("hd0D0TGHCbackPM","D^{0} impact par. plot , Tight Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1998 hd0D0TGHCbackPM->SetXTitle("Impact parameter [#mum]");
1999 hd0D0TGHCbackPM->SetYTitle("Entries");
2000
2001 TH1F *hd0D0VtxTrueTGHCbackPM = new TH1F("hd0D0VtxTrueTGHCbackPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2002 hd0D0VtxTrueTGHCbackPM->SetXTitle("Impact parameter [#mum]");
2003 hd0D0VtxTrueTGHCbackPM->SetYTitle("Entries");
2004
2005 TH1F *hMCd0D0TGHCbackPM = new TH1F("hMCd0D0TGHCbackPM","D^{0} impact par. plot, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2006 hMCd0D0TGHCbackPM->SetXTitle("MC Impact parameter [#mum]");
2007 hMCd0D0TGHCbackPM->SetYTitle("Entries");
2008
2009 TH1F *hd0D0TGHCbackSB = new TH1F("hd0D0TGHCbackSB","D^{0} impact par. plot , Tight Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2010 hd0D0TGHCbackSB->SetXTitle("Impact parameter [#mum]");
2011 hd0D0TGHCbackSB->SetYTitle("Entries");
2012
2013 TH1F *hd0D0VtxTrueTGHCbackSB = new TH1F("hd0D0VtxTrueTGHCbackSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2014 hd0D0VtxTrueTGHCbackSB->SetXTitle("Impact parameter [#mum]");
2015 hd0D0VtxTrueTGHCbackSB->SetYTitle("Entries");
2016
2017 TH1F *hMCd0D0TGHCbackSB = new TH1F("hMCd0D0TGHCbackSB","D^{0} impact par. plot, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2018 hMCd0D0TGHCbackSB->SetXTitle("MC Impact parameter [#mum]");
2019 hMCd0D0TGHCbackSB->SetYTitle("Entries");
2020
2021 flistTghCutsBack->Add(hd0D0TGHCbackPM);
2022 flistTghCutsBack->Add(hd0D0VtxTrueTGHCbackPM);
2023 flistTghCutsBack->Add(hMCd0D0TGHCbackPM);
2024 flistTghCutsBack->Add(hd0D0TGHCbackSB);
2025 flistTghCutsBack->Add(hd0D0VtxTrueTGHCbackSB);
2026 flistTghCutsBack->Add(hMCd0D0TGHCbackSB);
2027
2028 TH1F **hd0D0ptTGHCbackPM=new TH1F*[fnbins];
2029 TH1F **hMCd0D0ptTGHCbackPM=new TH1F*[fnbins];
2030 TH1F ** hd0D0VtxTrueptTGHCbackPM=new TH1F*[fnbins];
2031 TH1F **hd0D0ptTGHCbackSB=new TH1F*[fnbins];
2032 TH1F **hMCd0D0ptTGHCbackSB=new TH1F*[fnbins];
2033 TH1F ** hd0D0VtxTrueptTGHCbackSB=new TH1F*[fnbins];
2034 namehist="hd0D0ptTGHCback_";
624c07ab 2035 titlehist="D^{0} impact par. plot, Tight Cuts, Background, ";
2036 for(Int_t i=0;i<fnbins;i++){
2037 strnamept=namehist;
2038 strnamept.Append("PkMss_pt");
2039 strnamept+=i;
2040
2041 strtitlept=titlehist;
2042 strtitlept.Append(" Mass Peak, ");
2043 strtitlept+=fptbins[i];
2044 strtitlept.Append("<= pt <");
2045 strtitlept+=fptbins[i+1];
2046 strtitlept.Append(" [GeV/c]");
2047
ac4c229c 2048 hd0D0ptTGHCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2049 hd0D0ptTGHCbackPM[i]->SetXTitle("Impact parameter [#mum] ");
2050 hd0D0ptTGHCbackPM[i]->SetYTitle("Entries");
2051 flistTghCutsBack->Add(hd0D0ptTGHCbackPM[i]);
624c07ab 2052
2053 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2054 hMCd0D0ptTGHCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2055 hMCd0D0ptTGHCbackPM[i]->SetXTitle("MC Impact parameter [#mum] ");
2056 hMCd0D0ptTGHCbackPM[i]->SetYTitle("Entries");
2057 flistTghCutsBack->Add(hMCd0D0ptTGHCbackPM[i]);
624c07ab 2058
2059
2060 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2061 hd0D0VtxTrueptTGHCbackPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2062 hd0D0VtxTrueptTGHCbackPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2063 hd0D0VtxTrueptTGHCbackPM[i]->SetYTitle("Entries");
2064 flistTghCutsBack->Add(hd0D0VtxTrueptTGHCbackPM[i]);
624c07ab 2065
2066 strnamept=namehist;
2067 strnamept.Append("SBMss_pt");
2068 strnamept+=i;
2069
2070 strtitlept=titlehist;
2071 strtitlept.Append(" Side Bands, ");
2072 strtitlept+=fptbins[i];
2073 strtitlept.Append("<= pt <");
2074 strtitlept+=fptbins[i+1];
2075 strtitlept.Append(" [GeV/c]");
2076
ac4c229c 2077 hd0D0ptTGHCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2078 hd0D0ptTGHCbackSB[i]->SetXTitle("Impact parameter [#mum] ");
2079 hd0D0ptTGHCbackSB[i]->SetYTitle("Entries");
2080 flistTghCutsBack->Add(hd0D0ptTGHCbackSB[i]);
624c07ab 2081
2082 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2083 hMCd0D0ptTGHCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2084 hMCd0D0ptTGHCbackSB[i]->SetXTitle("MC Impact parameter [#mum] ");
2085 hMCd0D0ptTGHCbackSB[i]->SetYTitle("Entries");
2086 flistTghCutsBack->Add(hMCd0D0ptTGHCbackSB[i]);
624c07ab 2087
2088 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2089 hd0D0VtxTrueptTGHCbackSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2090 hd0D0VtxTrueptTGHCbackSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2091 hd0D0VtxTrueptTGHCbackSB[i]->SetYTitle("Entries");
2092 flistTghCutsBack->Add(hd0D0VtxTrueptTGHCbackSB[i]);
624c07ab 2093 }
2094
2095
2096
2097 //############ TIGHT CUTS FROMB HISTOGRAMS ###########
2098 //
2099 //####### global properties histos
2100
ac4c229c 2101 TH2F *hCPtaVSd0d0TGHCfromB=new TH2F("hCPtaVSd0d0TGHCfromB","hCPtaVSd0d0_TightCuts_FromB",1000,-100000.,100000.,100,0.,1.);
2102 TH1F *hSecVtxZTGHCfromB=new TH1F("hSecVtxZTGHCfromB","hSecVtxZ_TightCuts_FromB",1000,-8.,8.);
2103 TH1F *hSecVtxXTGHCfromB=new TH1F("hSecVtxXTGHCfromB","hSecVtxX_TightCuts_FromB",1000,-3000.,3000.);
2104 TH1F *hSecVtxYTGHCfromB=new TH1F("hSecVtxYTGHCfromB","hSecVtxY_TightCuts_FromB",1000,-3000.,3000.);
2105 TH2F *hSecVtxXYTGHCfromB=new TH2F("hSecVtxXYTGHCfromB","hSecVtxXY_TightCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
2106 TH1F *hSecVtxPhiTGHCfromB=new TH1F("hSecVtxPhiTGHCfromB","hSecVtxPhi_TightCuts_FromB",180,-180.1,180.1);
2107 TH1F *hCPtaTGHCfromB=new TH1F("hCPtaTGHCfromB","hCPta_TightCuts_FromB",100,0.,1.);
2108 TH1F *hd0xd0TGHCfromB=new TH1F("hd0xd0TGHCfromB","hd0xd0_TightCuts_FromB",1000,-100000.,100000.);
2109 TH1F *hMassTrueTGHCfromB=new TH1F("hMassTrueTGHCfromB","D^{0} MC inv. Mass Tight Cuts FromB(All momenta)",600,1.600,2.200);
2110 TH1F *hMassTGHCfromB=new TH1F("hMassTGHCfromB","D^{0} inv. Mass Tight Cuts FromB (All momenta)",600,1.600,2.200);
2111 hMassTGHCfromB->Sumw2();
2112 TH1F *hMassTrueTGHCfromBPM=new TH1F("hMassTrueTGHCfromBPM","D^{0} MC inv. Mass Tight Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
2113 TH1F *hMassTGHCfromBPM=new TH1F("hMassTGHCfromBPM","D^{0} inv. Mass Tight Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
2114 hMassTGHCfromBPM->Sumw2();
2115 TH1F *hMassTrueTGHCfromBSB=new TH1F("hMassTrueTGHCfromBSB","D^{0} MC inv. Mass in Side Bands Tight Cuts FromB(All momenta)",600,1.600,2.200);
2116 TH1F *hMassTGHCfromBSB=new TH1F("hMassTGHCfromBSB","D^{0} inv. Mass in Side Bands Tight Cuts FromB (All momenta)",600,1.600,2.200);
2117 hMassTGHCfromBSB->Sumw2();
2118
2119 flistTghCutsFromB->Add(hCPtaVSd0d0TGHCfromB);
2120 flistTghCutsFromB->Add(hSecVtxZTGHCfromB);
2121 flistTghCutsFromB->Add(hSecVtxYTGHCfromB);
2122 flistTghCutsFromB->Add(hSecVtxXTGHCfromB);
2123 flistTghCutsFromB->Add(hSecVtxXYTGHCfromB);
2124 flistTghCutsFromB->Add(hSecVtxPhiTGHCfromB);
2125 flistTghCutsFromB->Add(hCPtaTGHCfromB);
2126 flistTghCutsFromB->Add(hd0xd0TGHCfromB);
2127 flistTghCutsFromB->Add(hMassTrueTGHCfromB);
2128 flistTghCutsFromB->Add(hMassTGHCfromB);
2129 flistTghCutsFromB->Add(hMassTrueTGHCfromBPM);
2130 flistTghCutsFromB->Add(hMassTGHCfromBPM);
2131 flistTghCutsFromB->Add(hMassTrueTGHCfromBSB);
2132 flistTghCutsFromB->Add(hMassTGHCfromBSB);
624c07ab 2133
2134 // ######### d0 D0 histos ##############
ac4c229c 2135 TH1F *hd0D0TGHCfromBPM = new TH1F("hd0D0TGHCfromBPM","D^{0} impact par. plot , Tight Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2136 hd0D0TGHCfromBPM->SetXTitle("Impact parameter [#mum]");
2137 hd0D0TGHCfromBPM->SetYTitle("Entries");
2138
2139 TH1F *hd0D0VtxTrueTGHCfromBPM = new TH1F("hd0D0VtxTrueTGHCfromBPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2140 hd0D0VtxTrueTGHCfromBPM->SetXTitle("Impact parameter [#mum]");
2141 hd0D0VtxTrueTGHCfromBPM->SetYTitle("Entries");
2142
2143 TH1F *hMCd0D0TGHCfromBPM = new TH1F("hMCd0D0TGHCfromBPM","D^{0} impact par. plot, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2144 hMCd0D0TGHCfromBPM->SetXTitle("MC Impact parameter [#mum]");
2145 hMCd0D0TGHCfromBPM->SetYTitle("Entries");
2146
2147 TH1F *hd0D0TGHCfromBSB = new TH1F("hd0D0TGHCfromBSB","D^{0} impact par. plot , Tight Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2148 hd0D0TGHCfromBSB->SetXTitle("Impact parameter [#mum]");
2149 hd0D0TGHCfromBSB->SetYTitle("Entries");
2150
2151 TH1F *hd0D0VtxTrueTGHCfromBSB = new TH1F("hd0D0VtxTrueTGHCfromBSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2152 hd0D0VtxTrueTGHCfromBSB->SetXTitle("Impact parameter [#mum]");
2153 hd0D0VtxTrueTGHCfromBSB->SetYTitle("Entries");
2154
2155 TH1F *hMCd0D0TGHCfromBSB = new TH1F("hMCd0D0TGHCfromBSB","D^{0} impact par. plot, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2156 hMCd0D0TGHCfromBSB->SetXTitle("MC Impact parameter [#mum]");
2157 hMCd0D0TGHCfromBSB->SetYTitle("Entries");
2158
2159 flistTghCutsFromB->Add(hd0D0TGHCfromBPM);
2160 flistTghCutsFromB->Add(hd0D0VtxTrueTGHCfromBPM);
2161 flistTghCutsFromB->Add(hMCd0D0TGHCfromBPM);
2162 flistTghCutsFromB->Add(hd0D0TGHCfromBSB);
2163 flistTghCutsFromB->Add(hd0D0VtxTrueTGHCfromBSB);
2164 flistTghCutsFromB->Add(hMCd0D0TGHCfromBSB);
2165
2166 TH1F **hd0D0ptTGHCfromBPM=new TH1F*[fnbins];
2167 TH1F **hMCd0D0ptTGHCfromBPM=new TH1F*[fnbins];
2168 TH1F ** hd0D0VtxTrueptTGHCfromBPM=new TH1F*[fnbins];
2169 TH1F **hd0D0ptTGHCfromBSB=new TH1F*[fnbins];
2170 TH1F **hMCd0D0ptTGHCfromBSB=new TH1F*[fnbins];
2171 TH1F ** hd0D0VtxTrueptTGHCfromBSB=new TH1F*[fnbins];
2172 namehist="hd0D0ptTGHCfromB_";
624c07ab 2173 titlehist="D^{0} impact par. plot, Tight Cuts, FromB, ";
2174 for(Int_t i=0;i<fnbins;i++){
2175 strnamept=namehist;
2176 strnamept.Append("PkMss_pt");
2177 strnamept+=i;
2178
2179 strtitlept=titlehist;
2180 strtitlept.Append(" Mass Peak, ");
2181 strtitlept+=fptbins[i];
2182 strtitlept.Append("<= pt <");
2183 strtitlept+=fptbins[i+1];
2184 strtitlept.Append(" [GeV/c]");
2185
ac4c229c 2186 hd0D0ptTGHCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2187 hd0D0ptTGHCfromBPM[i]->SetXTitle("Impact parameter [#mum] ");
2188 hd0D0ptTGHCfromBPM[i]->SetYTitle("Entries");
2189 flistTghCutsFromB->Add(hd0D0ptTGHCfromBPM[i]);
624c07ab 2190
2191 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2192 hMCd0D0ptTGHCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2193 hMCd0D0ptTGHCfromBPM[i]->SetXTitle("MC Impact parameter [#mum] ");
2194 hMCd0D0ptTGHCfromBPM[i]->SetYTitle("Entries");
2195 flistTghCutsFromB->Add(hMCd0D0ptTGHCfromBPM[i]);
624c07ab 2196
2197
2198 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2199 hd0D0VtxTrueptTGHCfromBPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2200 hd0D0VtxTrueptTGHCfromBPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2201 hd0D0VtxTrueptTGHCfromBPM[i]->SetYTitle("Entries");
2202 flistTghCutsFromB->Add(hd0D0VtxTrueptTGHCfromBPM[i]);
624c07ab 2203
2204 strnamept=namehist;
2205 strnamept.Append("SBMss_pt");
2206 strnamept+=i;
2207
2208 strtitlept=titlehist;
2209 strtitlept.Append(" Side Bands, ");
2210 strtitlept+=fptbins[i];
2211 strtitlept.Append("<= pt <");
2212 strtitlept+=fptbins[i+1];
2213 strtitlept.Append(" [GeV/c]");
2214
ac4c229c 2215 hd0D0ptTGHCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2216 hd0D0ptTGHCfromBSB[i]->SetXTitle("Impact parameter [#mum] ");
2217 hd0D0ptTGHCfromBSB[i]->SetYTitle("Entries");
2218 flistTghCutsFromB->Add(hd0D0ptTGHCfromBSB[i]);
624c07ab 2219
2220 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2221 hMCd0D0ptTGHCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2222 hMCd0D0ptTGHCfromBSB[i]->SetXTitle("MC Impact parameter [#mum] ");
2223 hMCd0D0ptTGHCfromBSB[i]->SetYTitle("Entries");
2224 flistTghCutsFromB->Add(hMCd0D0ptTGHCfromBSB[i]);
624c07ab 2225
2226 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2227 hd0D0VtxTrueptTGHCfromBSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2228 hd0D0VtxTrueptTGHCfromBSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2229 hd0D0VtxTrueptTGHCfromBSB[i]->SetYTitle("Entries");
2230 flistTghCutsFromB->Add(hd0D0VtxTrueptTGHCfromBSB[i]);
624c07ab 2231 }
2232
2233
2234
2235 //############ TIGHT CUTS FROM DSTAR HISTOGRAMS ###########
2236 //
2237 //############## global properties histos
ac4c229c 2238 TH2F *hCPtaVSd0d0TGHCfromDstar=new TH2F("hCPtaVSd0d0TGHCfromDstar","hCPtaVSd0d0_TightCuts_FromDStar",1000,-100000.,100000.,100,0.,1.);
2239 TH1F *hSecVtxZTGHCfromDstar=new TH1F("hSecVtxZTGHCfromDstar","hSecVtxZ_TightCuts_FromDStar",1000,-8.,8.);
2240 TH1F *hSecVtxXTGHCfromDstar=new TH1F("hSecVtxXTGHCfromDstar","hSecVtxX_TightCuts_FromDStar",1000,-3000.,3000.);
2241 TH1F *hSecVtxYTGHCfromDstar=new TH1F("hSecVtxYTGHCfromDstar","hSecVtxY_TightCuts_FromDStar",1000,-3000.,3000.);
2242 TH2F *hSecVtxXYTGHCfromDstar=new TH2F("hSecVtxXYTGHCfromDstar","hSecVtxXY_TightCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
2243 TH1F *hSecVtxPhiTGHCfromDstar=new TH1F("hSecVtxPhiTGHCfromDstar","hSecVtxPhi_TightCuts_FromDStar",180,-180.1,180.1);
2244 TH1F *hCPtaTGHCfromDstar=new TH1F("hCPtaTGHCfromDstar","hCPta_TightCuts_FromDStar",100,0.,1.);
2245 TH1F *hd0xd0TGHCfromDstar=new TH1F("hd0xd0TGHCfromDstar","hd0xd0_TightCuts_FromDStar",1000,-100000.,100000.);
2246 TH1F *hMassTrueTGHCfromDstar=new TH1F("hMassTrueTGHCfromDstar","D^{0} MC inv. Mass Tight Cuts FromDStar(All momenta)",600,1.600,2.200);
2247 TH1F *hMassTGHCfromDstar=new TH1F("hMassTGHCfromDstar","D^{0} inv. Mass Tight Cuts FromDStar (All momenta)",600,1.600,2.200);
2248 hMassTGHCfromDstar->Sumw2();
2249 TH1F *hMassTrueTGHCfromDstarPM=new TH1F("hMassTrueTGHCfromDstarPM","D^{0} MC inv. Mass Tight Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
2250 TH1F *hMassTGHCfromDstarPM=new TH1F("hMassTGHCfromDstarPM","D^{0} inv. Mass Tight Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
2251 hMassTGHCfromDstarPM->Sumw2();
2252 TH1F *hMassTrueTGHCfromDstarSB=new TH1F("hMassTrueTGHCfromDstarSB","D^{0} MC inv. Mass in Side Bands Tight Cuts FromDStar(All momenta)",600,1.600,2.200);
2253 TH1F *hMassTGHCfromDstarSB=new TH1F("hMassTGHCfromDstarSB","D^{0} inv. Mass in Side Bands Tight Cuts FromDStar (All momenta)",600,1.600,2.200);
2254 hMassTGHCfromDstarSB->Sumw2();
2255
2256 flistTghCutsFromDstar->Add(hCPtaVSd0d0TGHCfromDstar);
2257 flistTghCutsFromDstar->Add(hSecVtxZTGHCfromDstar);
2258 flistTghCutsFromDstar->Add(hSecVtxYTGHCfromDstar);
2259 flistTghCutsFromDstar->Add(hSecVtxXTGHCfromDstar);
2260 flistTghCutsFromDstar->Add(hSecVtxXYTGHCfromDstar);
2261 flistTghCutsFromDstar->Add(hSecVtxPhiTGHCfromDstar);
2262 flistTghCutsFromDstar->Add(hCPtaTGHCfromDstar);
2263 flistTghCutsFromDstar->Add(hd0xd0TGHCfromDstar);
2264 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstar);
2265 flistTghCutsFromDstar->Add(hMassTGHCfromDstar);
2266 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstarPM);
2267 flistTghCutsFromDstar->Add(hMassTGHCfromDstarPM);
2268 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstarSB);
2269 flistTghCutsFromDstar->Add(hMassTGHCfromDstarSB);
624c07ab 2270
2271 //########## d0 D0 histos #############
ac4c229c 2272 TH1F *hd0D0TGHCfromDstPM = new TH1F("hd0D0TGHCfromDstarPM","D^{0} impact par. plot , Tight Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2273 hd0D0TGHCfromDstPM->SetXTitle("Impact parameter [#mum]");
2274 hd0D0TGHCfromDstPM->SetYTitle("Entries");
2275
2276 TH1F *hd0D0VtxTrueTGHCfromDstPM = new TH1F("hd0D0VtxTrueTGHCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2277 hd0D0VtxTrueTGHCfromDstPM->SetXTitle("Impact parameter [#mum]");
2278 hd0D0VtxTrueTGHCfromDstPM->SetYTitle("Entries");
2279
2280 TH1F *hMCd0D0TGHCfromDstPM = new TH1F("hMCd0D0TGHCfromDstarPM","D^{0} impact par. plot, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2281 hMCd0D0TGHCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
2282 hMCd0D0TGHCfromDstPM->SetYTitle("Entries");
2283
2284 TH1F *hd0D0TGHCfromDstSB = new TH1F("hd0D0TGHCfromDstarSB","D^{0} impact par. plot , Tight Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2285 hd0D0TGHCfromDstSB->SetXTitle("Impact parameter [#mum]");
2286 hd0D0TGHCfromDstSB->SetYTitle("Entries");
2287
2288 TH1F *hd0D0VtxTrueTGHCfromDstSB = new TH1F("hd0D0VtxTrueTGHCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2289 hd0D0VtxTrueTGHCfromDstSB->SetXTitle("Impact parameter [#mum]");
2290 hd0D0VtxTrueTGHCfromDstSB->SetYTitle("Entries");
2291
2292 TH1F *hMCd0D0TGHCfromDstSB = new TH1F("hMCd0D0TGHCfromDstarSB","D^{0} impact par. plot, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
2293 hMCd0D0TGHCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
2294 hMCd0D0TGHCfromDstSB->SetYTitle("Entries");
2295
2296 flistTghCutsFromDstar->Add(hd0D0TGHCfromDstPM);
2297 flistTghCutsFromDstar->Add(hd0D0VtxTrueTGHCfromDstPM);
2298 flistTghCutsFromDstar->Add(hMCd0D0TGHCfromDstPM);
2299 flistTghCutsFromDstar->Add(hd0D0TGHCfromDstSB);
2300 flistTghCutsFromDstar->Add(hd0D0VtxTrueTGHCfromDstSB);
2301 flistTghCutsFromDstar->Add(hMCd0D0TGHCfromDstSB);
2302
2303 TH1F **hd0D0ptTGHCfromDstPM=new TH1F*[fnbins];
2304 TH1F **hMCd0D0ptTGHCfromDstPM=new TH1F*[fnbins];
2305 TH1F ** hd0D0VtxTrueptTGHCfromDstPM=new TH1F*[fnbins];
2306 TH1F **hd0D0ptTGHCfromDstSB=new TH1F*[fnbins];
2307 TH1F **hMCd0D0ptTGHCfromDstSB=new TH1F*[fnbins];
2308 TH1F ** hd0D0VtxTrueptTGHCfromDstSB=new TH1F*[fnbins];
2309 namehist="hd0D0ptTGHCfromDstar_";
624c07ab 2310 titlehist="D^{0} impact par. plot, Tight Cuts, FromDStar, ";
2311 for(Int_t i=0;i<fnbins;i++){
2312 strnamept=namehist;
2313 strnamept.Append("PkMss_pt");
2314 strnamept+=i;
2315
2316 strtitlept=titlehist;
2317 strtitlept.Append(" Mass Peak, ");
2318 strtitlept+=fptbins[i];
2319 strtitlept.Append("<= pt <");
2320 strtitlept+=fptbins[i+1];
2321 strtitlept.Append(" [GeV/c]");
2322
ac4c229c 2323 hd0D0ptTGHCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2324 hd0D0ptTGHCfromDstPM[i]->SetXTitle("Impact parameter [#mum] ");
2325 hd0D0ptTGHCfromDstPM[i]->SetYTitle("Entries");
2326 flistTghCutsFromDstar->Add(hd0D0ptTGHCfromDstPM[i]);
624c07ab 2327
2328 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2329 hMCd0D0ptTGHCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2330 hMCd0D0ptTGHCfromDstPM[i]->SetXTitle("MC Impact parameter [#mum] ");
2331 hMCd0D0ptTGHCfromDstPM[i]->SetYTitle("Entries");
2332 flistTghCutsFromDstar->Add(hMCd0D0ptTGHCfromDstPM[i]);
624c07ab 2333
2334
2335 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2336 hd0D0VtxTrueptTGHCfromDstPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2337 hd0D0VtxTrueptTGHCfromDstPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2338 hd0D0VtxTrueptTGHCfromDstPM[i]->SetYTitle("Entries");
2339 flistTghCutsFromDstar->Add(hd0D0VtxTrueptTGHCfromDstPM[i]);
624c07ab 2340
2341 strnamept=namehist;
2342 strnamept.Append("SBMss_pt");
2343 strnamept+=i;
2344
2345 strtitlept=titlehist;
2346 strtitlept.Append(" Side Bands, ");
2347 strtitlept+=fptbins[i];
2348 strtitlept.Append("<= pt <");
2349 strtitlept+=fptbins[i+1];
2350 strtitlept.Append(" [GeV/c]");
2351
ac4c229c 2352 hd0D0ptTGHCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2353 hd0D0ptTGHCfromDstSB[i]->SetXTitle("Impact parameter [#mum] ");
2354 hd0D0ptTGHCfromDstSB[i]->SetYTitle("Entries");
2355 flistTghCutsFromDstar->Add(hd0D0ptTGHCfromDstSB[i]);
624c07ab 2356
2357 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2358 hMCd0D0ptTGHCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2359 hMCd0D0ptTGHCfromDstSB[i]->SetXTitle("MC Impact parameter [#mum] ");
2360 hMCd0D0ptTGHCfromDstSB[i]->SetYTitle("Entries");
2361 flistTghCutsFromDstar->Add(hMCd0D0ptTGHCfromDstSB[i]);
624c07ab 2362
2363 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2364 hd0D0VtxTrueptTGHCfromDstSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2365 hd0D0VtxTrueptTGHCfromDstSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2366 hd0D0VtxTrueptTGHCfromDstSB[i]->SetYTitle("Entries");
2367 flistTghCutsFromDstar->Add(hd0D0VtxTrueptTGHCfromDstSB[i]);
624c07ab 2368 }
2369
2370
2371 //############ TIGHT CUTS OTHER HISTOGRAMS ###########
2372 //
2373 //########### global properties histos ###########
2374
ac4c229c 2375 TH2F *hCPtaVSd0d0TGHCother=new TH2F("hCPtaVSd0d0TGHCother","hCPtaVSd0d0_TightCuts_other",1000,-100000.,100000.,100,0.,1.);
2376 TH1F *hSecVtxZTGHCother=new TH1F("hSecVtxZTGHCother","hSecVtxZ_TightCuts_other",1000,-8.,8.);
2377 TH1F *hSecVtxXTGHCother=new TH1F("hSecVtxXTGHCother","hSecVtxX_TightCuts_other",1000,-3000.,3000.);
2378 TH1F *hSecVtxYTGHCother=new TH1F("hSecVtxYTGHCother","hSecVtxY_TightCuts_other",1000,-3000.,3000.);
2379 TH2F *hSecVtxXYTGHCother=new TH2F("hSecVtxXYTGHCother","hSecVtxXY_TightCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
2380 TH1F *hSecVtxPhiTGHCother=new TH1F("hSecVtxPhiTGHCother","hSecVtxPhi_TightCuts_other",180,-180.1,180.1);
2381 TH1F *hCPtaTGHCother=new TH1F("hCPtaTGHCother","hCPta_TightCuts_other",100,0.,1.);
2382 TH1F *hd0xd0TGHCother=new TH1F("hd0xd0TGHCother","hd0xd0_TightCuts_other",1000,-100000.,100000.);
2383 TH1F *hMassTrueTGHCother=new TH1F("hMassTrueTGHCother","D^{0} MC inv. Mass Tight Cuts other(All momenta)",600,1.600,2.200);
2384 TH1F *hMassTGHCother=new TH1F("hMassTGHCother","D^{0} inv. Mass Tight Cuts other (All momenta)",600,1.600,2.200);
2385 hMassTGHCother->Sumw2();
2386 TH1F *hMassTrueTGHCotherPM=new TH1F("hMassTrueTGHCotherPM","D^{0} MC inv. Mass Tight Cuts other, Mass Peak. (All momenta)",600,1.600,2.200);
2387 TH1F *hMassTGHCotherPM=new TH1F("hMassTGHCotherPM","D^{0} inv. Mass Tight Cuts other (All momenta), MassPeak",600,1.600,2.200);
2388 hMassTGHCotherPM->Sumw2();
2389 TH1F *hMassTrueTGHCotherSB=new TH1F("hMassTrueTGHCotherSB","D^{0} MC inv. Mass in Side Bands Tight Cuts other(All momenta)",600,1.600,2.200);
2390 TH1F *hMassTGHCotherSB=new TH1F("hMassTGHCotherSB","D^{0} inv. Mass in Side Bands Tight Cuts other (All momenta)",600,1.600,2.200);
2391 hMassTGHCotherSB->Sumw2();
2392
2393 flistTghCutsOther->Add(hCPtaVSd0d0TGHCother);
2394 flistTghCutsOther->Add(hSecVtxZTGHCother);
2395 flistTghCutsOther->Add(hSecVtxYTGHCother);
2396 flistTghCutsOther->Add(hSecVtxXTGHCother);
2397 flistTghCutsOther->Add(hSecVtxXYTGHCother);
2398 flistTghCutsOther->Add(hSecVtxPhiTGHCother);
2399 flistTghCutsOther->Add(hCPtaTGHCother);
2400 flistTghCutsOther->Add(hd0xd0TGHCother);
2401 flistTghCutsOther->Add(hMassTrueTGHCother);
2402 flistTghCutsOther->Add(hMassTGHCother);
2403 flistTghCutsOther->Add(hMassTrueTGHCotherPM);
2404 flistTghCutsOther->Add(hMassTGHCotherPM);
2405 flistTghCutsOther->Add(hMassTrueTGHCotherSB);
2406 flistTghCutsOther->Add(hMassTGHCotherSB);
624c07ab 2407
2408 //############# d0 D0 histos ###############à
ac4c229c 2409 TH1F *hd0D0TGHCotherPM = new TH1F("hd0D0TGHCotherPM","D^{0} impact par. plot , Tight Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2410 hd0D0TGHCotherPM->SetXTitle("Impact parameter [#mum]");
2411 hd0D0TGHCotherPM->SetYTitle("Entries");
2412
2413 TH1F *hd0D0VtxTrueTGHCotherPM = new TH1F("hd0D0VtxTrueTGHCotherPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2414 hd0D0VtxTrueTGHCotherPM->SetXTitle("Impact parameter [#mum]");
2415 hd0D0VtxTrueTGHCotherPM->SetYTitle("Entries");
2416
2417 TH1F *hMCd0D0TGHCotherPM = new TH1F("hMCd0D0TGHCotherPM","D^{0} impact par. plot, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2418 hMCd0D0TGHCotherPM->SetXTitle("MC Impact parameter [#mum]");
2419 hMCd0D0TGHCotherPM->SetYTitle("Entries");
2420
2421 TH1F *hd0D0TGHCotherSB = new TH1F("hd0D0TGHCotherSB","D^{0} impact par. plot , Tight Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2422 hd0D0TGHCotherSB->SetXTitle("Impact parameter [#mum]");
2423 hd0D0TGHCotherSB->SetYTitle("Entries");
2424
2425 TH1F *hd0D0VtxTrueTGHCotherSB = new TH1F("hd0D0VtxTrueTGHCotherSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2426 hd0D0VtxTrueTGHCotherSB->SetXTitle("Impact parameter [#mum]");
2427 hd0D0VtxTrueTGHCotherSB->SetYTitle("Entries");
2428
2429 TH1F *hMCd0D0TGHCotherSB = new TH1F("hMCd0D0TGHCotherSB","D^{0} impact par. plot, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2430 hMCd0D0TGHCotherSB->SetXTitle("MC Impact parameter [#mum]");
2431 hMCd0D0TGHCotherSB->SetYTitle("Entries");
2432
2433 flistTghCutsOther->Add(hd0D0TGHCotherPM);
2434 flistTghCutsOther->Add(hd0D0VtxTrueTGHCotherPM);
2435 flistTghCutsOther->Add(hMCd0D0TGHCotherPM);
2436 flistTghCutsOther->Add(hd0D0TGHCotherSB);
2437 flistTghCutsOther->Add(hd0D0VtxTrueTGHCotherSB);
2438 flistTghCutsOther->Add(hMCd0D0TGHCotherSB);
2439
2440 TH1F **hd0D0ptTGHCotherPM=new TH1F*[fnbins];
2441 TH1F **hMCd0D0ptTGHCotherPM=new TH1F*[fnbins];
2442 TH1F ** hd0D0VtxTrueptTGHCotherPM=new TH1F*[fnbins];
2443 TH1F **hd0D0ptTGHCotherSB=new TH1F*[fnbins];
2444 TH1F **hMCd0D0ptTGHCotherSB=new TH1F*[fnbins];
2445 TH1F ** hd0D0VtxTrueptTGHCotherSB=new TH1F*[fnbins];
2446 namehist="hd0D0ptTGHCother_";
624c07ab 2447 titlehist="D^{0} impact par. plot, Tight Cuts, Other, ";
2448 for(Int_t i=0;i<fnbins;i++){
2449 strnamept=namehist;
2450 strnamept.Append("PkMss_pt");
2451 strnamept+=i;
2452
2453 strtitlept=titlehist;
2454 strtitlept.Append(" Mass Peak, ");
2455 strtitlept+=fptbins[i];
2456 strtitlept.Append("<= pt <");
2457 strtitlept+=fptbins[i+1];
2458 strtitlept.Append(" [GeV/c]");
2459
ac4c229c 2460 hd0D0ptTGHCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2461 hd0D0ptTGHCotherPM[i]->SetXTitle("Impact parameter [#mum] ");
2462 hd0D0ptTGHCotherPM[i]->SetYTitle("Entries");
2463 flistTghCutsOther->Add(hd0D0ptTGHCotherPM[i]);
624c07ab 2464
2465 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2466 hMCd0D0ptTGHCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2467 hMCd0D0ptTGHCotherPM[i]->SetXTitle("MC Impact parameter [#mum] ");
2468 hMCd0D0ptTGHCotherPM[i]->SetYTitle("Entries");
2469 flistTghCutsOther->Add(hMCd0D0ptTGHCotherPM[i]);
624c07ab 2470
2471
2472 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2473 hd0D0VtxTrueptTGHCotherPM[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2474 hd0D0VtxTrueptTGHCotherPM[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2475 hd0D0VtxTrueptTGHCotherPM[i]->SetYTitle("Entries");
2476 flistTghCutsOther->Add(hd0D0VtxTrueptTGHCotherPM[i]);
624c07ab 2477
2478 strnamept=namehist;
2479 strnamept.Append("SBMss_pt");
2480 strnamept+=i;
2481
2482 strtitlept=titlehist;
2483 strtitlept.Append(" Side Bands, ");
2484 strtitlept+=fptbins[i];
2485 strtitlept.Append("<= pt <");
2486 strtitlept+=fptbins[i+1];
2487 strtitlept.Append(" [GeV/c]");
2488
ac4c229c 2489 hd0D0ptTGHCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2490 hd0D0ptTGHCotherSB[i]->SetXTitle("Impact parameter [#mum] ");
2491 hd0D0ptTGHCotherSB[i]->SetYTitle("Entries");
2492 flistTghCutsOther->Add(hd0D0ptTGHCotherSB[i]);
624c07ab 2493
2494 strnamept.ReplaceAll("hd0D0","hMCd0D0");
ac4c229c 2495 hMCd0D0ptTGHCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2496 hMCd0D0ptTGHCotherSB[i]->SetXTitle("MC Impact parameter [#mum] ");
2497 hMCd0D0ptTGHCotherSB[i]->SetYTitle("Entries");
2498 flistTghCutsOther->Add(hMCd0D0ptTGHCotherSB[i]);
624c07ab 2499
2500 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
ac4c229c 2501 hd0D0VtxTrueptTGHCotherSB[i] = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2502 hd0D0VtxTrueptTGHCotherSB[i]->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2503 hd0D0VtxTrueptTGHCotherSB[i]->SetYTitle("Entries");
2504 flistTghCutsOther->Add(hd0D0VtxTrueptTGHCotherSB[i]);
624c07ab 2505 }
2506
2507
2508}
2509
2510
2511
2512//________________________________________________________________________
2513void AliAnalysisTaskSECharmFraction::UserExec(Option_t */*option*/)
2514{
2515 // Execute analysis for current event:
2516 // heavy flavor candidates association to MC truth
2517
2518 AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
2519
2520
2521 // load D0->Kpi candidates
2522 TClonesArray *arrayD0toKpi =
2523 (TClonesArray*)aod->GetList()->FindObject("D0toKpi");
2524 if(!arrayD0toKpi) {
2525 Printf("AliAnalysisTaskSECharmFraction::UserExec: D0toKpi branch not found!\n");
2526 return;
2527 }
2528
2529 // AOD primary vertex
2530 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
2531
2532
2533 // load MC particles
2534 TClonesArray *arrayMC =
2535 (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
2536 if(!arrayMC) {
2537 Printf("AliAnalysisTaskSECharmFraction::UserExec: MC particles branch not found!\n");
2538 return;
2539 }
2540
2541 // load MC header
2542 AliAODMCHeader *aodmcHeader =
2543 (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
2544 if(!aodmcHeader) {
2545 Printf("AliAnalysisTaskSECharmFraction::UserExec: MC header branch not found!\n");
2546 return;
2547 }
2548
2549 // MC primary vertex
2550 Double_t vtxTrue[3];
2551 aodmcHeader->GetVertex(vtxTrue);
2552
2553 if (!aod) {
2554 Printf("ERROR: aod not available");
2555 return;
2556 }
2557 //histogram filled with 1 for every AOD
2558 fNentries->Fill(1);
2559 PostData(1,fNentries);
2560
2561
2562 //Printf("There are %d tracks in this event", aod->GetNumberOfTracks());
2563 // Int_t nTotHF=0,nTotDstar=0,nTot3Prong=0;
2564 Int_t nTotD0toKpi=0;
ac4c229c 2565 Int_t okd0tight,okd0bartight,okd0loose,okd0barloose;
624c07ab 2566 Bool_t isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,isSideBand;
ac4c229c 2567 Bool_t isinacceptance;
624c07ab 2568 Int_t signallevel=-1;
2569 Int_t ptbin;
2570 // const Int_t nptbins=10;
2571 Double_t invMassD0,invMassD0bar,ptD0,massmumtrue;
2572
2573
2574 AliAODRecoDecayHF *aodDMC=0x0;// to be used to create a fake true sec vertex
2575 // make trkIDtoEntry register (temporary)
2576 Int_t trkIDtoEntry[100000];
2577 for(Int_t it=0;it<aod->GetNumberOfTracks();it++) {
2578 AliAODTrack *track = aod->GetTrack(it);
2579 if(track->GetID()<0) {
2580 //printf("Track ID <0, id= %d\n",track->GetID());
2581 return;
2582 }
2583 trkIDtoEntry[track->GetID()]=it;
2584 }
2585
2586
2587 // loop over D0->Kpi candidates
2588 Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
2589 nTotD0toKpi += nD0toKpi;
2590 // cout<<"Number of D0->Kpi: "<<nD0toKpi<<endl;
2591
2592 for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
2593 if(aodDMC!=0x0)delete aodDMC;
2594
2595 isPeakD0=kFALSE;
2596 isPeakD0bar=kFALSE;
2597 isSideBandD0=kFALSE;
2598 isSideBandD0bar=kFALSE;
2599 isSideBand=kFALSE;
ac4c229c 2600 okd0tight=0;
2601 okd0bartight=0;
2602 okd0loose=0;
2603 okd0barloose=0;
624c07ab 2604
2605 signallevel=-1;
2606
2607
2608 AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
2609 Bool_t unsetvtx=kFALSE;
2610 if(!d->GetOwnPrimaryVtx()) {
2611 d->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
2612 unsetvtx=kTRUE;
2613 }
624c07ab 2614
624c07ab 2615
ac4c229c 2616 //####### DATA SELECTION ####################################
2617 //
2618 // ######## CHECK FOR ACCEPTANCE ##########
2619 ptD0=d->Pt();
2620 isinacceptance = (TMath::Abs(d->EtaProng(0))<fAcceptanceCuts[0]&&TMath::Abs(d->EtaProng(1))<fAcceptanceCuts[0]);
624c07ab 2621
2622 //######## INVARIANT MASS SELECTION ###############
2623 CheckInvMassD0(d,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar);
2624 if(isSideBandD0&&isSideBandD0bar)isSideBand=kTRUE;// TEMPORARY, NOT DONE IN THE METHOD CALLED ABOVE ONLY FOR FURTHER SIDE BAND STUDY
2625
2626 // INVESTIGATE SIGNAL TYPE : ACCESS TO MC INFORMATION
2627 aodDMC=GetD0toKPiSignalType(d,arrayMC,signallevel,massmumtrue,vtxTrue);
2628 fSignalType->Fill(signallevel);
ac4c229c 2629 if(!isinacceptance)signallevel=9;
624c07ab 2630 // END OF BACKGROUND TYPE SELECTION
2631
2632 // NOW APPLY CUTS
2633 //NO CUTS CASE IS FOR FREE
2634
2635 // CHECK TIGHTER CUTS
2636 ptbin=SetStandardCuts(ptD0,flargeInvMassCut);
ac4c229c 2637 d->SelectD0(fVHFtight->GetD0toKpiCuts(),okd0tight,okd0bartight);
2638 if(((isPeakD0&&okd0tight)||(isPeakD0bar&&okd0bartight))&&isinacceptance)fSignalTypeTghCuts->Fill(signallevel);
624c07ab 2639
2640 // CHECK LOOSER CUTS
2641 ptbin=SetStandardCuts(ptD0,flargeInvMassCut);
ac4c229c 2642 d->SelectD0(fVHFloose->GetD0toKpiCuts(),okd0loose,okd0barloose);
2643 if(((isPeakD0&&okd0loose)||(isPeakD0bar&&okd0barloose))&&isinacceptance)fSignalTypeLsCuts->Fill(signallevel);
624c07ab 2644
2645
2646 //################### FILL HISTOS ########################
2647 //################################################################
2648 //
2649 //######## improvement: SPEED HERE CAN BE IMPROVED: CALCULATE ONCE AND FOR ALL
2650 // CANDIDATE VARIABLES
2651
2652 //NO CUTS Case: force okD0 and okD0bar = kTRUE
ac4c229c 2653 if(signallevel==1)FillHistos(d,flistNoCutsSignal,ptbin,kTRUE,kTRUE,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2654 else if(signallevel==2)FillHistos(d,flistNoCutsFromDstar,ptbin,kTRUE,kTRUE,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2655 else if(signallevel==3||signallevel==4)FillHistos(d,flistNoCutsFromB,ptbin,kTRUE,kTRUE,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2656 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==9)FillHistos(d,flistNoCutsBack,ptbin,kTRUE,kTRUE,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2657 else if(signallevel==5||signallevel==6)FillHistos(d,flistNoCutsOther,ptbin,kTRUE,kTRUE,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
624c07ab 2658
2659 //LOOSE CUTS Case
ac4c229c 2660 if(signallevel==1)FillHistos(d,flistLsCutsSignal,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2661 else if(signallevel==2)FillHistos(d,flistLsCutsFromDstar,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2662 else if(signallevel==3||signallevel==4)FillHistos(d,flistLsCutsFromB,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2663 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==9)FillHistos(d,flistLsCutsBack,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2664 else if(signallevel==5||signallevel==6)FillHistos(d,flistLsCutsOther,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
624c07ab 2665
2666 //TIGHT CUTS Case
ac4c229c 2667 if(signallevel==1)FillHistos(d,flistTghCutsSignal,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2668 else if(signallevel==2)FillHistos(d,flistTghCutsFromDstar,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2669 else if(signallevel==3||signallevel==4)FillHistos(d,flistTghCutsFromB,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2670 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==9)FillHistos(d,flistTghCutsBack,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2671 else if(signallevel==5||signallevel==6)FillHistos(d,flistTghCutsOther,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
2672
624c07ab 2673
2674 if(aodDMC!=0x0){
2675 delete aodDMC;
2676 aodDMC=0x0;
2677 }
ac4c229c 2678
624c07ab 2679 if(unsetvtx) d->UnsetOwnPrimaryVtx();
ac4c229c 2680
624c07ab 2681 }
2682
2683 // ####################### POST OUTPUT TLIST DATA #########################
2684 // ####### histo for #AOD entries already posted
2685
2686 PostData(2,fSignalType);
2687 PostData(3,fSignalTypeLsCuts);
2688 PostData(4,fSignalTypeTghCuts);
ac4c229c 2689 PostData(5,flistNoCutsSignal);
2690 PostData(6,flistNoCutsBack);
2691 PostData(7,flistNoCutsFromB);
2692 PostData(8,flistNoCutsFromDstar);
2693 PostData(9,flistNoCutsOther);
2694 PostData(10,flistLsCutsSignal);
2695 PostData(11,flistLsCutsBack);
2696 PostData(12,flistLsCutsFromB);
2697 PostData(13,flistLsCutsFromDstar);
2698 PostData(14,flistLsCutsOther);
2699 PostData(15,flistTghCutsSignal);
2700 PostData(16,flistTghCutsBack);
2701 PostData(17,flistTghCutsFromB);
2702 PostData(18,flistTghCutsFromDstar);
2703 PostData(19,flistTghCutsOther);
624c07ab 2704
2705 return;
2706}
2707
2708//_________________________________________
2709Int_t AliAnalysisTaskSECharmFraction::SetStandardCuts(Double_t pt,Double_t invMassCut){
2710 //#############
2711 // TEMPORARY: to be change in :
2712 // for(j<nptbins)
2713 // if pt < standardptbin[j+1]
2714 // SetCuts, bin=j
2715 // break
2716 //
2717 // the way the cuts are set is for further development
2718 // (to be interfaced with AliAnalsysTaskSETuneCuts)
2719 Int_t ptbin=-1;
2720 if (pt>0. && pt<=1.) {
2721 ptbin=0;
2722 fVHFtight->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.0003,0.7);
2723 fVHFloose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.00025,0.7);
2724 }
2725
2726 if(pt>1. && pt<=3.) {
2727 ptbin=1;
2728 fVHFtight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.0003,0.9);
2729 fVHFloose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
2730 //printf("I'm in the bin %d\n",ptbin);
2731 }
2732
2733 if(pt>3. && pt<=5.){
2734 ptbin=2;
2735 fVHFtight->SetD0toKpiCuts(invMassCut,0.015,0.8,0.7,0.7,0.05,0.05,-0.0002,0.9);
2736 fVHFloose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.8);
2737 //printf("I'm in the bin %d\n",ptbin);
2738 }
2739 if(pt>5.){
2740 ptbin=3;
2741 fVHFtight->SetD0toKpiCuts(invMassCut,0.015,0.8,0.7,0.7,0.05,0.05,-0.0002,0.95);
2742 fVHFloose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
2743 }//if(pt>5)
2744 return ptbin;
2745}
2746
2747//__________________________________________________________
2748void AliAnalysisTaskSECharmFraction::CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar){
2749 //Check wheter the candidate inv. mass is compatible with signal or sideband inv. mass selection
2750
2751 d->InvMassD0(invMassD0,invMassD0bar);
2752 //CHECK if ISPEAK
2753 if(TMath::Abs(invMassD0-fmD0PDG)<fsignalInvMassCut)isPeakD0=kTRUE;
2754 if(TMath::Abs(invMassD0bar-fmD0PDG)<fsignalInvMassCut)isPeakD0bar=kTRUE;
2755 //CHECK if ISSIDEBAND: no constraint is present between signal region definition and side band definition
2756 // ######## TO BE CHANGED the distinction between sidebandD0 and sidebandD0bar is meaningless
2757 // and it is present only for side band region study (see which inv mass has the D0(D0bar)
2758 // in case the D0bar(D0) is in the sideband) #######
2759 if(TMath::Abs(invMassD0-fmD0PDG)>fsidebandInvMassCut&&TMath::Abs(invMassD0-fmD0PDG)<fsidebandInvMassCut+fsidebandInvMassWindow){
2760 isSideBandD0=kTRUE;
2761 }
2762 if(TMath::Abs(invMassD0bar-fmD0PDG)>fsidebandInvMassCut&&TMath::Abs(invMassD0bar-fmD0PDG)<fsidebandInvMassCut+fsidebandInvMassWindow){
2763 isSideBandD0bar=kTRUE;
2764 }
2765
2766}
2767
2768
2769
2770//_______________________
ac4c229c 2771AliAODRecoDecayHF* AliAnalysisTaskSECharmFraction::GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx){
624c07ab 2772 //THIS METHOD CHECK THE TYPE OF SIGNAL/BACKGROUND THE CANDIDATE IS.
2773 // IF (!AND ONLY IF) THE TWO DAUGHTERS COME FROM A COMMONE MOTHER A FAKE TRUE SECONDARY VERTEX IS CONSTRUCTED (aodDMC)
2774 //
2775 // THE FOLLOWING SCHEME IS ADOPTED: signaltype is set to
7eb5a89e 2776 // 1:signal (D0 prompt); 2: signal D0 from Dstar; 3: D0 fromB 4: D0 from Dstar fromB
2777 // then background categories: -1: one or both daughters is a fake track
624c07ab 2778 // 5: one or both daughters come from a D meson != D0
2779 // 6: both daughters come from a D0->4prongs
2780 // 7: both daughetrs are primaries
2781 // 8: generic background (can include one of the previous if desired)
ac4c229c 2782 // 9: daughters out of acceptance
624c07ab 2783 // 10: pathologic cases (not clear)
2784 // 11: end of the method without output
2785 // 12: different result than MatchToMC method
2786
2787 AliAODMCParticle *mum1=0x0;
2788 AliAODMCParticle *b1=0x0,*b2=0x0;
2789 AliAODMCParticle *grandmoth1=0x0;
2790 massMumTrue=-1;
2791
2792 Int_t pdgmum,dglabels[2],matchtoMC;
2793 Int_t pdgdaughters[2]={211,321};
2794 // get daughter AOD tracks
2795 AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
2796 AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
2797 AliAODRecoDecayHF *aodDMC=0x0;
2798 if(trk0==0x0||trk1==0x0){
2799 AliDebug(2,"Delete tracks I AM \n");
2800
2801 signaltype=-1;
2802 return aodDMC;
2803
2804 }
2805 dglabels[0]=trk0->GetLabel();
2806 dglabels[1]=trk1->GetLabel();
2807 if(dglabels[0]==-1||dglabels[1]==-1){
2808 AliDebug(2,"HERE I AM \n");
2809
2810 //fake tracks
2811
7eb5a89e 2812 signaltype=-1;
624c07ab 2813 return aodDMC;
2814
2815 }
2816 // printf("Before entering the MC checks \n");
2817
2818 b1=(AliAODMCParticle*)arrayMC->At(trk0->GetLabel());
2819 b2=(AliAODMCParticle*)arrayMC->At(trk1->GetLabel());
2820
2821 if(b1->GetMother()==-1||b2->GetMother()==-1){
2822 //Tracks with no mother ????? FAKE DECAY VERTEX
2823
2824
2825 signaltype=10;
2826 return aodDMC;
2827 }
2828
2829 mum1=(AliAODMCParticle*)arrayMC->At(b1->GetMother());
2830 // mum2=(AliAODMCParticle*)arrayMC->At(b2->GetMother());//FOR FURTHER USE
2831
2832 if(b1->GetMother()!=b2->GetMother()){
2833 //Check the label of the mother is the same
2834 // NOT SAME MOTHER
2835
2836
2837 signaltype=8;
2838 return aodDMC;
2839 }
2840 massMumTrue=mum1->GetCalcMass();
2841
2842 matchtoMC=d->MatchToMC(421,arrayMC,2,pdgdaughters);
2843 aodDMC=ConstructFakeTrueSecVtx(b1,b2,mum1,primaryVtx);
2844
2845 if(aodDMC==0x0){
2846 signaltype=10;
2847 return aodDMC;
2848 }
2849
2850 // if((mum1->GetPdgCode()!=mum2->GetPdgCode()))continue; //Check the mother is the same particle
2851 // printf("Particle codes: tr1: %d, tr2: %d, mum1: %d, mum 2: %d \n",b1->GetPdgCode(),b2->GetPdgCode(),mum1->GetPdgCode(),mum2->GetPdgCode());
2852 if(!((TMath::Abs(b1->GetPdgCode())==321&&TMath::Abs(b1->GetPdgCode())!=211)||(TMath::Abs(b1->GetPdgCode())==211&&TMath::Abs(b1->GetPdgCode()!=321)))){
2853 // Not a Kaon and a Pion
2854
2855 signaltype=8;
2856 return aodDMC;
2857 }
2858
2859 pdgmum=mum1->GetPdgCode();
2860 if(TMath::Abs(pdgmum)!=421){
2861 if(TMath::Abs(pdgmum)==411||TMath::Abs(pdgmum)==431||TMath::Abs(pdgmum)==443){
2862 // IT IS A SECONDARY VERTEX FROM CHARM BUT NOT A D0
2863
2864 signaltype=5;
2865 return aodDMC;
2866 }
2867 else {
2868 signaltype=8;
2869 return aodDMC;
2870 }
2871 }
2872
2873 if(mum1->GetDaughter(1)-mum1->GetDaughter(0)+1!=2){
2874 // from D0 but NOT A 2 PRONG DECAY
2875 signaltype=6;
2876 return aodDMC;
2877
2878 }
2879
2880 if(mum1->GetMother()==-1){
2881 // A particle coming from nothing
2882 signaltype=10;
2883 return aodDMC;
2884
2885 }
7eb5a89e 2886 Bool_t isfromDstar=kFALSE;
2887 // matchtoMC=d->MatchToMC(421,arrayMC,2,pdgdaughters);
624c07ab 2888 grandmoth1=(AliAODMCParticle*)arrayMC->At(mum1->GetMother());
7eb5a89e 2889 if(TMath::Abs(grandmoth1->GetPdgCode())==413||TMath::Abs(grandmoth1->GetPdgCode())==423)isfromDstar=kTRUE;// D0 COMING FROM A D0*
2890
624c07ab 2891 // if(fcheckMCD0){//THIS CHECK IS NEEDED TO AVOID POSSIBLE FAILURE IN THE SECOND WHILE, FOR DEBUGGING
2892 while(TMath::Abs(grandmoth1->GetPdgCode())!=4&&TMath::Abs(grandmoth1->GetPdgCode())!=5){
2893 if(grandmoth1->GetMother()==-1){
2894 //### THE FOLLOWING IN CASE OF DEBUGGING ##########à
2895 /*printf("mother=-1, pdgcode: %d \n",grandmoth1->GetPdgCode());
2896 Int_t son=grandmoth1->GetDaughter(0);
2897 sonpart=(AliAODMCParticle*)arrayMC->At(son);
2898 while(TMath::Abs(sonpart->GetPdgCode())!=421){
2899 printf("mother=-1, pdgcode: %d \n",sonpart->GetPdgCode());
2900 son++;
2901 sonpart=(AliAODMCParticle*)arrayMC->At(son);
2902 }*/
2903
2904 signaltype=10;
2905 return aodDMC;
2906 }
2907 grandmoth1=(AliAODMCParticle*)arrayMC->At(grandmoth1->GetMother());
2908 }
2909
2910 if(TMath::Abs(grandmoth1->GetPdgCode())==4){
2911 if(matchtoMC!=-1){
7eb5a89e 2912
2913 if(isfromDstar)signaltype=2;
2914 else signaltype=1;
624c07ab 2915 return aodDMC;
2916 }
2917 else {
2918 signaltype=12;
2919 return aodDMC;
7eb5a89e 2920
624c07ab 2921 }
2922 }
2923 else if(TMath::Abs(grandmoth1->GetPdgCode())==5){
2924 if(matchtoMC!=-1){
7eb5a89e 2925 if(isfromDstar)signaltype=4;
2926 else signaltype=3;
624c07ab 2927 return aodDMC;
2928
2929 }
2930 else {
2931
2932 signaltype=12;
2933 return aodDMC;
2934 }
2935 }
2936 signaltype=11;// JUST FOR SAFETY: SHOULD NEVER REACH THIS POINT
2937 return aodDMC;
2938 // return 11;
2939}
2940
2941//___________________________________
ac4c229c 2942AliAODRecoDecayHF* AliAnalysisTaskSECharmFraction::ConstructFakeTrueSecVtx(const AliAODMCParticle *b1, const AliAODMCParticle *b2, const AliAODMCParticle *mum,Double_t *primaryVtxTrue){
624c07ab 2943 // CONSTRUCT A FAKE TRUE SECONDARY VERTEX (aodDMC)
2944 //!!!NOTE THAT ONLY ONE MOTHER IS CONSIDERED: THE METHOD REQUIRES THE DAUGHTERS COME FROM THE SAME MOTHER !!
2945 if(b1==0x0||b2==0x0)return 0x0;
2946 if(mum==0x0)return 0x0;
2947 Double_t pD[3],xD[3],pXtrTrue[2],pYtrTrue[2],pZtrTrue[2],xtr1[3],xtr2[3];
2948 Int_t charge[2]={0,0};
2949 if(b1->Charge()==-1)charge[0]=1;
2950 else {
2951 if(b2->Charge()==-1){
2952 //printf("Same charges for prongs \n");
2953 return 0x0;
2954 }
2955 charge[1]=1;
2956 }
2957
2958 pXtrTrue[charge[0]]=b1->Px();
2959 pYtrTrue[charge[0]]=b1->Py();
2960 pZtrTrue[charge[0]]=b1->Pz();
2961 if(!b1->XvYvZv(xtr1)){
2962 return 0x0;
2963 }
2964
2965 pXtrTrue[charge[1]]=b2->Px();
2966 pYtrTrue[charge[1]]=b2->Py();
2967 pZtrTrue[charge[1]]=b2->Pz();
2968
2969 if(!mum->PxPyPz(pD)){
2970 //printf("!D from B:Get momentum failed \n");
2971 return 0x0;
2972 }
2973 if(!mum->XvYvZv(xD)){
2974 //printf("!D from B:Get position failed \n");
2975 return 0x0;
2976 }
2977 /* ############ THIS HAPPENS FROM TIME TO TIME: NUMERIC PROBLEM KNOWN #################
2978 if(pXtrTrue[0]+pXtrTrue[1]!=pD[0]){
2979 }*/
2980
2981
2982 if(!b2->XvYvZv(xtr2)){
2983 return 0x0;
2984 }
2985 Double_t d0dummy[2]={0.,0.};//TEMPORARY : dummy d0 for AliAODRecoDeay constructor
2986 AliAODRecoDecayHF* aodDMC=new AliAODRecoDecayHF(primaryVtxTrue,xD,2,0,pXtrTrue,pYtrTrue,pZtrTrue,d0dummy);
2987
2988 /* ######## THE FOLLOWINF FOR DEBUGGING ############
2989 Printf("testing the Fake vertex: SecVtxX: %f, Px: %f, Py: %f, Pz:%f \n ",aodDMC->GetSecVtxX(),aodDMC->Px(),aodDMC->Py(),aodDMC->Pz());
2990 Printf("pD: x=%f, y=%f,z=%f\n",pD[0],pD[1],pD[2]);
2991 Printf("Daughters :px1:%f, px2:%f \n",pXtrTrue[0],pXtrTrue[1]);
2992 Printf("Daughters :py1:%f, py2:%f \n",pYtrTrue[0],pYtrTrue[1]);
2993 Printf("Daughters :pz1:%f, pz2:%f \n",pZtrTrue[0],pZtrTrue[1]);
2994 Printf("Mother pdg: %d",mum->GetPdgCode());
2995 Printf("Impact Par Prod: %f\n",aodDMC->ImpParXY());
2996 */
2997
2998 return aodDMC;
2999}
3000
3001//________________________________________________________
ac4c229c 3002Bool_t AliAnalysisTaskSECharmFraction::FillHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Int_t okD0,Int_t okD0bar,Double_t invMassD0,Double_t invMassD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBand,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue){//FILL THE HISTOGRAMS: TAKE THE HISTOS FROM THE list NAME
3003
624c07ab 3004
3005 if((!okD0)&&(!okD0bar))return kTRUE;
3006
3007 // ######### Get Standard label for hist in tlist ###############
3008 TString namehist=list->GetName(),str;
3009 namehist.ReplaceAll("list","");
3010
3011 // ######### Global properties histos #################
ac4c229c 3012 // ####### take care: only for candidates which pass the cuts !! not for side band ########
3013 if((isPeakD0&&okD0)||(isPeakD0bar&&okD0bar)){
3014 str="hCPtaVSd0d0";
3015 str.Append(namehist.Data());
3016 ((TH1F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0(),d->CosPointingAngle());
3017
3018 str="hSecVtxZ";
3019 str.Append(namehist.Data());
3020 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxZ());
3021
3022 str="hSecVtxX";
3023 str.Append(namehist.Data());
3024 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxX()*10000.);
3025
3026 str="hSecVtxY";
3027 str.Append(namehist.Data());
3028 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxY()*10000.);
3029
3030 str="hSecVtxXY";
3031 str.Append(namehist.Data());
3032 ((TH2F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxX()*10000.,d->GetSecVtxY()*10000.);
3033
3034 str="hSecVtxPhi";
3035 str.Append(namehist.Data());
3036 ((TH1F*)list->FindObject(str.Data()))->Fill(TMath::ATan2(d->GetSecVtxY()*10000.,d->GetSecVtxX()*10000.)*TMath::RadToDeg());
3037
3038 str="hCPta";
3039 str.Append(namehist.Data());
3040 ((TH1F*)list->FindObject(str.Data()))->Fill(d->CosPointingAngle());
3041
3042 str="hd0xd0";
3043 str.Append(namehist.Data());
3044 ((TH1F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0());
3045 }
624c07ab 3046
ac4c229c 3047
3048 // ######### Invariant mass histos #################
3049 str="hMass";
624c07ab 3050 str.Append(namehist.Data());
ac4c229c 3051