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