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