I have remade the outliers parameterization (very similar as pass1) based on all...
[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
27de2dfb 16/* $Id$ */
17
624c07ab 18/////////////////////////////////////////////////////////////
19//
20// Class AliAnalysisTaskSECharmFraction
21// AliAnalysisTaskSE for the extraction of the fraction of prompt charm
22// using the charm hadron impact parameter to the primary vertex
23//
d39e8f99 24// Author: Andrea Rossi, andrea.rossi@pd.infn.it
624c07ab 25/////////////////////////////////////////////////////////////
26
ac4c229c 27
624c07ab 28#include <TH1F.h>
29#include <TH2F.h>
d39e8f99 30#include <THnSparse.h>
624c07ab 31#include <TDatabasePDG.h>
32#include <TMath.h>
33#include <TROOT.h>
624c07ab 34#include "AliAODEvent.h"
624c07ab 35#include "AliAODRecoDecayHF2Prong.h"
36#include "AliAODRecoDecayHF.h"
37#include "AliAODRecoDecay.h"
e047b348 38#include "AliAnalysisDataSlot.h"
39#include "AliAnalysisDataContainer.h"
624c07ab 40#include "AliAODTrack.h"
e047b348 41#include "AliAODHandler.h"
42#include "AliESDtrack.h"
624c07ab 43#include "AliAODVertex.h"
e047b348 44#include "AliESDVertex.h"
45#include "AliVertexerTracks.h"
624c07ab 46#include "AliAODMCParticle.h"
e047b348 47#include "AliAODPid.h"
48#include "AliTPCPIDResponse.h"
624c07ab 49#include "AliAODMCHeader.h"
ac4c229c 50#include "AliAnalysisVertexingHF.h"
624c07ab 51#include "AliAnalysisTaskSECharmFraction.h"
e047b348 52#include "AliRDHFCutsD0toKpi.h"
53#include "AliAODInputHandler.h"
54#include "AliAnalysisManager.h"
ac4c229c 55
56class TCanvas;
57class TTree;
58class TChain;
ac4c229c 59class AliAnalysisTaskSE;
60
61
624c07ab 62ClassImp(AliAnalysisTaskSECharmFraction)
63
64//________________________________________________________________________
65 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction()
66 : AliAnalysisTaskSE(),
e047b348 67 fCutsLoose(0),
68 fCutsTight(0),
d39e8f99 69 fFastAnalysis(1),
bf74e6db 70 fReadMC(kFALSE),
cc3209fb 71 fsplitMassD0D0bar(kTRUE),
e047b348 72 fLikeSign(kFALSE),
73 fusePID(kTRUE),
624c07ab 74 fmD0PDG(),
e047b348 75 fnbins(1),
624c07ab 76 fptbins(0),
e047b348 77 fNtrMaxforVtx(-1),
78 fptAll(),
79 fptAllSq(),
80 fptMax(),
c387e585 81 fAcceptanceCuts(),
624c07ab 82 fsignalInvMassCut(),
83 flargeInvMassCut(),
84 fsidebandInvMassCut(),
85 fsidebandInvMassWindow(),
86 fUseMC(kTRUE),
87 fNentries(0),
88 fSignalType(0),
89 fSignalTypeLsCuts(0),
90 fSignalTypeTghCuts(0),
e047b348 91 flistMCproperties(0),
ac4c229c 92 flistNoCutsSignal(0),
93 flistNoCutsBack(0),
94 flistNoCutsFromB(0),
95 flistNoCutsFromDstar(0),
96 flistNoCutsOther(0),
97 flistLsCutsSignal(0),
98 flistLsCutsBack(0),
99 flistLsCutsFromB(0),
100 flistLsCutsFromDstar(0),
101 flistLsCutsOther(0),
102 flistTghCutsSignal(0),
103 flistTghCutsBack(0),
104 flistTghCutsFromB(0),
105 flistTghCutsFromDstar(0),
106 flistTghCutsOther(0)
624c07ab 107
108{
109 //Default constructor
110}
111//________________________________________________________________________
112 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name)
113 : AliAnalysisTaskSE(name),
e047b348 114 fCutsLoose(0x0),
115 fCutsTight(0x0),
d39e8f99 116 fFastAnalysis(1),
bf74e6db 117 fReadMC(kFALSE),
cc3209fb 118 fsplitMassD0D0bar(kTRUE),
e047b348 119 fLikeSign(kFALSE),
120 fusePID(kTRUE),
624c07ab 121 fmD0PDG(),
e047b348 122 fnbins(1),
624c07ab 123 fptbins(0),
e047b348 124 fNtrMaxforVtx(-1),
125 fptAll(),
126 fptAllSq(),
127 fptMax(),
c387e585 128 fAcceptanceCuts(),
e047b348 129 fsignalInvMassCut(-1.),
130 flargeInvMassCut(-1.),
131 fsidebandInvMassCut(-1.),
132 fsidebandInvMassWindow(-1.),
133 fUseMC(kFALSE),
624c07ab 134 fNentries(0),
135 fSignalType(0),
136 fSignalTypeLsCuts(0),
137 fSignalTypeTghCuts(0),
e047b348 138 flistMCproperties(0),
ac4c229c 139 flistNoCutsSignal(0),
140 flistNoCutsBack(0),
141 flistNoCutsFromB(0),
142 flistNoCutsFromDstar(0),
143 flistNoCutsOther(0),
144 flistLsCutsSignal(0),
145 flistLsCutsBack(0),
146 flistLsCutsFromB(0),
147 flistLsCutsFromDstar(0),
148 flistLsCutsOther(0),
149 flistTghCutsSignal(0),
150 flistTghCutsBack(0),
151 flistTghCutsFromB(0),
152 flistTghCutsFromDstar(0),
153 flistTghCutsOther(0)
624c07ab 154
155{
156 // Constructor
157
158 // Define input and output slots here
159 // Input slot #0 works with a TChain
160 // Output slot #0 writes into a TH1 container
161
162 //Standard pt bin
e047b348 163 fnbins=SetStandardCuts(fptbins);// THIS TO SET NBINS AND BINNING
164
624c07ab 165 DefineOutput(1, TH1F::Class());
166 DefineOutput(2, TH1F::Class());
167 DefineOutput(3, TH1F::Class());
168 DefineOutput(4, TH1F::Class());
e047b348 169 for(Int_t j=5;j<21;j++){
624c07ab 170 DefineOutput(j, TList::Class());
171 }
172
e047b348 173 // Output slot for the Cut Objects
174 DefineOutput(21,AliRDHFCutsD0toKpi::Class()); //My private output
175 DefineOutput(22,AliRDHFCutsD0toKpi::Class()); //My private output
624c07ab 176
177}
178
179
e047b348 180AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name,AliRDHFCutsD0toKpi *cutsA,AliRDHFCutsD0toKpi *cutsB)
624c07ab 181 : AliAnalysisTaskSE(name),
e047b348 182 fCutsLoose(0),
183 fCutsTight(0),
d39e8f99 184 fFastAnalysis(1),
bf74e6db 185 fReadMC(kFALSE),
cc3209fb 186 fsplitMassD0D0bar(kTRUE),
e047b348 187 fLikeSign(kFALSE),
188 fusePID(kTRUE),
624c07ab 189 fmD0PDG(),
e047b348 190 fnbins(1),
624c07ab 191 fptbins(0),
e047b348 192 fNtrMaxforVtx(-1),
193 fptAll(),
194 fptAllSq(),
195 fptMax(),
c387e585 196 fAcceptanceCuts(),
e047b348 197 fsignalInvMassCut(-1.),
198 flargeInvMassCut(-1.),
199 fsidebandInvMassCut(-1.),
200 fsidebandInvMassWindow(-1.),
201 fUseMC(kFALSE),
624c07ab 202 fNentries(0),
203 fSignalType(0),
204 fSignalTypeLsCuts(0),
205 fSignalTypeTghCuts(0),
e047b348 206 flistMCproperties(0),
ac4c229c 207 flistNoCutsSignal(0),
208 flistNoCutsBack(0),
209 flistNoCutsFromB(0),
210 flistNoCutsFromDstar(0),
211 flistNoCutsOther(0),
212 flistLsCutsSignal(0),
213 flistLsCutsBack(0),
214 flistLsCutsFromB(0),
215 flistLsCutsFromDstar(0),
216 flistLsCutsOther(0),
217 flistTghCutsSignal(0),
218 flistTghCutsBack(0),
219 flistTghCutsFromB(0),
220 flistTghCutsFromDstar(0),
221 flistTghCutsOther(0)
624c07ab 222{
223 // Constructor
d39e8f99 224 if(fCutsTight){
225 delete fCutsTight;fCutsTight=NULL;
226 }
227 if(fCutsLoose){
228 delete fCutsLoose;fCutsLoose=NULL;
229 }
e047b348 230
231 //Check consistency between sets of cuts:
232 if(cutsA->GetNPtBins()!=cutsB->GetNPtBins()){
233 printf("Different number of pt bins between the two sets of cuts: SWITCH TO STANDARD CUTS \n");
234 fnbins=SetStandardCuts(fptbins);
235 }
236 else{
237 fCutsTight=new AliRDHFCutsD0toKpi(*cutsA);
238 fCutsLoose=new AliRDHFCutsD0toKpi(*cutsB);
239 for(Int_t j=0;j<cutsA->GetNPtBins();j++){
240 if(TMath::Abs(cutsA->GetPtBinLimits()[j]-cutsB->GetPtBinLimits()[j])>1.e-7){
241 printf("Different pt bin limits in the two set of cuts: use the first as reference \n");
242 fCutsLoose->SetPtBins(cutsA->GetNPtBins(),cutsA->GetPtBinLimits());
243 break;
244 }
245 }
246 SetPtBins(fCutsTight->GetNPtBins(),fCutsTight->GetPtBinLimits());
247 }
624c07ab 248
624c07ab 249 // Output slot #0 writes into a TH1 container
250 DefineOutput(1, TH1F::Class());
251 DefineOutput(2, TH1F::Class());
252 DefineOutput(3, TH1F::Class());
253 DefineOutput(4, TH1F::Class());
e047b348 254 for(Int_t j=5;j<21;j++){
624c07ab 255
256 DefineOutput(j, TList::Class());
257 }
e047b348 258 // Output slot for the Cut Objects
259 DefineOutput(21,AliRDHFCutsD0toKpi::Class()); //My private output
260 DefineOutput(22,AliRDHFCutsD0toKpi::Class()); //My private output
624c07ab 261
262}
263
264//________________________________________________________________________
265AliAnalysisTaskSECharmFraction::~AliAnalysisTaskSECharmFraction()
266{ //Destructor
267
d39e8f99 268 if (fCutsTight) {
e047b348 269 delete fCutsTight;
270 fCutsTight = 0;
624c07ab 271 }
d39e8f99 272 if (fCutsLoose) {
e047b348 273 delete fCutsLoose;
274 fCutsLoose = 0;
624c07ab 275 }
ac4c229c 276 if(fptbins){
277 delete fptbins;
278 fptbins =0;
279 }
c387e585 280 /* if(fAcceptanceCuts){
ac4c229c 281 delete fAcceptanceCuts;
282 fAcceptanceCuts=0;
c387e585 283 }*/
624c07ab 284 if (fNentries) {
285 delete fNentries;
286 fNentries = 0;
287 }
288 if (fSignalType) {
289 delete fSignalType;
290 fSignalType = 0;
291 }
292 if (fSignalTypeLsCuts) {
293 delete fSignalTypeLsCuts;
294 fSignalTypeLsCuts = 0;
295 }
296 if (fSignalTypeTghCuts) {
297 delete fSignalTypeTghCuts;
298 fSignalTypeTghCuts = 0;
299 }
e047b348 300 if(flistMCproperties){
d39e8f99 301 flistMCproperties->Delete();
e047b348 302 delete flistMCproperties;
303 flistMCproperties=0;
304 }
ac4c229c 305 if(flistNoCutsSignal){
d39e8f99 306 flistNoCutsSignal->Delete();
ac4c229c 307 delete flistNoCutsSignal;
308 flistNoCutsSignal=0;
624c07ab 309 }
ac4c229c 310 if(flistNoCutsBack){
d39e8f99 311 flistNoCutsBack->Delete();
ac4c229c 312 delete flistNoCutsBack;
313 flistNoCutsBack=0;
624c07ab 314 }
ac4c229c 315 if(flistNoCutsFromB){
d39e8f99 316 flistNoCutsFromB->Delete();
ac4c229c 317 delete flistNoCutsFromB;
318 flistNoCutsFromB=0;
624c07ab 319 }
ac4c229c 320 if(flistNoCutsFromDstar){
d39e8f99 321 flistNoCutsFromDstar->Delete();
ac4c229c 322 delete flistNoCutsFromDstar;
323 flistNoCutsFromDstar=0;
624c07ab 324 }
ac4c229c 325 if(flistNoCutsOther){
d39e8f99 326 flistNoCutsOther->Delete();
ac4c229c 327 delete flistNoCutsOther;
328 flistNoCutsOther=0;
624c07ab 329 }
330
ac4c229c 331 if(flistLsCutsSignal){
d39e8f99 332 flistLsCutsSignal->Delete();
ac4c229c 333 delete flistLsCutsSignal;
334 flistLsCutsSignal=0;
624c07ab 335 }
ac4c229c 336 if(flistLsCutsBack){
d39e8f99 337 flistLsCutsBack->Delete();
ac4c229c 338 delete flistLsCutsBack;
339 flistLsCutsBack=0;
624c07ab 340 }
ac4c229c 341 if(flistLsCutsFromB){
d39e8f99 342 flistLsCutsFromB->Delete();
ac4c229c 343 delete flistLsCutsFromB;
344 flistLsCutsFromB=0;
624c07ab 345 }
ac4c229c 346 if(flistLsCutsFromDstar){
d39e8f99 347 flistLsCutsFromDstar->Delete();
ac4c229c 348 delete flistLsCutsFromDstar;
349 flistLsCutsFromDstar=0;
624c07ab 350 }
ac4c229c 351 if(flistLsCutsOther){
d39e8f99 352 flistLsCutsOther->Delete();
ac4c229c 353 delete flistLsCutsOther;
354 flistLsCutsOther=0;
624c07ab 355 }
356
ac4c229c 357 if(flistTghCutsSignal){
d39e8f99 358 flistTghCutsSignal->Delete();
ac4c229c 359 delete flistTghCutsSignal;
360 flistTghCutsSignal=0;
624c07ab 361 }
ac4c229c 362 if(flistTghCutsBack){
d39e8f99 363 flistTghCutsBack->Delete();
ac4c229c 364 delete flistTghCutsBack;
365 flistTghCutsBack=0;
624c07ab 366 }
ac4c229c 367 if(flistTghCutsFromB){
d39e8f99 368 flistTghCutsFromB->Delete();
ac4c229c 369 delete flistTghCutsFromB;
370 flistTghCutsFromB=0;
624c07ab 371 }
ac4c229c 372 if(flistTghCutsFromDstar){
d39e8f99 373 flistTghCutsFromDstar->Delete();
ac4c229c 374 delete flistTghCutsFromDstar;
375 flistTghCutsFromDstar=0;
624c07ab 376 }
ac4c229c 377 if(flistTghCutsOther){
d39e8f99 378 flistTghCutsOther->Delete();
ac4c229c 379 delete flistTghCutsOther;
380 flistTghCutsOther=0;
624c07ab 381 }
382
383
384}
385
386
387//________________________________________________________________________
388void AliAnalysisTaskSECharmFraction::Init()
389{
390 // Initialization
391
392 if(fDebug > 1) printf("AnalysisTaskSED0Mass::Init() \n");
393 fmD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
394
e047b348 395 // gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C");
396 // gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/D0fromBSetCuts.C");
397 // 2 sets of dedicated cuts: fCutsTight is assumed as the standard cut object
624c07ab 398
e047b348 399 // SetAcceptanceCut();
400 if(fNtrMaxforVtx<0)SetNMaxTrForVtx(3); //DEFAULT : NO SELECTION
401 if(fsignalInvMassCut<0.||flargeInvMassCut<0.||fsidebandInvMassCut<0.||fsidebandInvMassWindow<0.){
402 printf("AliAnalysisTaskSECharmFraction: Not All info for mass selection provided: switch to default values \n");
403 SetStandardMassSelection();
624c07ab 404 }
e047b348 405
406 AliRDHFCutsD0toKpi* copyfCutsTight=new AliRDHFCutsD0toKpi(*fCutsTight);
407 const char* nameoutputTight=GetOutputSlot(21)->GetContainer()->GetName();
408 copyfCutsTight->SetName(nameoutputTight);
409 AliRDHFCutsD0toKpi* copyfCutsLoose=new AliRDHFCutsD0toKpi(*fCutsLoose);
410 const char* nameoutputLoose=GetOutputSlot(22)->GetContainer()->GetName();
411 copyfCutsLoose->SetName(nameoutputLoose);
412 // Post the data
413 PostData(21,copyfCutsTight);
414 PostData(22,copyfCutsLoose);
415
624c07ab 416 return;
417}
418
419//________________________________________________________________________
420void AliAnalysisTaskSECharmFraction::UserCreateOutputObjects()
421{
422 // Create histograms
423 // Called once
c387e585 424
425 // ################ NAMING SCHEME ###################################
426 // LISTS NAMING SCHEME
427 // "list" + cut selection string + MC selection string
428 // cut strings: "NC" =nocuts, "LSC"= loose cuts, "TGHC"= tight cuts
429 // MC sel. strings: "sign"= D0 from c quark
430 // "fromDstar" = D0 from Dstar from c quark
431 // "fromB"= D0from B decay (->from b quark) + D0from Dstar from B
432 // "back"= backgroun, generic except the cas "other"
433 // "other"= background case for candidates made of a pion and a kaon coming from the same D0 (in 4 prong) or from D+
434 //
435 // HISTS NAMING SCHEME
436 //
437 // "h" + specific name + cut selection string + MC selection string + (InvMass region string) + (pt string)
438 //
439 // cut selection strings = those for lists
440 // MC selection strings = those for lists
441 // inv mass region strings : "PM" or "SB" for global properties and pt integrated histos
442 // "_PkMss" or "_SBMss" for impact par. pt dependent histos
443 // pt string : "_pt" + integer number of ptbin
444 //
445 //###################################################################
624c07ab 446
447 TString namehist;
448 TString titlehist;
449 TString strnamept,strtitlept;
e047b348 450 Printf("INSIDE USER CREATE \n");
d39e8f99 451
452 // fNentries=new TH1F("nentriesChFr", "Look at the number of entries! = number of AODs", 2,1.,2.);
453 fNentries=new TH1F("nentriesChFr", "Analyzed sample properties", 15,-0.5,14.5);
454
455 fNentries->GetXaxis()->SetBinLabel(1,"nEventsAnal");
456 fNentries->GetXaxis()->SetBinLabel(2,"nCandSel(Cuts)");
457 fNentries->GetXaxis()->SetBinLabel(3,"nD0Selected");
458 fNentries->GetXaxis()->SetBinLabel(4,"nEventsGoodVtxS");
459 fNentries->GetXaxis()->SetBinLabel(5,"ptbin = -1");
460 fNentries->GetXaxis()->SetBinLabel(6,"no daughter");
461 fNentries->GetXaxis()->SetBinLabel(7,"nCandSel(Tr)");
462 fNentries->GetXaxis()->SetBinLabel(8,"PID=0");
463 fNentries->GetXaxis()->SetBinLabel(9,"PID=1");
464 fNentries->GetXaxis()->SetBinLabel(10,"PID=2");
465 fNentries->GetXaxis()->SetBinLabel(11,"PID=3");
466 fNentries->GetXaxis()->SetBinLabel(12,"K");
467 fNentries->GetXaxis()->SetBinLabel(13,"Lambda");
468 fNentries->GetXaxis()->SetBinLabel(14,"Pile-up Rej");
469 fNentries->GetXaxis()->SetBinLabel(15,"N. of 0SMH");
470 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
471
e047b348 472 fSignalType=new TH1F("hsignaltype", "Histo for type of MC signal", 61,-1.,60.);
473 fSignalTypeLsCuts=new TH1F("hsignaltypeLsCuts", "Histo for type of MC signal with loose cuts", 61,-1.,60.);
474 fSignalTypeTghCuts=new TH1F("hsignaltypeTghCuts", "Histo for type of MC signal with tight cuts", 61,-1.,60.);
624c07ab 475
476 //########## DEFINE THE TLISTS ##################
e047b348 477 flistMCproperties=new TList();
478 flistMCproperties->SetOwner();
479 flistMCproperties->SetName("listMCproperties");
480
ac4c229c 481 flistNoCutsSignal = new TList();
482 flistNoCutsSignal->SetOwner();
483 flistNoCutsSignal->SetName("listNCsign");
624c07ab 484
ac4c229c 485 flistNoCutsBack = new TList();
486 flistNoCutsBack->SetOwner();
487 flistNoCutsBack->SetName("listNCback");
624c07ab 488
ac4c229c 489 flistNoCutsFromB = new TList();
490 flistNoCutsFromB->SetOwner();
491 flistNoCutsFromB->SetName("listNCfromB");
624c07ab 492
ac4c229c 493 flistNoCutsFromDstar = new TList();
494 flistNoCutsFromDstar->SetOwner();
495 flistNoCutsFromDstar->SetName("listNCfromDstar");
624c07ab 496
ac4c229c 497 flistNoCutsOther = new TList();
498 flistNoCutsOther->SetOwner();
499 flistNoCutsOther->SetName("listNCother");
624c07ab 500
501
ac4c229c 502 flistLsCutsSignal = new TList();
503 flistLsCutsSignal->SetOwner();
504 flistLsCutsSignal->SetName("listLSCsign");
624c07ab 505
ac4c229c 506 flistLsCutsBack = new TList();
507 flistLsCutsBack->SetOwner();
508 flistLsCutsBack->SetName("listLSCback");
624c07ab 509
ac4c229c 510 flistLsCutsFromB = new TList();
511 flistLsCutsFromB->SetOwner();
512 flistLsCutsFromB->SetName("listLSCfromB");
624c07ab 513
ac4c229c 514 flistLsCutsFromDstar = new TList();
515 flistLsCutsFromDstar->SetOwner();
516 flistLsCutsFromDstar->SetName("listLSCfromDstar");
624c07ab 517
ac4c229c 518 flistLsCutsOther = new TList();
519 flistLsCutsOther->SetOwner();
520 flistLsCutsOther->SetName("listLSCother");
624c07ab 521
522
ac4c229c 523 flistTghCutsSignal = new TList();
524 flistTghCutsSignal->SetOwner();
525 flistTghCutsSignal->SetName("listTGHCsign");
624c07ab 526
ac4c229c 527 flistTghCutsBack = new TList();
528 flistTghCutsBack->SetOwner();
529 flistTghCutsBack->SetName("listTGHCback");
624c07ab 530
ac4c229c 531 flistTghCutsFromB = new TList();
532 flistTghCutsFromB->SetOwner();
533 flistTghCutsFromB->SetName("listTGHCfromB");
624c07ab 534
ac4c229c 535 flistTghCutsFromDstar = new TList();
536 flistTghCutsFromDstar->SetOwner();
537 flistTghCutsFromDstar->SetName("listTGHCfromDstar");
624c07ab 538
ac4c229c 539 flistTghCutsOther = new TList();
540 flistTghCutsOther->SetOwner();
541 flistTghCutsOther->SetName("listTGHCother");
624c07ab 542
543
544
e047b348 545 Float_t ptbinsD0arr[35]={0.,0.1,0.2,0.3,0.4,0.5,0.6,0.8,1.,1.25,1.5,1.75,2.,2.3,2.6,3.,3.5,4.,4.5,5.,5.5,6.,7.,8.,9.,10.,12.,14.,16.,20.,25.,30.,40.,50.,100.};
546 Float_t dumbinning[201];
547 for(Int_t j=0;j<201;j++){
548 dumbinning[j]=(Float_t)j*0.5;
549 }
d39e8f99 550
551 // DEFINE EDGES FOR SPARSE HISTOS
552 const Int_t nPtbinsForSparse=91;//nuber of edges, -1 to get number of bins
553 Double_t ptbinsForNsparse[nPtbinsForSparse];//Binning in pt: step: 0.2 GeV/c up to 8 GeV/c, 0.5 Upto 20, 1 GeV/c up to 40, 5 upt to 70-> 8/0.2+12/0.5+20/1.+30./5
554 Double_t pT=0;
555 Double_t massbins[186],impparbins[401];
556 Double_t massHypoBins[4]={1.,2.,3.,4.};
557 Int_t nbinsSparse[5]={185,185,nPtbinsForSparse-1,400,3};
558 for(Int_t nBins=0;nBins<nPtbinsForSparse;nBins++){
559 ptbinsForNsparse[nBins]=pT;
560 if(pT<8.)pT+=0.2;
561 else if(pT<20)pT+=0.5;
562 else if(pT<40)pT+=1;
563 else if(pT<70)pT+=5.;
564 }
565 for(Int_t nBins=0;nBins<186;nBins++){
566 massbins[nBins]=1.680+nBins*(2.050-1.680)/185.;
567 }
568 for(Int_t nBins=0;nBins<401;nBins++){
569 impparbins[nBins]=-1000+nBins*(2000.)/400.;
570 }
571
572
573
e047b348 574 //################################################################################################
575 // #
576 // HISTO FOR MC PROPERTIES OF D0, c quarks and B mesons #
577 // #
578 //################################################################################################
579 TH1F *hMCcquarkAllPt=new TH1F("hMCcquarkAllPt","c quark Pt (all cquarks produced)",34,ptbinsD0arr);
580 TH1F *hMCcquarkAllEta=new TH1F("hMCcquarkAllEta","c quark Eta (all cquarks produced)",50,-3.,3.);
581 TH1F *hMCcquarkAllEnergy=new TH1F("hMCcquarkAllEnergy","c quark Pt (all cquarks produced)",200,0.,100.);
582 TH1F *hMCcquarkNdaught=new TH1F("hMCcquarkNdaught","N cquark daughters (all cquarks produced)",100,0.,100.);
583 TH1F *hMCD0fromcPt=new TH1F("hMCD0fromcPt","D0 from c Pt",34,ptbinsD0arr);
584 TH1F *hMCD0fromcEta=new TH1F("hMCD0fromcEta","D0 from c Eta",50,-3.,3.);
585 TH1F *hMCD0fromcEnergy=new TH1F("hMCD0fromcEnergy","D0 from c Energy",200,0.,100.);
586
587 TH2F *hMCD0VscquarkPt=new TH2F("hMCD0VscquarkPt","D0 pt Vs cquark pt",34,ptbinsD0arr,34,ptbinsD0arr);
588 TH2F *hMCD0VscquarkEnergy=new TH2F("hMCD0VscquarkEnergy","D0 Energy Vs cquark Energy",200,0.,50.,200,0.,50.);
589 TH1F *hMCD0deltacquarkEnergy=new TH1F("hMCD0deltacquarkEnergy","Fractional D0 Energy w.r.t. cquark Energy",20,0.,1.);
590 TH1F *hMCD0EnergyVsAvcquarkDaughtEn=new TH1F("hMCD0EnergyVsAvcquarkDaughtEn","#Delta(E^{D^0}-E_{avg})/E_{cquark}",40,-1.,1.);
591 TH1F *hMCD0cquarkAngle=new TH1F("hMCD0cquarkAngle","cosine of the angle between D0 and c quark particle",40,-1.,1.);
592 TH2F *hMCD0cquarkAngleEnergy=new TH2F("hMCD0cquarkAngleEnergy","cosine of the angle between D0 and c quark particle as a function of Energy",25,0.,50.,40,-1.,1.);
593
594 TH1I *hMCfromBpdgB=new TH1I("hMCfromBpdgB","hMCfromBpdgB",10000,0.,10000);
595 TH1F *hMCBhadrPt=new TH1F("hMCBhadrPt","B hadr Pt",34,ptbinsD0arr);
596 TH1F *hMCBhadrEta=new TH1F("hMCBhadrEta","B hadr Eta",50,-3.,3.);
597 TH1F *hMCBhadrEnergy=new TH1F("hMCBhadrEnergy","B hadr Pt",200,0.,100.);
598 TH1F *hMCBhadrNdaught=new TH1F("hMCBhadrNdaught","N Bhadr daughters",100,0.,100.);
599 TH1F *hMCD0fromBPt=new TH1F("hMCD0fromBPt","D0 from B Pt",34,ptbinsD0arr);
600 TH1F *hMCD0fromBEta=new TH1F("hMCD0fromBEta","D0 from B Eta",50,-3.,3.);
601 TH1F *hMCD0fromBEnergy=new TH1F("hMCD0fromBEnergy","D0 from B Energy",200,0.,100.);
602
603 TH2F *hMCD0VsBhadrPt=new TH2F("hMCD0VsBhadrPt","D0 pt Vs Bhadr pt",34,ptbinsD0arr,34,ptbinsD0arr);
604 TH2F *hMCD0VsBhadrEnergy=new TH2F("hMCD0VsBhadrEnergy","D0 Energy Vs Bhadr Energy",200,0.,50.,200,0.,50.);
605 TH1F *hMCD0deltaBhadrEnergy=new TH1F("hMCD0deltaBhadrEnergy","Fractional D0 Energy w.r.t. Bhadr Energy",20,0.,1.);
606 TH1F *hMCD0EnergyVsAvBDaughtEn=new TH1F("hMCD0EnergyVsAvBDaughtEn","#Delta(E^{D^0}-E_{avg})/E_{Bahdr}",40,-1.,1.);
607 TH1F *hMCD0BhadrAngle=new TH1F("hMCD0BhadrAngle","cosine of the angle between D0 and Bhadr particle",40,-1.,1.);
608 TH2F *hMCD0BhadrAngleEnergy=new TH2F("hMCD0BhadrAngleEnergy","cosine of the angle between D0 and Bhadr particle as a function of Energy",25,0.,50.,40,-1.,1.);
609
610 TH1I *hMCPartFound=new TH1I("hMCPartFound","1=c,2=D0,3=fromBall,4=fromBmeson,5=fromBbaryon",6,0,6);
611
612
613 flistMCproperties->Add(hMCcquarkAllPt);
614 flistMCproperties->Add(hMCcquarkAllEta);
615 flistMCproperties->Add(hMCcquarkAllEnergy);
616 flistMCproperties->Add(hMCcquarkNdaught);
617 flistMCproperties->Add(hMCD0fromcPt);
618 flistMCproperties->Add(hMCD0fromcEta);
619 flistMCproperties->Add(hMCD0fromcEnergy);
620 flistMCproperties->Add(hMCD0VscquarkPt);
621 flistMCproperties->Add(hMCD0VscquarkEnergy);
622 flistMCproperties->Add(hMCD0deltacquarkEnergy);
623 flistMCproperties->Add(hMCD0EnergyVsAvcquarkDaughtEn);
624 flistMCproperties->Add(hMCD0cquarkAngle);
625 flistMCproperties->Add(hMCD0cquarkAngleEnergy);
626
627 flistMCproperties->Add(hMCfromBpdgB);
628 flistMCproperties->Add(hMCBhadrPt);
629 flistMCproperties->Add(hMCBhadrEta);
630 flistMCproperties->Add(hMCBhadrEnergy);
631 flistMCproperties->Add(hMCBhadrNdaught);
632 flistMCproperties->Add(hMCD0fromBPt);
633 flistMCproperties->Add(hMCD0fromBEta);
634 flistMCproperties->Add(hMCD0fromBEnergy);
635 flistMCproperties->Add(hMCD0VsBhadrPt);
636 flistMCproperties->Add(hMCD0VsBhadrEnergy);
637 flistMCproperties->Add(hMCD0deltaBhadrEnergy);
638 flistMCproperties->Add(hMCD0EnergyVsAvBDaughtEn);
639 flistMCproperties->Add(hMCD0BhadrAngle);
640 flistMCproperties->Add(hMCD0BhadrAngleEnergy);
641 flistMCproperties->Add(hMCPartFound);
624c07ab 642
643 //################################################################################################
644 // #
645 // HISTOS FOR NO CUTS CASE #
646 // #
647 //################################################################################################
e047b348 648 Printf("AFTER MC HISTOS \n");
624c07ab 649
650 //############ NO CUTS SIGNAL HISTOGRAMS ###############
651 //
652 // ####### global properties histo ############
653
e047b348 654 TH2F *hCPtaVSd0d0NCsign=new TH2F("hCPtaVSd0d0NCsign","hCPtaVSd0d0_NoCuts_Signal",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 655 TH1F *hSecVtxZNCsign=new TH1F("hSecVtxZNCsign","hSecVtxZ_NoCuts_Signal",1000,-8.,8.);
656 TH1F *hSecVtxXNCsign=new TH1F("hSecVtxXNCsign","hSecVtxX_NoCuts_Signal",1000,-3000.,3000.);
657 TH1F *hSecVtxYNCsign=new TH1F("hSecVtxYNCsign","hSecVtxY_NoCuts_Signal",1000,-3000.,3000.);
658 TH2F *hSecVtxXYNCsign=new TH2F("hSecVtxXYNCsign","hSecVtxXY_NoCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
659 TH1F *hSecVtxPhiNCsign=new TH1F("hSecVtxPhiNCsign","hSecVtxPhi_NoCuts_Signal",180,-180.1,180.1);
e047b348 660 TH1F *hd0singlTrackNCsign=new TH1F("hd0singlTrackNCsign","hd0singlTrackNoCuts_Signal",1000,-5000.,5000.);
661 TH1F *hCPtaNCsign=new TH1F("hCPtaNCsign","hCPta_NoCuts_Signal",100,-1.,1.);
ac4c229c 662 TH1F *hd0xd0NCsign=new TH1F("hd0xd0NCsign","hd0xd0_NoCuts_Signal",1000,-100000.,100000.);
663 TH1F *hMassTrueNCsign=new TH1F("hMassTrueNCsign","D^{0} MC inv. Mass No Cuts Signal(All momenta)",600,1.600,2.200);
664 TH1F *hMassNCsign=new TH1F("hMassNCsign","D^{0} inv. Mass No Cuts Signal (All momenta)",600,1.600,2.200);
665 hMassNCsign->Sumw2();
666 TH1F *hMassTrueNCsignPM=new TH1F("hMassTrueNCsignPM","D^{0} MC inv. Mass No Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
667 TH1F *hMassNCsignPM=new TH1F("hMassNCsignPM","D^{0} inv. Mass No Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
668 hMassNCsignPM->Sumw2();
669
670 TH1F *hMassTrueNCsignSB=new TH1F("hMassTrueNCsignSB","D^{0} MC inv. Mass in Side Bands No Cuts Signal(All momenta)",600,1.600,2.200);
671 TH1F *hMassNCsignSB=new TH1F("hMassNCsignSB","D^{0} inv. Mass in Side Bands No Cuts Signal (All momenta)",600,1.600,2.200);
672 hMassNCsignSB->Sumw2();
673
674 flistNoCutsSignal->Add(hCPtaVSd0d0NCsign);
675 flistNoCutsSignal->Add(hSecVtxZNCsign);
676 flistNoCutsSignal->Add(hSecVtxYNCsign);
677 flistNoCutsSignal->Add(hSecVtxXNCsign);
678 flistNoCutsSignal->Add(hSecVtxXYNCsign);
679 flistNoCutsSignal->Add(hSecVtxPhiNCsign);
e047b348 680 flistNoCutsSignal->Add(hd0singlTrackNCsign);
ac4c229c 681 flistNoCutsSignal->Add(hCPtaNCsign);
682 flistNoCutsSignal->Add(hd0xd0NCsign);
683 flistNoCutsSignal->Add(hMassTrueNCsign);
684 flistNoCutsSignal->Add(hMassNCsign);
685 flistNoCutsSignal->Add(hMassTrueNCsignPM);
686 flistNoCutsSignal->Add(hMassNCsignPM);
687 flistNoCutsSignal->Add(hMassTrueNCsignSB);
688 flistNoCutsSignal->Add(hMassNCsignSB);
e047b348 689
690 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
691 TH1F *hdcaNCsign=new TH1F("hdcaNCsign","hdca_NoCuts_Signal",100,0.,1000.);
692 hdcaNCsign->SetXTitle("dca [#mum]");
693 hdcaNCsign->SetYTitle("Entries");
694 TH1F *hcosthetastarNCsign=new TH1F("hcosthetastarNCsign","hCosThetaStar_NoCuts_Signal",50,-1.,1.);
695 hcosthetastarNCsign->SetXTitle("cos #theta^{*}");
696 hcosthetastarNCsign->SetYTitle("Entries");
697 TH1F *hptD0NCsign=new TH1F("hptD0NCsign","D^{0} transverse momentum distribution",34,ptbinsD0arr);
698 hptD0NCsign->SetXTitle("p_{t} [GeV/c]");
699 hptD0NCsign->SetYTitle("Entries");
700 TH1F *hptD0VsMaxPtNCsign=new TH1F("hptD0VsMaxPtNCsign","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
701 TH2F *hptD0PTallsqrtNCsign=new TH2F("hptD0PTallsqrtNCsign","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
702 TH2F *hptD0PTallNCsign=new TH2F("hptD0PTallNCsign","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
703 TH2F *hptD0vsptBNCsign=new TH2F("hptD0vsptBNCsign","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
704 TH2F *hpD0vspBNCsign=new TH2F("hpD0vspBNCsign","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
705 TH2F *hptD0vsptcquarkNCsign=new TH2F("hptD0vsptcquarkNCsign","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
706 TH2F *hpD0vspcquarkNCsign=new TH2F("hpD0vspcquarkNCsign","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
707 flistNoCutsSignal->Add(hdcaNCsign);
708 flistNoCutsSignal->Add(hcosthetastarNCsign);
709 flistNoCutsSignal->Add(hptD0NCsign);
710 flistNoCutsSignal->Add(hptD0VsMaxPtNCsign);
711 flistNoCutsSignal->Add(hptD0PTallsqrtNCsign);
712 flistNoCutsSignal->Add(hptD0PTallNCsign);
713 flistNoCutsSignal->Add(hptD0vsptBNCsign);
714 flistNoCutsSignal->Add(hpD0vspBNCsign);
715 flistNoCutsSignal->Add(hptD0vsptcquarkNCsign);
716 flistNoCutsSignal->Add(hpD0vspcquarkNCsign);
717
718 TH1F *hd0zD0ptNCsign;
cc3209fb 719 TH1F *hInvMassD0NCsign,*hInvMassD0barNCsign;
e047b348 720 TH2F *hInvMassPtNCsign=new TH2F("hInvMassPtNCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
721 flistNoCutsSignal->Add(hInvMassPtNCsign);
d39e8f99 722 THnSparseF *hSparseNCsign=new THnSparseF("hSparseNCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
723 hSparseNCsign->SetBinEdges(0,massbins);
724 hSparseNCsign->SetBinEdges(1,massbins);
725 hSparseNCsign->SetBinEdges(2,ptbinsForNsparse);
726 hSparseNCsign->SetBinEdges(3,impparbins);
727 hSparseNCsign->SetBinEdges(4,massHypoBins);
728 flistNoCutsSignal->Add(hSparseNCsign);
729
730
e047b348 731 TH1F *hetaNCsign;
732 TH1F *hCosPDPBNCsign;
733 TH1F *hCosPcPDNCsign;
734 // ADDITIONAL HISTOS
735 TH2F *hd0D0VSd0xd0NCsignpt;
736 TH2F *hangletracksVSd0xd0NCsignpt;
737 TH2F *hangletracksVSd0D0NCsignpt;
738 TH1F *hd0xd0NCsignpt;
739
740 TH2F *hTOFpidNCsign=new TH2F("hTOFpidNCsign","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
741 flistNoCutsSignal->Add(hTOFpidNCsign);
742
743 //##################
744 for(Int_t i=0;i<fnbins;i++){
745 //Printf("INSIDE HISTOS CREATION LOOP: %d \n",fnbins);
746
747 namehist="hd0zD0ptNCsign_pt";
748 namehist+=i;
749 titlehist="d0(z) No Cuts Signalm ptbin=";
750 titlehist+=i;
751 hd0zD0ptNCsign=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
752 hd0zD0ptNCsign->SetXTitle("d_{0}(z) [#mum]");
753 hd0zD0ptNCsign->SetYTitle("Entries");
754 flistNoCutsSignal->Add(hd0zD0ptNCsign);
755
cc3209fb 756 namehist="hInvMassD0NCsign_pt";
e047b348 757 namehist+=i;
cc3209fb 758 titlehist="Invariant Mass D0 No Cuts Signal ptbin=";
e047b348 759 titlehist+=i;
cc3209fb 760 hInvMassD0NCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
761 hInvMassD0NCsign->SetXTitle("Invariant Mass [GeV]");
762 hInvMassD0NCsign->SetYTitle("Entries");
763 flistNoCutsSignal->Add(hInvMassD0NCsign);
764
765
766 namehist="hInvMassD0barNCsign_pt";
767 namehist+=i;
768 titlehist="Invariant Mass D0bar No Cuts Signal ptbin=";
769 titlehist+=i;
770 hInvMassD0barNCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
771 hInvMassD0barNCsign->SetXTitle("Invariant Mass [GeV]");
772 hInvMassD0barNCsign->SetYTitle("Entries");
773 flistNoCutsSignal->Add(hInvMassD0barNCsign);
774
e047b348 775
776 namehist="hetaNCsign_pt";
777 namehist+=i;
778 titlehist="eta No Cuts Signal ptbin=";
779 titlehist+=i;
780 hetaNCsign=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
781 hetaNCsign->SetXTitle("Pseudorapidity");
782 hetaNCsign->SetYTitle("Entries");
783 flistNoCutsSignal->Add(hetaNCsign);
784
785 namehist="hCosPDPBNCsign_pt";
786 namehist+=i;
787 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
788 titlehist+=i;
789 hCosPDPBNCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
790 hCosPDPBNCsign->SetXTitle("Cosine between D0 momentum and B momentum");
791 hCosPDPBNCsign->SetYTitle("Entries");
792 flistNoCutsSignal->Add(hCosPDPBNCsign);
793
794 namehist="hCosPcPDNCsign_pt";
795 namehist+=i;
796 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
797 titlehist+=i;
798 hCosPcPDNCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
799 hCosPcPDNCsign->SetXTitle("Cosine between c quark momentum and D0 momentum");
800 hCosPcPDNCsign->SetYTitle("Entries");
801 flistNoCutsSignal->Add(hCosPcPDNCsign);
802
803
804 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
805 namehist="hd0xd0NCsign_pt";
806 namehist+=i;
807 titlehist="d0xd0 No Cuts Signal ptbin=";
808 titlehist+=i;
809 hd0xd0NCsignpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
810 hd0xd0NCsignpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
811 hd0xd0NCsignpt->SetYTitle("Entries");
812 flistNoCutsSignal->Add(hd0xd0NCsignpt);
813
814
815 namehist="hd0D0VSd0xd0NCsign_pt";
816 namehist+=i;
817 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Signal ptbin=";
818 titlehist+=i;
819 hd0D0VSd0xd0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
820 hd0D0VSd0xd0NCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
821 hd0D0VSd0xd0NCsignpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
822 flistNoCutsSignal->Add(hd0D0VSd0xd0NCsignpt);
823
824
825 namehist="hangletracksVSd0xd0NCsign_pt";
826 namehist+=i;
827 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Signal ptbin=";
828 titlehist+=i;
829 hangletracksVSd0xd0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
830 hangletracksVSd0xd0NCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
831 hangletracksVSd0xd0NCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
832 flistNoCutsSignal->Add(hangletracksVSd0xd0NCsignpt);
833
834
835 namehist="hangletracksVSd0D0NCsign_pt";
836 namehist+=i;
837 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Signal ptbin=";
838 titlehist+=i;
839 hangletracksVSd0D0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
840 hangletracksVSd0D0NCsignpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
841 hangletracksVSd0D0NCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
842 flistNoCutsSignal->Add(hangletracksVSd0D0NCsignpt);
843
844 }
845 Printf("AFTER LOOP HISTOS CREATION \n");
846 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
847 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
624c07ab 848
849 // ####### d0 D0 histos ############
ac4c229c 850 TH1F *hd0D0NCsignPM = new TH1F("hd0D0NCsignPM","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
851 hd0D0NCsignPM->SetXTitle("Impact parameter [#mum]");
852 hd0D0NCsignPM->SetYTitle("Entries");
853
854 TH1F *hd0D0VtxTrueNCsignPM = new TH1F("hd0D0VtxTrueNCsignPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
855 hd0D0VtxTrueNCsignPM->SetXTitle("Impact parameter [#mum]");
856 hd0D0VtxTrueNCsignPM->SetYTitle("Entries");
857
858 TH1F *hMCd0D0NCsignPM = new TH1F("hMCd0D0NCsignPM","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
859 hMCd0D0NCsignPM->SetXTitle("MC Impact parameter [#mum]");
860 hMCd0D0NCsignPM->SetYTitle("Entries");
861
862 TH1F *hd0D0NCsignSB = new TH1F("hd0D0NCsignSB","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
863 hd0D0NCsignSB->SetXTitle("Impact parameter [#mum]");
864 hd0D0NCsignSB->SetYTitle("Entries");
865
866 TH1F *hd0D0VtxTrueNCsignSB = new TH1F("hd0D0VtxTrueNCsignSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
867 hd0D0VtxTrueNCsignSB->SetXTitle("Impact parameter [#mum]");
868 hd0D0VtxTrueNCsignSB->SetYTitle("Entries");
869
870 TH1F *hMCd0D0NCsignSB = new TH1F("hMCd0D0NCsignSB","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
871 hMCd0D0NCsignSB->SetXTitle("MC Impact parameter [#mum]");
872 hMCd0D0NCsignSB->SetYTitle("Entries");
873
874 flistNoCutsSignal->Add(hd0D0NCsignPM);
875 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignPM);
876 flistNoCutsSignal->Add(hMCd0D0NCsignPM);
877 flistNoCutsSignal->Add(hd0D0NCsignSB);
878 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignSB);
879 flistNoCutsSignal->Add(hMCd0D0NCsignSB);
880
e047b348 881 TH1F *hd0D0ptNCsignPM;
882 TH1F *hMCd0D0ptNCsignPM;
883 TH1F *hd0D0VtxTrueptNCsignPM;
884 TH1F *hd0D0ptNCsignSB;
885 TH1F *hMCd0D0ptNCsignSB;
886 TH1F *hd0D0VtxTrueptNCsignSB;
ac4c229c 887 namehist="hd0D0ptNCsign_";
624c07ab 888 titlehist="D^{0} impact par. plot, No Cuts, Signal, ";
889 for(Int_t i=0;i<fnbins;i++){
d39e8f99 890 //Printf("IN HISTOS CREATION USING PTBINS VALUES for NAMES \n");
624c07ab 891 strnamept=namehist;
892 strnamept.Append("PkMss_pt");
893 strnamept+=i;
894
895 strtitlept=titlehist;
896 strtitlept.Append(" Mass Peak, ");
e047b348 897
624c07ab 898 strtitlept+=fptbins[i];
d39e8f99 899 //Printf("IN HISTOS CREATION USING PTBINS VALUES for NAMES %d: %f\n",i,fptbins[i]);
624c07ab 900 strtitlept.Append("<= pt <");
901 strtitlept+=fptbins[i+1];
902 strtitlept.Append(" [GeV/c]");
903
e047b348 904 hd0D0ptNCsignPM= new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
905 hd0D0ptNCsignPM->SetXTitle("Impact parameter [#mum] ");
906 hd0D0ptNCsignPM->SetYTitle("Entries");
907 flistNoCutsSignal->Add(hd0D0ptNCsignPM);
624c07ab 908
909 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 910 hMCd0D0ptNCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
911 hMCd0D0ptNCsignPM->SetXTitle("MC Impact parameter [#mum] ");
912 hMCd0D0ptNCsignPM->SetYTitle("Entries");
913 flistNoCutsSignal->Add(hMCd0D0ptNCsignPM);
624c07ab 914
915
916 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 917 hd0D0VtxTrueptNCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
918 hd0D0VtxTrueptNCsignPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
919 hd0D0VtxTrueptNCsignPM->SetYTitle("Entries");
920 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignPM);
624c07ab 921
922 strnamept=namehist;
923 strnamept.Append("SBMss_pt");
924 strnamept+=i;
925
926 strtitlept=titlehist;
927 strtitlept.Append(" Side Bands, ");
928 strtitlept+=fptbins[i];
929 strtitlept.Append("<= pt <");
930 strtitlept+=fptbins[i+1];
931 strtitlept.Append(" [GeV/c]");
932
e047b348 933 hd0D0ptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
934 hd0D0ptNCsignSB->SetXTitle("Impact parameter [#mum] ");
935 hd0D0ptNCsignSB->SetYTitle("Entries");
936 flistNoCutsSignal->Add(hd0D0ptNCsignSB);
624c07ab 937
938 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 939 hMCd0D0ptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
940 hMCd0D0ptNCsignSB->SetXTitle("MC Impact parameter [#mum] ");
941 hMCd0D0ptNCsignSB->SetYTitle("Entries");
942 flistNoCutsSignal->Add(hMCd0D0ptNCsignSB);
624c07ab 943
944 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 945 hd0D0VtxTrueptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
946 hd0D0VtxTrueptNCsignSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
947 hd0D0VtxTrueptNCsignSB->SetYTitle("Entries");
948 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignSB);
624c07ab 949 }
950
d39e8f99 951 //Printf("AFTER SIGNAL HISTOS CREATION for NOCUTS\n");
e047b348 952
624c07ab 953
954 //############ NO CUTS BACKGROUND HISTOGRAMS ###########
955 //
956 // ######## global properties histos #######
e047b348 957 TH2F *hCPtaVSd0d0NCback=new TH2F("hCPtaVSd0d0NCback","hCPtaVSd0d0_NoCuts_Background",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 958 TH1F *hSecVtxZNCback=new TH1F("hSecVtxZNCback","hSecVtxZ_NoCuts_Background",1000,-8.,8.);
959 TH1F *hSecVtxXNCback=new TH1F("hSecVtxXNCback","hSecVtxX_NoCuts_Background",1000,-3000.,3000.);
960 TH1F *hSecVtxYNCback=new TH1F("hSecVtxYNCback","hSecVtxY_NoCuts_Background",1000,-3000.,3000.);
961 TH2F *hSecVtxXYNCback=new TH2F("hSecVtxXYNCback","hSecVtxXY_NoCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
962 TH1F *hSecVtxPhiNCback=new TH1F("hSecVtxPhiNCback","hSecVtxPhi_NoCuts_Background",180,-180.1,180.1);
e047b348 963 TH1F *hd0singlTrackNCback=new TH1F("hd0singlTrackNCback","hd0singlTrackNoCuts_Back",1000,-5000.,5000.);
964 TH1F *hCPtaNCback=new TH1F("hCPtaNCback","hCPta_NoCuts_Background",100,-1.,1.);
ac4c229c 965 TH1F *hd0xd0NCback=new TH1F("hd0xd0NCback","hd0xd0_NoCuts_Background",1000,-100000.,100000.);
966 TH1F *hMassTrueNCback=new TH1F("hMassTrueNCback","D^{0} MC inv. Mass No Cuts Background(All momenta)",600,1.600,2.200);
967 TH1F *hMassNCback=new TH1F("hMassNCback","D^{0} inv. Mass No Cuts Background (All momenta)",600,1.600,2.200);
968 hMassNCback->Sumw2();
969 TH1F *hMassTrueNCbackPM=new TH1F("hMassTrueNCbackPM","D^{0} MC inv. Mass No Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
970 TH1F *hMassNCbackPM=new TH1F("hMassNCbackPM","D^{0} inv. Mass No Cuts Background (All momenta), MassPeak",600,1.600,2.200);
971 hMassNCbackPM->Sumw2();
972 TH1F *hMassTrueNCbackSB=new TH1F("hMassTrueNCbackSB","D^{0} MC inv. Mass in Side Bands No Cuts Background(All momenta)",600,1.600,2.200);
973 TH1F *hMassNCbackSB=new TH1F("hMassNCbackSB","D^{0} inv. Mass in Side Bands No Cuts Background (All momenta)",600,1.600,2.200);
974 hMassNCbackSB->Sumw2();
975
976 flistNoCutsBack->Add(hCPtaVSd0d0NCback);
977 flistNoCutsBack->Add(hSecVtxZNCback);
978 flistNoCutsBack->Add(hSecVtxYNCback);
979 flistNoCutsBack->Add(hSecVtxXNCback);
980 flistNoCutsBack->Add(hSecVtxXYNCback);
981 flistNoCutsBack->Add(hSecVtxPhiNCback);
e047b348 982 flistNoCutsBack->Add(hd0singlTrackNCback);
ac4c229c 983 flistNoCutsBack->Add(hCPtaNCback);
984 flistNoCutsBack->Add(hd0xd0NCback);
985 flistNoCutsBack->Add(hMassTrueNCback);
986 flistNoCutsBack->Add(hMassNCback);
987 flistNoCutsBack->Add(hMassTrueNCbackPM);
988 flistNoCutsBack->Add(hMassNCbackPM);
989 flistNoCutsBack->Add(hMassTrueNCbackSB);
990 flistNoCutsBack->Add(hMassNCbackSB);
624c07ab 991
992
e047b348 993 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
994 TH1F *hdcaNCback=new TH1F("hdcaNCback","hdca_NoCuts_Backgr",100,0.,1000.);
995 hdcaNCback->SetXTitle("dca [#mum]");
996 hdcaNCback->SetYTitle("Entries");
997 TH1F *hcosthetastarNCback=new TH1F("hcosthetastarNCback","hCosThetaStar_NoCuts_Backgr",50,-1.,1.);
998 hcosthetastarNCback->SetXTitle("cos #theta^{*}");
999 hcosthetastarNCback->SetYTitle("Entries");
1000 TH1F *hptD0NCback=new TH1F("hptD0NCback","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1001 hptD0NCback->SetXTitle("p_{t} [GeV/c]");
1002 hptD0NCback->SetYTitle("Entries");
1003 TH1F *hptD0VsMaxPtNCback=new TH1F("hptD0VsMaxPtNCback","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1004 TH2F *hptD0PTallsqrtNCback=new TH2F("hptD0PTallsqrtNCback","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1005 TH2F *hptD0PTallNCback=new TH2F("hptD0PTallNCback","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1006 TH2F *hptD0vsptBNCback=new TH2F("hptD0vsptBNCback","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1007 TH2F *hpD0vspBNCback=new TH2F("hpD0vspBNCback","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1008 TH2F *hptD0vsptcquarkNCback=new TH2F("hptD0vsptcquarkNCback","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1009 TH2F *hpD0vspcquarkNCback=new TH2F("hpD0vspcquarkNCback","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1010 flistNoCutsBack->Add(hdcaNCback);
1011 flistNoCutsBack->Add(hcosthetastarNCback);
1012 flistNoCutsBack->Add(hptD0NCback);
1013 flistNoCutsBack->Add(hptD0VsMaxPtNCback);
1014 flistNoCutsBack->Add(hptD0PTallsqrtNCback);
1015 flistNoCutsBack->Add(hptD0PTallNCback);
1016 flistNoCutsBack->Add(hptD0vsptBNCback);
1017 flistNoCutsBack->Add(hpD0vspBNCback);
1018 flistNoCutsBack->Add(hptD0vsptcquarkNCback);
1019 flistNoCutsBack->Add(hpD0vspcquarkNCback);
1020
1021 TH1F *hd0zD0ptNCback;
cc3209fb 1022 TH1F *hInvMassD0NCback,*hInvMassD0barNCback;
e047b348 1023 TH2F *hInvMassPtNCback=new TH2F("hInvMassPtNCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 1024 THnSparseF *hSparseNCback=new THnSparseF("hSparseNCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
1025 hSparseNCback->SetBinEdges(0,massbins);
1026 hSparseNCback->SetBinEdges(1,massbins);
1027 hSparseNCback->SetBinEdges(2,ptbinsForNsparse);
1028 hSparseNCback->SetBinEdges(3,impparbins);
1029 hSparseNCback->SetBinEdges(4,massHypoBins);
1030 flistNoCutsBack->Add(hSparseNCback);
1031
e047b348 1032 TH1F *hetaNCback;
1033 TH1F *hCosPDPBNCback;
1034 TH1F *hCosPcPDNCback;
1035 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1036 TH2F *hd0D0VSd0xd0NCbackpt;
1037 TH2F *hangletracksVSd0xd0NCbackpt;
1038 TH2F *hangletracksVSd0D0NCbackpt;
1039 TH1F *hd0xd0NCbackpt;
1040 flistNoCutsBack->Add(hInvMassPtNCback);
1041
1042 TH2F *hTOFpidNCback=new TH2F("hTOFpidNCback","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1043 flistNoCutsBack->Add(hTOFpidNCback);
1044
1045 for(Int_t i=0;i<fnbins;i++){
1046 namehist="hd0zD0ptNCback_pt";
1047 namehist+=i;
1048 titlehist="d0(z) No Cuts Backgrm ptbin=";
1049 titlehist+=i;
1050 hd0zD0ptNCback=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1051 hd0zD0ptNCback->SetXTitle("d_{0}(z) [#mum]");
1052 hd0zD0ptNCback->SetYTitle("Entries");
1053 flistNoCutsBack->Add(hd0zD0ptNCback);
1054
cc3209fb 1055 namehist="hInvMassD0NCback_pt";
e047b348 1056 namehist+=i;
1057 titlehist="Invariant Mass No Cuts Backgr ptbin=";
1058 titlehist+=i;
cc3209fb 1059 hInvMassD0NCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1060 hInvMassD0NCback->SetXTitle("Invariant Mass [GeV]");
1061 hInvMassD0NCback->SetYTitle("Entries");
1062 flistNoCutsBack->Add(hInvMassD0NCback);
1063
1064
1065 namehist="hInvMassD0barNCback_pt";
1066 namehist+=i;
1067 titlehist="Invariant Mass D0bar No Cuts Back ptbin=";
1068 titlehist+=i;
1069 hInvMassD0barNCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1070 hInvMassD0barNCback->SetXTitle("Invariant Mass [GeV]");
1071 hInvMassD0barNCback->SetYTitle("Entries");
1072 flistNoCutsBack->Add(hInvMassD0barNCback);
1073
e047b348 1074
1075 namehist="hetaNCback_pt";
1076 namehist+=i;
1077 titlehist="eta No Cuts Backgr ptbin=";
1078 titlehist+=i;
1079 hetaNCback=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1080 hetaNCback->SetXTitle("Pseudorapidity");
1081 hetaNCback->SetYTitle("Entries");
1082 flistNoCutsBack->Add(hetaNCback);
1083
1084 namehist="hCosPDPBNCback_pt";
1085 namehist+=i;
1086 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1087 titlehist+=i;
1088 hCosPDPBNCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1089 hCosPDPBNCback->SetXTitle("Cosine between D0 momentum and B momentum");
1090 hCosPDPBNCback->SetYTitle("Entries");
1091 flistNoCutsBack->Add(hCosPDPBNCback);
1092
1093 namehist="hCosPcPDNCback_pt";
1094 namehist+=i;
1095 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1096 titlehist+=i;
1097 hCosPcPDNCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1098 hCosPcPDNCback->SetXTitle("Cosine between c quark momentum and D0 momentum");
1099 hCosPcPDNCback->SetYTitle("Entries");
1100 flistNoCutsBack->Add(hCosPcPDNCback);
1101
1102
1103 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1104 namehist="hd0xd0NCback_pt";
1105 namehist+=i;
1106 titlehist="d0xd0 No Cuts Background ptbin=";
1107 titlehist+=i;
1108 hd0xd0NCbackpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1109 hd0xd0NCbackpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1110 hd0xd0NCbackpt->SetYTitle("Entries");
1111 flistNoCutsBack->Add(hd0xd0NCbackpt);
1112
1113
1114 namehist="hd0D0VSd0xd0NCback_pt";
1115 namehist+=i;
1116 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Back ptbin=";
1117 titlehist+=i;
1118 hd0D0VSd0xd0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1119 hd0D0VSd0xd0NCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1120 hd0D0VSd0xd0NCbackpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1121 flistNoCutsBack->Add(hd0D0VSd0xd0NCbackpt);
1122
1123
1124 namehist="hangletracksVSd0xd0NCback_pt";
1125 namehist+=i;
1126 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Back ptbin=";
1127 titlehist+=i;
1128 hangletracksVSd0xd0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1129 hangletracksVSd0xd0NCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1130 hangletracksVSd0xd0NCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
1131 flistNoCutsBack->Add(hangletracksVSd0xd0NCbackpt);
1132
1133
1134 namehist="hangletracksVSd0D0NCback_pt";
1135 namehist+=i;
1136 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Back ptbin=";
1137 titlehist+=i;
1138 hangletracksVSd0D0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1139 hangletracksVSd0D0NCbackpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1140 hangletracksVSd0D0NCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
1141 flistNoCutsBack->Add(hangletracksVSd0D0NCbackpt);
1142
1143
1144
1145 }
1146 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1147 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1148
1149
1150
624c07ab 1151 // ####### d0 D0 histos ############
1152
ac4c229c 1153 TH1F *hd0D0NCbackPM = new TH1F("hd0D0NCbackPM","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1154 hd0D0NCbackPM->SetXTitle("Impact parameter [#mum]");
1155 hd0D0NCbackPM->SetYTitle("Entries");
1156
1157 TH1F *hd0D0VtxTrueNCbackPM = new TH1F("hd0D0VtxTrueNCbackPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1158 hd0D0VtxTrueNCbackPM->SetXTitle("Impact parameter [#mum]");
1159 hd0D0VtxTrueNCbackPM->SetYTitle("Entries");
1160
1161 TH1F *hMCd0D0NCbackPM = new TH1F("hMCd0D0NCbackPM","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1162 hMCd0D0NCbackPM->SetXTitle("MC Impact parameter [#mum]");
1163 hMCd0D0NCbackPM->SetYTitle("Entries");
1164
1165 TH1F *hd0D0NCbackSB = new TH1F("hd0D0NCbackSB","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1166 hd0D0NCbackSB->SetXTitle("Impact parameter [#mum]");
1167 hd0D0NCbackSB->SetYTitle("Entries");
1168
1169 TH1F *hd0D0VtxTrueNCbackSB = new TH1F("hd0D0VtxTrueNCbackSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1170 hd0D0VtxTrueNCbackSB->SetXTitle("Impact parameter [#mum]");
1171 hd0D0VtxTrueNCbackSB->SetYTitle("Entries");
1172
1173 TH1F *hMCd0D0NCbackSB = new TH1F("hMCd0D0NCbackSB","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1174 hMCd0D0NCbackSB->SetXTitle("MC Impact parameter [#mum]");
1175 hMCd0D0NCbackSB->SetYTitle("Entries");
1176
1177 flistNoCutsBack->Add(hd0D0NCbackPM);
1178 flistNoCutsBack->Add(hd0D0VtxTrueNCbackPM);
1179 flistNoCutsBack->Add(hMCd0D0NCbackPM);
1180 flistNoCutsBack->Add(hd0D0NCbackSB);
1181 flistNoCutsBack->Add(hd0D0VtxTrueNCbackSB);
1182 flistNoCutsBack->Add(hMCd0D0NCbackSB);
1183
e047b348 1184 TH1F *hd0D0ptNCbackPM;
1185 TH1F *hMCd0D0ptNCbackPM;
1186 TH1F *hd0D0VtxTrueptNCbackPM;
1187 TH1F *hd0D0ptNCbackSB;
1188 TH1F *hMCd0D0ptNCbackSB;
1189 TH1F *hd0D0VtxTrueptNCbackSB;
ac4c229c 1190 namehist="hd0D0ptNCback_";
624c07ab 1191 titlehist="D^{0} impact par. plot, No Cuts, Background, ";
1192 for(Int_t i=0;i<fnbins;i++){
1193 strnamept=namehist;
1194 strnamept.Append("PkMss_pt");
1195 strnamept+=i;
1196
1197 strtitlept=titlehist;
1198 strtitlept.Append(" Mass Peak, ");
1199 strtitlept+=fptbins[i];
1200 strtitlept.Append("<= pt <");
1201 strtitlept+=fptbins[i+1];
1202 strtitlept.Append(" [GeV/c]");
1203
e047b348 1204 hd0D0ptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1205 hd0D0ptNCbackPM->SetXTitle("Impact parameter [#mum] ");
1206 hd0D0ptNCbackPM->SetYTitle("Entries");
1207 flistNoCutsBack->Add(hd0D0ptNCbackPM);
624c07ab 1208
1209 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1210 hMCd0D0ptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1211 hMCd0D0ptNCbackPM->SetXTitle("MC Impact parameter [#mum] ");
1212 hMCd0D0ptNCbackPM->SetYTitle("Entries");
1213 flistNoCutsBack->Add(hMCd0D0ptNCbackPM);
624c07ab 1214
1215
1216 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1217 hd0D0VtxTrueptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1218 hd0D0VtxTrueptNCbackPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1219 hd0D0VtxTrueptNCbackPM->SetYTitle("Entries");
1220 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackPM);
624c07ab 1221
1222 strnamept=namehist;
1223 strnamept.Append("SBMss_pt");
1224 strnamept+=i;
1225
1226 strtitlept=titlehist;
1227 strtitlept.Append(" Side Bands, ");
1228 strtitlept+=fptbins[i];
1229 strtitlept.Append("<= pt <");
1230 strtitlept+=fptbins[i+1];
1231 strtitlept.Append(" [GeV/c]");
1232
e047b348 1233 hd0D0ptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1234 hd0D0ptNCbackSB->SetXTitle("Impact parameter [#mum] ");
1235 hd0D0ptNCbackSB->SetYTitle("Entries");
1236 flistNoCutsBack->Add(hd0D0ptNCbackSB);
624c07ab 1237
1238 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1239 hMCd0D0ptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1240 hMCd0D0ptNCbackSB->SetXTitle("MC Impact parameter [#mum] ");
1241 hMCd0D0ptNCbackSB->SetYTitle("Entries");
1242 flistNoCutsBack->Add(hMCd0D0ptNCbackSB);
624c07ab 1243
1244 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1245 hd0D0VtxTrueptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1246 hd0D0VtxTrueptNCbackSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1247 hd0D0VtxTrueptNCbackSB->SetYTitle("Entries");
1248 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackSB);
624c07ab 1249 }
1250
1251
1252
1253 //############ NO CUTS FROMB HISTOGRAMS ###########
1254 //
1255 //####### global properties histos
1256
e047b348 1257 TH2F *hCPtaVSd0d0NCfromB=new TH2F("hCPtaVSd0d0NCfromB","hCPtaVSd0d0_NoCuts_FromB",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1258 TH1F *hSecVtxZNCfromB=new TH1F("hSecVtxZNCfromB","hSecVtxZ_NoCuts_FromB",1000,-8.,8.);
1259 TH1F *hSecVtxXNCfromB=new TH1F("hSecVtxXNCfromB","hSecVtxX_NoCuts_FromB",1000,-3000.,3000.);
1260 TH1F *hSecVtxYNCfromB=new TH1F("hSecVtxYNCfromB","hSecVtxY_NoCuts_FromB",1000,-3000.,3000.);
1261 TH2F *hSecVtxXYNCfromB=new TH2F("hSecVtxXYNCfromB","hSecVtxXY_NoCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
1262 TH1F *hSecVtxPhiNCfromB=new TH1F("hSecVtxPhiNCfromB","hSecVtxPhi_NoCuts_FromB",180,-180.1,180.1);
e047b348 1263 TH1F *hd0singlTrackNCfromB=new TH1F("hd0singlTrackNCfromB","hd0singlTrackNoCuts_FromB",1000,-5000.,5000.);
1264 TH1F *hCPtaNCfromB=new TH1F("hCPtaNCfromB","hCPta_NoCuts_FromB",100,-1.,1.);
ac4c229c 1265 TH1F *hd0xd0NCfromB=new TH1F("hd0xd0NCfromB","hd0xd0_NoCuts_FromB",1000,-100000.,100000.);
1266 TH1F *hMassTrueNCfromB=new TH1F("hMassTrueNCfromB","D^{0} MC inv. Mass No Cuts FromB(All momenta)",600,1.600,2.200);
1267 TH1F *hMassNCfromB=new TH1F("hMassNCfromB","D^{0} inv. Mass No Cuts FromB (All momenta)",600,1.600,2.200);
1268 hMassNCfromB->Sumw2();
1269 TH1F *hMassTrueNCfromBPM=new TH1F("hMassTrueNCfromBPM","D^{0} MC inv. Mass No Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
1270 TH1F *hMassNCfromBPM=new TH1F("hMassNCfromBPM","D^{0} inv. Mass No Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
1271 hMassNCfromB->Sumw2();
1272 TH1F *hMassTrueNCfromBSB=new TH1F("hMassTrueNCfromBSB","D^{0} MC inv. Mass in Side Bands No Cuts FromB(All momenta)",600,1.600,2.200);
1273 TH1F *hMassNCfromBSB=new TH1F("hMassNCfromBSB","D^{0} inv. Mass in Side Bands No Cuts FromB (All momenta)",600,1.600,2.200);
1274 hMassNCfromBSB->Sumw2();
1275
1276 flistNoCutsFromB->Add(hCPtaVSd0d0NCfromB);
1277 flistNoCutsFromB->Add(hSecVtxZNCfromB);
1278 flistNoCutsFromB->Add(hSecVtxYNCfromB);
1279 flistNoCutsFromB->Add(hSecVtxXNCfromB);
1280 flistNoCutsFromB->Add(hSecVtxXYNCfromB);
1281 flistNoCutsFromB->Add(hSecVtxPhiNCfromB);
e047b348 1282 flistNoCutsFromB->Add(hd0singlTrackNCfromB);
ac4c229c 1283 flistNoCutsFromB->Add(hCPtaNCfromB);
1284 flistNoCutsFromB->Add(hd0xd0NCfromB);
1285 flistNoCutsFromB->Add(hMassTrueNCfromB);
1286 flistNoCutsFromB->Add(hMassNCfromB);
1287 flistNoCutsFromB->Add(hMassTrueNCfromBPM);
1288 flistNoCutsFromB->Add(hMassNCfromBPM);
1289 flistNoCutsFromB->Add(hMassTrueNCfromBSB);
1290 flistNoCutsFromB->Add(hMassNCfromBSB);
624c07ab 1291
e047b348 1292
1293
1294
1295
1296 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
1297 TH1F *hdcaNCfromB=new TH1F("hdcaNCfromB","hdca_NoCuts_FromB",100,0.,1000.);
1298 hdcaNCfromB->SetXTitle("dca [#mum]");
1299 hdcaNCfromB->SetYTitle("Entries");
1300 TH1F *hcosthetastarNCfromB=new TH1F("hcosthetastarNCfromB","hCosThetaStar_NoCuts_FromB",50,-1.,1.);
1301 hcosthetastarNCfromB->SetXTitle("cos #theta^{*}");
1302 hcosthetastarNCfromB->SetYTitle("Entries");
1303 TH1F *hptD0NCfromB=new TH1F("hptD0NCfromB","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1304 hptD0NCfromB->SetXTitle("p_{t} [GeV/c]");
1305 hptD0NCfromB->SetYTitle("Entries");
1306 TH1F *hptD0VsMaxPtNCfromB=new TH1F("hptD0VsMaxPtNCfromB","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1307 TH2F *hptD0PTallsqrtNCfromB=new TH2F("hptD0PTallsqrtNCfromB","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1308 TH2F *hptD0PTallNCfromB=new TH2F("hptD0PTallNCfromB","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1309 TH2F *hptD0vsptBNCfromB=new TH2F("hptD0vsptBNCfromB","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1310 TH2F *hpD0vspBNCfromB=new TH2F("hpD0vspBNCfromB","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1311 TH2F *hptD0vsptcquarkNCfromB=new TH2F("hptD0vsptcquarkNCfromB","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1312 TH2F *hpD0vspcquarkNCfromB=new TH2F("hpD0vspcquarkNCfromB","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1313 flistNoCutsFromB->Add(hdcaNCfromB);
1314 flistNoCutsFromB->Add(hcosthetastarNCfromB);
1315 flistNoCutsFromB->Add(hptD0NCfromB);
1316 flistNoCutsFromB->Add(hptD0VsMaxPtNCfromB);
1317 flistNoCutsFromB->Add(hptD0PTallsqrtNCfromB);
1318 flistNoCutsFromB->Add(hptD0PTallNCfromB);
1319 flistNoCutsFromB->Add(hptD0vsptBNCfromB);
1320 flistNoCutsFromB->Add(hpD0vspBNCfromB);
1321 flistNoCutsFromB->Add(hptD0vsptcquarkNCfromB);
1322 flistNoCutsFromB->Add(hpD0vspcquarkNCfromB);
1323
1324 TH1F *hd0zD0ptNCfromB;
cc3209fb 1325 TH1F *hInvMassD0NCfromB,*hInvMassD0barNCfromB;
e047b348 1326 TH2F *hInvMassPtNCfromB=new TH2F("hInvMassPtNCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 1327 THnSparseF *hSparseNCfromB=new THnSparseF("hSparseNCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
1328 hSparseNCfromB->SetBinEdges(0,massbins);
1329 hSparseNCfromB->SetBinEdges(1,massbins);
1330 hSparseNCfromB->SetBinEdges(2,ptbinsForNsparse);
1331 hSparseNCfromB->SetBinEdges(3,impparbins);
1332 hSparseNCfromB->SetBinEdges(4,massHypoBins);
1333 flistNoCutsFromB->Add(hSparseNCfromB);
1334
e047b348 1335 TH1F *hetaNCfromB;
1336 TH1F *hCosPDPBNCfromB;
1337 TH1F *hCosPcPDNCfromB;
1338
1339 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1340 TH2F *hd0D0VSd0xd0NCfromBpt;
1341 TH2F *hangletracksVSd0xd0NCfromBpt;
1342 TH2F *hangletracksVSd0D0NCfromBpt;
1343 TH1F *hd0xd0NCfromBpt;
1344 flistNoCutsFromB->Add(hInvMassPtNCfromB);
1345
1346 TH2F *hTOFpidNCfromB=new TH2F("hTOFpidNCfromB","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1347 flistNoCutsFromB->Add(hTOFpidNCfromB);
1348
1349 for(Int_t i=0;i<fnbins;i++){
1350 namehist="hd0zD0ptNCfromB_pt";
1351 namehist+=i;
1352 titlehist="d0(z) No Cuts FromB ptbin=";
1353 titlehist+=i;
1354 hd0zD0ptNCfromB=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1355 hd0zD0ptNCfromB->SetXTitle("d_{0}(z) [#mum]");
1356 hd0zD0ptNCfromB->SetYTitle("Entries");
1357 flistNoCutsFromB->Add(hd0zD0ptNCfromB);
1358
cc3209fb 1359 namehist="hInvMassD0NCfromB_pt";
e047b348 1360 namehist+=i;
1361 titlehist="Invariant Mass No Cuts FromB ptbin=";
1362 titlehist+=i;
cc3209fb 1363 hInvMassD0NCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1364 hInvMassD0NCfromB->SetXTitle("Invariant Mass [GeV]");
1365 hInvMassD0NCfromB->SetYTitle("Entries");
1366 flistNoCutsFromB->Add(hInvMassD0NCfromB);
1367
1368
1369 namehist="hInvMassD0barNCfromB_pt";
1370 namehist+=i;
1371 titlehist="Invariant Mass D0bar No Cuts FromB ptbin=";
1372 titlehist+=i;
1373 hInvMassD0barNCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1374 hInvMassD0barNCfromB->SetXTitle("Invariant Mass [GeV]");
1375 hInvMassD0barNCfromB->SetYTitle("Entries");
1376 flistNoCutsFromB->Add(hInvMassD0barNCfromB);
1377
1378
e047b348 1379
1380 namehist="hetaNCfromB_pt";
1381 namehist+=i;
1382 titlehist="eta No Cuts FromB ptbin=";
1383 titlehist+=i;
1384 hetaNCfromB=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1385 hetaNCfromB->SetXTitle("Pseudorapidity");
1386 hetaNCfromB->SetYTitle("Entries");
1387 flistNoCutsFromB->Add(hetaNCfromB);
1388
1389 namehist="hCosPDPBNCfromB_pt";
1390 namehist+=i;
1391 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1392 titlehist+=i;
1393 hCosPDPBNCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1394 hCosPDPBNCfromB->SetXTitle("Cosine between D0 momentum and B momentum");
1395 hCosPDPBNCfromB->SetYTitle("Entries");
1396 flistNoCutsFromB->Add(hCosPDPBNCfromB);
1397
1398 namehist="hCosPcPDNCfromB_pt";
1399 namehist+=i;
1400 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1401 titlehist+=i;
1402 hCosPcPDNCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1403 hCosPcPDNCfromB->SetXTitle("Cosine between c quark momentum and D0 momentum");
1404 hCosPcPDNCfromB->SetYTitle("Entries");
1405 flistNoCutsFromB->Add(hCosPcPDNCfromB);
1406
1407// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1408 namehist="hd0xd0NCfromB_pt";
1409 namehist+=i;
1410 titlehist="d0xd0 No Cuts FromB ptbin=";
1411 titlehist+=i;
1412 hd0xd0NCfromBpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1413 hd0xd0NCfromBpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1414 hd0xd0NCfromBpt->SetYTitle("Entries");
1415 flistNoCutsFromB->Add(hd0xd0NCfromBpt);
1416
1417
1418 namehist="hd0D0VSd0xd0NCfromB_pt";
1419 namehist+=i;
1420 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromB ptbin=";
1421 titlehist+=i;
1422 hd0D0VSd0xd0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1423 hd0D0VSd0xd0NCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1424 hd0D0VSd0xd0NCfromBpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1425 flistNoCutsFromB->Add(hd0D0VSd0xd0NCfromBpt);
1426
1427
1428 namehist="hangletracksVSd0xd0NCfromB_pt";
1429 namehist+=i;
1430 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromB ptbin=";
1431 titlehist+=i;
1432 hangletracksVSd0xd0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1433 hangletracksVSd0xd0NCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1434 hangletracksVSd0xd0NCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
1435 flistNoCutsFromB->Add(hangletracksVSd0xd0NCfromBpt);
1436
1437
1438 namehist="hangletracksVSd0D0NCfromB_pt";
1439 namehist+=i;
1440 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts FromB ptbin=";
1441 titlehist+=i;
1442 hangletracksVSd0D0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1443 hangletracksVSd0D0NCfromBpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1444 hangletracksVSd0D0NCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
1445 flistNoCutsFromB->Add(hangletracksVSd0D0NCfromBpt);
1446
1447
1448 }
1449 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1450 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1451
1452
1453
624c07ab 1454 // ######### d0 D0 histos ##############
ac4c229c 1455 TH1F *hd0D0NCfromBPM = new TH1F("hd0D0NCfromBPM","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1456 hd0D0NCfromBPM->SetXTitle("Impact parameter [#mum]");
1457 hd0D0NCfromBPM->SetYTitle("Entries");
1458
1459 TH1F *hd0D0VtxTrueNCfromBPM = new TH1F("hd0D0VtxTrueNCfromBPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1460 hd0D0VtxTrueNCfromBPM->SetXTitle("Impact parameter [#mum]");
1461 hd0D0VtxTrueNCfromBPM->SetYTitle("Entries");
1462
1463 TH1F *hMCd0D0NCfromBPM = new TH1F("hMCd0D0NCfromBPM","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1464 hMCd0D0NCfromBPM->SetXTitle("MC Impact parameter [#mum]");
1465 hMCd0D0NCfromBPM->SetYTitle("Entries");
1466
1467 TH1F *hd0D0NCfromBSB = new TH1F("hd0D0NCfromBSB","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1468 hd0D0NCfromBSB->SetXTitle("Impact parameter [#mum]");
1469 hd0D0NCfromBSB->SetYTitle("Entries");
1470
1471 TH1F *hd0D0VtxTrueNCfromBSB = new TH1F("hd0D0VtxTrueNCfromBSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1472 hd0D0VtxTrueNCfromBSB->SetXTitle("Impact parameter [#mum]");
1473 hd0D0VtxTrueNCfromBSB->SetYTitle("Entries");
1474
1475 TH1F *hMCd0D0NCfromBSB = new TH1F("hMCd0D0NCfromBSB","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1476 hMCd0D0NCfromBSB->SetXTitle("MC Impact parameter [#mum]");
1477 hMCd0D0NCfromBSB->SetYTitle("Entries");
1478
1479 flistNoCutsFromB->Add(hd0D0NCfromBPM);
1480 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBPM);
1481 flistNoCutsFromB->Add(hMCd0D0NCfromBPM);
1482 flistNoCutsFromB->Add(hd0D0NCfromBSB);
1483 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBSB);
1484 flistNoCutsFromB->Add(hMCd0D0NCfromBSB);
1485
e047b348 1486 TH1F *hd0D0ptNCfromBPM;
1487 TH1F *hMCd0D0ptNCfromBPM;
1488 TH1F *hd0D0VtxTrueptNCfromBPM;
1489 TH1F *hd0D0ptNCfromBSB;
1490 TH1F *hMCd0D0ptNCfromBSB;
1491 TH1F *hd0D0VtxTrueptNCfromBSB;
ac4c229c 1492 namehist="hd0D0ptNCfromB_";
624c07ab 1493 titlehist="D^{0} impact par. plot, No Cuts, FromB, ";
1494 for(Int_t i=0;i<fnbins;i++){
1495 strnamept=namehist;
1496 strnamept.Append("PkMss_pt");
1497 strnamept+=i;
1498
1499 strtitlept=titlehist;
1500 strtitlept.Append(" Mass Peak, ");
1501 strtitlept+=fptbins[i];
1502 strtitlept.Append("<= pt <");
1503 strtitlept+=fptbins[i+1];
1504 strtitlept.Append(" [GeV/c]");
1505
e047b348 1506 hd0D0ptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1507 hd0D0ptNCfromBPM->SetXTitle("Impact parameter [#mum] ");
1508 hd0D0ptNCfromBPM->SetYTitle("Entries");
1509 flistNoCutsFromB->Add(hd0D0ptNCfromBPM);
624c07ab 1510
1511 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1512 hMCd0D0ptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1513 hMCd0D0ptNCfromBPM->SetXTitle("MC Impact parameter [#mum] ");
1514 hMCd0D0ptNCfromBPM->SetYTitle("Entries");
1515 flistNoCutsFromB->Add(hMCd0D0ptNCfromBPM);
624c07ab 1516
1517
1518 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1519 hd0D0VtxTrueptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1520 hd0D0VtxTrueptNCfromBPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1521 hd0D0VtxTrueptNCfromBPM->SetYTitle("Entries");
1522 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBPM);
624c07ab 1523
1524 strnamept=namehist;
1525 strnamept.Append("SBMss_pt");
1526 strnamept+=i;
1527
1528 strtitlept=titlehist;
1529 strtitlept.Append(" Side Bands, ");
1530 strtitlept+=fptbins[i];
1531 strtitlept.Append("<= pt <");
1532 strtitlept+=fptbins[i+1];
1533 strtitlept.Append(" [GeV/c]");
1534
e047b348 1535 hd0D0ptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1536 hd0D0ptNCfromBSB->SetXTitle("Impact parameter [#mum] ");
1537 hd0D0ptNCfromBSB->SetYTitle("Entries");
1538 flistNoCutsFromB->Add(hd0D0ptNCfromBSB);
624c07ab 1539
1540 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1541 hMCd0D0ptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1542 hMCd0D0ptNCfromBSB->SetXTitle("MC Impact parameter [#mum] ");
1543 hMCd0D0ptNCfromBSB->SetYTitle("Entries");
1544 flistNoCutsFromB->Add(hMCd0D0ptNCfromBSB);
624c07ab 1545
1546 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1547 hd0D0VtxTrueptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1548 hd0D0VtxTrueptNCfromBSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1549 hd0D0VtxTrueptNCfromBSB->SetYTitle("Entries");
1550 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBSB);
624c07ab 1551 }
1552
1553
1554
1555 //############ NO CUTS FROM DSTAR HISTOGRAMS ###########
1556 //
1557 //############# global properties histos #######
1558
e047b348 1559 TH2F *hCPtaVSd0d0NCfromDstar=new TH2F("hCPtaVSd0d0NCfromDstar","hCPtaVSd0d0_NoCuts_FromDStar",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1560 TH1F *hSecVtxZNCfromDstar=new TH1F("hSecVtxZNCfromDstar","hSecVtxZ_NoCuts_FromDStar",1000,-8.,8.);
1561 TH1F *hSecVtxXNCfromDstar=new TH1F("hSecVtxXNCfromDstar","hSecVtxX_NoCuts_FromDStar",1000,-3000.,3000.);
1562 TH1F *hSecVtxYNCfromDstar=new TH1F("hSecVtxYNCfromDstar","hSecVtxY_NoCuts_FromDStar",1000,-3000.,3000.);
1563 TH2F *hSecVtxXYNCfromDstar=new TH2F("hSecVtxXYNCfromDstar","hSecVtxXY_NoCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
1564 TH1F *hSecVtxPhiNCfromDstar=new TH1F("hSecVtxPhiNCfromDstar","hSecVtxPhi_NoCuts_FromDStar",180,-180.1,180.1);
e047b348 1565 TH1F *hd0singlTrackNCfromDstar=new TH1F("hd0singlTrackNCfromDstar","hd0singlTrackNoCuts_fromDstar",1000,-5000.,5000.);
1566 TH1F *hCPtaNCfromDstar=new TH1F("hCPtaNCfromDstar","hCPta_NoCuts_FromDStar",100,-1.,1.);
ac4c229c 1567 TH1F *hd0xd0NCfromDstar=new TH1F("hd0xd0NCfromDstar","hd0xd0_NoCuts_FromDStar",1000,-100000.,100000.);
1568 TH1F *hMassTrueNCfromDstar=new TH1F("hMassTrueNCfromDstar","D^{0} MC inv. Mass No Cuts FromDStar(All momenta)",600,1.600,2.200);
1569 TH1F *hMassNCfromDstar=new TH1F("hMassNCfromDstar","D^{0} inv. Mass No Cuts FromDStar (All momenta)",600,1.600,2.200);
1570 hMassNCfromDstar->Sumw2();
1571 TH1F *hMassTrueNCfromDstarPM=new TH1F("hMassTrueNCfromDstarPM","D^{0} MC inv. Mass No Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
1572 TH1F *hMassNCfromDstarPM=new TH1F("hMassNCfromDstarPM","D^{0} inv. Mass No Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
1573 hMassNCfromDstarPM->Sumw2();
1574 TH1F *hMassTrueNCfromDstarSB=new TH1F("hMassTrueNCfromDstarSB","D^{0} MC inv. Mass in Side Bands No Cuts FromDStar(All momenta)",600,1.600,2.200);
1575 TH1F *hMassNCfromDstarSB=new TH1F("hMassNCfromDstarSB","D^{0} inv. Mass in Side Bands No Cuts FromDStar (All momenta)",600,1.600,2.200);
1576 hMassNCfromDstarSB->Sumw2();
1577
1578 flistNoCutsFromDstar->Add(hCPtaVSd0d0NCfromDstar);
1579 flistNoCutsFromDstar->Add(hSecVtxZNCfromDstar);
1580 flistNoCutsFromDstar->Add(hSecVtxYNCfromDstar);
1581 flistNoCutsFromDstar->Add(hSecVtxXNCfromDstar);
1582 flistNoCutsFromDstar->Add(hSecVtxXYNCfromDstar);
1583 flistNoCutsFromDstar->Add(hSecVtxPhiNCfromDstar);
e047b348 1584 flistNoCutsFromDstar->Add(hd0singlTrackNCfromDstar);
ac4c229c 1585 flistNoCutsFromDstar->Add(hCPtaNCfromDstar);
1586 flistNoCutsFromDstar->Add(hd0xd0NCfromDstar);
1587 flistNoCutsFromDstar->Add(hMassTrueNCfromDstar);
1588 flistNoCutsFromDstar->Add(hMassNCfromDstar);
1589 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarPM);
1590 flistNoCutsFromDstar->Add(hMassNCfromDstarPM);
1591 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarSB);
1592 flistNoCutsFromDstar->Add(hMassNCfromDstarSB);
624c07ab 1593
e047b348 1594
1595
1596
1597//%%% NEW HISTOS %%%%%%%%%%%%%%%%
1598 TH1F *hdcaNCfromDstar=new TH1F("hdcaNCfromDstar","hdca_NoCuts_FromDstar",100,0.,1000.);
1599 hdcaNCfromDstar->SetXTitle("dca [#mum]");
1600 hdcaNCfromDstar->SetYTitle("Entries");
1601 TH1F *hcosthetastarNCfromDstar=new TH1F("hcosthetastarNCfromDstar","hCosThetaStar_NoCuts_FromDstar",50,-1.,1.);
1602 hcosthetastarNCfromDstar->SetXTitle("cos #theta^{*}");
1603 hcosthetastarNCfromDstar->SetYTitle("Entries");
1604 TH1F *hptD0NCfromDstar=new TH1F("hptD0NCfromDstar","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1605 hptD0NCfromDstar->SetXTitle("p_{t} [GeV/c]");
1606 hptD0NCfromDstar->SetYTitle("Entries");
1607 TH1F *hptD0VsMaxPtNCfromDstar=new TH1F("hptD0VsMaxPtNCfromDstar","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1608 TH2F *hptD0PTallsqrtNCfromDstar=new TH2F("hptD0PTallsqrtNCfromDstar","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1609 TH2F *hptD0PTallNCfromDstar=new TH2F("hptD0PTallNCfromDstar","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1610 TH2F *hptD0vsptBNCfromDstar=new TH2F("hptD0vsptBNCfromDstar","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1611 TH2F *hpD0vspBNCfromDstar=new TH2F("hpD0vspBNCfromDstar","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1612 TH2F *hptD0vsptcquarkNCfromDstar=new TH2F("hptD0vsptcquarkNCfromDstar","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1613 TH2F *hpD0vspcquarkNCfromDstar=new TH2F("hpD0vspcquarkNCfromDstar","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1614 flistNoCutsFromDstar->Add(hdcaNCfromDstar);
1615 flistNoCutsFromDstar->Add(hcosthetastarNCfromDstar);
1616 flistNoCutsFromDstar->Add(hptD0NCfromDstar);
1617 flistNoCutsFromDstar->Add(hptD0VsMaxPtNCfromDstar);
1618 flistNoCutsFromDstar->Add(hptD0PTallsqrtNCfromDstar);
1619 flistNoCutsFromDstar->Add(hptD0PTallNCfromDstar);
1620 flistNoCutsFromDstar->Add(hptD0vsptBNCfromDstar);
1621 flistNoCutsFromDstar->Add(hpD0vspBNCfromDstar);
1622 flistNoCutsFromDstar->Add(hptD0vsptcquarkNCfromDstar);
1623 flistNoCutsFromDstar->Add(hpD0vspcquarkNCfromDstar);
1624
1625 TH1F *hd0zD0ptNCfromDstar;
cc3209fb 1626 TH1F *hInvMassD0NCfromDstar,*hInvMassD0barNCfromDstar;
e047b348 1627 TH2F *hInvMassPtNCfromDstar=new TH2F("hInvMassPtNCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 1628 THnSparseF *hSparseNCfromDstar=new THnSparseF("hSparseNCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
1629 hSparseNCfromDstar->SetBinEdges(0,massbins);
1630 hSparseNCfromDstar->SetBinEdges(1,massbins);
1631 hSparseNCfromDstar->SetBinEdges(2,ptbinsForNsparse);
1632 hSparseNCfromDstar->SetBinEdges(3,impparbins);
1633 hSparseNCfromDstar->SetBinEdges(4,massHypoBins);
1634 flistNoCutsFromDstar->Add(hSparseNCfromDstar);
e047b348 1635 TH1F *hetaNCfromDstar;
1636 TH1F *hCosPDPBNCfromDstar;
1637 TH1F *hCosPcPDNCfromDstar;
1638 flistNoCutsFromDstar->Add(hInvMassPtNCfromDstar);
1639 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1640 TH2F *hd0D0VSd0xd0NCfromDstarpt;
1641 TH2F *hangletracksVSd0xd0NCfromDstarpt;
1642 TH2F *hangletracksVSd0D0NCfromDstarpt;
1643 TH1F *hd0xd0NCfromDstarpt;
1644
1645 TH2F *hTOFpidNCfromDstar=new TH2F("hTOFpidNCfromDstar","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1646 flistNoCutsFromDstar->Add(hTOFpidNCfromDstar);
1647
1648 for(Int_t i=0;i<fnbins;i++){
1649 namehist="hd0zD0ptNCfromDstar_pt";
1650 namehist+=i;
1651 titlehist="d0(z) No Cuts FromDstarm ptbin=";
1652 titlehist+=i;
1653 hd0zD0ptNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1654 hd0zD0ptNCfromDstar->SetXTitle("d_{0}(z) [#mum]");
1655 hd0zD0ptNCfromDstar->SetYTitle("Entries");
1656 flistNoCutsFromDstar->Add(hd0zD0ptNCfromDstar);
1657
cc3209fb 1658 namehist="hInvMassD0NCfromDstar_pt";
e047b348 1659 namehist+=i;
1660 titlehist="Invariant Mass No Cuts FromDstar ptbin=";
1661 titlehist+=i;
cc3209fb 1662 hInvMassD0NCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1663 hInvMassD0NCfromDstar->SetXTitle("Invariant Mass [GeV]");
1664 hInvMassD0NCfromDstar->SetYTitle("Entries");
1665 flistNoCutsFromDstar->Add(hInvMassD0NCfromDstar);
1666
1667
1668 namehist="hInvMassD0barNCfromDstar_pt";
1669 namehist+=i;
1670 titlehist="Invariant Mass D0bar No Cuts FromDstar ptbin=";
1671 titlehist+=i;
1672 hInvMassD0barNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1673 hInvMassD0barNCfromDstar->SetXTitle("Invariant Mass [GeV]");
1674 hInvMassD0barNCfromDstar->SetYTitle("Entries");
1675 flistNoCutsFromDstar->Add(hInvMassD0barNCfromDstar);
1676
1677
e047b348 1678
1679 namehist="hetaNCfromDstar_pt";
1680 namehist+=i;
1681 titlehist="eta No Cuts FromDstar ptbin=";
1682 titlehist+=i;
1683 hetaNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1684 hetaNCfromDstar->SetXTitle("Pseudorapidity");
1685 hetaNCfromDstar->SetYTitle("Entries");
1686 flistNoCutsFromDstar->Add(hetaNCfromDstar);
1687
1688 namehist="hCosPDPBNCfromDstar_pt";
1689 namehist+=i;
1690 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1691 titlehist+=i;
1692 hCosPDPBNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1693 hCosPDPBNCfromDstar->SetXTitle("Cosine between D0 momentum and B momentum");
1694 hCosPDPBNCfromDstar->SetYTitle("Entries");
1695 flistNoCutsFromDstar->Add(hCosPDPBNCfromDstar);
1696
1697 namehist="hCosPcPDNCfromDstar_pt";
1698 namehist+=i;
1699 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1700 titlehist+=i;
1701 hCosPcPDNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1702 hCosPcPDNCfromDstar->SetXTitle("Cosine between c quark momentum and D0 momentum");
1703 hCosPcPDNCfromDstar->SetYTitle("Entries");
1704 flistNoCutsFromDstar->Add(hCosPcPDNCfromDstar);
1705
1706 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1707 namehist="hd0xd0NCfromDstar_pt";
1708 namehist+=i;
1709 titlehist="d0xd0 No Cuts FromDstar ptbin=";
1710 titlehist+=i;
1711 hd0xd0NCfromDstarpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1712 hd0xd0NCfromDstarpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1713 hd0xd0NCfromDstarpt->SetYTitle("Entries");
1714 flistNoCutsFromDstar->Add(hd0xd0NCfromDstarpt);
1715
1716
1717 namehist="hd0D0VSd0xd0NCfromDstar_pt";
1718 namehist+=i;
1719 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromDstar ptbin=";
1720 titlehist+=i;
1721 hd0D0VSd0xd0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1722 hd0D0VSd0xd0NCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1723 hd0D0VSd0xd0NCfromDstarpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1724 flistNoCutsFromDstar->Add(hd0D0VSd0xd0NCfromDstarpt);
1725
1726
1727 namehist="hangletracksVSd0xd0NCfromDstar_pt";
1728 namehist+=i;
1729 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromDstar ptbin=";
1730 titlehist+=i;
1731 hangletracksVSd0xd0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1732 hangletracksVSd0xd0NCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1733 hangletracksVSd0xd0NCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
1734 flistNoCutsFromDstar->Add(hangletracksVSd0xd0NCfromDstarpt);
1735
1736
1737 namehist="hangletracksVSd0D0NCfromDstar_pt";
1738 namehist+=i;
1739 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts FromDstar ptbin=";
1740 titlehist+=i;
1741 hangletracksVSd0D0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1742 hangletracksVSd0D0NCfromDstarpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1743 hangletracksVSd0D0NCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
1744 flistNoCutsFromDstar->Add(hangletracksVSd0D0NCfromDstarpt);
1745
1746 }
1747 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1748 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1749
1750
624c07ab 1751 //########## d0 D0 histos #############
ac4c229c 1752 TH1F *hd0D0NCfromDstPM = new TH1F("hd0D0NCfromDstarPM","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1753 hd0D0NCfromDstPM->SetXTitle("Impact parameter [#mum]");
1754 hd0D0NCfromDstPM->SetYTitle("Entries");
1755
1756 TH1F *hd0D0VtxTrueNCfromDstPM = new TH1F("hd0D0VtxTrueNCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1757 hd0D0VtxTrueNCfromDstPM->SetXTitle("Impact parameter [#mum]");
1758 hd0D0VtxTrueNCfromDstPM->SetYTitle("Entries");
1759
1760 TH1F *hMCd0D0NCfromDstPM = new TH1F("hMCd0D0NCfromDstarPM","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1761 hMCd0D0NCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
1762 hMCd0D0NCfromDstPM->SetYTitle("Entries");
1763
1764 TH1F *hd0D0NCfromDstSB = new TH1F("hd0D0NCfromDstarSB","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1765 hd0D0NCfromDstSB->SetXTitle("Impact parameter [#mum]");
1766 hd0D0NCfromDstSB->SetYTitle("Entries");
1767
1768 TH1F *hd0D0VtxTrueNCfromDstSB = new TH1F("hd0D0VtxTrueNCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1769 hd0D0VtxTrueNCfromDstSB->SetXTitle("Impact parameter [#mum]");
1770 hd0D0VtxTrueNCfromDstSB->SetYTitle("Entries");
1771
1772 TH1F *hMCd0D0NCfromDstSB = new TH1F("hMCd0D0NCfromDstarSB","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1773 hMCd0D0NCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
1774 hMCd0D0NCfromDstSB->SetYTitle("Entries");
1775
1776 flistNoCutsFromDstar->Add(hd0D0NCfromDstPM);
1777 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstPM);
1778 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstPM);
1779 flistNoCutsFromDstar->Add(hd0D0NCfromDstSB);
1780 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstSB);
1781 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstSB);
1782
e047b348 1783 TH1F *hd0D0ptNCfromDstPM;
1784 TH1F *hMCd0D0ptNCfromDstPM;
1785 TH1F *hd0D0VtxTrueptNCfromDstPM;
1786 TH1F *hd0D0ptNCfromDstSB;
1787 TH1F *hMCd0D0ptNCfromDstSB;
1788 TH1F *hd0D0VtxTrueptNCfromDstSB;
ac4c229c 1789 namehist="hd0D0ptNCfromDstar_";
624c07ab 1790 titlehist="D^{0} impact par. plot, No Cuts, FromDStar, ";
1791 for(Int_t i=0;i<fnbins;i++){
1792 strnamept=namehist;
1793 strnamept.Append("PkMss_pt");
1794 strnamept+=i;
1795
1796 strtitlept=titlehist;
1797 strtitlept.Append(" Mass Peak, ");
1798 strtitlept+=fptbins[i];
1799 strtitlept.Append("<= pt <");
1800 strtitlept+=fptbins[i+1];
1801 strtitlept.Append(" [GeV/c]");
1802
e047b348 1803 hd0D0ptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1804 hd0D0ptNCfromDstPM->SetXTitle("Impact parameter [#mum] ");
1805 hd0D0ptNCfromDstPM->SetYTitle("Entries");
1806 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstPM);
624c07ab 1807
1808 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1809 hMCd0D0ptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1810 hMCd0D0ptNCfromDstPM->SetXTitle("MC Impact parameter [#mum] ");
1811 hMCd0D0ptNCfromDstPM->SetYTitle("Entries");
1812 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstPM);
624c07ab 1813
1814
1815 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1816 hd0D0VtxTrueptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1817 hd0D0VtxTrueptNCfromDstPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1818 hd0D0VtxTrueptNCfromDstPM->SetYTitle("Entries");
1819 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstPM);
624c07ab 1820
1821 strnamept=namehist;
1822 strnamept.Append("SBMss_pt");
1823 strnamept+=i;
1824
1825 strtitlept=titlehist;
1826 strtitlept.Append(" Side Bands, ");
1827 strtitlept+=fptbins[i];
1828 strtitlept.Append("<= pt <");
1829 strtitlept+=fptbins[i+1];
1830 strtitlept.Append(" [GeV/c]");
1831
e047b348 1832 hd0D0ptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1833 hd0D0ptNCfromDstSB->SetXTitle("Impact parameter [#mum] ");
1834 hd0D0ptNCfromDstSB->SetYTitle("Entries");
1835 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstSB);
624c07ab 1836
1837 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1838 hMCd0D0ptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1839 hMCd0D0ptNCfromDstSB->SetXTitle("MC Impact parameter [#mum] ");
1840 hMCd0D0ptNCfromDstSB->SetYTitle("Entries");
1841 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstSB);
624c07ab 1842
1843 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1844 hd0D0VtxTrueptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1845 hd0D0VtxTrueptNCfromDstSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1846 hd0D0VtxTrueptNCfromDstSB->SetYTitle("Entries");
1847 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstSB);
624c07ab 1848 }
1849
1850
1851 //############ NO CUTS OTHER HISTOGRAMS ###########
1852 //
1853 //########### global properties histos ###########
1854
e047b348 1855 TH2F *hCPtaVSd0d0NCother=new TH2F("hCPtaVSd0d0NCother","hCPtaVSd0d0_NoCuts_other",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1856 TH1F *hSecVtxZNCother=new TH1F("hSecVtxZNCother","hSecVtxZ_NoCuts_other",1000,-8.,8.);
1857 TH1F *hSecVtxXNCother=new TH1F("hSecVtxXNCother","hSecVtxX_NoCuts_other",1000,-3000.,3000.);
1858 TH1F *hSecVtxYNCother=new TH1F("hSecVtxYNCother","hSecVtxY_NoCuts_other",1000,-3000.,3000.);
1859 TH2F *hSecVtxXYNCother=new TH2F("hSecVtxXYNCother","hSecVtxXY_NoCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
1860 TH1F *hSecVtxPhiNCother=new TH1F("hSecVtxPhiNCother","hSecVtxPhi_NoCuts_other",180,-180.1,180.1);
e047b348 1861 TH1F *hd0singlTrackNCother=new TH1F("hd0singlTrackNCother","hd0singlTrackNoCuts_Other",1000,-5000.,5000.);
1862 TH1F *hCPtaNCother=new TH1F("hCPtaNCother","hCPta_NoCuts_other",100,-1.,1.);
ac4c229c 1863 TH1F *hd0xd0NCother=new TH1F("hd0xd0NCother","hd0xd0_NoCuts_other",1000,-100000.,100000.);
1864 TH1F *hMassTrueNCother=new TH1F("hMassTrueNCother","D^{0} MC inv. Mass No Cuts other(All momenta)",600,1.600,2.200);
1865 TH1F *hMassNCother=new TH1F("hMassNCother","D^{0} inv. Mass No Cuts other (All momenta)",600,1.600,2.200);
1866 hMassNCother->Sumw2();
1867 TH1F *hMassTrueNCotherPM=new TH1F("hMassTrueNCotherPM","D^{0} MC inv. Mass No Cuts Other, Mass Peak. (All momenta)",600,1.600,2.200);
1868 TH1F *hMassNCotherPM=new TH1F("hMassNCotherPM","D^{0} inv. Mass No Cuts Other (All momenta), MassPeak",600,1.600,2.200);
1869 hMassNCotherPM->Sumw2();
1870 TH1F *hMassTrueNCotherSB=new TH1F("hMassTrueNCotherSB","D^{0} MC inv. Mass in Side Bands No Cuts other(All momenta)",600,1.600,2.200);
1871 TH1F *hMassNCotherSB=new TH1F("hMassNCotherSB","D^{0} inv. Mass in Side Bands No Cuts other (All momenta)",600,1.600,2.200);
1872 hMassNCotherSB->Sumw2();
1873
1874 flistNoCutsOther->Add(hCPtaVSd0d0NCother);
1875 flistNoCutsOther->Add(hSecVtxZNCother);
1876 flistNoCutsOther->Add(hSecVtxYNCother);
1877 flistNoCutsOther->Add(hSecVtxXNCother);
1878 flistNoCutsOther->Add(hSecVtxXYNCother);
1879 flistNoCutsOther->Add(hSecVtxPhiNCother);
e047b348 1880 flistNoCutsOther->Add(hd0singlTrackNCother);
ac4c229c 1881 flistNoCutsOther->Add(hCPtaNCother);
1882 flistNoCutsOther->Add(hd0xd0NCother);
1883 flistNoCutsOther->Add(hMassTrueNCother);
1884 flistNoCutsOther->Add(hMassNCother);
1885 flistNoCutsOther->Add(hMassTrueNCotherPM);
1886 flistNoCutsOther->Add(hMassNCotherPM);
1887 flistNoCutsOther->Add(hMassTrueNCotherSB);
1888 flistNoCutsOther->Add(hMassNCotherSB);
624c07ab 1889
e047b348 1890
1891
1892 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
1893 TH1F *hdcaNCother=new TH1F("hdcaNCother","hdca_NoCuts_Other",100,0.,1000.);
1894 hdcaNCother->SetXTitle("dca [#mum]");
1895 hdcaNCother->SetYTitle("Entries");
1896 TH1F *hcosthetastarNCother=new TH1F("hcosthetastarNCother","hCosThetaStar_NoCuts_Other",50,-1.,1.);
1897 hcosthetastarNCother->SetXTitle("cos #theta^{*}");
1898 hcosthetastarNCother->SetYTitle("Entries");
1899 TH1F *hptD0NCother=new TH1F("hptD0NCother","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1900 hptD0NCother->SetXTitle("p_{t} [GeV/c]");
1901 hptD0NCother->SetYTitle("Entries");
1902 TH1F *hptD0VsMaxPtNCother=new TH1F("hptD0VsMaxPtNCother","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1903 TH2F *hptD0PTallsqrtNCother=new TH2F("hptD0PTallsqrtNCother","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1904 TH2F *hptD0PTallNCother=new TH2F("hptD0PTallNCother","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1905 TH2F *hptD0vsptBNCother=new TH2F("hptD0vsptBNCother","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1906 TH2F *hpD0vspBNCother=new TH2F("hpD0vspBNCother","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1907 TH2F *hptD0vsptcquarkNCother=new TH2F("hptD0vsptcquarkNCother","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1908 TH2F *hpD0vspcquarkNCother=new TH2F("hpD0vspcquarkNCother","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1909 flistNoCutsOther->Add(hdcaNCother);
1910 flistNoCutsOther->Add(hcosthetastarNCother);
1911 flistNoCutsOther->Add(hptD0NCother);
1912 flistNoCutsOther->Add(hptD0VsMaxPtNCother);
1913 flistNoCutsOther->Add(hptD0PTallsqrtNCother);
1914 flistNoCutsOther->Add(hptD0PTallNCother);
1915 flistNoCutsOther->Add(hptD0vsptBNCother);
1916 flistNoCutsOther->Add(hpD0vspBNCother);
1917 flistNoCutsOther->Add(hptD0vsptcquarkNCother);
1918 flistNoCutsOther->Add(hpD0vspcquarkNCother);
1919
1920 TH1F *hd0zD0ptNCother;
cc3209fb 1921 TH1F *hInvMassD0NCother,*hInvMassD0barNCother;
e047b348 1922 TH2F *hInvMassPtNCother=new TH2F("hInvMassPtNCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 1923 THnSparseF *hSparseNCother=new THnSparseF("hSparseNCother","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
1924 hSparseNCother->SetBinEdges(0,massbins);
1925 hSparseNCother->SetBinEdges(1,massbins);
1926 hSparseNCother->SetBinEdges(2,ptbinsForNsparse);
1927 hSparseNCother->SetBinEdges(3,impparbins);
1928 hSparseNCother->SetBinEdges(4,massHypoBins);
1929 flistNoCutsOther->Add(hSparseNCother);
e047b348 1930 TH1F *hetaNCother;
1931 TH1F *hCosPDPBNCother;
1932 TH1F *hCosPcPDNCother;
1933 flistNoCutsOther->Add(hInvMassPtNCother);
1934 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1935 TH2F *hd0D0VSd0xd0NCotherpt;
1936 TH2F *hangletracksVSd0xd0NCotherpt;
1937 TH2F *hangletracksVSd0D0NCotherpt;
1938 TH1F *hd0xd0NCotherpt;
1939
1940 TH2F *hTOFpidNCother=new TH2F("hTOFpidNCother","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1941 flistNoCutsOther->Add(hTOFpidNCother);
1942
1943 for(Int_t i=0;i<fnbins;i++){
1944 namehist="hd0zD0ptNCother_pt";
1945 namehist+=i;
1946 titlehist="d0(z) No Cuts Otherm ptbin=";
1947 titlehist+=i;
1948 hd0zD0ptNCother=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1949 hd0zD0ptNCother->SetXTitle("d_{0}(z) [#mum]");
1950 hd0zD0ptNCother->SetYTitle("Entries");
1951 flistNoCutsOther->Add(hd0zD0ptNCother);
1952
cc3209fb 1953 namehist="hInvMassD0NCother_pt";
e047b348 1954 namehist+=i;
1955 titlehist="Invariant Mass No Cuts Other ptbin=";
1956 titlehist+=i;
cc3209fb 1957 hInvMassD0NCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1958 hInvMassD0NCother->SetXTitle("Invariant Mass [GeV]");
1959 hInvMassD0NCother->SetYTitle("Entries");
1960 flistNoCutsOther->Add(hInvMassD0NCother);
1961
1962
1963 namehist="hInvMassD0barNCother_pt";
1964 namehist+=i;
1965 titlehist="Invariant Mass D0bar No Cuts Other ptbin=";
1966 titlehist+=i;
1967 hInvMassD0barNCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1968 hInvMassD0barNCother->SetXTitle("Invariant Mass [GeV]");
1969 hInvMassD0barNCother->SetYTitle("Entries");
1970 flistNoCutsOther->Add(hInvMassD0barNCother);
1971
e047b348 1972
1973 namehist="hetaNCother_pt";
1974 namehist+=i;
1975 titlehist="eta No Cuts Other ptbin=";
1976 titlehist+=i;
1977 hetaNCother=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1978 hetaNCother->SetXTitle("Pseudorapidity");
1979 hetaNCother->SetYTitle("Entries");
1980 flistNoCutsOther->Add(hetaNCother);
1981
1982 namehist="hCosPDPBNCother_pt";
1983 namehist+=i;
1984 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1985 titlehist+=i;
1986 hCosPDPBNCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1987 hCosPDPBNCother->SetXTitle("Cosine between D0 momentum and B momentum");
1988 hCosPDPBNCother->SetYTitle("Entries");
1989 flistNoCutsOther->Add(hCosPDPBNCother);
1990
1991 namehist="hCosPcPDNCother_pt";
1992 namehist+=i;
1993 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1994 titlehist+=i;
1995 hCosPcPDNCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1996 hCosPcPDNCother->SetXTitle("Cosine between c quark momentum and D0 momentum");
1997 hCosPcPDNCother->SetYTitle("Entries");
1998 flistNoCutsOther->Add(hCosPcPDNCother);
1999
2000
2001 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2002 namehist="hd0xd0NCother_pt";
2003 namehist+=i;
2004 titlehist="d0xd0 No Cuts Other ptbin=";
2005 titlehist+=i;
2006 hd0xd0NCotherpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2007 hd0xd0NCotherpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2008 hd0xd0NCotherpt->SetYTitle("Entries");
2009 flistNoCutsOther->Add(hd0xd0NCotherpt);
2010
2011
2012 namehist="hd0D0VSd0xd0NCother_pt";
2013 namehist+=i;
2014 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Other ptbin=";
2015 titlehist+=i;
2016 hd0D0VSd0xd0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2017 hd0D0VSd0xd0NCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2018 hd0D0VSd0xd0NCotherpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2019 flistNoCutsOther->Add(hd0D0VSd0xd0NCotherpt);
2020
2021
2022 namehist="hangletracksVSd0xd0NCother_pt";
2023 namehist+=i;
2024 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Other ptbin=";
2025 titlehist+=i;
2026 hangletracksVSd0xd0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2027 hangletracksVSd0xd0NCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2028 hangletracksVSd0xd0NCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
2029 flistNoCutsOther->Add(hangletracksVSd0xd0NCotherpt);
2030
2031
2032 namehist="hangletracksVSd0D0NCother_pt";
2033 namehist+=i;
2034 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Other ptbin=";
2035 titlehist+=i;
2036 hangletracksVSd0D0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2037 hangletracksVSd0D0NCotherpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2038 hangletracksVSd0D0NCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
2039 flistNoCutsOther->Add(hangletracksVSd0D0NCotherpt);
2040
2041 }
2042 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2043 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2044
2045
2046
2047
624c07ab 2048 //############# d0 D0 histos ###############à
ac4c229c 2049 TH1F *hd0D0NCotherPM = new TH1F("hd0D0NCotherPM","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2050 hd0D0NCotherPM->SetXTitle("Impact parameter [#mum]");
2051 hd0D0NCotherPM->SetYTitle("Entries");
2052
2053 TH1F *hd0D0VtxTrueNCotherPM = new TH1F("hd0D0VtxTrueNCotherPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2054 hd0D0VtxTrueNCotherPM->SetXTitle("Impact parameter [#mum]");
2055 hd0D0VtxTrueNCotherPM->SetYTitle("Entries");
2056
2057 TH1F *hMCd0D0NCotherPM = new TH1F("hMCd0D0NCotherPM","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2058 hMCd0D0NCotherPM->SetXTitle("MC Impact parameter [#mum]");
2059 hMCd0D0NCotherPM->SetYTitle("Entries");
2060
2061 TH1F *hd0D0NCotherSB = new TH1F("hd0D0NCotherSB","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2062 hd0D0NCotherSB->SetXTitle("Impact parameter [#mum]");
2063 hd0D0NCotherSB->SetYTitle("Entries");
2064
2065 TH1F *hd0D0VtxTrueNCotherSB = new TH1F("hd0D0VtxTrueNCotherSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2066 hd0D0VtxTrueNCotherSB->SetXTitle("Impact parameter [#mum]");
2067 hd0D0VtxTrueNCotherSB->SetYTitle("Entries");
2068
2069 TH1F *hMCd0D0NCotherSB = new TH1F("hMCd0D0NCotherSB","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
2070 hMCd0D0NCotherSB->SetXTitle("MC Impact parameter [#mum]");
2071 hMCd0D0NCotherSB->SetYTitle("Entries");
2072
2073 flistNoCutsOther->Add(hd0D0NCotherPM);
2074 flistNoCutsOther->Add(hd0D0VtxTrueNCotherPM);
2075 flistNoCutsOther->Add(hMCd0D0NCotherPM);
2076 flistNoCutsOther->Add(hd0D0NCotherSB);
2077 flistNoCutsOther->Add(hd0D0VtxTrueNCotherSB);
2078 flistNoCutsOther->Add(hMCd0D0NCotherSB);
2079
e047b348 2080 TH1F *hd0D0ptNCotherPM;
2081 TH1F *hMCd0D0ptNCotherPM;
2082 TH1F *hd0D0VtxTrueptNCotherPM;
2083 TH1F *hd0D0ptNCotherSB;
2084 TH1F *hMCd0D0ptNCotherSB;
2085 TH1F *hd0D0VtxTrueptNCotherSB;
ac4c229c 2086 namehist="hd0D0ptNCother_";
624c07ab 2087 titlehist="D^{0} impact par. plot, No Cuts, Other, ";
2088 for(Int_t i=0;i<fnbins;i++){
2089 strnamept=namehist;
2090 strnamept.Append("PkMss_pt");
2091 strnamept+=i;
2092
2093 strtitlept=titlehist;
2094 strtitlept.Append(" Mass Peak, ");
2095 strtitlept+=fptbins[i];
2096 strtitlept.Append("<= pt <");
2097 strtitlept+=fptbins[i+1];
2098 strtitlept.Append(" [GeV/c]");
2099
e047b348 2100 hd0D0ptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2101 hd0D0ptNCotherPM->SetXTitle("Impact parameter [#mum] ");
2102 hd0D0ptNCotherPM->SetYTitle("Entries");
2103 flistNoCutsOther->Add(hd0D0ptNCotherPM);
624c07ab 2104
2105 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2106 hMCd0D0ptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2107 hMCd0D0ptNCotherPM->SetXTitle("MC Impact parameter [#mum] ");
2108 hMCd0D0ptNCotherPM->SetYTitle("Entries");
2109 flistNoCutsOther->Add(hMCd0D0ptNCotherPM);
624c07ab 2110
2111
2112 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2113 hd0D0VtxTrueptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2114 hd0D0VtxTrueptNCotherPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2115 hd0D0VtxTrueptNCotherPM->SetYTitle("Entries");
2116 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherPM);
624c07ab 2117
2118 strnamept=namehist;
2119 strnamept.Append("SBMss_pt");
2120 strnamept+=i;
2121
2122 strtitlept=titlehist;
2123 strtitlept.Append(" Side Bands, ");
2124 strtitlept+=fptbins[i];
2125 strtitlept.Append("<= pt <");
2126 strtitlept+=fptbins[i+1];
2127 strtitlept.Append(" [GeV/c]");
2128
e047b348 2129 hd0D0ptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2130 hd0D0ptNCotherSB->SetXTitle("Impact parameter [#mum] ");
2131 hd0D0ptNCotherSB->SetYTitle("Entries");
2132 flistNoCutsOther->Add(hd0D0ptNCotherSB);
624c07ab 2133
2134 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2135 hMCd0D0ptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2136 hMCd0D0ptNCotherSB->SetXTitle("MC Impact parameter [#mum] ");
2137 hMCd0D0ptNCotherSB->SetYTitle("Entries");
2138 flistNoCutsOther->Add(hMCd0D0ptNCotherSB);
624c07ab 2139
2140 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2141 hd0D0VtxTrueptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2142 hd0D0VtxTrueptNCotherSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2143 hd0D0VtxTrueptNCotherSB->SetYTitle("Entries");
2144 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherSB);
624c07ab 2145 }
2146
2147
2148 //################################################################################################
2149 // #
2150 // HISTOS FOR LOOSE CUTS #
2151 // #
2152 //################################################################################################
2153
2154 //############ LOOSE CUTS SIGNAL HISTOGRAMS ###############
2155 //
2156 // ####### global properties histo ############
2157
e047b348 2158 TH2F *hCPtaVSd0d0LSCsign=new TH2F("hCPtaVSd0d0LSCsign","hCPtaVSd0d0_LooseCuts_Signal",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2159 TH1F *hSecVtxZLSCsign=new TH1F("hSecVtxZLSCsign","hSecVtxZ_LooseCuts_Signal",1000,-8.,8.);
2160 TH1F *hSecVtxXLSCsign=new TH1F("hSecVtxXLSCsign","hSecVtxX_LooseCuts_Signal",1000,-3000.,3000.);
2161 TH1F *hSecVtxYLSCsign=new TH1F("hSecVtxYLSCsign","hSecVtxY_LooseCuts_Signal",1000,-3000.,3000.);
2162 TH2F *hSecVtxXYLSCsign=new TH2F("hSecVtxXYLSCsign","hSecVtxXY_LooseCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
2163 TH1F *hSecVtxPhiLSCsign=new TH1F("hSecVtxPhiLSCsign","hSecVtxPhi_LooseCuts_Signal",180,-180.1,180.1);
e047b348 2164 TH1F *hd0singlTrackLSCsign=new TH1F("hd0singlTrackLSCsign","hd0singlTrackLooseCuts_Signal",1000,-5000.,5000.);
2165 TH1F *hCPtaLSCsign=new TH1F("hCPtaLSCsign","hCPta_LooseCuts_Signal",100,-1.,1.);
ac4c229c 2166 TH1F *hd0xd0LSCsign=new TH1F("hd0xd0LSCsign","hd0xd0_LooseCuts_Signal",1000,-100000.,100000.);
2167 TH1F *hMassTrueLSCsign=new TH1F("hMassTrueLSCsign","D^{0} MC inv. Mass Loose Cuts Signal(All momenta)",600,1.600,2.200);
2168 TH1F *hMassLSCsign=new TH1F("hMassLSCsign","D^{0} inv. Mass Loose Cuts Signal (All momenta)",600,1.600,2.200);
2169 hMassLSCsign->Sumw2();
2170 TH1F *hMassTrueLSCsignPM=new TH1F("hMassTrueLSCsignPM","D^{0} MC inv. Mass Loose Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
2171 TH1F *hMassLSCsignPM=new TH1F("hMassLSCsignPM","D^{0} inv. Mass Loose Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
2172 hMassLSCsignPM->Sumw2();
2173 TH1F *hMassTrueLSCsignSB=new TH1F("hMassTrueLSCsignSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Signal(All momenta)",600,1.600,2.200);
2174 TH1F *hMassLSCsignSB=new TH1F("hMassLSCsignSB","D^{0} inv. Mass in Side Bands Loose Cuts Signal (All momenta)",600,1.600,2.200);
2175 hMassLSCsignSB->Sumw2();
2176
2177 flistLsCutsSignal->Add(hCPtaVSd0d0LSCsign);
2178 flistLsCutsSignal->Add(hSecVtxZLSCsign);
2179 flistLsCutsSignal->Add(hSecVtxYLSCsign);
2180 flistLsCutsSignal->Add(hSecVtxXLSCsign);
2181 flistLsCutsSignal->Add(hSecVtxXYLSCsign);
2182 flistLsCutsSignal->Add(hSecVtxPhiLSCsign);
e047b348 2183 flistLsCutsSignal->Add(hd0singlTrackLSCsign);
ac4c229c 2184 flistLsCutsSignal->Add(hCPtaLSCsign);
2185 flistLsCutsSignal->Add(hd0xd0LSCsign);
2186 flistLsCutsSignal->Add(hMassTrueLSCsign);
2187 flistLsCutsSignal->Add(hMassLSCsign);
2188 flistLsCutsSignal->Add(hMassTrueLSCsignPM);
2189 flistLsCutsSignal->Add(hMassLSCsignPM);
2190 flistLsCutsSignal->Add(hMassTrueLSCsignSB);
2191 flistLsCutsSignal->Add(hMassLSCsignSB);
624c07ab 2192
e047b348 2193
2194 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2195 TH1F *hdcaLSCsign=new TH1F("hdcaLSCsign","hdca_LooseCuts_Sign",100,0.,1000.);
2196 hdcaLSCsign->SetXTitle("dca [#mum]");
2197 hdcaLSCsign->SetYTitle("Entries");
2198 TH1F *hcosthetastarLSCsign=new TH1F("hcosthetastarLSCsign","hCosThetaStar_LooseCuts_Sign",50,-1.,1.);
2199 hcosthetastarLSCsign->SetXTitle("cos #theta^{*}");
2200 hcosthetastarLSCsign->SetYTitle("Entries");
2201 TH1F *hptD0LSCsign=new TH1F("hptD0LSCsign","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2202 hptD0LSCsign->SetXTitle("p_{t} [GeV/c]");
2203 hptD0LSCsign->SetYTitle("Entries");
2204 TH1F *hptD0VsMaxPtLSCsign=new TH1F("hptD0VsMaxPtLSCsign","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2205 TH2F *hptD0PTallsqrtLSCsign=new TH2F("hptD0PTallsqrtLSCsign","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2206 TH2F *hptD0PTallLSCsign=new TH2F("hptD0PTallLSCsign","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2207 TH2F *hptD0vsptBLSCsign=new TH2F("hptD0vsptBLSCsign","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2208 TH2F *hpD0vspBLSCsign=new TH2F("hpD0vspBLSCsign","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2209 TH2F *hptD0vsptcquarkLSCsign=new TH2F("hptD0vsptcquarkLSCsign","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2210 TH2F *hpD0vspcquarkLSCsign=new TH2F("hpD0vspcquarkLSCsign","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2211 flistLsCutsSignal->Add(hdcaLSCsign);
2212 flistLsCutsSignal->Add(hcosthetastarLSCsign);
2213 flistLsCutsSignal->Add(hptD0LSCsign);
2214 flistLsCutsSignal->Add(hptD0VsMaxPtLSCsign);
2215 flistLsCutsSignal->Add(hptD0PTallsqrtLSCsign);
2216 flistLsCutsSignal->Add(hptD0PTallLSCsign);
2217 flistLsCutsSignal->Add(hptD0vsptBLSCsign);
2218 flistLsCutsSignal->Add(hpD0vspBLSCsign);
2219 flistLsCutsSignal->Add(hptD0vsptcquarkLSCsign);
2220 flistLsCutsSignal->Add(hpD0vspcquarkLSCsign);
2221
2222 TH1F *hd0zD0ptLSCsign;
cc3209fb 2223 TH1F *hInvMassD0LSCsign,*hInvMassD0barLSCsign;
e047b348 2224 TH2F *hInvMassPtLSCsign=new TH2F("hInvMassPtLSCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 2225 THnSparseF *hSparseLSCsign=new THnSparseF("hSparseLSCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
2226 hSparseLSCsign->SetBinEdges(0,massbins);
2227 hSparseLSCsign->SetBinEdges(1,massbins);
2228 hSparseLSCsign->SetBinEdges(2,ptbinsForNsparse);
2229 hSparseLSCsign->SetBinEdges(3,impparbins);
2230 hSparseLSCsign->SetBinEdges(4,massHypoBins);
2231 flistLsCutsSignal->Add(hSparseLSCsign);
e047b348 2232 TH1F *hetaLSCsign;
2233 TH1F *hCosPDPBLSCsign;
2234 TH1F *hCosPcPDLSCsign;
2235 flistLsCutsSignal->Add(hInvMassPtLSCsign);
2236
2237 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2238 TH2F *hd0D0VSd0xd0LSCsignpt;
2239 TH2F *hangletracksVSd0xd0LSCsignpt;
2240 TH2F *hangletracksVSd0D0LSCsignpt;
2241 TH1F *hd0xd0LSCsignpt;
2242
2243 TH2F *hTOFpidLSCsign=new TH2F("hTOFpidLSCsign","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2244 flistLsCutsSignal->Add(hTOFpidLSCsign);
2245
2246 for(Int_t i=0;i<fnbins;i++){
2247 namehist="hd0zD0ptLSCsign_pt";
2248 namehist+=i;
2249 titlehist="d0(z) Loose Cuts Signm ptbin=";
2250 titlehist+=i;
2251 hd0zD0ptLSCsign=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2252 hd0zD0ptLSCsign->SetXTitle("d_{0}(z) [#mum]");
2253 hd0zD0ptLSCsign->SetYTitle("Entries");
2254 flistLsCutsSignal->Add(hd0zD0ptLSCsign);
2255
cc3209fb 2256 namehist="hInvMassD0LSCsign_pt";
e047b348 2257 namehist+=i;
2258 titlehist="Invariant Mass Loose Cuts Sign ptbin=";
2259 titlehist+=i;
cc3209fb 2260 hInvMassD0LSCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2261 hInvMassD0LSCsign->SetXTitle("Invariant Mass [GeV]");
2262 hInvMassD0LSCsign->SetYTitle("Entries");
2263 flistLsCutsSignal->Add(hInvMassD0LSCsign);
2264
2265
2266 namehist="hInvMassD0barLSCsign_pt";
2267 namehist+=i;
d39e8f99 2268 titlehist="Invariant Mass D0bar Loose Cuts Signal ptbin=";
cc3209fb 2269 titlehist+=i;
2270 hInvMassD0barLSCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2271 hInvMassD0barLSCsign->SetXTitle("Invariant Mass [GeV]");
2272 hInvMassD0barLSCsign->SetYTitle("Entries");
2273 flistLsCutsSignal->Add(hInvMassD0barLSCsign);
e047b348 2274
2275 namehist="hetaLSCsign_pt";
2276 namehist+=i;
2277 titlehist="eta Loose Cuts Sign ptbin=";
2278 titlehist+=i;
2279 hetaLSCsign=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2280 hetaLSCsign->SetXTitle("Pseudorapidity");
2281 hetaLSCsign->SetYTitle("Entries");
2282 flistLsCutsSignal->Add(hetaLSCsign);
2283
2284 namehist="hCosPDPBLSCsign_pt";
2285 namehist+=i;
2286 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2287 titlehist+=i;
2288 hCosPDPBLSCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2289 hCosPDPBLSCsign->SetXTitle("Cosine between D0 momentum and B momentum");
2290 hCosPDPBLSCsign->SetYTitle("Entries");
2291 flistLsCutsSignal->Add(hCosPDPBLSCsign);
2292
2293 namehist="hCosPcPDLSCsign_pt";
2294 namehist+=i;
2295 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2296 titlehist+=i;
2297 hCosPcPDLSCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2298 hCosPcPDLSCsign->SetXTitle("Cosine between c quark momentum and D0 momentum");
2299 hCosPcPDLSCsign->SetYTitle("Entries");
2300 flistLsCutsSignal->Add(hCosPcPDLSCsign);
2301
2302
2303 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2304 namehist="hd0xd0LSCsign_pt";
2305 namehist+=i;
2306 titlehist="d0xd0 Loose Cuts Sign ptbin=";
2307 titlehist+=i;
2308 hd0xd0LSCsignpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2309 hd0xd0LSCsignpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2310 hd0xd0LSCsignpt->SetYTitle("Entries");
2311 flistLsCutsSignal->Add(hd0xd0LSCsignpt);
2312
2313
2314 namehist="hd0D0VSd0xd0LSCsign_pt";
2315 namehist+=i;
2316 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Sign ptbin=";
2317 titlehist+=i;
2318 hd0D0VSd0xd0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2319 hd0D0VSd0xd0LSCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2320 hd0D0VSd0xd0LSCsignpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2321 flistLsCutsSignal->Add(hd0D0VSd0xd0LSCsignpt);
2322
2323
2324 namehist="hangletracksVSd0xd0LSCsign_pt";
2325 namehist+=i;
2326 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Sign ptbin=";
2327 titlehist+=i;
2328 hangletracksVSd0xd0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2329 hangletracksVSd0xd0LSCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2330 hangletracksVSd0xd0LSCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
2331 flistLsCutsSignal->Add(hangletracksVSd0xd0LSCsignpt);
2332
2333
2334 namehist="hangletracksVSd0D0LSCsign_pt";
2335 namehist+=i;
2336 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts Sign ptbin=";
2337 titlehist+=i;
2338 hangletracksVSd0D0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2339 hangletracksVSd0D0LSCsignpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2340 hangletracksVSd0D0LSCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
2341 flistLsCutsSignal->Add(hangletracksVSd0D0LSCsignpt);
2342
2343
2344 }
2345 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2346 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2347
2348
624c07ab 2349 // ####### d0 D0 histos ############
ac4c229c 2350 TH1F *hd0D0LSCsignPM = new TH1F("hd0D0LSCsignPM","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2351 hd0D0LSCsignPM->SetXTitle("Impact parameter [#mum]");
2352 hd0D0LSCsignPM->SetYTitle("Entries");
2353
2354 TH1F *hd0D0VtxTrueLSCsignPM = new TH1F("hd0D0VtxTrueLSCsignPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2355 hd0D0VtxTrueLSCsignPM->SetXTitle("Impact parameter [#mum]");
2356 hd0D0VtxTrueLSCsignPM->SetYTitle("Entries");
2357
2358 TH1F *hMCd0D0LSCsignPM = new TH1F("hMCd0D0LSCsignPM","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2359 hMCd0D0LSCsignPM->SetXTitle("MC Impact parameter [#mum]");
2360 hMCd0D0LSCsignPM->SetYTitle("Entries");
2361
2362 TH1F *hd0D0LSCsignSB = new TH1F("hd0D0LSCsignSB","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2363 hd0D0LSCsignSB->SetXTitle("Impact parameter [#mum]");
2364 hd0D0LSCsignSB->SetYTitle("Entries");
2365
2366 TH1F *hd0D0VtxTrueLSCsignSB = new TH1F("hd0D0VtxTrueLSCsignSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2367 hd0D0VtxTrueLSCsignSB->SetXTitle("Impact parameter [#mum]");
2368 hd0D0VtxTrueLSCsignSB->SetYTitle("Entries");
2369
2370 TH1F *hMCd0D0LSCsignSB = new TH1F("hMCd0D0LSCsignSB","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2371 hMCd0D0LSCsignSB->SetXTitle("MC Impact parameter [#mum]");
2372 hMCd0D0LSCsignSB->SetYTitle("Entries");
2373
2374 flistLsCutsSignal->Add(hd0D0LSCsignPM);
2375 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignPM);
2376 flistLsCutsSignal->Add(hMCd0D0LSCsignPM);
2377 flistLsCutsSignal->Add(hd0D0LSCsignSB);
2378 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignSB);
2379 flistLsCutsSignal->Add(hMCd0D0LSCsignSB);
2380
e047b348 2381 TH1F *hd0D0ptLSCsignPM;
2382 TH1F *hMCd0D0ptLSCsignPM;
2383 TH1F *hd0D0VtxTrueptLSCsignPM;
2384 TH1F *hd0D0ptLSCsignSB;
2385 TH1F *hMCd0D0ptLSCsignSB;
2386 TH1F *hd0D0VtxTrueptLSCsignSB;
ac4c229c 2387 namehist="hd0D0ptLSCsign_";
624c07ab 2388 titlehist="D^{0} impact par. plot, Loose Cuts, Signal, ";
2389 for(Int_t i=0;i<fnbins;i++){
2390 strnamept=namehist;
2391 strnamept.Append("PkMss_pt");
2392 strnamept+=i;
2393
2394 strtitlept=titlehist;
2395 strtitlept.Append(" Mass Peak, ");
2396 strtitlept+=fptbins[i];
2397 strtitlept.Append("<= pt <");
2398 strtitlept+=fptbins[i+1];
2399 strtitlept.Append(" [GeV/c]");
2400
e047b348 2401 hd0D0ptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2402 hd0D0ptLSCsignPM->SetXTitle("Impact parameter [#mum] ");
2403 hd0D0ptLSCsignPM->SetYTitle("Entries");
2404 flistLsCutsSignal->Add(hd0D0ptLSCsignPM);
624c07ab 2405
2406 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2407 hMCd0D0ptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2408 hMCd0D0ptLSCsignPM->SetXTitle("MC Impact parameter [#mum] ");
2409 hMCd0D0ptLSCsignPM->SetYTitle("Entries");
2410 flistLsCutsSignal->Add(hMCd0D0ptLSCsignPM);
624c07ab 2411
2412
2413 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2414 hd0D0VtxTrueptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2415 hd0D0VtxTrueptLSCsignPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2416 hd0D0VtxTrueptLSCsignPM->SetYTitle("Entries");
2417 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignPM);
624c07ab 2418
2419 strnamept=namehist;
2420 strnamept.Append("SBMss_pt");
2421 strnamept+=i;
2422
2423 strtitlept=titlehist;
2424 strtitlept.Append(" Side Bands, ");
2425 strtitlept+=fptbins[i];
2426 strtitlept.Append("<= pt <");
2427 strtitlept+=fptbins[i+1];
2428 strtitlept.Append(" [GeV/c]");
2429
e047b348 2430 hd0D0ptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2431 hd0D0ptLSCsignSB->SetXTitle("Impact parameter [#mum] ");
2432 hd0D0ptLSCsignSB->SetYTitle("Entries");
2433 flistLsCutsSignal->Add(hd0D0ptLSCsignSB);
624c07ab 2434
2435 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2436 hMCd0D0ptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2437 hMCd0D0ptLSCsignSB->SetXTitle("MC Impact parameter [#mum] ");
2438 hMCd0D0ptLSCsignSB->SetYTitle("Entries");
2439 flistLsCutsSignal->Add(hMCd0D0ptLSCsignSB);
624c07ab 2440
2441 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2442 hd0D0VtxTrueptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2443 hd0D0VtxTrueptLSCsignSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2444 hd0D0VtxTrueptLSCsignSB->SetYTitle("Entries");
2445 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignSB);
624c07ab 2446 }
2447
2448
2449 //############ LOOSE CUTS BACKGROUND HISTOGRAMS ###########
2450 //
2451 // ######## global properties histos #######
e047b348 2452 TH2F *hCPtaVSd0d0LSCback=new TH2F("hCPtaVSd0d0LSCback","hCPtaVSd0d0_LooseCuts_Background",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2453 TH1F *hSecVtxZLSCback=new TH1F("hSecVtxZLSCback","hSecVtxZ_LooseCuts_Background",1000,-8.,8.);
2454 TH1F *hSecVtxXLSCback=new TH1F("hSecVtxXLSCback","hSecVtxX_LooseCuts_Background",1000,-3000.,3000.);
2455 TH1F *hSecVtxYLSCback=new TH1F("hSecVtxYLSCback","hSecVtxY_LooseCuts_Background",1000,-3000.,3000.);
2456 TH2F *hSecVtxXYLSCback=new TH2F("hSecVtxXYLSCback","hSecVtxXY_LooseCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
2457 TH1F *hSecVtxPhiLSCback=new TH1F("hSecVtxPhiLSCback","hSecVtxPhi_LooseCuts_Background",180,-180.1,180.1);
e047b348 2458 TH1F *hd0singlTrackLSCback=new TH1F("hd0singlTrackLSCback","hd0singlTrackLooseCuts_Back",1000,-5000.,5000.);
2459 TH1F *hCPtaLSCback=new TH1F("hCPtaLSCback","hCPta_LooseCuts_Background",100,-1.,1.);
ac4c229c 2460 TH1F *hd0xd0LSCback=new TH1F("hd0xd0LSCback","hd0xd0_LooseCuts_Background",1000,-100000.,100000.);
2461 TH1F *hMassTrueLSCback=new TH1F("hMassTrueLSCback","D^{0} MC inv. Mass Loose Cuts Background(All momenta)",600,1.600,2.200);
2462 TH1F *hMassLSCback=new TH1F("hMassLSCback","D^{0} inv. Mass Loose Cuts Background (All momenta)",600,1.600,2.200);
2463 hMassLSCback->Sumw2();
2464 TH1F *hMassTrueLSCbackPM=new TH1F("hMassTrueLSCbackPM","D^{0} MC inv. Mass Loose Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
2465 TH1F *hMassLSCbackPM=new TH1F("hMassLSCbackPM","D^{0} inv. Mass Loose Cuts Background (All momenta), MassPeak",600,1.600,2.200);
2466 hMassLSCbackPM->Sumw2();
2467 TH1F *hMassTrueLSCbackSB=new TH1F("hMassTrueLSCbackSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Background(All momenta)",600,1.600,2.200);
2468 TH1F *hMassLSCbackSB=new TH1F("hMassLSCbackSB","D^{0} inv. Mass in Side Bands Loose Cuts Background (All momenta)",600,1.600,2.200);
2469 hMassLSCbackSB->Sumw2();
2470
2471 flistLsCutsBack->Add(hCPtaVSd0d0LSCback);
2472 flistLsCutsBack->Add(hSecVtxZLSCback);
2473 flistLsCutsBack->Add(hSecVtxYLSCback);
2474 flistLsCutsBack->Add(hSecVtxXLSCback);
2475 flistLsCutsBack->Add(hSecVtxXYLSCback);
2476 flistLsCutsBack->Add(hSecVtxPhiLSCback);
e047b348 2477 flistLsCutsBack->Add(hd0singlTrackLSCback);
ac4c229c 2478 flistLsCutsBack->Add(hCPtaLSCback);
2479 flistLsCutsBack->Add(hd0xd0LSCback);
2480 flistLsCutsBack->Add(hMassTrueLSCback);
2481 flistLsCutsBack->Add(hMassLSCback);
2482 flistLsCutsBack->Add(hMassTrueLSCbackPM);
2483 flistLsCutsBack->Add(hMassLSCbackPM);
2484 flistLsCutsBack->Add(hMassTrueLSCbackSB);
2485 flistLsCutsBack->Add(hMassLSCbackSB);
624c07ab 2486
2487
e047b348 2488
2489
2490
2491
2492
2493
2494 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2495 TH1F *hdcaLSCback=new TH1F("hdcaLSCback","hdca_LooseCuts_Backgr",100,0.,1000.);
2496 hdcaLSCback->SetXTitle("dca [#mum]");
2497 hdcaLSCback->SetYTitle("Entries");
2498 TH1F *hcosthetastarLSCback=new TH1F("hcosthetastarLSCback","hCosThetaStar_LooseCuts_Backgr",50,-1.,1.);
2499 hcosthetastarLSCback->SetXTitle("cos #theta^{*}");
2500 hcosthetastarLSCback->SetYTitle("Entries");
2501 TH1F *hptD0LSCback=new TH1F("hptD0LSCback","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2502 hptD0LSCback->SetXTitle("p_{t} [GeV/c]");
2503 hptD0LSCback->SetYTitle("Entries");
2504 TH1F *hptD0VsMaxPtLSCback=new TH1F("hptD0VsMaxPtLSCback","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2505 TH2F *hptD0PTallsqrtLSCback=new TH2F("hptD0PTallsqrtLSCback","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2506 TH2F *hptD0PTallLSCback=new TH2F("hptD0PTallLSCback","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2507 TH2F *hptD0vsptBLSCback=new TH2F("hptD0vsptBLSCback","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2508 TH2F *hpD0vspBLSCback=new TH2F("hpD0vspBLSCback","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2509 TH2F *hptD0vsptcquarkLSCback=new TH2F("hptD0vsptcquarkLSCback","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2510 TH2F *hpD0vspcquarkLSCback=new TH2F("hpD0vspcquarkLSCback","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2511 flistLsCutsBack->Add(hdcaLSCback);
2512 flistLsCutsBack->Add(hcosthetastarLSCback);
2513 flistLsCutsBack->Add(hptD0LSCback);
2514 flistLsCutsBack->Add(hptD0VsMaxPtLSCback);
2515 flistLsCutsBack->Add(hptD0PTallsqrtLSCback);
2516 flistLsCutsBack->Add(hptD0PTallLSCback);
2517 flistLsCutsBack->Add(hptD0vsptBLSCback);
2518 flistLsCutsBack->Add(hpD0vspBLSCback);
2519 flistLsCutsBack->Add(hptD0vsptcquarkLSCback);
2520 flistLsCutsBack->Add(hpD0vspcquarkLSCback);
2521
2522 TH1F *hd0zD0ptLSCback;
cc3209fb 2523 TH1F *hInvMassD0LSCback,*hInvMassD0barLSCback;
e047b348 2524 TH2F *hInvMassPtLSCback=new TH2F("hInvMassPtLSCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 2525 THnSparseF *hSparseLSCback=new THnSparseF("hSparseLSCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
2526 hSparseLSCback->SetBinEdges(0,massbins);
2527 hSparseLSCback->SetBinEdges(1,massbins);
2528 hSparseLSCback->SetBinEdges(2,ptbinsForNsparse);
2529 hSparseLSCback->SetBinEdges(3,impparbins);
2530 hSparseLSCback->SetBinEdges(4,massHypoBins);
2531 flistLsCutsBack->Add(hSparseLSCback);
e047b348 2532 TH1F *hetaLSCback;
2533 TH1F *hCosPDPBLSCback;
2534 TH1F *hCosPcPDLSCback;
2535 flistLsCutsBack->Add(hInvMassPtLSCback);
2536 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2537 TH2F *hd0D0VSd0xd0LSCbackpt;
2538 TH2F *hangletracksVSd0xd0LSCbackpt;
2539 TH2F *hangletracksVSd0D0LSCbackpt;
2540 TH1F *hd0xd0LSCbackpt;
2541
2542 TH2F *hTOFpidLSCback=new TH2F("hTOFpidLSCback","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2543 flistLsCutsBack->Add(hTOFpidLSCback);
2544
2545 for(Int_t i=0;i<fnbins;i++){
2546 namehist="hd0zD0ptLSCback_pt";
2547 namehist+=i;
2548 titlehist="d0(z) Loose Cuts Backgr ptbin=";
2549 titlehist+=i;
2550 hd0zD0ptLSCback=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2551 hd0zD0ptLSCback->SetXTitle("d_{0}(z) [#mum]");
2552 hd0zD0ptLSCback->SetYTitle("Entries");
2553 flistLsCutsBack->Add(hd0zD0ptLSCback);
2554
cc3209fb 2555 namehist="hInvMassD0LSCback_pt";
e047b348 2556 namehist+=i;
2557 titlehist="Invariant Mass Loose Cuts Backgr ptbin=";
2558 titlehist+=i;
cc3209fb 2559 hInvMassD0LSCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2560 hInvMassD0LSCback->SetXTitle("Invariant Mass [GeV]");
2561 hInvMassD0LSCback->SetYTitle("Entries");
2562 flistLsCutsBack->Add(hInvMassD0LSCback);
2563
2564 namehist="hInvMassD0barLSCback_pt";
2565 namehist+=i;
d39e8f99 2566 titlehist="Invariant Mass D0bar Loose Cuts Back ptbin=";
cc3209fb 2567 titlehist+=i;
2568 hInvMassD0barLSCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2569 hInvMassD0barLSCback->SetXTitle("Invariant Mass [GeV]");
2570 hInvMassD0barLSCback->SetYTitle("Entries");
2571 flistLsCutsBack->Add(hInvMassD0barLSCback);
2572
e047b348 2573
2574 namehist="hetaLSCback_pt";
2575 namehist+=i;
2576 titlehist="eta Loose Cuts Backgr ptbin=";
2577 titlehist+=i;
2578 hetaLSCback=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2579 hetaLSCback->SetXTitle("Pseudorapidity");
2580 hetaLSCback->SetYTitle("Entries");
2581 flistLsCutsBack->Add(hetaLSCback);
2582
2583 namehist="hCosPDPBLSCback_pt";
2584 namehist+=i;
2585 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2586 titlehist+=i;
2587 hCosPDPBLSCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2588 hCosPDPBLSCback->SetXTitle("Cosine between D0 momentum and B momentum");
2589 hCosPDPBLSCback->SetYTitle("Entries");
2590 flistLsCutsBack->Add(hCosPDPBLSCback);
2591
2592 namehist="hCosPcPDLSCback_pt";
2593 namehist+=i;
2594 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2595 titlehist+=i;
2596 hCosPcPDLSCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2597 hCosPcPDLSCback->SetXTitle("Cosine between c quark momentum and D0 momentum");
2598 hCosPcPDLSCback->SetYTitle("Entries");
2599 flistLsCutsBack->Add(hCosPcPDLSCback);
2600
2601 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2602 namehist="hd0xd0LSCback_pt";
2603 namehist+=i;
2604 titlehist="d0xd0 Loose Cuts Back ptbin=";
2605 titlehist+=i;
2606 hd0xd0LSCbackpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2607 hd0xd0LSCbackpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2608 hd0xd0LSCbackpt->SetYTitle("Entries");
2609 flistLsCutsBack->Add(hd0xd0LSCbackpt);
2610
2611
2612 namehist="hd0D0VSd0xd0LSCback_pt";
2613 namehist+=i;
2614 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Back ptbin=";
2615 titlehist+=i;
2616 hd0D0VSd0xd0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2617 hd0D0VSd0xd0LSCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2618 hd0D0VSd0xd0LSCbackpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2619 flistLsCutsBack->Add(hd0D0VSd0xd0LSCbackpt);
2620
2621
2622 namehist="hangletracksVSd0xd0LSCback_pt";
2623 namehist+=i;
2624 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Back ptbin=";
2625 titlehist+=i;
2626 hangletracksVSd0xd0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2627 hangletracksVSd0xd0LSCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2628 hangletracksVSd0xd0LSCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
2629 flistLsCutsBack->Add(hangletracksVSd0xd0LSCbackpt);
2630
2631
2632 namehist="hangletracksVSd0D0LSCback_pt";
2633 namehist+=i;
2634 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts Back ptbin=";
2635 titlehist+=i;
2636 hangletracksVSd0D0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2637 hangletracksVSd0D0LSCbackpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2638 hangletracksVSd0D0LSCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
2639 flistLsCutsBack->Add(hangletracksVSd0D0LSCbackpt);
2640
2641 }
2642 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2643 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2644
2645
2646
2647
2648
2649
2650
624c07ab 2651 // ####### d0 D0 histos ############
2652
ac4c229c 2653 TH1F *hd0D0LSCbackPM = new TH1F("hd0D0LSCbackPM","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2654 hd0D0LSCbackPM->SetXTitle("Impact parameter [#mum]");
2655 hd0D0LSCbackPM->SetYTitle("Entries");
2656
2657 TH1F *hd0D0VtxTrueLSCbackPM = new TH1F("hd0D0VtxTrueLSCbackPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2658 hd0D0VtxTrueLSCbackPM->SetXTitle("Impact parameter [#mum]");
2659 hd0D0VtxTrueLSCbackPM->SetYTitle("Entries");
2660
2661 TH1F *hMCd0D0LSCbackPM = new TH1F("hMCd0D0LSCbackPM","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2662 hMCd0D0LSCbackPM->SetXTitle("MC Impact parameter [#mum]");
2663 hMCd0D0LSCbackPM->SetYTitle("Entries");
2664
2665 TH1F *hd0D0LSCbackSB = new TH1F("hd0D0LSCbackSB","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2666 hd0D0LSCbackSB->SetXTitle("Impact parameter [#mum]");
2667 hd0D0LSCbackSB->SetYTitle("Entries");
2668
2669 TH1F *hd0D0VtxTrueLSCbackSB = new TH1F("hd0D0VtxTrueLSCbackSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2670 hd0D0VtxTrueLSCbackSB->SetXTitle("Impact parameter [#mum]");
2671 hd0D0VtxTrueLSCbackSB->SetYTitle("Entries");
2672
2673 TH1F *hMCd0D0LSCbackSB = new TH1F("hMCd0D0LSCbackSB","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2674 hMCd0D0LSCbackSB->SetXTitle("MC Impact parameter [#mum]");
2675 hMCd0D0LSCbackSB->SetYTitle("Entries");
2676
2677 flistLsCutsBack->Add(hd0D0LSCbackPM);
2678 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackPM);
2679 flistLsCutsBack->Add(hMCd0D0LSCbackPM);
2680 flistLsCutsBack->Add(hd0D0LSCbackSB);
2681 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackSB);
2682 flistLsCutsBack->Add(hMCd0D0LSCbackSB);
2683
e047b348 2684 TH1F *hd0D0ptLSCbackPM;
2685 TH1F *hMCd0D0ptLSCbackPM;
2686 TH1F *hd0D0VtxTrueptLSCbackPM;
2687 TH1F *hd0D0ptLSCbackSB;
2688 TH1F *hMCd0D0ptLSCbackSB;
2689 TH1F *hd0D0VtxTrueptLSCbackSB;
ac4c229c 2690 namehist="hd0D0ptLSCback_";
624c07ab 2691 titlehist="D^{0} impact par. plot, Loose Cuts, Background, ";
2692 for(Int_t i=0;i<fnbins;i++){
2693 strnamept=namehist;
2694 strnamept.Append("PkMss_pt");
2695 strnamept+=i;
2696
2697 strtitlept=titlehist;
2698 strtitlept.Append(" Mass Peak, ");
2699 strtitlept+=fptbins[i];
2700 strtitlept.Append("<= pt <");
2701 strtitlept+=fptbins[i+1];
2702 strtitlept.Append(" [GeV/c]");
2703
e047b348 2704 hd0D0ptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2705 hd0D0ptLSCbackPM->SetXTitle("Impact parameter [#mum] ");
2706 hd0D0ptLSCbackPM->SetYTitle("Entries");
2707 flistLsCutsBack->Add(hd0D0ptLSCbackPM);
624c07ab 2708
2709 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2710 hMCd0D0ptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2711 hMCd0D0ptLSCbackPM->SetXTitle("MC Impact parameter [#mum] ");
2712 hMCd0D0ptLSCbackPM->SetYTitle("Entries");
2713 flistLsCutsBack->Add(hMCd0D0ptLSCbackPM);
624c07ab 2714
2715
2716 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2717 hd0D0VtxTrueptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2718 hd0D0VtxTrueptLSCbackPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2719 hd0D0VtxTrueptLSCbackPM->SetYTitle("Entries");
2720 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackPM);
624c07ab 2721
2722 strnamept=namehist;
2723 strnamept.Append("SBMss_pt");
2724 strnamept+=i;
2725
2726 strtitlept=titlehist;
2727 strtitlept.Append(" Side Bands, ");
2728 strtitlept+=fptbins[i];
2729 strtitlept.Append("<= pt <");
2730 strtitlept+=fptbins[i+1];
2731 strtitlept.Append(" [GeV/c]");
2732
e047b348 2733 hd0D0ptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2734 hd0D0ptLSCbackSB->SetXTitle("Impact parameter [#mum] ");
2735 hd0D0ptLSCbackSB->SetYTitle("Entries");
2736 flistLsCutsBack->Add(hd0D0ptLSCbackSB);
624c07ab 2737
2738 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2739 hMCd0D0ptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2740 hMCd0D0ptLSCbackSB->SetXTitle("MC Impact parameter [#mum] ");
2741 hMCd0D0ptLSCbackSB->SetYTitle("Entries");
2742 flistLsCutsBack->Add(hMCd0D0ptLSCbackSB);
624c07ab 2743
2744 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2745 hd0D0VtxTrueptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2746 hd0D0VtxTrueptLSCbackSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2747 hd0D0VtxTrueptLSCbackSB->SetYTitle("Entries");
2748 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackSB);
624c07ab 2749 }
2750
2751
2752
2753 //############ LOOSE CUTS FROMB HISTOGRAMS ###########
2754 //
2755 //####### global properties histos
2756
e047b348 2757 TH2F *hCPtaVSd0d0LSCfromB=new TH2F("hCPtaVSd0d0LSCfromB","hCPtaVSd0d0_LooseCuts_FromB",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2758 TH1F *hSecVtxZLSCfromB=new TH1F("hSecVtxZLSCfromB","hSecVtxZ_LooseCuts_FromB",1000,-8.,8.);
2759 TH1F *hSecVtxXLSCfromB=new TH1F("hSecVtxXLSCfromB","hSecVtxX_LooseCuts_FromB",1000,-3000.,3000.);
2760 TH1F *hSecVtxYLSCfromB=new TH1F("hSecVtxYLSCfromB","hSecVtxY_LooseCuts_FromB",1000,-3000.,3000.);
2761 TH2F *hSecVtxXYLSCfromB=new TH2F("hSecVtxXYLSCfromB","hSecVtxXY_LooseCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
2762 TH1F *hSecVtxPhiLSCfromB=new TH1F("hSecVtxPhiLSCfromB","hSecVtxPhi_LooseCuts_FromB",180,-180.1,180.1);
e047b348 2763 TH1F *hd0singlTrackLSCfromB=new TH1F("hd0singlTrackLSCfromB","hd0singlTrackLooseCuts_FromB",1000,-5000.,5000.);
2764 TH1F *hCPtaLSCfromB=new TH1F("hCPtaLSCfromB","hCPta_LooseCuts_FromB",100,-1.,1.);
ac4c229c 2765 TH1F *hd0xd0LSCfromB=new TH1F("hd0xd0LSCfromB","hd0xd0_LooseCuts_FromB",1000,-100000.,100000.);
2766 TH1F *hMassTrueLSCfromB=new TH1F("hMassTrueLSCfromB","D^{0} MC inv. Mass Loose Cuts FromB(All momenta)",600,1.600,2.200);
2767 TH1F *hMassLSCfromB=new TH1F("hMassLSCfromB","D^{0} inv. Mass Loose Cuts FromB (All momenta)",600,1.600,2.200);
2768 hMassLSCfromB->Sumw2();
2769 TH1F *hMassTrueLSCfromBPM=new TH1F("hMassTrueLSCfromBPM","D^{0} MC inv. Mass Loose Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
2770 TH1F *hMassLSCfromBPM=new TH1F("hMassLSCfromBPM","D^{0} inv. Mass Loose Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
2771 hMassLSCfromBPM->Sumw2();
2772 TH1F *hMassTrueLSCfromBSB=new TH1F("hMassTrueLSCfromBSB","D^{0} MC inv. Mass in Side Bands Loose Cuts FromB(All momenta)",600,1.600,2.200);
2773 TH1F *hMassLSCfromBSB=new TH1F("hMassLSCfromBSB","D^{0} inv. Mass in Side Bands Loose Cuts FromB (All momenta)",600,1.600,2.200);
2774 hMassLSCfromBSB->Sumw2();
2775
2776 flistLsCutsFromB->Add(hCPtaVSd0d0LSCfromB);
2777 flistLsCutsFromB->Add(hSecVtxZLSCfromB);
2778 flistLsCutsFromB->Add(hSecVtxYLSCfromB);
2779 flistLsCutsFromB->Add(hSecVtxXLSCfromB);
2780 flistLsCutsFromB->Add(hSecVtxXYLSCfromB);
2781 flistLsCutsFromB->Add(hSecVtxPhiLSCfromB);
e047b348 2782 flistLsCutsFromB->Add(hd0singlTrackLSCfromB);
ac4c229c 2783 flistLsCutsFromB->Add(hCPtaLSCfromB);
2784 flistLsCutsFromB->Add(hd0xd0LSCfromB);
2785 flistLsCutsFromB->Add(hMassTrueLSCfromB);
2786 flistLsCutsFromB->Add(hMassLSCfromB);
2787 flistLsCutsFromB->Add(hMassTrueLSCfromBPM);
2788 flistLsCutsFromB->Add(hMassLSCfromBPM);
2789 flistLsCutsFromB->Add(hMassTrueLSCfromBSB);
2790 flistLsCutsFromB->Add(hMassLSCfromBSB);
624c07ab 2791
e047b348 2792
2793
2794
2795 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2796 TH1F *hdcaLSCfromB=new TH1F("hdcaLSCfromB","hdca_LooseCuts_FromB",100,0.,1000.);
2797 hdcaLSCfromB->SetXTitle("dca [#mum]");
2798 hdcaLSCfromB->SetYTitle("Entries");
2799 TH1F *hcosthetastarLSCfromB=new TH1F("hcosthetastarLSCfromB","hCosThetaStar_LooseCuts_FromB",50,-1.,1.);
2800 hcosthetastarLSCfromB->SetXTitle("cos #theta^{*}");
2801 hcosthetastarLSCfromB->SetYTitle("Entries");
2802 TH1F *hptD0LSCfromB=new TH1F("hptD0LSCfromB","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2803 hptD0LSCfromB->SetXTitle("p_{t} [GeV/c]");
2804 hptD0LSCfromB->SetYTitle("Entries");
2805 TH1F *hptD0VsMaxPtLSCfromB=new TH1F("hptD0VsMaxPtLSCfromB","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2806 TH2F *hptD0PTallsqrtLSCfromB=new TH2F("hptD0PTallsqrtLSCfromB","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2807 TH2F *hptD0PTallLSCfromB=new TH2F("hptD0PTallLSCfromB","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2808 TH2F *hptD0vsptBLSCfromB=new TH2F("hptD0vsptBLSCfromB","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2809 TH2F *hpD0vspBLSCfromB=new TH2F("hpD0vspBLSCfromB","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2810 TH2F *hptD0vsptcquarkLSCfromB=new TH2F("hptD0vsptcquarkLSCfromB","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2811 TH2F *hpD0vspcquarkLSCfromB=new TH2F("hpD0vspcquarkLSCfromB","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2812 flistLsCutsFromB->Add(hdcaLSCfromB);
2813 flistLsCutsFromB->Add(hcosthetastarLSCfromB);
2814 flistLsCutsFromB->Add(hptD0LSCfromB);
2815 flistLsCutsFromB->Add(hptD0VsMaxPtLSCfromB);
2816 flistLsCutsFromB->Add(hptD0PTallsqrtLSCfromB);
2817 flistLsCutsFromB->Add(hptD0PTallLSCfromB);
2818 flistLsCutsFromB->Add(hptD0vsptBLSCfromB);
2819 flistLsCutsFromB->Add(hpD0vspBLSCfromB);
2820 flistLsCutsFromB->Add(hptD0vsptcquarkLSCfromB);
2821 flistLsCutsFromB->Add(hpD0vspcquarkLSCfromB);
2822
2823 TH1F *hd0zD0ptLSCfromB;
cc3209fb 2824 TH1F *hInvMassD0LSCfromB,*hInvMassD0barLSCfromB;
e047b348 2825 TH2F *hInvMassPtLSCfromB=new TH2F("hInvMassPtLSCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
d39e8f99 2826 THnSparseF *hSparseLSCfromB=new THnSparseF("hSparseLSCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
2827 hSparseLSCfromB->SetBinEdges(0,massbins);
2828 hSparseLSCfromB->SetBinEdges(1,massbins);
2829 hSparseLSCfromB->SetBinEdges(2,ptbinsForNsparse);
2830 hSparseLSCfromB->SetBinEdges(3,impparbins);
2831 hSparseLSCfromB->SetBinEdges(4,massHypoBins);
2832 flistLsCutsFromB->Add(hSparseLSCfromB);
e047b348 2833 TH1F *hetaLSCfromB;
2834 TH1F *hCosPDPBLSCfromB;
2835 TH1F *hCosPcPDLSCfromB;
2836 flistLsCutsFromB->Add(hInvMassPtLSCfromB);
2837 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2838 TH2F *hd0D0VSd0xd0LSCfromBpt;
2839 TH2F *hangletracksVSd0xd0LSCfromBpt;
2840 TH2F *hangletracksVSd0D0LSCfromBpt;
2841 TH1F *hd0xd0LSCfromBpt;
2842
2843
2844 TH2F *hTOFpidLSCfromB=new TH2F("hTOFpidLSCfromB","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2845 flistLsCutsFromB->Add(hTOFpidLSCfromB);
2846
2847 for(Int_t i=0;i<fnbins;i++){
2848 namehist="hd0zD0ptLSCfromB_pt";
2849 namehist+=i;
2850 titlehist="d0(z) Loose Cuts FromBm ptbin=";
2851 titlehist+=i;
2852 hd0zD0ptLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2853 hd0zD0ptLSCfromB->SetXTitle("d_{0}(z) [#mum]");
2854 hd0zD0ptLSCfromB->SetYTitle("Entries");
2855 flistLsCutsFromB->Add(hd0zD0ptLSCfromB);
2856
cc3209fb 2857 namehist="hInvMassD0LSCfromB_pt";
e047b348 2858 namehist+=i;
2859 titlehist="Invariant Mass Loose Cuts FromB ptbin=";
2860 titlehist+=i;
cc3209fb 2861 hInvMassD0LSCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2862 hInvMassD0LSCfromB->SetXTitle("Invariant Mass [GeV]");
2863 hInvMassD0LSCfromB->SetYTitle("Entries");
2864 flistLsCutsFromB->Add(hInvMassD0LSCfromB);
2865
2866 namehist="hInvMassD0barLSCfromB_pt";
2867 namehist+=i;
d39e8f99 2868 titlehist="Invariant Mass D0bar Loose Cuts FromB ptbin=";
cc3209fb 2869 titlehist+=i;
2870 hInvMassD0barLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2871 hInvMassD0barLSCfromB->SetXTitle("Invariant Mass [GeV]");
2872 hInvMassD0barLSCfromB->SetYTitle("Entries");
2873 flistLsCutsFromB->Add(hInvMassD0barLSCfromB);
e047b348 2874
2875 namehist="hetaLSCfromB_pt";
2876 namehist+=i;
2877 titlehist="eta Loose Cuts FromB ptbin=";
2878 titlehist+=i;
2879 hetaLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2880 hetaLSCfromB->SetXTitle("Pseudorapidity");
2881 hetaLSCfromB->SetYTitle("Entries");
2882 flistLsCutsFromB->Add(hetaLSCfromB);
2883
2884 namehist="hCosPDPBLSCfromB_pt";
2885 namehist+=i;
2886 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2887 titlehist+=i;
2888 hCosPDPBLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2889 hCosPDPBLSCfromB->SetXTitle("Cosine between D0 momentum and B momentum");
2890 hCosPDPBLSCfromB->SetYTitle("Entries");
2891 flistLsCutsFromB->Add(hCosPDPBLSCfromB);
2892
2893 namehist="hCosPcPDLSCfromB_pt";
2894 namehist+=i;
2895 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2896 titlehist+=i;
2897 hCosPcPDLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2898 hCosPcPDLSCfromB->SetXTitle("Cosine between c quark momentum and D0 momentum");
2899 hCosPcPDLSCfromB->SetYTitle("Entries");
2900 flistLsCutsFromB->Add(hCosPcPDLSCfromB);
2901
2902 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2903 namehist="hd0xd0LSCfromB_pt";
2904 namehist+=i;
2905 titlehist="d0xd0 Loose Cuts FromB ptbin=";
2906 titlehist+=i;
2907 hd0xd0LSCfromBpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2908 hd0xd0LSCfromBpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2909 hd0xd0LSCfromBpt->SetYTitle("Entries");
2910 flistLsCutsFromB->Add(hd0xd0LSCfromBpt);
2911
2912
2913 namehist="hd0D0VSd0xd0LSCfromB_pt";
2914 namehist+=i;
2915 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromB ptbin=";
2916 titlehist+=i;
2917 hd0D0VSd0xd0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2918 hd0D0VSd0xd0LSCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2919 hd0D0VSd0xd0LSCfromBpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2920 flistLsCutsFromB->Add(hd0D0VSd0xd0LSCfromBpt);
2921
2922
2923 namehist="hangletracksVSd0xd0LSCfromB_pt";
2924 namehist+=i;
2925 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromB ptbin=";
2926 titlehist+=i;
2927 hangletracksVSd0xd0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2928 hangletracksVSd0xd0LSCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2929 hangletracksVSd0xd0LSCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
2930 flistLsCutsFromB->Add(hangletracksVSd0xd0LSCfromBpt);
2931
2932
2933 namehist="hangletracksVSd0D0LSCfromB_pt";
2934 namehist+=i;
2935 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts FromB ptbin=";
2936 titlehist+=i;
2937 hangletracksVSd0D0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2938 hangletracksVSd0D0LSCfromBpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2939 hangletracksVSd0D0LSCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
2940 flistLsCutsFromB->Add(hangletracksVSd0D0LSCfromBpt);
2941
2942 }
2943 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2944 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2945
2946
2947
2948
2949
624c07ab 2950 // ######### d0 D0 histos ##############
ac4c229c 2951 TH1F *hd0D0LSCfromBPM = new TH1F("hd0D0LSCfromBPM","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2952 hd0D0LSCfromBPM->SetXTitle("Impact parameter [#mum]");
2953 hd0D0LSCfromBPM->SetYTitle("Entries");
2954
2955 TH1F *hd0D0VtxTrueLSCfromBPM = new TH1F("hd0D0VtxTrueLSCfromBPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2956 hd0D0VtxTrueLSCfromBPM->SetXTitle("Impact parameter [#mum]");
2957 hd0D0VtxTrueLSCfromBPM->SetYTitle("Entries");
2958
2959 TH1F *hMCd0D0LSCfromBPM = new TH1F("hMCd0D0LSCfromBPM","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2960 hMCd0D0LSCfromBPM->SetXTitle("MC Impact parameter [#mum]");
2961 hMCd0D0LSCfromBPM->SetYTitle("Entries");
2962
2963 TH1F *hd0D0LSCfromBSB = new TH1F("hd0D0LSCfromBSB","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2964 hd0D0LSCfromBSB->SetXTitle("Impact parameter [#mum]");
2965 hd0D0LSCfromBSB->SetYTitle("Entries");
2966
2967 TH1F *hd0D0VtxTrueLSCfromBSB = new TH1F("hd0D0VtxTrueLSCfromBSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2968 hd0D0VtxTrueLSCfromBSB->SetXTitle("Impact parameter [#mum]");
2969 hd0D0VtxTrueLSCfromBSB->SetYTitle("Entries");
2970
2971 TH1F *hMCd0D0LSCfromBSB = new TH1F("hMCd0D0LSCfromBSB","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2972 hMCd0D0LSCfromBSB->SetXTitle("MC Impact parameter [#mum]");
2973 hMCd0D0LSCfromBSB->SetYTitle("Entries");
2974
2975 flistLsCutsFromB->Add(hd0D0LSCfromBPM);
2976 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBPM);
2977 flistLsCutsFromB->Add(hMCd0D0LSCfromBPM);
2978 flistLsCutsFromB->Add(hd0D0LSCfromBSB);
2979 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBSB);
2980 flistLsCutsFromB->Add(hMCd0D0LSCfromBSB);
2981
e047b348 2982 TH1F *hd0D0ptLSCfromBPM;
2983 TH1F *hMCd0D0ptLSCfromBPM;
2984 TH1F *hd0D0VtxTrueptLSCfromBPM;
2985 TH1F *hd0D0ptLSCfromBSB;
2986 TH1F *hMCd0D0ptLSCfromBSB;
2987 TH1F *hd0D0VtxTrueptLSCfromBSB;
ac4c229c 2988 namehist="hd0D0ptLSCfromB_";
624c07ab 2989 titlehist="D^{0} impact par. plot, Loose Cuts, FromB, ";
2990 for(Int_t i=0;i<fnbins;i++){
2991 strnamept=namehist;
2992 strnamept.Append("PkMss_pt");
2993 strnamept+=i;
2994
2995 strtitlept=titlehist;
2996 strtitlept.Append(" Mass Peak, ");
2997 strtitlept+=fptbins[i];
2998 strtitlept.Append("<= pt <");
2999 strtitlept+=fptbins[i+1];
3000 strtitlept.Append(" [GeV/c]");
3001
e047b348 3002 hd0D0ptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3003 hd0D0ptLSCfromBPM->SetXTitle("Impact parameter [#mum] ");
3004 hd0D0ptLSCfromBPM->SetYTitle("Entries");
3005 flistLsCutsFromB->Add(hd0D0ptLSCfromBPM);
624c07ab 3006
3007 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3008 hMCd0D0ptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3009 hMCd0D0ptLSCfromBPM->SetXTitle("MC Impact parameter [#mum] ");
3010 hMCd0D0ptLSCfromBPM->SetYTitle("Entries");
3011 flistLsCutsFromB->Add(hMCd0D0ptLSCfromBPM);
624c07ab 3012
3013
3014 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3015 hd0D0VtxTrueptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3016 hd0D0VtxTrueptLSCfromBPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3017 hd0D0VtxTrueptLSCfromBPM->SetYTitle("Entries");
3018 flistLsCutsFromB->Add(hd0D0VtxTrueptLSCfromBPM);
624c07ab 3019
3020 strnamept=namehist;
3021 strnamept.Append("SBMss_pt");
3022 strnamept+=i;