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