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