]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliAnalysisTaskSECharmFraction.cxx
train back
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSECharmFraction.cxx
CommitLineData
624c07ab 1/**************************************************************************
2 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/////////////////////////////////////////////////////////////
17//
18// Class AliAnalysisTaskSECharmFraction
19// AliAnalysisTaskSE for the extraction of the fraction of prompt charm
20// using the charm hadron impact parameter to the primary vertex
21//
22// Author: Andrea Rossi, andrea.rossi@ts.infn.it
23/////////////////////////////////////////////////////////////
24
ac4c229c 25
624c07ab 26#include <TH1F.h>
27#include <TH2F.h>
624c07ab 28#include <TDatabasePDG.h>
29#include <TMath.h>
30#include <TROOT.h>
624c07ab 31#include "AliAODEvent.h"
624c07ab 32#include "AliAODRecoDecayHF2Prong.h"
33#include "AliAODRecoDecayHF.h"
34#include "AliAODRecoDecay.h"
e047b348 35#include "AliAnalysisDataSlot.h"
36#include "AliAnalysisDataContainer.h"
624c07ab 37#include "AliAODTrack.h"
e047b348 38#include "AliAODHandler.h"
39#include "AliESDtrack.h"
624c07ab 40#include "AliAODVertex.h"
e047b348 41#include "AliESDVertex.h"
42#include "AliVertexerTracks.h"
624c07ab 43#include "AliAODMCParticle.h"
e047b348 44#include "AliAODPid.h"
45#include "AliTPCPIDResponse.h"
624c07ab 46#include "AliAODMCHeader.h"
ac4c229c 47#include "AliAnalysisVertexingHF.h"
624c07ab 48#include "AliAnalysisTaskSECharmFraction.h"
e047b348 49#include "AliRDHFCutsD0toKpi.h"
50#include "AliAODInputHandler.h"
51#include "AliAnalysisManager.h"
ac4c229c 52
53class TCanvas;
54class TTree;
55class TChain;
ac4c229c 56class AliAnalysisTaskSE;
57
58
624c07ab 59ClassImp(AliAnalysisTaskSECharmFraction)
60
61//________________________________________________________________________
62 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction()
63 : AliAnalysisTaskSE(),
e047b348 64 fCutsLoose(0),
65 fCutsTight(0),
bf74e6db 66 fReadMC(kFALSE),
cc3209fb 67 fsplitMassD0D0bar(kTRUE),
e047b348 68 fLikeSign(kFALSE),
69 fusePID(kTRUE),
624c07ab 70 fmD0PDG(),
e047b348 71 fnbins(1),
624c07ab 72 fptbins(0),
e047b348 73 fNtrMaxforVtx(-1),
74 fptAll(),
75 fptAllSq(),
76 fptMax(),
c387e585 77 fAcceptanceCuts(),
624c07ab 78 fsignalInvMassCut(),
79 flargeInvMassCut(),
80 fsidebandInvMassCut(),
81 fsidebandInvMassWindow(),
82 fUseMC(kTRUE),
83 fNentries(0),
84 fSignalType(0),
85 fSignalTypeLsCuts(0),
86 fSignalTypeTghCuts(0),
e047b348 87 flistMCproperties(0),
ac4c229c 88 flistNoCutsSignal(0),
89 flistNoCutsBack(0),
90 flistNoCutsFromB(0),
91 flistNoCutsFromDstar(0),
92 flistNoCutsOther(0),
93 flistLsCutsSignal(0),
94 flistLsCutsBack(0),
95 flistLsCutsFromB(0),
96 flistLsCutsFromDstar(0),
97 flistLsCutsOther(0),
98 flistTghCutsSignal(0),
99 flistTghCutsBack(0),
100 flistTghCutsFromB(0),
101 flistTghCutsFromDstar(0),
102 flistTghCutsOther(0)
624c07ab 103
104{
105 //Default constructor
106}
107//________________________________________________________________________
108 AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name)
109 : AliAnalysisTaskSE(name),
e047b348 110 fCutsLoose(0x0),
111 fCutsTight(0x0),
bf74e6db 112 fReadMC(kFALSE),
cc3209fb 113 fsplitMassD0D0bar(kTRUE),
e047b348 114 fLikeSign(kFALSE),
115 fusePID(kTRUE),
624c07ab 116 fmD0PDG(),
e047b348 117 fnbins(1),
624c07ab 118 fptbins(0),
e047b348 119 fNtrMaxforVtx(-1),
120 fptAll(),
121 fptAllSq(),
122 fptMax(),
c387e585 123 fAcceptanceCuts(),
e047b348 124 fsignalInvMassCut(-1.),
125 flargeInvMassCut(-1.),
126 fsidebandInvMassCut(-1.),
127 fsidebandInvMassWindow(-1.),
128 fUseMC(kFALSE),
624c07ab 129 fNentries(0),
130 fSignalType(0),
131 fSignalTypeLsCuts(0),
132 fSignalTypeTghCuts(0),
e047b348 133 flistMCproperties(0),
ac4c229c 134 flistNoCutsSignal(0),
135 flistNoCutsBack(0),
136 flistNoCutsFromB(0),
137 flistNoCutsFromDstar(0),
138 flistNoCutsOther(0),
139 flistLsCutsSignal(0),
140 flistLsCutsBack(0),
141 flistLsCutsFromB(0),
142 flistLsCutsFromDstar(0),
143 flistLsCutsOther(0),
144 flistTghCutsSignal(0),
145 flistTghCutsBack(0),
146 flistTghCutsFromB(0),
147 flistTghCutsFromDstar(0),
148 flistTghCutsOther(0)
624c07ab 149
150{
151 // Constructor
152
153 // Define input and output slots here
154 // Input slot #0 works with a TChain
155 // Output slot #0 writes into a TH1 container
156
157 //Standard pt bin
e047b348 158 fnbins=SetStandardCuts(fptbins);// THIS TO SET NBINS AND BINNING
159
624c07ab 160 DefineOutput(1, TH1F::Class());
161 DefineOutput(2, TH1F::Class());
162 DefineOutput(3, TH1F::Class());
163 DefineOutput(4, TH1F::Class());
e047b348 164 for(Int_t j=5;j<21;j++){
624c07ab 165 DefineOutput(j, TList::Class());
166 }
167
e047b348 168 // Output slot for the Cut Objects
169 DefineOutput(21,AliRDHFCutsD0toKpi::Class()); //My private output
170 DefineOutput(22,AliRDHFCutsD0toKpi::Class()); //My private output
624c07ab 171
172}
173
174
e047b348 175AliAnalysisTaskSECharmFraction::AliAnalysisTaskSECharmFraction(const char *name,AliRDHFCutsD0toKpi *cutsA,AliRDHFCutsD0toKpi *cutsB)
624c07ab 176 : AliAnalysisTaskSE(name),
e047b348 177 fCutsLoose(0),
178 fCutsTight(0),
bf74e6db 179 fReadMC(kFALSE),
cc3209fb 180 fsplitMassD0D0bar(kTRUE),
e047b348 181 fLikeSign(kFALSE),
182 fusePID(kTRUE),
624c07ab 183 fmD0PDG(),
e047b348 184 fnbins(1),
624c07ab 185 fptbins(0),
e047b348 186 fNtrMaxforVtx(-1),
187 fptAll(),
188 fptAllSq(),
189 fptMax(),
c387e585 190 fAcceptanceCuts(),
e047b348 191 fsignalInvMassCut(-1.),
192 flargeInvMassCut(-1.),
193 fsidebandInvMassCut(-1.),
194 fsidebandInvMassWindow(-1.),
195 fUseMC(kFALSE),
624c07ab 196 fNentries(0),
197 fSignalType(0),
198 fSignalTypeLsCuts(0),
199 fSignalTypeTghCuts(0),
e047b348 200 flistMCproperties(0),
ac4c229c 201 flistNoCutsSignal(0),
202 flistNoCutsBack(0),
203 flistNoCutsFromB(0),
204 flistNoCutsFromDstar(0),
205 flistNoCutsOther(0),
206 flistLsCutsSignal(0),
207 flistLsCutsBack(0),
208 flistLsCutsFromB(0),
209 flistLsCutsFromDstar(0),
210 flistLsCutsOther(0),
211 flistTghCutsSignal(0),
212 flistTghCutsBack(0),
213 flistTghCutsFromB(0),
214 flistTghCutsFromDstar(0),
215 flistTghCutsOther(0)
624c07ab 216{
217 // Constructor
e047b348 218 if(fCutsTight)delete fCutsTight;fCutsTight=NULL;
219 if(fCutsLoose)delete fCutsLoose;fCutsLoose=NULL;
220
221 //Check consistency between sets of cuts:
222 if(cutsA->GetNPtBins()!=cutsB->GetNPtBins()){
223 printf("Different number of pt bins between the two sets of cuts: SWITCH TO STANDARD CUTS \n");
224 fnbins=SetStandardCuts(fptbins);
225 }
226 else{
227 fCutsTight=new AliRDHFCutsD0toKpi(*cutsA);
228 fCutsLoose=new AliRDHFCutsD0toKpi(*cutsB);
229 for(Int_t j=0;j<cutsA->GetNPtBins();j++){
230 if(TMath::Abs(cutsA->GetPtBinLimits()[j]-cutsB->GetPtBinLimits()[j])>1.e-7){
231 printf("Different pt bin limits in the two set of cuts: use the first as reference \n");
232 fCutsLoose->SetPtBins(cutsA->GetNPtBins(),cutsA->GetPtBinLimits());
233 break;
234 }
235 }
236 SetPtBins(fCutsTight->GetNPtBins(),fCutsTight->GetPtBinLimits());
237 }
624c07ab 238
624c07ab 239 // Output slot #0 writes into a TH1 container
240 DefineOutput(1, TH1F::Class());
241 DefineOutput(2, TH1F::Class());
242 DefineOutput(3, TH1F::Class());
243 DefineOutput(4, TH1F::Class());
e047b348 244 for(Int_t j=5;j<21;j++){
624c07ab 245
246 DefineOutput(j, TList::Class());
247 }
e047b348 248 // Output slot for the Cut Objects
249 DefineOutput(21,AliRDHFCutsD0toKpi::Class()); //My private output
250 DefineOutput(22,AliRDHFCutsD0toKpi::Class()); //My private output
624c07ab 251
252}
253
254//________________________________________________________________________
255AliAnalysisTaskSECharmFraction::~AliAnalysisTaskSECharmFraction()
256{ //Destructor
257
e047b348 258 if (fCutsTight) {
259 delete fCutsTight;
260 fCutsTight = 0;
624c07ab 261 }
e047b348 262 if (fCutsLoose) {
263 delete fCutsLoose;
264 fCutsLoose = 0;
624c07ab 265 }
ac4c229c 266 if(fptbins){
267 delete fptbins;
268 fptbins =0;
269 }
c387e585 270 /* if(fAcceptanceCuts){
ac4c229c 271 delete fAcceptanceCuts;
272 fAcceptanceCuts=0;
c387e585 273 }*/
624c07ab 274 if (fNentries) {
275 delete fNentries;
276 fNentries = 0;
277 }
278 if (fSignalType) {
279 delete fSignalType;
280 fSignalType = 0;
281 }
282 if (fSignalTypeLsCuts) {
283 delete fSignalTypeLsCuts;
284 fSignalTypeLsCuts = 0;
285 }
286 if (fSignalTypeTghCuts) {
287 delete fSignalTypeTghCuts;
288 fSignalTypeTghCuts = 0;
289 }
e047b348 290 if(flistMCproperties){
291 delete flistMCproperties;
292 flistMCproperties=0;
293 }
ac4c229c 294 if(flistNoCutsSignal){
295 delete flistNoCutsSignal;
296 flistNoCutsSignal=0;
624c07ab 297 }
ac4c229c 298 if(flistNoCutsBack){
299 delete flistNoCutsBack;
300 flistNoCutsBack=0;
624c07ab 301 }
ac4c229c 302 if(flistNoCutsFromB){
303 delete flistNoCutsFromB;
304 flistNoCutsFromB=0;
624c07ab 305 }
ac4c229c 306 if(flistNoCutsFromDstar){
307 delete flistNoCutsFromDstar;
308 flistNoCutsFromDstar=0;
624c07ab 309 }
ac4c229c 310 if(flistNoCutsOther){
311 delete flistNoCutsOther;
312 flistNoCutsOther=0;
624c07ab 313 }
314
ac4c229c 315 if(flistLsCutsSignal){
316 delete flistLsCutsSignal;
317 flistLsCutsSignal=0;
624c07ab 318 }
ac4c229c 319 if(flistLsCutsBack){
320 delete flistLsCutsBack;
321 flistLsCutsBack=0;
624c07ab 322 }
ac4c229c 323 if(flistLsCutsFromB){
324 delete flistLsCutsFromB;
325 flistLsCutsFromB=0;
624c07ab 326 }
ac4c229c 327 if(flistLsCutsFromDstar){
328 delete flistLsCutsFromDstar;
329 flistLsCutsFromDstar=0;
624c07ab 330 }
ac4c229c 331 if(flistLsCutsOther){
332 delete flistLsCutsOther;
333 flistLsCutsOther=0;
624c07ab 334 }
335
ac4c229c 336 if(flistTghCutsSignal){
337 delete flistTghCutsSignal;
338 flistTghCutsSignal=0;
624c07ab 339 }
ac4c229c 340 if(flistTghCutsBack){
341 delete flistTghCutsBack;
342 flistTghCutsBack=0;
624c07ab 343 }
ac4c229c 344 if(flistTghCutsFromB){
345 delete flistTghCutsFromB;
346 flistTghCutsFromB=0;
624c07ab 347 }
ac4c229c 348 if(flistTghCutsFromDstar){
349 delete flistTghCutsFromDstar;
350 flistTghCutsFromDstar=0;
624c07ab 351 }
ac4c229c 352 if(flistTghCutsOther){
353 delete flistTghCutsOther;
354 flistTghCutsOther=0;
624c07ab 355 }
356
357
358}
359
360
361//________________________________________________________________________
362void AliAnalysisTaskSECharmFraction::Init()
363{
364 // Initialization
365
366 if(fDebug > 1) printf("AnalysisTaskSED0Mass::Init() \n");
367 fmD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
368
e047b348 369 // gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/ConfigVertexingHF.C");
370 // gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/D0fromBSetCuts.C");
371 // 2 sets of dedicated cuts: fCutsTight is assumed as the standard cut object
624c07ab 372
e047b348 373 // SetAcceptanceCut();
374 if(fNtrMaxforVtx<0)SetNMaxTrForVtx(3); //DEFAULT : NO SELECTION
375 if(fsignalInvMassCut<0.||flargeInvMassCut<0.||fsidebandInvMassCut<0.||fsidebandInvMassWindow<0.){
376 printf("AliAnalysisTaskSECharmFraction: Not All info for mass selection provided: switch to default values \n");
377 SetStandardMassSelection();
624c07ab 378 }
e047b348 379
380 AliRDHFCutsD0toKpi* copyfCutsTight=new AliRDHFCutsD0toKpi(*fCutsTight);
381 const char* nameoutputTight=GetOutputSlot(21)->GetContainer()->GetName();
382 copyfCutsTight->SetName(nameoutputTight);
383 AliRDHFCutsD0toKpi* copyfCutsLoose=new AliRDHFCutsD0toKpi(*fCutsLoose);
384 const char* nameoutputLoose=GetOutputSlot(22)->GetContainer()->GetName();
385 copyfCutsLoose->SetName(nameoutputLoose);
386 // Post the data
387 PostData(21,copyfCutsTight);
388 PostData(22,copyfCutsLoose);
389
624c07ab 390 return;
391}
392
393//________________________________________________________________________
394void AliAnalysisTaskSECharmFraction::UserCreateOutputObjects()
395{
396 // Create histograms
397 // Called once
c387e585 398
399 // ################ NAMING SCHEME ###################################
400 // LISTS NAMING SCHEME
401 // "list" + cut selection string + MC selection string
402 // cut strings: "NC" =nocuts, "LSC"= loose cuts, "TGHC"= tight cuts
403 // MC sel. strings: "sign"= D0 from c quark
404 // "fromDstar" = D0 from Dstar from c quark
405 // "fromB"= D0from B decay (->from b quark) + D0from Dstar from B
406 // "back"= backgroun, generic except the cas "other"
407 // "other"= background case for candidates made of a pion and a kaon coming from the same D0 (in 4 prong) or from D+
408 //
409 // HISTS NAMING SCHEME
410 //
411 // "h" + specific name + cut selection string + MC selection string + (InvMass region string) + (pt string)
412 //
413 // cut selection strings = those for lists
414 // MC selection strings = those for lists
415 // inv mass region strings : "PM" or "SB" for global properties and pt integrated histos
416 // "_PkMss" or "_SBMss" for impact par. pt dependent histos
417 // pt string : "_pt" + integer number of ptbin
418 //
419 //###################################################################
624c07ab 420
421 TString namehist;
422 TString titlehist;
423 TString strnamept,strtitlept;
e047b348 424 Printf("INSIDE USER CREATE \n");
624c07ab 425 fNentries=new TH1F("nentriesChFr", "Look at the number of entries! = number of AODs", 2,1.,2.);
e047b348 426 fSignalType=new TH1F("hsignaltype", "Histo for type of MC signal", 61,-1.,60.);
427 fSignalTypeLsCuts=new TH1F("hsignaltypeLsCuts", "Histo for type of MC signal with loose cuts", 61,-1.,60.);
428 fSignalTypeTghCuts=new TH1F("hsignaltypeTghCuts", "Histo for type of MC signal with tight cuts", 61,-1.,60.);
624c07ab 429
430 //########## DEFINE THE TLISTS ##################
e047b348 431 flistMCproperties=new TList();
432 flistMCproperties->SetOwner();
433 flistMCproperties->SetName("listMCproperties");
434
ac4c229c 435 flistNoCutsSignal = new TList();
436 flistNoCutsSignal->SetOwner();
437 flistNoCutsSignal->SetName("listNCsign");
624c07ab 438
ac4c229c 439 flistNoCutsBack = new TList();
440 flistNoCutsBack->SetOwner();
441 flistNoCutsBack->SetName("listNCback");
624c07ab 442
ac4c229c 443 flistNoCutsFromB = new TList();
444 flistNoCutsFromB->SetOwner();
445 flistNoCutsFromB->SetName("listNCfromB");
624c07ab 446
ac4c229c 447 flistNoCutsFromDstar = new TList();
448 flistNoCutsFromDstar->SetOwner();
449 flistNoCutsFromDstar->SetName("listNCfromDstar");
624c07ab 450
ac4c229c 451 flistNoCutsOther = new TList();
452 flistNoCutsOther->SetOwner();
453 flistNoCutsOther->SetName("listNCother");
624c07ab 454
455
ac4c229c 456 flistLsCutsSignal = new TList();
457 flistLsCutsSignal->SetOwner();
458 flistLsCutsSignal->SetName("listLSCsign");
624c07ab 459
ac4c229c 460 flistLsCutsBack = new TList();
461 flistLsCutsBack->SetOwner();
462 flistLsCutsBack->SetName("listLSCback");
624c07ab 463
ac4c229c 464 flistLsCutsFromB = new TList();
465 flistLsCutsFromB->SetOwner();
466 flistLsCutsFromB->SetName("listLSCfromB");
624c07ab 467
ac4c229c 468 flistLsCutsFromDstar = new TList();
469 flistLsCutsFromDstar->SetOwner();
470 flistLsCutsFromDstar->SetName("listLSCfromDstar");
624c07ab 471
ac4c229c 472 flistLsCutsOther = new TList();
473 flistLsCutsOther->SetOwner();
474 flistLsCutsOther->SetName("listLSCother");
624c07ab 475
476
ac4c229c 477 flistTghCutsSignal = new TList();
478 flistTghCutsSignal->SetOwner();
479 flistTghCutsSignal->SetName("listTGHCsign");
624c07ab 480
ac4c229c 481 flistTghCutsBack = new TList();
482 flistTghCutsBack->SetOwner();
483 flistTghCutsBack->SetName("listTGHCback");
624c07ab 484
ac4c229c 485 flistTghCutsFromB = new TList();
486 flistTghCutsFromB->SetOwner();
487 flistTghCutsFromB->SetName("listTGHCfromB");
624c07ab 488
ac4c229c 489 flistTghCutsFromDstar = new TList();
490 flistTghCutsFromDstar->SetOwner();
491 flistTghCutsFromDstar->SetName("listTGHCfromDstar");
624c07ab 492
ac4c229c 493 flistTghCutsOther = new TList();
494 flistTghCutsOther->SetOwner();
495 flistTghCutsOther->SetName("listTGHCother");
624c07ab 496
497
498
e047b348 499 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.};
500 Float_t dumbinning[201];
501 for(Int_t j=0;j<201;j++){
502 dumbinning[j]=(Float_t)j*0.5;
503 }
504 //################################################################################################
505 // #
506 // HISTO FOR MC PROPERTIES OF D0, c quarks and B mesons #
507 // #
508 //################################################################################################
509 TH1F *hMCcquarkAllPt=new TH1F("hMCcquarkAllPt","c quark Pt (all cquarks produced)",34,ptbinsD0arr);
510 TH1F *hMCcquarkAllEta=new TH1F("hMCcquarkAllEta","c quark Eta (all cquarks produced)",50,-3.,3.);
511 TH1F *hMCcquarkAllEnergy=new TH1F("hMCcquarkAllEnergy","c quark Pt (all cquarks produced)",200,0.,100.);
512 TH1F *hMCcquarkNdaught=new TH1F("hMCcquarkNdaught","N cquark daughters (all cquarks produced)",100,0.,100.);
513 TH1F *hMCD0fromcPt=new TH1F("hMCD0fromcPt","D0 from c Pt",34,ptbinsD0arr);
514 TH1F *hMCD0fromcEta=new TH1F("hMCD0fromcEta","D0 from c Eta",50,-3.,3.);
515 TH1F *hMCD0fromcEnergy=new TH1F("hMCD0fromcEnergy","D0 from c Energy",200,0.,100.);
516
517 TH2F *hMCD0VscquarkPt=new TH2F("hMCD0VscquarkPt","D0 pt Vs cquark pt",34,ptbinsD0arr,34,ptbinsD0arr);
518 TH2F *hMCD0VscquarkEnergy=new TH2F("hMCD0VscquarkEnergy","D0 Energy Vs cquark Energy",200,0.,50.,200,0.,50.);
519 TH1F *hMCD0deltacquarkEnergy=new TH1F("hMCD0deltacquarkEnergy","Fractional D0 Energy w.r.t. cquark Energy",20,0.,1.);
520 TH1F *hMCD0EnergyVsAvcquarkDaughtEn=new TH1F("hMCD0EnergyVsAvcquarkDaughtEn","#Delta(E^{D^0}-E_{avg})/E_{cquark}",40,-1.,1.);
521 TH1F *hMCD0cquarkAngle=new TH1F("hMCD0cquarkAngle","cosine of the angle between D0 and c quark particle",40,-1.,1.);
522 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.);
523
524 TH1I *hMCfromBpdgB=new TH1I("hMCfromBpdgB","hMCfromBpdgB",10000,0.,10000);
525 TH1F *hMCBhadrPt=new TH1F("hMCBhadrPt","B hadr Pt",34,ptbinsD0arr);
526 TH1F *hMCBhadrEta=new TH1F("hMCBhadrEta","B hadr Eta",50,-3.,3.);
527 TH1F *hMCBhadrEnergy=new TH1F("hMCBhadrEnergy","B hadr Pt",200,0.,100.);
528 TH1F *hMCBhadrNdaught=new TH1F("hMCBhadrNdaught","N Bhadr daughters",100,0.,100.);
529 TH1F *hMCD0fromBPt=new TH1F("hMCD0fromBPt","D0 from B Pt",34,ptbinsD0arr);
530 TH1F *hMCD0fromBEta=new TH1F("hMCD0fromBEta","D0 from B Eta",50,-3.,3.);
531 TH1F *hMCD0fromBEnergy=new TH1F("hMCD0fromBEnergy","D0 from B Energy",200,0.,100.);
532
533 TH2F *hMCD0VsBhadrPt=new TH2F("hMCD0VsBhadrPt","D0 pt Vs Bhadr pt",34,ptbinsD0arr,34,ptbinsD0arr);
534 TH2F *hMCD0VsBhadrEnergy=new TH2F("hMCD0VsBhadrEnergy","D0 Energy Vs Bhadr Energy",200,0.,50.,200,0.,50.);
535 TH1F *hMCD0deltaBhadrEnergy=new TH1F("hMCD0deltaBhadrEnergy","Fractional D0 Energy w.r.t. Bhadr Energy",20,0.,1.);
536 TH1F *hMCD0EnergyVsAvBDaughtEn=new TH1F("hMCD0EnergyVsAvBDaughtEn","#Delta(E^{D^0}-E_{avg})/E_{Bahdr}",40,-1.,1.);
537 TH1F *hMCD0BhadrAngle=new TH1F("hMCD0BhadrAngle","cosine of the angle between D0 and Bhadr particle",40,-1.,1.);
538 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.);
539
540 TH1I *hMCPartFound=new TH1I("hMCPartFound","1=c,2=D0,3=fromBall,4=fromBmeson,5=fromBbaryon",6,0,6);
541
542
543 flistMCproperties->Add(hMCcquarkAllPt);
544 flistMCproperties->Add(hMCcquarkAllEta);
545 flistMCproperties->Add(hMCcquarkAllEnergy);
546 flistMCproperties->Add(hMCcquarkNdaught);
547 flistMCproperties->Add(hMCD0fromcPt);
548 flistMCproperties->Add(hMCD0fromcEta);
549 flistMCproperties->Add(hMCD0fromcEnergy);
550 flistMCproperties->Add(hMCD0VscquarkPt);
551 flistMCproperties->Add(hMCD0VscquarkEnergy);
552 flistMCproperties->Add(hMCD0deltacquarkEnergy);
553 flistMCproperties->Add(hMCD0EnergyVsAvcquarkDaughtEn);
554 flistMCproperties->Add(hMCD0cquarkAngle);
555 flistMCproperties->Add(hMCD0cquarkAngleEnergy);
556
557 flistMCproperties->Add(hMCfromBpdgB);
558 flistMCproperties->Add(hMCBhadrPt);
559 flistMCproperties->Add(hMCBhadrEta);
560 flistMCproperties->Add(hMCBhadrEnergy);
561 flistMCproperties->Add(hMCBhadrNdaught);
562 flistMCproperties->Add(hMCD0fromBPt);
563 flistMCproperties->Add(hMCD0fromBEta);
564 flistMCproperties->Add(hMCD0fromBEnergy);
565 flistMCproperties->Add(hMCD0VsBhadrPt);
566 flistMCproperties->Add(hMCD0VsBhadrEnergy);
567 flistMCproperties->Add(hMCD0deltaBhadrEnergy);
568 flistMCproperties->Add(hMCD0EnergyVsAvBDaughtEn);
569 flistMCproperties->Add(hMCD0BhadrAngle);
570 flistMCproperties->Add(hMCD0BhadrAngleEnergy);
571 flistMCproperties->Add(hMCPartFound);
624c07ab 572
573 //################################################################################################
574 // #
575 // HISTOS FOR NO CUTS CASE #
576 // #
577 //################################################################################################
e047b348 578 Printf("AFTER MC HISTOS \n");
624c07ab 579
580 //############ NO CUTS SIGNAL HISTOGRAMS ###############
581 //
582 // ####### global properties histo ############
583
e047b348 584 TH2F *hCPtaVSd0d0NCsign=new TH2F("hCPtaVSd0d0NCsign","hCPtaVSd0d0_NoCuts_Signal",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 585 TH1F *hSecVtxZNCsign=new TH1F("hSecVtxZNCsign","hSecVtxZ_NoCuts_Signal",1000,-8.,8.);
586 TH1F *hSecVtxXNCsign=new TH1F("hSecVtxXNCsign","hSecVtxX_NoCuts_Signal",1000,-3000.,3000.);
587 TH1F *hSecVtxYNCsign=new TH1F("hSecVtxYNCsign","hSecVtxY_NoCuts_Signal",1000,-3000.,3000.);
588 TH2F *hSecVtxXYNCsign=new TH2F("hSecVtxXYNCsign","hSecVtxXY_NoCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
589 TH1F *hSecVtxPhiNCsign=new TH1F("hSecVtxPhiNCsign","hSecVtxPhi_NoCuts_Signal",180,-180.1,180.1);
e047b348 590 TH1F *hd0singlTrackNCsign=new TH1F("hd0singlTrackNCsign","hd0singlTrackNoCuts_Signal",1000,-5000.,5000.);
591 TH1F *hCPtaNCsign=new TH1F("hCPtaNCsign","hCPta_NoCuts_Signal",100,-1.,1.);
ac4c229c 592 TH1F *hd0xd0NCsign=new TH1F("hd0xd0NCsign","hd0xd0_NoCuts_Signal",1000,-100000.,100000.);
593 TH1F *hMassTrueNCsign=new TH1F("hMassTrueNCsign","D^{0} MC inv. Mass No Cuts Signal(All momenta)",600,1.600,2.200);
594 TH1F *hMassNCsign=new TH1F("hMassNCsign","D^{0} inv. Mass No Cuts Signal (All momenta)",600,1.600,2.200);
595 hMassNCsign->Sumw2();
596 TH1F *hMassTrueNCsignPM=new TH1F("hMassTrueNCsignPM","D^{0} MC inv. Mass No Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
597 TH1F *hMassNCsignPM=new TH1F("hMassNCsignPM","D^{0} inv. Mass No Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
598 hMassNCsignPM->Sumw2();
599
600 TH1F *hMassTrueNCsignSB=new TH1F("hMassTrueNCsignSB","D^{0} MC inv. Mass in Side Bands No Cuts Signal(All momenta)",600,1.600,2.200);
601 TH1F *hMassNCsignSB=new TH1F("hMassNCsignSB","D^{0} inv. Mass in Side Bands No Cuts Signal (All momenta)",600,1.600,2.200);
602 hMassNCsignSB->Sumw2();
603
604 flistNoCutsSignal->Add(hCPtaVSd0d0NCsign);
605 flistNoCutsSignal->Add(hSecVtxZNCsign);
606 flistNoCutsSignal->Add(hSecVtxYNCsign);
607 flistNoCutsSignal->Add(hSecVtxXNCsign);
608 flistNoCutsSignal->Add(hSecVtxXYNCsign);
609 flistNoCutsSignal->Add(hSecVtxPhiNCsign);
e047b348 610 flistNoCutsSignal->Add(hd0singlTrackNCsign);
ac4c229c 611 flistNoCutsSignal->Add(hCPtaNCsign);
612 flistNoCutsSignal->Add(hd0xd0NCsign);
613 flistNoCutsSignal->Add(hMassTrueNCsign);
614 flistNoCutsSignal->Add(hMassNCsign);
615 flistNoCutsSignal->Add(hMassTrueNCsignPM);
616 flistNoCutsSignal->Add(hMassNCsignPM);
617 flistNoCutsSignal->Add(hMassTrueNCsignSB);
618 flistNoCutsSignal->Add(hMassNCsignSB);
e047b348 619
620 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
621 TH1F *hdcaNCsign=new TH1F("hdcaNCsign","hdca_NoCuts_Signal",100,0.,1000.);
622 hdcaNCsign->SetXTitle("dca [#mum]");
623 hdcaNCsign->SetYTitle("Entries");
624 TH1F *hcosthetastarNCsign=new TH1F("hcosthetastarNCsign","hCosThetaStar_NoCuts_Signal",50,-1.,1.);
625 hcosthetastarNCsign->SetXTitle("cos #theta^{*}");
626 hcosthetastarNCsign->SetYTitle("Entries");
627 TH1F *hptD0NCsign=new TH1F("hptD0NCsign","D^{0} transverse momentum distribution",34,ptbinsD0arr);
628 hptD0NCsign->SetXTitle("p_{t} [GeV/c]");
629 hptD0NCsign->SetYTitle("Entries");
630 TH1F *hptD0VsMaxPtNCsign=new TH1F("hptD0VsMaxPtNCsign","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
631 TH2F *hptD0PTallsqrtNCsign=new TH2F("hptD0PTallsqrtNCsign","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
632 TH2F *hptD0PTallNCsign=new TH2F("hptD0PTallNCsign","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
633 TH2F *hptD0vsptBNCsign=new TH2F("hptD0vsptBNCsign","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
634 TH2F *hpD0vspBNCsign=new TH2F("hpD0vspBNCsign","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
635 TH2F *hptD0vsptcquarkNCsign=new TH2F("hptD0vsptcquarkNCsign","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
636 TH2F *hpD0vspcquarkNCsign=new TH2F("hpD0vspcquarkNCsign","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
637 flistNoCutsSignal->Add(hdcaNCsign);
638 flistNoCutsSignal->Add(hcosthetastarNCsign);
639 flistNoCutsSignal->Add(hptD0NCsign);
640 flistNoCutsSignal->Add(hptD0VsMaxPtNCsign);
641 flistNoCutsSignal->Add(hptD0PTallsqrtNCsign);
642 flistNoCutsSignal->Add(hptD0PTallNCsign);
643 flistNoCutsSignal->Add(hptD0vsptBNCsign);
644 flistNoCutsSignal->Add(hpD0vspBNCsign);
645 flistNoCutsSignal->Add(hptD0vsptcquarkNCsign);
646 flistNoCutsSignal->Add(hpD0vspcquarkNCsign);
647
648 TH1F *hd0zD0ptNCsign;
cc3209fb 649 TH1F *hInvMassD0NCsign,*hInvMassD0barNCsign;
e047b348 650 TH2F *hInvMassPtNCsign=new TH2F("hInvMassPtNCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
651 flistNoCutsSignal->Add(hInvMassPtNCsign);
652 TH1F *hetaNCsign;
653 TH1F *hCosPDPBNCsign;
654 TH1F *hCosPcPDNCsign;
655 // ADDITIONAL HISTOS
656 TH2F *hd0D0VSd0xd0NCsignpt;
657 TH2F *hangletracksVSd0xd0NCsignpt;
658 TH2F *hangletracksVSd0D0NCsignpt;
659 TH1F *hd0xd0NCsignpt;
660
661 TH2F *hTOFpidNCsign=new TH2F("hTOFpidNCsign","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
662 flistNoCutsSignal->Add(hTOFpidNCsign);
663
664 //##################
665 for(Int_t i=0;i<fnbins;i++){
666 //Printf("INSIDE HISTOS CREATION LOOP: %d \n",fnbins);
667
668 namehist="hd0zD0ptNCsign_pt";
669 namehist+=i;
670 titlehist="d0(z) No Cuts Signalm ptbin=";
671 titlehist+=i;
672 hd0zD0ptNCsign=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
673 hd0zD0ptNCsign->SetXTitle("d_{0}(z) [#mum]");
674 hd0zD0ptNCsign->SetYTitle("Entries");
675 flistNoCutsSignal->Add(hd0zD0ptNCsign);
676
cc3209fb 677 namehist="hInvMassD0NCsign_pt";
e047b348 678 namehist+=i;
cc3209fb 679 titlehist="Invariant Mass D0 No Cuts Signal ptbin=";
e047b348 680 titlehist+=i;
cc3209fb 681 hInvMassD0NCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
682 hInvMassD0NCsign->SetXTitle("Invariant Mass [GeV]");
683 hInvMassD0NCsign->SetYTitle("Entries");
684 flistNoCutsSignal->Add(hInvMassD0NCsign);
685
686
687 namehist="hInvMassD0barNCsign_pt";
688 namehist+=i;
689 titlehist="Invariant Mass D0bar No Cuts Signal ptbin=";
690 titlehist+=i;
691 hInvMassD0barNCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
692 hInvMassD0barNCsign->SetXTitle("Invariant Mass [GeV]");
693 hInvMassD0barNCsign->SetYTitle("Entries");
694 flistNoCutsSignal->Add(hInvMassD0barNCsign);
695
e047b348 696
697 namehist="hetaNCsign_pt";
698 namehist+=i;
699 titlehist="eta No Cuts Signal ptbin=";
700 titlehist+=i;
701 hetaNCsign=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
702 hetaNCsign->SetXTitle("Pseudorapidity");
703 hetaNCsign->SetYTitle("Entries");
704 flistNoCutsSignal->Add(hetaNCsign);
705
706 namehist="hCosPDPBNCsign_pt";
707 namehist+=i;
708 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
709 titlehist+=i;
710 hCosPDPBNCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
711 hCosPDPBNCsign->SetXTitle("Cosine between D0 momentum and B momentum");
712 hCosPDPBNCsign->SetYTitle("Entries");
713 flistNoCutsSignal->Add(hCosPDPBNCsign);
714
715 namehist="hCosPcPDNCsign_pt";
716 namehist+=i;
717 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
718 titlehist+=i;
719 hCosPcPDNCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
720 hCosPcPDNCsign->SetXTitle("Cosine between c quark momentum and D0 momentum");
721 hCosPcPDNCsign->SetYTitle("Entries");
722 flistNoCutsSignal->Add(hCosPcPDNCsign);
723
724
725 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
726 namehist="hd0xd0NCsign_pt";
727 namehist+=i;
728 titlehist="d0xd0 No Cuts Signal ptbin=";
729 titlehist+=i;
730 hd0xd0NCsignpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
731 hd0xd0NCsignpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
732 hd0xd0NCsignpt->SetYTitle("Entries");
733 flistNoCutsSignal->Add(hd0xd0NCsignpt);
734
735
736 namehist="hd0D0VSd0xd0NCsign_pt";
737 namehist+=i;
738 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Signal ptbin=";
739 titlehist+=i;
740 hd0D0VSd0xd0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
741 hd0D0VSd0xd0NCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
742 hd0D0VSd0xd0NCsignpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
743 flistNoCutsSignal->Add(hd0D0VSd0xd0NCsignpt);
744
745
746 namehist="hangletracksVSd0xd0NCsign_pt";
747 namehist+=i;
748 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Signal ptbin=";
749 titlehist+=i;
750 hangletracksVSd0xd0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
751 hangletracksVSd0xd0NCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
752 hangletracksVSd0xd0NCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
753 flistNoCutsSignal->Add(hangletracksVSd0xd0NCsignpt);
754
755
756 namehist="hangletracksVSd0D0NCsign_pt";
757 namehist+=i;
758 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Signal ptbin=";
759 titlehist+=i;
760 hangletracksVSd0D0NCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
761 hangletracksVSd0D0NCsignpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
762 hangletracksVSd0D0NCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
763 flistNoCutsSignal->Add(hangletracksVSd0D0NCsignpt);
764
765 }
766 Printf("AFTER LOOP HISTOS CREATION \n");
767 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
768 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
624c07ab 769
770 // ####### d0 D0 histos ############
ac4c229c 771 TH1F *hd0D0NCsignPM = new TH1F("hd0D0NCsignPM","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
772 hd0D0NCsignPM->SetXTitle("Impact parameter [#mum]");
773 hd0D0NCsignPM->SetYTitle("Entries");
774
775 TH1F *hd0D0VtxTrueNCsignPM = new TH1F("hd0D0VtxTrueNCsignPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
776 hd0D0VtxTrueNCsignPM->SetXTitle("Impact parameter [#mum]");
777 hd0D0VtxTrueNCsignPM->SetYTitle("Entries");
778
779 TH1F *hMCd0D0NCsignPM = new TH1F("hMCd0D0NCsignPM","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
780 hMCd0D0NCsignPM->SetXTitle("MC Impact parameter [#mum]");
781 hMCd0D0NCsignPM->SetYTitle("Entries");
782
783 TH1F *hd0D0NCsignSB = new TH1F("hd0D0NCsignSB","D^{0} impact par. plot , No Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
784 hd0D0NCsignSB->SetXTitle("Impact parameter [#mum]");
785 hd0D0NCsignSB->SetYTitle("Entries");
786
787 TH1F *hd0D0VtxTrueNCsignSB = new TH1F("hd0D0VtxTrueNCsignSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
788 hd0D0VtxTrueNCsignSB->SetXTitle("Impact parameter [#mum]");
789 hd0D0VtxTrueNCsignSB->SetYTitle("Entries");
790
791 TH1F *hMCd0D0NCsignSB = new TH1F("hMCd0D0NCsignSB","D^{0} impact par. plot, No Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
792 hMCd0D0NCsignSB->SetXTitle("MC Impact parameter [#mum]");
793 hMCd0D0NCsignSB->SetYTitle("Entries");
794
795 flistNoCutsSignal->Add(hd0D0NCsignPM);
796 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignPM);
797 flistNoCutsSignal->Add(hMCd0D0NCsignPM);
798 flistNoCutsSignal->Add(hd0D0NCsignSB);
799 flistNoCutsSignal->Add(hd0D0VtxTrueNCsignSB);
800 flistNoCutsSignal->Add(hMCd0D0NCsignSB);
801
e047b348 802 TH1F *hd0D0ptNCsignPM;
803 TH1F *hMCd0D0ptNCsignPM;
804 TH1F *hd0D0VtxTrueptNCsignPM;
805 TH1F *hd0D0ptNCsignSB;
806 TH1F *hMCd0D0ptNCsignSB;
807 TH1F *hd0D0VtxTrueptNCsignSB;
ac4c229c 808 namehist="hd0D0ptNCsign_";
624c07ab 809 titlehist="D^{0} impact par. plot, No Cuts, Signal, ";
810 for(Int_t i=0;i<fnbins;i++){
e047b348 811 Printf("IN HISTOS CREATION USING PTBINS VALUES for NAMES \n");
624c07ab 812 strnamept=namehist;
813 strnamept.Append("PkMss_pt");
814 strnamept+=i;
815
816 strtitlept=titlehist;
817 strtitlept.Append(" Mass Peak, ");
e047b348 818
624c07ab 819 strtitlept+=fptbins[i];
e047b348 820 Printf("IN HISTOS CREATION USING PTBINS VALUES for NAMES %d: %f\n",i,fptbins[i]);
624c07ab 821 strtitlept.Append("<= pt <");
822 strtitlept+=fptbins[i+1];
823 strtitlept.Append(" [GeV/c]");
824
e047b348 825 hd0D0ptNCsignPM= new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
826 hd0D0ptNCsignPM->SetXTitle("Impact parameter [#mum] ");
827 hd0D0ptNCsignPM->SetYTitle("Entries");
828 flistNoCutsSignal->Add(hd0D0ptNCsignPM);
624c07ab 829
830 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 831 hMCd0D0ptNCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
832 hMCd0D0ptNCsignPM->SetXTitle("MC Impact parameter [#mum] ");
833 hMCd0D0ptNCsignPM->SetYTitle("Entries");
834 flistNoCutsSignal->Add(hMCd0D0ptNCsignPM);
624c07ab 835
836
837 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 838 hd0D0VtxTrueptNCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
839 hd0D0VtxTrueptNCsignPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
840 hd0D0VtxTrueptNCsignPM->SetYTitle("Entries");
841 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignPM);
624c07ab 842
843 strnamept=namehist;
844 strnamept.Append("SBMss_pt");
845 strnamept+=i;
846
847 strtitlept=titlehist;
848 strtitlept.Append(" Side Bands, ");
849 strtitlept+=fptbins[i];
850 strtitlept.Append("<= pt <");
851 strtitlept+=fptbins[i+1];
852 strtitlept.Append(" [GeV/c]");
853
e047b348 854 hd0D0ptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
855 hd0D0ptNCsignSB->SetXTitle("Impact parameter [#mum] ");
856 hd0D0ptNCsignSB->SetYTitle("Entries");
857 flistNoCutsSignal->Add(hd0D0ptNCsignSB);
624c07ab 858
859 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 860 hMCd0D0ptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
861 hMCd0D0ptNCsignSB->SetXTitle("MC Impact parameter [#mum] ");
862 hMCd0D0ptNCsignSB->SetYTitle("Entries");
863 flistNoCutsSignal->Add(hMCd0D0ptNCsignSB);
624c07ab 864
865 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 866 hd0D0VtxTrueptNCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
867 hd0D0VtxTrueptNCsignSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
868 hd0D0VtxTrueptNCsignSB->SetYTitle("Entries");
869 flistNoCutsSignal->Add(hd0D0VtxTrueptNCsignSB);
624c07ab 870 }
871
e047b348 872 Printf("AFTER SIGNAL HISTOS CREATION for NOCUTS\n");
873
624c07ab 874
875 //############ NO CUTS BACKGROUND HISTOGRAMS ###########
876 //
877 // ######## global properties histos #######
e047b348 878 TH2F *hCPtaVSd0d0NCback=new TH2F("hCPtaVSd0d0NCback","hCPtaVSd0d0_NoCuts_Background",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 879 TH1F *hSecVtxZNCback=new TH1F("hSecVtxZNCback","hSecVtxZ_NoCuts_Background",1000,-8.,8.);
880 TH1F *hSecVtxXNCback=new TH1F("hSecVtxXNCback","hSecVtxX_NoCuts_Background",1000,-3000.,3000.);
881 TH1F *hSecVtxYNCback=new TH1F("hSecVtxYNCback","hSecVtxY_NoCuts_Background",1000,-3000.,3000.);
882 TH2F *hSecVtxXYNCback=new TH2F("hSecVtxXYNCback","hSecVtxXY_NoCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
883 TH1F *hSecVtxPhiNCback=new TH1F("hSecVtxPhiNCback","hSecVtxPhi_NoCuts_Background",180,-180.1,180.1);
e047b348 884 TH1F *hd0singlTrackNCback=new TH1F("hd0singlTrackNCback","hd0singlTrackNoCuts_Back",1000,-5000.,5000.);
885 TH1F *hCPtaNCback=new TH1F("hCPtaNCback","hCPta_NoCuts_Background",100,-1.,1.);
ac4c229c 886 TH1F *hd0xd0NCback=new TH1F("hd0xd0NCback","hd0xd0_NoCuts_Background",1000,-100000.,100000.);
887 TH1F *hMassTrueNCback=new TH1F("hMassTrueNCback","D^{0} MC inv. Mass No Cuts Background(All momenta)",600,1.600,2.200);
888 TH1F *hMassNCback=new TH1F("hMassNCback","D^{0} inv. Mass No Cuts Background (All momenta)",600,1.600,2.200);
889 hMassNCback->Sumw2();
890 TH1F *hMassTrueNCbackPM=new TH1F("hMassTrueNCbackPM","D^{0} MC inv. Mass No Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
891 TH1F *hMassNCbackPM=new TH1F("hMassNCbackPM","D^{0} inv. Mass No Cuts Background (All momenta), MassPeak",600,1.600,2.200);
892 hMassNCbackPM->Sumw2();
893 TH1F *hMassTrueNCbackSB=new TH1F("hMassTrueNCbackSB","D^{0} MC inv. Mass in Side Bands No Cuts Background(All momenta)",600,1.600,2.200);
894 TH1F *hMassNCbackSB=new TH1F("hMassNCbackSB","D^{0} inv. Mass in Side Bands No Cuts Background (All momenta)",600,1.600,2.200);
895 hMassNCbackSB->Sumw2();
896
897 flistNoCutsBack->Add(hCPtaVSd0d0NCback);
898 flistNoCutsBack->Add(hSecVtxZNCback);
899 flistNoCutsBack->Add(hSecVtxYNCback);
900 flistNoCutsBack->Add(hSecVtxXNCback);
901 flistNoCutsBack->Add(hSecVtxXYNCback);
902 flistNoCutsBack->Add(hSecVtxPhiNCback);
e047b348 903 flistNoCutsBack->Add(hd0singlTrackNCback);
ac4c229c 904 flistNoCutsBack->Add(hCPtaNCback);
905 flistNoCutsBack->Add(hd0xd0NCback);
906 flistNoCutsBack->Add(hMassTrueNCback);
907 flistNoCutsBack->Add(hMassNCback);
908 flistNoCutsBack->Add(hMassTrueNCbackPM);
909 flistNoCutsBack->Add(hMassNCbackPM);
910 flistNoCutsBack->Add(hMassTrueNCbackSB);
911 flistNoCutsBack->Add(hMassNCbackSB);
624c07ab 912
913
e047b348 914 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
915 TH1F *hdcaNCback=new TH1F("hdcaNCback","hdca_NoCuts_Backgr",100,0.,1000.);
916 hdcaNCback->SetXTitle("dca [#mum]");
917 hdcaNCback->SetYTitle("Entries");
918 TH1F *hcosthetastarNCback=new TH1F("hcosthetastarNCback","hCosThetaStar_NoCuts_Backgr",50,-1.,1.);
919 hcosthetastarNCback->SetXTitle("cos #theta^{*}");
920 hcosthetastarNCback->SetYTitle("Entries");
921 TH1F *hptD0NCback=new TH1F("hptD0NCback","D^{0} transverse momentum distribution",34,ptbinsD0arr);
922 hptD0NCback->SetXTitle("p_{t} [GeV/c]");
923 hptD0NCback->SetYTitle("Entries");
924 TH1F *hptD0VsMaxPtNCback=new TH1F("hptD0VsMaxPtNCback","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
925 TH2F *hptD0PTallsqrtNCback=new TH2F("hptD0PTallsqrtNCback","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
926 TH2F *hptD0PTallNCback=new TH2F("hptD0PTallNCback","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
927 TH2F *hptD0vsptBNCback=new TH2F("hptD0vsptBNCback","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
928 TH2F *hpD0vspBNCback=new TH2F("hpD0vspBNCback","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
929 TH2F *hptD0vsptcquarkNCback=new TH2F("hptD0vsptcquarkNCback","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
930 TH2F *hpD0vspcquarkNCback=new TH2F("hpD0vspcquarkNCback","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
931 flistNoCutsBack->Add(hdcaNCback);
932 flistNoCutsBack->Add(hcosthetastarNCback);
933 flistNoCutsBack->Add(hptD0NCback);
934 flistNoCutsBack->Add(hptD0VsMaxPtNCback);
935 flistNoCutsBack->Add(hptD0PTallsqrtNCback);
936 flistNoCutsBack->Add(hptD0PTallNCback);
937 flistNoCutsBack->Add(hptD0vsptBNCback);
938 flistNoCutsBack->Add(hpD0vspBNCback);
939 flistNoCutsBack->Add(hptD0vsptcquarkNCback);
940 flistNoCutsBack->Add(hpD0vspcquarkNCback);
941
942 TH1F *hd0zD0ptNCback;
cc3209fb 943 TH1F *hInvMassD0NCback,*hInvMassD0barNCback;
e047b348 944 TH2F *hInvMassPtNCback=new TH2F("hInvMassPtNCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
945 TH1F *hetaNCback;
946 TH1F *hCosPDPBNCback;
947 TH1F *hCosPcPDNCback;
948 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
949 TH2F *hd0D0VSd0xd0NCbackpt;
950 TH2F *hangletracksVSd0xd0NCbackpt;
951 TH2F *hangletracksVSd0D0NCbackpt;
952 TH1F *hd0xd0NCbackpt;
953 flistNoCutsBack->Add(hInvMassPtNCback);
954
955 TH2F *hTOFpidNCback=new TH2F("hTOFpidNCback","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
956 flistNoCutsBack->Add(hTOFpidNCback);
957
958 for(Int_t i=0;i<fnbins;i++){
959 namehist="hd0zD0ptNCback_pt";
960 namehist+=i;
961 titlehist="d0(z) No Cuts Backgrm ptbin=";
962 titlehist+=i;
963 hd0zD0ptNCback=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
964 hd0zD0ptNCback->SetXTitle("d_{0}(z) [#mum]");
965 hd0zD0ptNCback->SetYTitle("Entries");
966 flistNoCutsBack->Add(hd0zD0ptNCback);
967
cc3209fb 968 namehist="hInvMassD0NCback_pt";
e047b348 969 namehist+=i;
970 titlehist="Invariant Mass No Cuts Backgr ptbin=";
971 titlehist+=i;
cc3209fb 972 hInvMassD0NCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
973 hInvMassD0NCback->SetXTitle("Invariant Mass [GeV]");
974 hInvMassD0NCback->SetYTitle("Entries");
975 flistNoCutsBack->Add(hInvMassD0NCback);
976
977
978 namehist="hInvMassD0barNCback_pt";
979 namehist+=i;
980 titlehist="Invariant Mass D0bar No Cuts Back ptbin=";
981 titlehist+=i;
982 hInvMassD0barNCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
983 hInvMassD0barNCback->SetXTitle("Invariant Mass [GeV]");
984 hInvMassD0barNCback->SetYTitle("Entries");
985 flistNoCutsBack->Add(hInvMassD0barNCback);
986
e047b348 987
988 namehist="hetaNCback_pt";
989 namehist+=i;
990 titlehist="eta No Cuts Backgr ptbin=";
991 titlehist+=i;
992 hetaNCback=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
993 hetaNCback->SetXTitle("Pseudorapidity");
994 hetaNCback->SetYTitle("Entries");
995 flistNoCutsBack->Add(hetaNCback);
996
997 namehist="hCosPDPBNCback_pt";
998 namehist+=i;
999 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1000 titlehist+=i;
1001 hCosPDPBNCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1002 hCosPDPBNCback->SetXTitle("Cosine between D0 momentum and B momentum");
1003 hCosPDPBNCback->SetYTitle("Entries");
1004 flistNoCutsBack->Add(hCosPDPBNCback);
1005
1006 namehist="hCosPcPDNCback_pt";
1007 namehist+=i;
1008 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1009 titlehist+=i;
1010 hCosPcPDNCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1011 hCosPcPDNCback->SetXTitle("Cosine between c quark momentum and D0 momentum");
1012 hCosPcPDNCback->SetYTitle("Entries");
1013 flistNoCutsBack->Add(hCosPcPDNCback);
1014
1015
1016 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1017 namehist="hd0xd0NCback_pt";
1018 namehist+=i;
1019 titlehist="d0xd0 No Cuts Background ptbin=";
1020 titlehist+=i;
1021 hd0xd0NCbackpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1022 hd0xd0NCbackpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1023 hd0xd0NCbackpt->SetYTitle("Entries");
1024 flistNoCutsBack->Add(hd0xd0NCbackpt);
1025
1026
1027 namehist="hd0D0VSd0xd0NCback_pt";
1028 namehist+=i;
1029 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Back ptbin=";
1030 titlehist+=i;
1031 hd0D0VSd0xd0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1032 hd0D0VSd0xd0NCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1033 hd0D0VSd0xd0NCbackpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1034 flistNoCutsBack->Add(hd0D0VSd0xd0NCbackpt);
1035
1036
1037 namehist="hangletracksVSd0xd0NCback_pt";
1038 namehist+=i;
1039 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Back ptbin=";
1040 titlehist+=i;
1041 hangletracksVSd0xd0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1042 hangletracksVSd0xd0NCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1043 hangletracksVSd0xd0NCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
1044 flistNoCutsBack->Add(hangletracksVSd0xd0NCbackpt);
1045
1046
1047 namehist="hangletracksVSd0D0NCback_pt";
1048 namehist+=i;
1049 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Back ptbin=";
1050 titlehist+=i;
1051 hangletracksVSd0D0NCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1052 hangletracksVSd0D0NCbackpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1053 hangletracksVSd0D0NCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
1054 flistNoCutsBack->Add(hangletracksVSd0D0NCbackpt);
1055
1056
1057
1058 }
1059 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1060 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1061
1062
1063
624c07ab 1064 // ####### d0 D0 histos ############
1065
ac4c229c 1066 TH1F *hd0D0NCbackPM = new TH1F("hd0D0NCbackPM","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1067 hd0D0NCbackPM->SetXTitle("Impact parameter [#mum]");
1068 hd0D0NCbackPM->SetYTitle("Entries");
1069
1070 TH1F *hd0D0VtxTrueNCbackPM = new TH1F("hd0D0VtxTrueNCbackPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1071 hd0D0VtxTrueNCbackPM->SetXTitle("Impact parameter [#mum]");
1072 hd0D0VtxTrueNCbackPM->SetYTitle("Entries");
1073
1074 TH1F *hMCd0D0NCbackPM = new TH1F("hMCd0D0NCbackPM","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1075 hMCd0D0NCbackPM->SetXTitle("MC Impact parameter [#mum]");
1076 hMCd0D0NCbackPM->SetYTitle("Entries");
1077
1078 TH1F *hd0D0NCbackSB = new TH1F("hd0D0NCbackSB","D^{0} impact par. plot , No Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1079 hd0D0NCbackSB->SetXTitle("Impact parameter [#mum]");
1080 hd0D0NCbackSB->SetYTitle("Entries");
1081
1082 TH1F *hd0D0VtxTrueNCbackSB = new TH1F("hd0D0VtxTrueNCbackSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1083 hd0D0VtxTrueNCbackSB->SetXTitle("Impact parameter [#mum]");
1084 hd0D0VtxTrueNCbackSB->SetYTitle("Entries");
1085
1086 TH1F *hMCd0D0NCbackSB = new TH1F("hMCd0D0NCbackSB","D^{0} impact par. plot, No Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
1087 hMCd0D0NCbackSB->SetXTitle("MC Impact parameter [#mum]");
1088 hMCd0D0NCbackSB->SetYTitle("Entries");
1089
1090 flistNoCutsBack->Add(hd0D0NCbackPM);
1091 flistNoCutsBack->Add(hd0D0VtxTrueNCbackPM);
1092 flistNoCutsBack->Add(hMCd0D0NCbackPM);
1093 flistNoCutsBack->Add(hd0D0NCbackSB);
1094 flistNoCutsBack->Add(hd0D0VtxTrueNCbackSB);
1095 flistNoCutsBack->Add(hMCd0D0NCbackSB);
1096
e047b348 1097 TH1F *hd0D0ptNCbackPM;
1098 TH1F *hMCd0D0ptNCbackPM;
1099 TH1F *hd0D0VtxTrueptNCbackPM;
1100 TH1F *hd0D0ptNCbackSB;
1101 TH1F *hMCd0D0ptNCbackSB;
1102 TH1F *hd0D0VtxTrueptNCbackSB;
ac4c229c 1103 namehist="hd0D0ptNCback_";
624c07ab 1104 titlehist="D^{0} impact par. plot, No Cuts, Background, ";
1105 for(Int_t i=0;i<fnbins;i++){
1106 strnamept=namehist;
1107 strnamept.Append("PkMss_pt");
1108 strnamept+=i;
1109
1110 strtitlept=titlehist;
1111 strtitlept.Append(" Mass Peak, ");
1112 strtitlept+=fptbins[i];
1113 strtitlept.Append("<= pt <");
1114 strtitlept+=fptbins[i+1];
1115 strtitlept.Append(" [GeV/c]");
1116
e047b348 1117 hd0D0ptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1118 hd0D0ptNCbackPM->SetXTitle("Impact parameter [#mum] ");
1119 hd0D0ptNCbackPM->SetYTitle("Entries");
1120 flistNoCutsBack->Add(hd0D0ptNCbackPM);
624c07ab 1121
1122 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1123 hMCd0D0ptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1124 hMCd0D0ptNCbackPM->SetXTitle("MC Impact parameter [#mum] ");
1125 hMCd0D0ptNCbackPM->SetYTitle("Entries");
1126 flistNoCutsBack->Add(hMCd0D0ptNCbackPM);
624c07ab 1127
1128
1129 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1130 hd0D0VtxTrueptNCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1131 hd0D0VtxTrueptNCbackPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1132 hd0D0VtxTrueptNCbackPM->SetYTitle("Entries");
1133 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackPM);
624c07ab 1134
1135 strnamept=namehist;
1136 strnamept.Append("SBMss_pt");
1137 strnamept+=i;
1138
1139 strtitlept=titlehist;
1140 strtitlept.Append(" Side Bands, ");
1141 strtitlept+=fptbins[i];
1142 strtitlept.Append("<= pt <");
1143 strtitlept+=fptbins[i+1];
1144 strtitlept.Append(" [GeV/c]");
1145
e047b348 1146 hd0D0ptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1147 hd0D0ptNCbackSB->SetXTitle("Impact parameter [#mum] ");
1148 hd0D0ptNCbackSB->SetYTitle("Entries");
1149 flistNoCutsBack->Add(hd0D0ptNCbackSB);
624c07ab 1150
1151 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1152 hMCd0D0ptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1153 hMCd0D0ptNCbackSB->SetXTitle("MC Impact parameter [#mum] ");
1154 hMCd0D0ptNCbackSB->SetYTitle("Entries");
1155 flistNoCutsBack->Add(hMCd0D0ptNCbackSB);
624c07ab 1156
1157 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1158 hd0D0VtxTrueptNCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1159 hd0D0VtxTrueptNCbackSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1160 hd0D0VtxTrueptNCbackSB->SetYTitle("Entries");
1161 flistNoCutsBack->Add(hd0D0VtxTrueptNCbackSB);
624c07ab 1162 }
1163
1164
1165
1166 //############ NO CUTS FROMB HISTOGRAMS ###########
1167 //
1168 //####### global properties histos
1169
e047b348 1170 TH2F *hCPtaVSd0d0NCfromB=new TH2F("hCPtaVSd0d0NCfromB","hCPtaVSd0d0_NoCuts_FromB",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1171 TH1F *hSecVtxZNCfromB=new TH1F("hSecVtxZNCfromB","hSecVtxZ_NoCuts_FromB",1000,-8.,8.);
1172 TH1F *hSecVtxXNCfromB=new TH1F("hSecVtxXNCfromB","hSecVtxX_NoCuts_FromB",1000,-3000.,3000.);
1173 TH1F *hSecVtxYNCfromB=new TH1F("hSecVtxYNCfromB","hSecVtxY_NoCuts_FromB",1000,-3000.,3000.);
1174 TH2F *hSecVtxXYNCfromB=new TH2F("hSecVtxXYNCfromB","hSecVtxXY_NoCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
1175 TH1F *hSecVtxPhiNCfromB=new TH1F("hSecVtxPhiNCfromB","hSecVtxPhi_NoCuts_FromB",180,-180.1,180.1);
e047b348 1176 TH1F *hd0singlTrackNCfromB=new TH1F("hd0singlTrackNCfromB","hd0singlTrackNoCuts_FromB",1000,-5000.,5000.);
1177 TH1F *hCPtaNCfromB=new TH1F("hCPtaNCfromB","hCPta_NoCuts_FromB",100,-1.,1.);
ac4c229c 1178 TH1F *hd0xd0NCfromB=new TH1F("hd0xd0NCfromB","hd0xd0_NoCuts_FromB",1000,-100000.,100000.);
1179 TH1F *hMassTrueNCfromB=new TH1F("hMassTrueNCfromB","D^{0} MC inv. Mass No Cuts FromB(All momenta)",600,1.600,2.200);
1180 TH1F *hMassNCfromB=new TH1F("hMassNCfromB","D^{0} inv. Mass No Cuts FromB (All momenta)",600,1.600,2.200);
1181 hMassNCfromB->Sumw2();
1182 TH1F *hMassTrueNCfromBPM=new TH1F("hMassTrueNCfromBPM","D^{0} MC inv. Mass No Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
1183 TH1F *hMassNCfromBPM=new TH1F("hMassNCfromBPM","D^{0} inv. Mass No Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
1184 hMassNCfromB->Sumw2();
1185 TH1F *hMassTrueNCfromBSB=new TH1F("hMassTrueNCfromBSB","D^{0} MC inv. Mass in Side Bands No Cuts FromB(All momenta)",600,1.600,2.200);
1186 TH1F *hMassNCfromBSB=new TH1F("hMassNCfromBSB","D^{0} inv. Mass in Side Bands No Cuts FromB (All momenta)",600,1.600,2.200);
1187 hMassNCfromBSB->Sumw2();
1188
1189 flistNoCutsFromB->Add(hCPtaVSd0d0NCfromB);
1190 flistNoCutsFromB->Add(hSecVtxZNCfromB);
1191 flistNoCutsFromB->Add(hSecVtxYNCfromB);
1192 flistNoCutsFromB->Add(hSecVtxXNCfromB);
1193 flistNoCutsFromB->Add(hSecVtxXYNCfromB);
1194 flistNoCutsFromB->Add(hSecVtxPhiNCfromB);
e047b348 1195 flistNoCutsFromB->Add(hd0singlTrackNCfromB);
ac4c229c 1196 flistNoCutsFromB->Add(hCPtaNCfromB);
1197 flistNoCutsFromB->Add(hd0xd0NCfromB);
1198 flistNoCutsFromB->Add(hMassTrueNCfromB);
1199 flistNoCutsFromB->Add(hMassNCfromB);
1200 flistNoCutsFromB->Add(hMassTrueNCfromBPM);
1201 flistNoCutsFromB->Add(hMassNCfromBPM);
1202 flistNoCutsFromB->Add(hMassTrueNCfromBSB);
1203 flistNoCutsFromB->Add(hMassNCfromBSB);
624c07ab 1204
e047b348 1205
1206
1207
1208
1209 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
1210 TH1F *hdcaNCfromB=new TH1F("hdcaNCfromB","hdca_NoCuts_FromB",100,0.,1000.);
1211 hdcaNCfromB->SetXTitle("dca [#mum]");
1212 hdcaNCfromB->SetYTitle("Entries");
1213 TH1F *hcosthetastarNCfromB=new TH1F("hcosthetastarNCfromB","hCosThetaStar_NoCuts_FromB",50,-1.,1.);
1214 hcosthetastarNCfromB->SetXTitle("cos #theta^{*}");
1215 hcosthetastarNCfromB->SetYTitle("Entries");
1216 TH1F *hptD0NCfromB=new TH1F("hptD0NCfromB","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1217 hptD0NCfromB->SetXTitle("p_{t} [GeV/c]");
1218 hptD0NCfromB->SetYTitle("Entries");
1219 TH1F *hptD0VsMaxPtNCfromB=new TH1F("hptD0VsMaxPtNCfromB","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1220 TH2F *hptD0PTallsqrtNCfromB=new TH2F("hptD0PTallsqrtNCfromB","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1221 TH2F *hptD0PTallNCfromB=new TH2F("hptD0PTallNCfromB","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1222 TH2F *hptD0vsptBNCfromB=new TH2F("hptD0vsptBNCfromB","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1223 TH2F *hpD0vspBNCfromB=new TH2F("hpD0vspBNCfromB","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1224 TH2F *hptD0vsptcquarkNCfromB=new TH2F("hptD0vsptcquarkNCfromB","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1225 TH2F *hpD0vspcquarkNCfromB=new TH2F("hpD0vspcquarkNCfromB","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1226 flistNoCutsFromB->Add(hdcaNCfromB);
1227 flistNoCutsFromB->Add(hcosthetastarNCfromB);
1228 flistNoCutsFromB->Add(hptD0NCfromB);
1229 flistNoCutsFromB->Add(hptD0VsMaxPtNCfromB);
1230 flistNoCutsFromB->Add(hptD0PTallsqrtNCfromB);
1231 flistNoCutsFromB->Add(hptD0PTallNCfromB);
1232 flistNoCutsFromB->Add(hptD0vsptBNCfromB);
1233 flistNoCutsFromB->Add(hpD0vspBNCfromB);
1234 flistNoCutsFromB->Add(hptD0vsptcquarkNCfromB);
1235 flistNoCutsFromB->Add(hpD0vspcquarkNCfromB);
1236
1237 TH1F *hd0zD0ptNCfromB;
cc3209fb 1238 TH1F *hInvMassD0NCfromB,*hInvMassD0barNCfromB;
e047b348 1239 TH2F *hInvMassPtNCfromB=new TH2F("hInvMassPtNCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
1240 TH1F *hetaNCfromB;
1241 TH1F *hCosPDPBNCfromB;
1242 TH1F *hCosPcPDNCfromB;
1243
1244 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1245 TH2F *hd0D0VSd0xd0NCfromBpt;
1246 TH2F *hangletracksVSd0xd0NCfromBpt;
1247 TH2F *hangletracksVSd0D0NCfromBpt;
1248 TH1F *hd0xd0NCfromBpt;
1249 flistNoCutsFromB->Add(hInvMassPtNCfromB);
1250
1251 TH2F *hTOFpidNCfromB=new TH2F("hTOFpidNCfromB","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1252 flistNoCutsFromB->Add(hTOFpidNCfromB);
1253
1254 for(Int_t i=0;i<fnbins;i++){
1255 namehist="hd0zD0ptNCfromB_pt";
1256 namehist+=i;
1257 titlehist="d0(z) No Cuts FromB ptbin=";
1258 titlehist+=i;
1259 hd0zD0ptNCfromB=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1260 hd0zD0ptNCfromB->SetXTitle("d_{0}(z) [#mum]");
1261 hd0zD0ptNCfromB->SetYTitle("Entries");
1262 flistNoCutsFromB->Add(hd0zD0ptNCfromB);
1263
cc3209fb 1264 namehist="hInvMassD0NCfromB_pt";
e047b348 1265 namehist+=i;
1266 titlehist="Invariant Mass No Cuts FromB ptbin=";
1267 titlehist+=i;
cc3209fb 1268 hInvMassD0NCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1269 hInvMassD0NCfromB->SetXTitle("Invariant Mass [GeV]");
1270 hInvMassD0NCfromB->SetYTitle("Entries");
1271 flistNoCutsFromB->Add(hInvMassD0NCfromB);
1272
1273
1274 namehist="hInvMassD0barNCfromB_pt";
1275 namehist+=i;
1276 titlehist="Invariant Mass D0bar No Cuts FromB ptbin=";
1277 titlehist+=i;
1278 hInvMassD0barNCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1279 hInvMassD0barNCfromB->SetXTitle("Invariant Mass [GeV]");
1280 hInvMassD0barNCfromB->SetYTitle("Entries");
1281 flistNoCutsFromB->Add(hInvMassD0barNCfromB);
1282
1283
e047b348 1284
1285 namehist="hetaNCfromB_pt";
1286 namehist+=i;
1287 titlehist="eta No Cuts FromB ptbin=";
1288 titlehist+=i;
1289 hetaNCfromB=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1290 hetaNCfromB->SetXTitle("Pseudorapidity");
1291 hetaNCfromB->SetYTitle("Entries");
1292 flistNoCutsFromB->Add(hetaNCfromB);
1293
1294 namehist="hCosPDPBNCfromB_pt";
1295 namehist+=i;
1296 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1297 titlehist+=i;
1298 hCosPDPBNCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1299 hCosPDPBNCfromB->SetXTitle("Cosine between D0 momentum and B momentum");
1300 hCosPDPBNCfromB->SetYTitle("Entries");
1301 flistNoCutsFromB->Add(hCosPDPBNCfromB);
1302
1303 namehist="hCosPcPDNCfromB_pt";
1304 namehist+=i;
1305 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1306 titlehist+=i;
1307 hCosPcPDNCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1308 hCosPcPDNCfromB->SetXTitle("Cosine between c quark momentum and D0 momentum");
1309 hCosPcPDNCfromB->SetYTitle("Entries");
1310 flistNoCutsFromB->Add(hCosPcPDNCfromB);
1311
1312// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1313 namehist="hd0xd0NCfromB_pt";
1314 namehist+=i;
1315 titlehist="d0xd0 No Cuts FromB ptbin=";
1316 titlehist+=i;
1317 hd0xd0NCfromBpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1318 hd0xd0NCfromBpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1319 hd0xd0NCfromBpt->SetYTitle("Entries");
1320 flistNoCutsFromB->Add(hd0xd0NCfromBpt);
1321
1322
1323 namehist="hd0D0VSd0xd0NCfromB_pt";
1324 namehist+=i;
1325 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromB ptbin=";
1326 titlehist+=i;
1327 hd0D0VSd0xd0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1328 hd0D0VSd0xd0NCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1329 hd0D0VSd0xd0NCfromBpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1330 flistNoCutsFromB->Add(hd0D0VSd0xd0NCfromBpt);
1331
1332
1333 namehist="hangletracksVSd0xd0NCfromB_pt";
1334 namehist+=i;
1335 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromB ptbin=";
1336 titlehist+=i;
1337 hangletracksVSd0xd0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1338 hangletracksVSd0xd0NCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1339 hangletracksVSd0xd0NCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
1340 flistNoCutsFromB->Add(hangletracksVSd0xd0NCfromBpt);
1341
1342
1343 namehist="hangletracksVSd0D0NCfromB_pt";
1344 namehist+=i;
1345 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts FromB ptbin=";
1346 titlehist+=i;
1347 hangletracksVSd0D0NCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1348 hangletracksVSd0D0NCfromBpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1349 hangletracksVSd0D0NCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
1350 flistNoCutsFromB->Add(hangletracksVSd0D0NCfromBpt);
1351
1352
1353 }
1354 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1355 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1356
1357
1358
624c07ab 1359 // ######### d0 D0 histos ##############
ac4c229c 1360 TH1F *hd0D0NCfromBPM = new TH1F("hd0D0NCfromBPM","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1361 hd0D0NCfromBPM->SetXTitle("Impact parameter [#mum]");
1362 hd0D0NCfromBPM->SetYTitle("Entries");
1363
1364 TH1F *hd0D0VtxTrueNCfromBPM = new TH1F("hd0D0VtxTrueNCfromBPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1365 hd0D0VtxTrueNCfromBPM->SetXTitle("Impact parameter [#mum]");
1366 hd0D0VtxTrueNCfromBPM->SetYTitle("Entries");
1367
1368 TH1F *hMCd0D0NCfromBPM = new TH1F("hMCd0D0NCfromBPM","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1369 hMCd0D0NCfromBPM->SetXTitle("MC Impact parameter [#mum]");
1370 hMCd0D0NCfromBPM->SetYTitle("Entries");
1371
1372 TH1F *hd0D0NCfromBSB = new TH1F("hd0D0NCfromBSB","D^{0} impact par. plot , No Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1373 hd0D0NCfromBSB->SetXTitle("Impact parameter [#mum]");
1374 hd0D0NCfromBSB->SetYTitle("Entries");
1375
1376 TH1F *hd0D0VtxTrueNCfromBSB = new TH1F("hd0D0VtxTrueNCfromBSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1377 hd0D0VtxTrueNCfromBSB->SetXTitle("Impact parameter [#mum]");
1378 hd0D0VtxTrueNCfromBSB->SetYTitle("Entries");
1379
1380 TH1F *hMCd0D0NCfromBSB = new TH1F("hMCd0D0NCfromBSB","D^{0} impact par. plot, No Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
1381 hMCd0D0NCfromBSB->SetXTitle("MC Impact parameter [#mum]");
1382 hMCd0D0NCfromBSB->SetYTitle("Entries");
1383
1384 flistNoCutsFromB->Add(hd0D0NCfromBPM);
1385 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBPM);
1386 flistNoCutsFromB->Add(hMCd0D0NCfromBPM);
1387 flistNoCutsFromB->Add(hd0D0NCfromBSB);
1388 flistNoCutsFromB->Add(hd0D0VtxTrueNCfromBSB);
1389 flistNoCutsFromB->Add(hMCd0D0NCfromBSB);
1390
e047b348 1391 TH1F *hd0D0ptNCfromBPM;
1392 TH1F *hMCd0D0ptNCfromBPM;
1393 TH1F *hd0D0VtxTrueptNCfromBPM;
1394 TH1F *hd0D0ptNCfromBSB;
1395 TH1F *hMCd0D0ptNCfromBSB;
1396 TH1F *hd0D0VtxTrueptNCfromBSB;
ac4c229c 1397 namehist="hd0D0ptNCfromB_";
624c07ab 1398 titlehist="D^{0} impact par. plot, No Cuts, FromB, ";
1399 for(Int_t i=0;i<fnbins;i++){
1400 strnamept=namehist;
1401 strnamept.Append("PkMss_pt");
1402 strnamept+=i;
1403
1404 strtitlept=titlehist;
1405 strtitlept.Append(" Mass Peak, ");
1406 strtitlept+=fptbins[i];
1407 strtitlept.Append("<= pt <");
1408 strtitlept+=fptbins[i+1];
1409 strtitlept.Append(" [GeV/c]");
1410
e047b348 1411 hd0D0ptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1412 hd0D0ptNCfromBPM->SetXTitle("Impact parameter [#mum] ");
1413 hd0D0ptNCfromBPM->SetYTitle("Entries");
1414 flistNoCutsFromB->Add(hd0D0ptNCfromBPM);
624c07ab 1415
1416 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1417 hMCd0D0ptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1418 hMCd0D0ptNCfromBPM->SetXTitle("MC Impact parameter [#mum] ");
1419 hMCd0D0ptNCfromBPM->SetYTitle("Entries");
1420 flistNoCutsFromB->Add(hMCd0D0ptNCfromBPM);
624c07ab 1421
1422
1423 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1424 hd0D0VtxTrueptNCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1425 hd0D0VtxTrueptNCfromBPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1426 hd0D0VtxTrueptNCfromBPM->SetYTitle("Entries");
1427 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBPM);
624c07ab 1428
1429 strnamept=namehist;
1430 strnamept.Append("SBMss_pt");
1431 strnamept+=i;
1432
1433 strtitlept=titlehist;
1434 strtitlept.Append(" Side Bands, ");
1435 strtitlept+=fptbins[i];
1436 strtitlept.Append("<= pt <");
1437 strtitlept+=fptbins[i+1];
1438 strtitlept.Append(" [GeV/c]");
1439
e047b348 1440 hd0D0ptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1441 hd0D0ptNCfromBSB->SetXTitle("Impact parameter [#mum] ");
1442 hd0D0ptNCfromBSB->SetYTitle("Entries");
1443 flistNoCutsFromB->Add(hd0D0ptNCfromBSB);
624c07ab 1444
1445 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1446 hMCd0D0ptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1447 hMCd0D0ptNCfromBSB->SetXTitle("MC Impact parameter [#mum] ");
1448 hMCd0D0ptNCfromBSB->SetYTitle("Entries");
1449 flistNoCutsFromB->Add(hMCd0D0ptNCfromBSB);
624c07ab 1450
1451 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1452 hd0D0VtxTrueptNCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1453 hd0D0VtxTrueptNCfromBSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1454 hd0D0VtxTrueptNCfromBSB->SetYTitle("Entries");
1455 flistNoCutsFromB->Add(hd0D0VtxTrueptNCfromBSB);
624c07ab 1456 }
1457
1458
1459
1460 //############ NO CUTS FROM DSTAR HISTOGRAMS ###########
1461 //
1462 //############# global properties histos #######
1463
e047b348 1464 TH2F *hCPtaVSd0d0NCfromDstar=new TH2F("hCPtaVSd0d0NCfromDstar","hCPtaVSd0d0_NoCuts_FromDStar",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1465 TH1F *hSecVtxZNCfromDstar=new TH1F("hSecVtxZNCfromDstar","hSecVtxZ_NoCuts_FromDStar",1000,-8.,8.);
1466 TH1F *hSecVtxXNCfromDstar=new TH1F("hSecVtxXNCfromDstar","hSecVtxX_NoCuts_FromDStar",1000,-3000.,3000.);
1467 TH1F *hSecVtxYNCfromDstar=new TH1F("hSecVtxYNCfromDstar","hSecVtxY_NoCuts_FromDStar",1000,-3000.,3000.);
1468 TH2F *hSecVtxXYNCfromDstar=new TH2F("hSecVtxXYNCfromDstar","hSecVtxXY_NoCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
1469 TH1F *hSecVtxPhiNCfromDstar=new TH1F("hSecVtxPhiNCfromDstar","hSecVtxPhi_NoCuts_FromDStar",180,-180.1,180.1);
e047b348 1470 TH1F *hd0singlTrackNCfromDstar=new TH1F("hd0singlTrackNCfromDstar","hd0singlTrackNoCuts_fromDstar",1000,-5000.,5000.);
1471 TH1F *hCPtaNCfromDstar=new TH1F("hCPtaNCfromDstar","hCPta_NoCuts_FromDStar",100,-1.,1.);
ac4c229c 1472 TH1F *hd0xd0NCfromDstar=new TH1F("hd0xd0NCfromDstar","hd0xd0_NoCuts_FromDStar",1000,-100000.,100000.);
1473 TH1F *hMassTrueNCfromDstar=new TH1F("hMassTrueNCfromDstar","D^{0} MC inv. Mass No Cuts FromDStar(All momenta)",600,1.600,2.200);
1474 TH1F *hMassNCfromDstar=new TH1F("hMassNCfromDstar","D^{0} inv. Mass No Cuts FromDStar (All momenta)",600,1.600,2.200);
1475 hMassNCfromDstar->Sumw2();
1476 TH1F *hMassTrueNCfromDstarPM=new TH1F("hMassTrueNCfromDstarPM","D^{0} MC inv. Mass No Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
1477 TH1F *hMassNCfromDstarPM=new TH1F("hMassNCfromDstarPM","D^{0} inv. Mass No Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
1478 hMassNCfromDstarPM->Sumw2();
1479 TH1F *hMassTrueNCfromDstarSB=new TH1F("hMassTrueNCfromDstarSB","D^{0} MC inv. Mass in Side Bands No Cuts FromDStar(All momenta)",600,1.600,2.200);
1480 TH1F *hMassNCfromDstarSB=new TH1F("hMassNCfromDstarSB","D^{0} inv. Mass in Side Bands No Cuts FromDStar (All momenta)",600,1.600,2.200);
1481 hMassNCfromDstarSB->Sumw2();
1482
1483 flistNoCutsFromDstar->Add(hCPtaVSd0d0NCfromDstar);
1484 flistNoCutsFromDstar->Add(hSecVtxZNCfromDstar);
1485 flistNoCutsFromDstar->Add(hSecVtxYNCfromDstar);
1486 flistNoCutsFromDstar->Add(hSecVtxXNCfromDstar);
1487 flistNoCutsFromDstar->Add(hSecVtxXYNCfromDstar);
1488 flistNoCutsFromDstar->Add(hSecVtxPhiNCfromDstar);
e047b348 1489 flistNoCutsFromDstar->Add(hd0singlTrackNCfromDstar);
ac4c229c 1490 flistNoCutsFromDstar->Add(hCPtaNCfromDstar);
1491 flistNoCutsFromDstar->Add(hd0xd0NCfromDstar);
1492 flistNoCutsFromDstar->Add(hMassTrueNCfromDstar);
1493 flistNoCutsFromDstar->Add(hMassNCfromDstar);
1494 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarPM);
1495 flistNoCutsFromDstar->Add(hMassNCfromDstarPM);
1496 flistNoCutsFromDstar->Add(hMassTrueNCfromDstarSB);
1497 flistNoCutsFromDstar->Add(hMassNCfromDstarSB);
624c07ab 1498
e047b348 1499
1500
1501
1502//%%% NEW HISTOS %%%%%%%%%%%%%%%%
1503 TH1F *hdcaNCfromDstar=new TH1F("hdcaNCfromDstar","hdca_NoCuts_FromDstar",100,0.,1000.);
1504 hdcaNCfromDstar->SetXTitle("dca [#mum]");
1505 hdcaNCfromDstar->SetYTitle("Entries");
1506 TH1F *hcosthetastarNCfromDstar=new TH1F("hcosthetastarNCfromDstar","hCosThetaStar_NoCuts_FromDstar",50,-1.,1.);
1507 hcosthetastarNCfromDstar->SetXTitle("cos #theta^{*}");
1508 hcosthetastarNCfromDstar->SetYTitle("Entries");
1509 TH1F *hptD0NCfromDstar=new TH1F("hptD0NCfromDstar","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1510 hptD0NCfromDstar->SetXTitle("p_{t} [GeV/c]");
1511 hptD0NCfromDstar->SetYTitle("Entries");
1512 TH1F *hptD0VsMaxPtNCfromDstar=new TH1F("hptD0VsMaxPtNCfromDstar","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1513 TH2F *hptD0PTallsqrtNCfromDstar=new TH2F("hptD0PTallsqrtNCfromDstar","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1514 TH2F *hptD0PTallNCfromDstar=new TH2F("hptD0PTallNCfromDstar","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1515 TH2F *hptD0vsptBNCfromDstar=new TH2F("hptD0vsptBNCfromDstar","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1516 TH2F *hpD0vspBNCfromDstar=new TH2F("hpD0vspBNCfromDstar","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1517 TH2F *hptD0vsptcquarkNCfromDstar=new TH2F("hptD0vsptcquarkNCfromDstar","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1518 TH2F *hpD0vspcquarkNCfromDstar=new TH2F("hpD0vspcquarkNCfromDstar","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1519 flistNoCutsFromDstar->Add(hdcaNCfromDstar);
1520 flistNoCutsFromDstar->Add(hcosthetastarNCfromDstar);
1521 flistNoCutsFromDstar->Add(hptD0NCfromDstar);
1522 flistNoCutsFromDstar->Add(hptD0VsMaxPtNCfromDstar);
1523 flistNoCutsFromDstar->Add(hptD0PTallsqrtNCfromDstar);
1524 flistNoCutsFromDstar->Add(hptD0PTallNCfromDstar);
1525 flistNoCutsFromDstar->Add(hptD0vsptBNCfromDstar);
1526 flistNoCutsFromDstar->Add(hpD0vspBNCfromDstar);
1527 flistNoCutsFromDstar->Add(hptD0vsptcquarkNCfromDstar);
1528 flistNoCutsFromDstar->Add(hpD0vspcquarkNCfromDstar);
1529
1530 TH1F *hd0zD0ptNCfromDstar;
cc3209fb 1531 TH1F *hInvMassD0NCfromDstar,*hInvMassD0barNCfromDstar;
e047b348 1532 TH2F *hInvMassPtNCfromDstar=new TH2F("hInvMassPtNCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
1533 TH1F *hetaNCfromDstar;
1534 TH1F *hCosPDPBNCfromDstar;
1535 TH1F *hCosPcPDNCfromDstar;
1536 flistNoCutsFromDstar->Add(hInvMassPtNCfromDstar);
1537 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1538 TH2F *hd0D0VSd0xd0NCfromDstarpt;
1539 TH2F *hangletracksVSd0xd0NCfromDstarpt;
1540 TH2F *hangletracksVSd0D0NCfromDstarpt;
1541 TH1F *hd0xd0NCfromDstarpt;
1542
1543 TH2F *hTOFpidNCfromDstar=new TH2F("hTOFpidNCfromDstar","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1544 flistNoCutsFromDstar->Add(hTOFpidNCfromDstar);
1545
1546 for(Int_t i=0;i<fnbins;i++){
1547 namehist="hd0zD0ptNCfromDstar_pt";
1548 namehist+=i;
1549 titlehist="d0(z) No Cuts FromDstarm ptbin=";
1550 titlehist+=i;
1551 hd0zD0ptNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1552 hd0zD0ptNCfromDstar->SetXTitle("d_{0}(z) [#mum]");
1553 hd0zD0ptNCfromDstar->SetYTitle("Entries");
1554 flistNoCutsFromDstar->Add(hd0zD0ptNCfromDstar);
1555
cc3209fb 1556 namehist="hInvMassD0NCfromDstar_pt";
e047b348 1557 namehist+=i;
1558 titlehist="Invariant Mass No Cuts FromDstar ptbin=";
1559 titlehist+=i;
cc3209fb 1560 hInvMassD0NCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1561 hInvMassD0NCfromDstar->SetXTitle("Invariant Mass [GeV]");
1562 hInvMassD0NCfromDstar->SetYTitle("Entries");
1563 flistNoCutsFromDstar->Add(hInvMassD0NCfromDstar);
1564
1565
1566 namehist="hInvMassD0barNCfromDstar_pt";
1567 namehist+=i;
1568 titlehist="Invariant Mass D0bar No Cuts FromDstar ptbin=";
1569 titlehist+=i;
1570 hInvMassD0barNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1571 hInvMassD0barNCfromDstar->SetXTitle("Invariant Mass [GeV]");
1572 hInvMassD0barNCfromDstar->SetYTitle("Entries");
1573 flistNoCutsFromDstar->Add(hInvMassD0barNCfromDstar);
1574
1575
e047b348 1576
1577 namehist="hetaNCfromDstar_pt";
1578 namehist+=i;
1579 titlehist="eta No Cuts FromDstar ptbin=";
1580 titlehist+=i;
1581 hetaNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1582 hetaNCfromDstar->SetXTitle("Pseudorapidity");
1583 hetaNCfromDstar->SetYTitle("Entries");
1584 flistNoCutsFromDstar->Add(hetaNCfromDstar);
1585
1586 namehist="hCosPDPBNCfromDstar_pt";
1587 namehist+=i;
1588 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1589 titlehist+=i;
1590 hCosPDPBNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1591 hCosPDPBNCfromDstar->SetXTitle("Cosine between D0 momentum and B momentum");
1592 hCosPDPBNCfromDstar->SetYTitle("Entries");
1593 flistNoCutsFromDstar->Add(hCosPDPBNCfromDstar);
1594
1595 namehist="hCosPcPDNCfromDstar_pt";
1596 namehist+=i;
1597 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1598 titlehist+=i;
1599 hCosPcPDNCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1600 hCosPcPDNCfromDstar->SetXTitle("Cosine between c quark momentum and D0 momentum");
1601 hCosPcPDNCfromDstar->SetYTitle("Entries");
1602 flistNoCutsFromDstar->Add(hCosPcPDNCfromDstar);
1603
1604 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1605 namehist="hd0xd0NCfromDstar_pt";
1606 namehist+=i;
1607 titlehist="d0xd0 No Cuts FromDstar ptbin=";
1608 titlehist+=i;
1609 hd0xd0NCfromDstarpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1610 hd0xd0NCfromDstarpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1611 hd0xd0NCfromDstarpt->SetYTitle("Entries");
1612 flistNoCutsFromDstar->Add(hd0xd0NCfromDstarpt);
1613
1614
1615 namehist="hd0D0VSd0xd0NCfromDstar_pt";
1616 namehist+=i;
1617 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromDstar ptbin=";
1618 titlehist+=i;
1619 hd0D0VSd0xd0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1620 hd0D0VSd0xd0NCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1621 hd0D0VSd0xd0NCfromDstarpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1622 flistNoCutsFromDstar->Add(hd0D0VSd0xd0NCfromDstarpt);
1623
1624
1625 namehist="hangletracksVSd0xd0NCfromDstar_pt";
1626 namehist+=i;
1627 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts FromDstar ptbin=";
1628 titlehist+=i;
1629 hangletracksVSd0xd0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1630 hangletracksVSd0xd0NCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1631 hangletracksVSd0xd0NCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
1632 flistNoCutsFromDstar->Add(hangletracksVSd0xd0NCfromDstarpt);
1633
1634
1635 namehist="hangletracksVSd0D0NCfromDstar_pt";
1636 namehist+=i;
1637 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts FromDstar ptbin=";
1638 titlehist+=i;
1639 hangletracksVSd0D0NCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1640 hangletracksVSd0D0NCfromDstarpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1641 hangletracksVSd0D0NCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
1642 flistNoCutsFromDstar->Add(hangletracksVSd0D0NCfromDstarpt);
1643
1644 }
1645 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1646 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1647
1648
624c07ab 1649 //########## d0 D0 histos #############
ac4c229c 1650 TH1F *hd0D0NCfromDstPM = new TH1F("hd0D0NCfromDstarPM","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1651 hd0D0NCfromDstPM->SetXTitle("Impact parameter [#mum]");
1652 hd0D0NCfromDstPM->SetYTitle("Entries");
1653
1654 TH1F *hd0D0VtxTrueNCfromDstPM = new TH1F("hd0D0VtxTrueNCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1655 hd0D0VtxTrueNCfromDstPM->SetXTitle("Impact parameter [#mum]");
1656 hd0D0VtxTrueNCfromDstPM->SetYTitle("Entries");
1657
1658 TH1F *hMCd0D0NCfromDstPM = new TH1F("hMCd0D0NCfromDstarPM","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1659 hMCd0D0NCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
1660 hMCd0D0NCfromDstPM->SetYTitle("Entries");
1661
1662 TH1F *hd0D0NCfromDstSB = new TH1F("hd0D0NCfromDstarSB","D^{0} impact par. plot , No Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1663 hd0D0NCfromDstSB->SetXTitle("Impact parameter [#mum]");
1664 hd0D0NCfromDstSB->SetYTitle("Entries");
1665
1666 TH1F *hd0D0VtxTrueNCfromDstSB = new TH1F("hd0D0VtxTrueNCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1667 hd0D0VtxTrueNCfromDstSB->SetXTitle("Impact parameter [#mum]");
1668 hd0D0VtxTrueNCfromDstSB->SetYTitle("Entries");
1669
1670 TH1F *hMCd0D0NCfromDstSB = new TH1F("hMCd0D0NCfromDstarSB","D^{0} impact par. plot, No Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
1671 hMCd0D0NCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
1672 hMCd0D0NCfromDstSB->SetYTitle("Entries");
1673
1674 flistNoCutsFromDstar->Add(hd0D0NCfromDstPM);
1675 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstPM);
1676 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstPM);
1677 flistNoCutsFromDstar->Add(hd0D0NCfromDstSB);
1678 flistNoCutsFromDstar->Add(hd0D0VtxTrueNCfromDstSB);
1679 flistNoCutsFromDstar->Add(hMCd0D0NCfromDstSB);
1680
e047b348 1681 TH1F *hd0D0ptNCfromDstPM;
1682 TH1F *hMCd0D0ptNCfromDstPM;
1683 TH1F *hd0D0VtxTrueptNCfromDstPM;
1684 TH1F *hd0D0ptNCfromDstSB;
1685 TH1F *hMCd0D0ptNCfromDstSB;
1686 TH1F *hd0D0VtxTrueptNCfromDstSB;
ac4c229c 1687 namehist="hd0D0ptNCfromDstar_";
624c07ab 1688 titlehist="D^{0} impact par. plot, No Cuts, FromDStar, ";
1689 for(Int_t i=0;i<fnbins;i++){
1690 strnamept=namehist;
1691 strnamept.Append("PkMss_pt");
1692 strnamept+=i;
1693
1694 strtitlept=titlehist;
1695 strtitlept.Append(" Mass Peak, ");
1696 strtitlept+=fptbins[i];
1697 strtitlept.Append("<= pt <");
1698 strtitlept+=fptbins[i+1];
1699 strtitlept.Append(" [GeV/c]");
1700
e047b348 1701 hd0D0ptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1702 hd0D0ptNCfromDstPM->SetXTitle("Impact parameter [#mum] ");
1703 hd0D0ptNCfromDstPM->SetYTitle("Entries");
1704 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstPM);
624c07ab 1705
1706 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1707 hMCd0D0ptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1708 hMCd0D0ptNCfromDstPM->SetXTitle("MC Impact parameter [#mum] ");
1709 hMCd0D0ptNCfromDstPM->SetYTitle("Entries");
1710 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstPM);
624c07ab 1711
1712
1713 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1714 hd0D0VtxTrueptNCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1715 hd0D0VtxTrueptNCfromDstPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1716 hd0D0VtxTrueptNCfromDstPM->SetYTitle("Entries");
1717 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstPM);
624c07ab 1718
1719 strnamept=namehist;
1720 strnamept.Append("SBMss_pt");
1721 strnamept+=i;
1722
1723 strtitlept=titlehist;
1724 strtitlept.Append(" Side Bands, ");
1725 strtitlept+=fptbins[i];
1726 strtitlept.Append("<= pt <");
1727 strtitlept+=fptbins[i+1];
1728 strtitlept.Append(" [GeV/c]");
1729
e047b348 1730 hd0D0ptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1731 hd0D0ptNCfromDstSB->SetXTitle("Impact parameter [#mum] ");
1732 hd0D0ptNCfromDstSB->SetYTitle("Entries");
1733 flistNoCutsFromDstar->Add(hd0D0ptNCfromDstSB);
624c07ab 1734
1735 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1736 hMCd0D0ptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1737 hMCd0D0ptNCfromDstSB->SetXTitle("MC Impact parameter [#mum] ");
1738 hMCd0D0ptNCfromDstSB->SetYTitle("Entries");
1739 flistNoCutsFromDstar->Add(hMCd0D0ptNCfromDstSB);
624c07ab 1740
1741 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 1742 hd0D0VtxTrueptNCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1743 hd0D0VtxTrueptNCfromDstSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
1744 hd0D0VtxTrueptNCfromDstSB->SetYTitle("Entries");
1745 flistNoCutsFromDstar->Add(hd0D0VtxTrueptNCfromDstSB);
624c07ab 1746 }
1747
1748
1749 //############ NO CUTS OTHER HISTOGRAMS ###########
1750 //
1751 //########### global properties histos ###########
1752
e047b348 1753 TH2F *hCPtaVSd0d0NCother=new TH2F("hCPtaVSd0d0NCother","hCPtaVSd0d0_NoCuts_other",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 1754 TH1F *hSecVtxZNCother=new TH1F("hSecVtxZNCother","hSecVtxZ_NoCuts_other",1000,-8.,8.);
1755 TH1F *hSecVtxXNCother=new TH1F("hSecVtxXNCother","hSecVtxX_NoCuts_other",1000,-3000.,3000.);
1756 TH1F *hSecVtxYNCother=new TH1F("hSecVtxYNCother","hSecVtxY_NoCuts_other",1000,-3000.,3000.);
1757 TH2F *hSecVtxXYNCother=new TH2F("hSecVtxXYNCother","hSecVtxXY_NoCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
1758 TH1F *hSecVtxPhiNCother=new TH1F("hSecVtxPhiNCother","hSecVtxPhi_NoCuts_other",180,-180.1,180.1);
e047b348 1759 TH1F *hd0singlTrackNCother=new TH1F("hd0singlTrackNCother","hd0singlTrackNoCuts_Other",1000,-5000.,5000.);
1760 TH1F *hCPtaNCother=new TH1F("hCPtaNCother","hCPta_NoCuts_other",100,-1.,1.);
ac4c229c 1761 TH1F *hd0xd0NCother=new TH1F("hd0xd0NCother","hd0xd0_NoCuts_other",1000,-100000.,100000.);
1762 TH1F *hMassTrueNCother=new TH1F("hMassTrueNCother","D^{0} MC inv. Mass No Cuts other(All momenta)",600,1.600,2.200);
1763 TH1F *hMassNCother=new TH1F("hMassNCother","D^{0} inv. Mass No Cuts other (All momenta)",600,1.600,2.200);
1764 hMassNCother->Sumw2();
1765 TH1F *hMassTrueNCotherPM=new TH1F("hMassTrueNCotherPM","D^{0} MC inv. Mass No Cuts Other, Mass Peak. (All momenta)",600,1.600,2.200);
1766 TH1F *hMassNCotherPM=new TH1F("hMassNCotherPM","D^{0} inv. Mass No Cuts Other (All momenta), MassPeak",600,1.600,2.200);
1767 hMassNCotherPM->Sumw2();
1768 TH1F *hMassTrueNCotherSB=new TH1F("hMassTrueNCotherSB","D^{0} MC inv. Mass in Side Bands No Cuts other(All momenta)",600,1.600,2.200);
1769 TH1F *hMassNCotherSB=new TH1F("hMassNCotherSB","D^{0} inv. Mass in Side Bands No Cuts other (All momenta)",600,1.600,2.200);
1770 hMassNCotherSB->Sumw2();
1771
1772 flistNoCutsOther->Add(hCPtaVSd0d0NCother);
1773 flistNoCutsOther->Add(hSecVtxZNCother);
1774 flistNoCutsOther->Add(hSecVtxYNCother);
1775 flistNoCutsOther->Add(hSecVtxXNCother);
1776 flistNoCutsOther->Add(hSecVtxXYNCother);
1777 flistNoCutsOther->Add(hSecVtxPhiNCother);
e047b348 1778 flistNoCutsOther->Add(hd0singlTrackNCother);
ac4c229c 1779 flistNoCutsOther->Add(hCPtaNCother);
1780 flistNoCutsOther->Add(hd0xd0NCother);
1781 flistNoCutsOther->Add(hMassTrueNCother);
1782 flistNoCutsOther->Add(hMassNCother);
1783 flistNoCutsOther->Add(hMassTrueNCotherPM);
1784 flistNoCutsOther->Add(hMassNCotherPM);
1785 flistNoCutsOther->Add(hMassTrueNCotherSB);
1786 flistNoCutsOther->Add(hMassNCotherSB);
624c07ab 1787
e047b348 1788
1789
1790 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
1791 TH1F *hdcaNCother=new TH1F("hdcaNCother","hdca_NoCuts_Other",100,0.,1000.);
1792 hdcaNCother->SetXTitle("dca [#mum]");
1793 hdcaNCother->SetYTitle("Entries");
1794 TH1F *hcosthetastarNCother=new TH1F("hcosthetastarNCother","hCosThetaStar_NoCuts_Other",50,-1.,1.);
1795 hcosthetastarNCother->SetXTitle("cos #theta^{*}");
1796 hcosthetastarNCother->SetYTitle("Entries");
1797 TH1F *hptD0NCother=new TH1F("hptD0NCother","D^{0} transverse momentum distribution",34,ptbinsD0arr);
1798 hptD0NCother->SetXTitle("p_{t} [GeV/c]");
1799 hptD0NCother->SetYTitle("Entries");
1800 TH1F *hptD0VsMaxPtNCother=new TH1F("hptD0VsMaxPtNCother","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
1801 TH2F *hptD0PTallsqrtNCother=new TH2F("hptD0PTallsqrtNCother","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
1802 TH2F *hptD0PTallNCother=new TH2F("hptD0PTallNCother","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
1803 TH2F *hptD0vsptBNCother=new TH2F("hptD0vsptBNCother","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1804 TH2F *hpD0vspBNCother=new TH2F("hpD0vspBNCother","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1805 TH2F *hptD0vsptcquarkNCother=new TH2F("hptD0vsptcquarkNCother","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1806 TH2F *hpD0vspcquarkNCother=new TH2F("hpD0vspcquarkNCother","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
1807 flistNoCutsOther->Add(hdcaNCother);
1808 flistNoCutsOther->Add(hcosthetastarNCother);
1809 flistNoCutsOther->Add(hptD0NCother);
1810 flistNoCutsOther->Add(hptD0VsMaxPtNCother);
1811 flistNoCutsOther->Add(hptD0PTallsqrtNCother);
1812 flistNoCutsOther->Add(hptD0PTallNCother);
1813 flistNoCutsOther->Add(hptD0vsptBNCother);
1814 flistNoCutsOther->Add(hpD0vspBNCother);
1815 flistNoCutsOther->Add(hptD0vsptcquarkNCother);
1816 flistNoCutsOther->Add(hpD0vspcquarkNCother);
1817
1818 TH1F *hd0zD0ptNCother;
cc3209fb 1819 TH1F *hInvMassD0NCother,*hInvMassD0barNCother;
e047b348 1820 TH2F *hInvMassPtNCother=new TH2F("hInvMassPtNCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
1821 TH1F *hetaNCother;
1822 TH1F *hCosPDPBNCother;
1823 TH1F *hCosPcPDNCother;
1824 flistNoCutsOther->Add(hInvMassPtNCother);
1825 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1826 TH2F *hd0D0VSd0xd0NCotherpt;
1827 TH2F *hangletracksVSd0xd0NCotherpt;
1828 TH2F *hangletracksVSd0D0NCotherpt;
1829 TH1F *hd0xd0NCotherpt;
1830
1831 TH2F *hTOFpidNCother=new TH2F("hTOFpidNCother","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
1832 flistNoCutsOther->Add(hTOFpidNCother);
1833
1834 for(Int_t i=0;i<fnbins;i++){
1835 namehist="hd0zD0ptNCother_pt";
1836 namehist+=i;
1837 titlehist="d0(z) No Cuts Otherm ptbin=";
1838 titlehist+=i;
1839 hd0zD0ptNCother=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
1840 hd0zD0ptNCother->SetXTitle("d_{0}(z) [#mum]");
1841 hd0zD0ptNCother->SetYTitle("Entries");
1842 flistNoCutsOther->Add(hd0zD0ptNCother);
1843
cc3209fb 1844 namehist="hInvMassD0NCother_pt";
e047b348 1845 namehist+=i;
1846 titlehist="Invariant Mass No Cuts Other ptbin=";
1847 titlehist+=i;
cc3209fb 1848 hInvMassD0NCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1849 hInvMassD0NCother->SetXTitle("Invariant Mass [GeV]");
1850 hInvMassD0NCother->SetYTitle("Entries");
1851 flistNoCutsOther->Add(hInvMassD0NCother);
1852
1853
1854 namehist="hInvMassD0barNCother_pt";
1855 namehist+=i;
1856 titlehist="Invariant Mass D0bar No Cuts Other ptbin=";
1857 titlehist+=i;
1858 hInvMassD0barNCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
1859 hInvMassD0barNCother->SetXTitle("Invariant Mass [GeV]");
1860 hInvMassD0barNCother->SetYTitle("Entries");
1861 flistNoCutsOther->Add(hInvMassD0barNCother);
1862
e047b348 1863
1864 namehist="hetaNCother_pt";
1865 namehist+=i;
1866 titlehist="eta No Cuts Other ptbin=";
1867 titlehist+=i;
1868 hetaNCother=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
1869 hetaNCother->SetXTitle("Pseudorapidity");
1870 hetaNCother->SetYTitle("Entries");
1871 flistNoCutsOther->Add(hetaNCother);
1872
1873 namehist="hCosPDPBNCother_pt";
1874 namehist+=i;
1875 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
1876 titlehist+=i;
1877 hCosPDPBNCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1878 hCosPDPBNCother->SetXTitle("Cosine between D0 momentum and B momentum");
1879 hCosPDPBNCother->SetYTitle("Entries");
1880 flistNoCutsOther->Add(hCosPDPBNCother);
1881
1882 namehist="hCosPcPDNCother_pt";
1883 namehist+=i;
1884 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
1885 titlehist+=i;
1886 hCosPcPDNCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
1887 hCosPcPDNCother->SetXTitle("Cosine between c quark momentum and D0 momentum");
1888 hCosPcPDNCother->SetYTitle("Entries");
1889 flistNoCutsOther->Add(hCosPcPDNCother);
1890
1891
1892 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
1893 namehist="hd0xd0NCother_pt";
1894 namehist+=i;
1895 titlehist="d0xd0 No Cuts Other ptbin=";
1896 titlehist+=i;
1897 hd0xd0NCotherpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
1898 hd0xd0NCotherpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
1899 hd0xd0NCotherpt->SetYTitle("Entries");
1900 flistNoCutsOther->Add(hd0xd0NCotherpt);
1901
1902
1903 namehist="hd0D0VSd0xd0NCother_pt";
1904 namehist+=i;
1905 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Other ptbin=";
1906 titlehist+=i;
1907 hd0D0VSd0xd0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
1908 hd0D0VSd0xd0NCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1909 hd0D0VSd0xd0NCotherpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
1910 flistNoCutsOther->Add(hd0D0VSd0xd0NCotherpt);
1911
1912
1913 namehist="hangletracksVSd0xd0NCother_pt";
1914 namehist+=i;
1915 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} No Cuts Other ptbin=";
1916 titlehist+=i;
1917 hangletracksVSd0xd0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
1918 hangletracksVSd0xd0NCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
1919 hangletracksVSd0xd0NCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
1920 flistNoCutsOther->Add(hangletracksVSd0xd0NCotherpt);
1921
1922
1923 namehist="hangletracksVSd0D0NCother_pt";
1924 namehist+=i;
1925 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} No Cuts Other ptbin=";
1926 titlehist+=i;
1927 hangletracksVSd0D0NCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
1928 hangletracksVSd0D0NCotherpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
1929 hangletracksVSd0D0NCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
1930 flistNoCutsOther->Add(hangletracksVSd0D0NCotherpt);
1931
1932 }
1933 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
1934 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1935
1936
1937
1938
624c07ab 1939 //############# d0 D0 histos ###############à
ac4c229c 1940 TH1F *hd0D0NCotherPM = new TH1F("hd0D0NCotherPM","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1941 hd0D0NCotherPM->SetXTitle("Impact parameter [#mum]");
1942 hd0D0NCotherPM->SetYTitle("Entries");
1943
1944 TH1F *hd0D0VtxTrueNCotherPM = new TH1F("hd0D0VtxTrueNCotherPM","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1945 hd0D0VtxTrueNCotherPM->SetXTitle("Impact parameter [#mum]");
1946 hd0D0VtxTrueNCotherPM->SetYTitle("Entries");
1947
1948 TH1F *hMCd0D0NCotherPM = new TH1F("hMCd0D0NCotherPM","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1949 hMCd0D0NCotherPM->SetXTitle("MC Impact parameter [#mum]");
1950 hMCd0D0NCotherPM->SetYTitle("Entries");
1951
1952 TH1F *hd0D0NCotherSB = new TH1F("hd0D0NCotherSB","D^{0} impact par. plot , No Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1953 hd0D0NCotherSB->SetXTitle("Impact parameter [#mum]");
1954 hd0D0NCotherSB->SetYTitle("Entries");
1955
1956 TH1F *hd0D0VtxTrueNCotherSB = new TH1F("hd0D0VtxTrueNCotherSB","D^{0} impact par. w.r.t. True Vtx, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1957 hd0D0VtxTrueNCotherSB->SetXTitle("Impact parameter [#mum]");
1958 hd0D0VtxTrueNCotherSB->SetYTitle("Entries");
1959
1960 TH1F *hMCd0D0NCotherSB = new TH1F("hMCd0D0NCotherSB","D^{0} impact par. plot, No Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
1961 hMCd0D0NCotherSB->SetXTitle("MC Impact parameter [#mum]");
1962 hMCd0D0NCotherSB->SetYTitle("Entries");
1963
1964 flistNoCutsOther->Add(hd0D0NCotherPM);
1965 flistNoCutsOther->Add(hd0D0VtxTrueNCotherPM);
1966 flistNoCutsOther->Add(hMCd0D0NCotherPM);
1967 flistNoCutsOther->Add(hd0D0NCotherSB);
1968 flistNoCutsOther->Add(hd0D0VtxTrueNCotherSB);
1969 flistNoCutsOther->Add(hMCd0D0NCotherSB);
1970
e047b348 1971 TH1F *hd0D0ptNCotherPM;
1972 TH1F *hMCd0D0ptNCotherPM;
1973 TH1F *hd0D0VtxTrueptNCotherPM;
1974 TH1F *hd0D0ptNCotherSB;
1975 TH1F *hMCd0D0ptNCotherSB;
1976 TH1F *hd0D0VtxTrueptNCotherSB;
ac4c229c 1977 namehist="hd0D0ptNCother_";
624c07ab 1978 titlehist="D^{0} impact par. plot, No Cuts, Other, ";
1979 for(Int_t i=0;i<fnbins;i++){
1980 strnamept=namehist;
1981 strnamept.Append("PkMss_pt");
1982 strnamept+=i;
1983
1984 strtitlept=titlehist;
1985 strtitlept.Append(" Mass Peak, ");
1986 strtitlept+=fptbins[i];
1987 strtitlept.Append("<= pt <");
1988 strtitlept+=fptbins[i+1];
1989 strtitlept.Append(" [GeV/c]");
1990
e047b348 1991 hd0D0ptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1992 hd0D0ptNCotherPM->SetXTitle("Impact parameter [#mum] ");
1993 hd0D0ptNCotherPM->SetYTitle("Entries");
1994 flistNoCutsOther->Add(hd0D0ptNCotherPM);
624c07ab 1995
1996 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 1997 hMCd0D0ptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
1998 hMCd0D0ptNCotherPM->SetXTitle("MC Impact parameter [#mum] ");
1999 hMCd0D0ptNCotherPM->SetYTitle("Entries");
2000 flistNoCutsOther->Add(hMCd0D0ptNCotherPM);
624c07ab 2001
2002
2003 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2004 hd0D0VtxTrueptNCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2005 hd0D0VtxTrueptNCotherPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2006 hd0D0VtxTrueptNCotherPM->SetYTitle("Entries");
2007 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherPM);
624c07ab 2008
2009 strnamept=namehist;
2010 strnamept.Append("SBMss_pt");
2011 strnamept+=i;
2012
2013 strtitlept=titlehist;
2014 strtitlept.Append(" Side Bands, ");
2015 strtitlept+=fptbins[i];
2016 strtitlept.Append("<= pt <");
2017 strtitlept+=fptbins[i+1];
2018 strtitlept.Append(" [GeV/c]");
2019
e047b348 2020 hd0D0ptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2021 hd0D0ptNCotherSB->SetXTitle("Impact parameter [#mum] ");
2022 hd0D0ptNCotherSB->SetYTitle("Entries");
2023 flistNoCutsOther->Add(hd0D0ptNCotherSB);
624c07ab 2024
2025 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2026 hMCd0D0ptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2027 hMCd0D0ptNCotherSB->SetXTitle("MC Impact parameter [#mum] ");
2028 hMCd0D0ptNCotherSB->SetYTitle("Entries");
2029 flistNoCutsOther->Add(hMCd0D0ptNCotherSB);
624c07ab 2030
2031 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2032 hd0D0VtxTrueptNCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2033 hd0D0VtxTrueptNCotherSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2034 hd0D0VtxTrueptNCotherSB->SetYTitle("Entries");
2035 flistNoCutsOther->Add(hd0D0VtxTrueptNCotherSB);
624c07ab 2036 }
2037
2038
2039 //################################################################################################
2040 // #
2041 // HISTOS FOR LOOSE CUTS #
2042 // #
2043 //################################################################################################
2044
2045 //############ LOOSE CUTS SIGNAL HISTOGRAMS ###############
2046 //
2047 // ####### global properties histo ############
2048
e047b348 2049 TH2F *hCPtaVSd0d0LSCsign=new TH2F("hCPtaVSd0d0LSCsign","hCPtaVSd0d0_LooseCuts_Signal",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2050 TH1F *hSecVtxZLSCsign=new TH1F("hSecVtxZLSCsign","hSecVtxZ_LooseCuts_Signal",1000,-8.,8.);
2051 TH1F *hSecVtxXLSCsign=new TH1F("hSecVtxXLSCsign","hSecVtxX_LooseCuts_Signal",1000,-3000.,3000.);
2052 TH1F *hSecVtxYLSCsign=new TH1F("hSecVtxYLSCsign","hSecVtxY_LooseCuts_Signal",1000,-3000.,3000.);
2053 TH2F *hSecVtxXYLSCsign=new TH2F("hSecVtxXYLSCsign","hSecVtxXY_LooseCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
2054 TH1F *hSecVtxPhiLSCsign=new TH1F("hSecVtxPhiLSCsign","hSecVtxPhi_LooseCuts_Signal",180,-180.1,180.1);
e047b348 2055 TH1F *hd0singlTrackLSCsign=new TH1F("hd0singlTrackLSCsign","hd0singlTrackLooseCuts_Signal",1000,-5000.,5000.);
2056 TH1F *hCPtaLSCsign=new TH1F("hCPtaLSCsign","hCPta_LooseCuts_Signal",100,-1.,1.);
ac4c229c 2057 TH1F *hd0xd0LSCsign=new TH1F("hd0xd0LSCsign","hd0xd0_LooseCuts_Signal",1000,-100000.,100000.);
2058 TH1F *hMassTrueLSCsign=new TH1F("hMassTrueLSCsign","D^{0} MC inv. Mass Loose Cuts Signal(All momenta)",600,1.600,2.200);
2059 TH1F *hMassLSCsign=new TH1F("hMassLSCsign","D^{0} inv. Mass Loose Cuts Signal (All momenta)",600,1.600,2.200);
2060 hMassLSCsign->Sumw2();
2061 TH1F *hMassTrueLSCsignPM=new TH1F("hMassTrueLSCsignPM","D^{0} MC inv. Mass Loose Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
2062 TH1F *hMassLSCsignPM=new TH1F("hMassLSCsignPM","D^{0} inv. Mass Loose Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
2063 hMassLSCsignPM->Sumw2();
2064 TH1F *hMassTrueLSCsignSB=new TH1F("hMassTrueLSCsignSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Signal(All momenta)",600,1.600,2.200);
2065 TH1F *hMassLSCsignSB=new TH1F("hMassLSCsignSB","D^{0} inv. Mass in Side Bands Loose Cuts Signal (All momenta)",600,1.600,2.200);
2066 hMassLSCsignSB->Sumw2();
2067
2068 flistLsCutsSignal->Add(hCPtaVSd0d0LSCsign);
2069 flistLsCutsSignal->Add(hSecVtxZLSCsign);
2070 flistLsCutsSignal->Add(hSecVtxYLSCsign);
2071 flistLsCutsSignal->Add(hSecVtxXLSCsign);
2072 flistLsCutsSignal->Add(hSecVtxXYLSCsign);
2073 flistLsCutsSignal->Add(hSecVtxPhiLSCsign);
e047b348 2074 flistLsCutsSignal->Add(hd0singlTrackLSCsign);
ac4c229c 2075 flistLsCutsSignal->Add(hCPtaLSCsign);
2076 flistLsCutsSignal->Add(hd0xd0LSCsign);
2077 flistLsCutsSignal->Add(hMassTrueLSCsign);
2078 flistLsCutsSignal->Add(hMassLSCsign);
2079 flistLsCutsSignal->Add(hMassTrueLSCsignPM);
2080 flistLsCutsSignal->Add(hMassLSCsignPM);
2081 flistLsCutsSignal->Add(hMassTrueLSCsignSB);
2082 flistLsCutsSignal->Add(hMassLSCsignSB);
624c07ab 2083
e047b348 2084
2085 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2086 TH1F *hdcaLSCsign=new TH1F("hdcaLSCsign","hdca_LooseCuts_Sign",100,0.,1000.);
2087 hdcaLSCsign->SetXTitle("dca [#mum]");
2088 hdcaLSCsign->SetYTitle("Entries");
2089 TH1F *hcosthetastarLSCsign=new TH1F("hcosthetastarLSCsign","hCosThetaStar_LooseCuts_Sign",50,-1.,1.);
2090 hcosthetastarLSCsign->SetXTitle("cos #theta^{*}");
2091 hcosthetastarLSCsign->SetYTitle("Entries");
2092 TH1F *hptD0LSCsign=new TH1F("hptD0LSCsign","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2093 hptD0LSCsign->SetXTitle("p_{t} [GeV/c]");
2094 hptD0LSCsign->SetYTitle("Entries");
2095 TH1F *hptD0VsMaxPtLSCsign=new TH1F("hptD0VsMaxPtLSCsign","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2096 TH2F *hptD0PTallsqrtLSCsign=new TH2F("hptD0PTallsqrtLSCsign","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2097 TH2F *hptD0PTallLSCsign=new TH2F("hptD0PTallLSCsign","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2098 TH2F *hptD0vsptBLSCsign=new TH2F("hptD0vsptBLSCsign","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2099 TH2F *hpD0vspBLSCsign=new TH2F("hpD0vspBLSCsign","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2100 TH2F *hptD0vsptcquarkLSCsign=new TH2F("hptD0vsptcquarkLSCsign","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2101 TH2F *hpD0vspcquarkLSCsign=new TH2F("hpD0vspcquarkLSCsign","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2102 flistLsCutsSignal->Add(hdcaLSCsign);
2103 flistLsCutsSignal->Add(hcosthetastarLSCsign);
2104 flistLsCutsSignal->Add(hptD0LSCsign);
2105 flistLsCutsSignal->Add(hptD0VsMaxPtLSCsign);
2106 flistLsCutsSignal->Add(hptD0PTallsqrtLSCsign);
2107 flistLsCutsSignal->Add(hptD0PTallLSCsign);
2108 flistLsCutsSignal->Add(hptD0vsptBLSCsign);
2109 flistLsCutsSignal->Add(hpD0vspBLSCsign);
2110 flistLsCutsSignal->Add(hptD0vsptcquarkLSCsign);
2111 flistLsCutsSignal->Add(hpD0vspcquarkLSCsign);
2112
2113 TH1F *hd0zD0ptLSCsign;
cc3209fb 2114 TH1F *hInvMassD0LSCsign,*hInvMassD0barLSCsign;
e047b348 2115 TH2F *hInvMassPtLSCsign=new TH2F("hInvMassPtLSCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
2116 TH1F *hetaLSCsign;
2117 TH1F *hCosPDPBLSCsign;
2118 TH1F *hCosPcPDLSCsign;
2119 flistLsCutsSignal->Add(hInvMassPtLSCsign);
2120
2121 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2122 TH2F *hd0D0VSd0xd0LSCsignpt;
2123 TH2F *hangletracksVSd0xd0LSCsignpt;
2124 TH2F *hangletracksVSd0D0LSCsignpt;
2125 TH1F *hd0xd0LSCsignpt;
2126
2127 TH2F *hTOFpidLSCsign=new TH2F("hTOFpidLSCsign","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2128 flistLsCutsSignal->Add(hTOFpidLSCsign);
2129
2130 for(Int_t i=0;i<fnbins;i++){
2131 namehist="hd0zD0ptLSCsign_pt";
2132 namehist+=i;
2133 titlehist="d0(z) Loose Cuts Signm ptbin=";
2134 titlehist+=i;
2135 hd0zD0ptLSCsign=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2136 hd0zD0ptLSCsign->SetXTitle("d_{0}(z) [#mum]");
2137 hd0zD0ptLSCsign->SetYTitle("Entries");
2138 flistLsCutsSignal->Add(hd0zD0ptLSCsign);
2139
cc3209fb 2140 namehist="hInvMassD0LSCsign_pt";
e047b348 2141 namehist+=i;
2142 titlehist="Invariant Mass Loose Cuts Sign ptbin=";
2143 titlehist+=i;
cc3209fb 2144 hInvMassD0LSCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2145 hInvMassD0LSCsign->SetXTitle("Invariant Mass [GeV]");
2146 hInvMassD0LSCsign->SetYTitle("Entries");
2147 flistLsCutsSignal->Add(hInvMassD0LSCsign);
2148
2149
2150 namehist="hInvMassD0barLSCsign_pt";
2151 namehist+=i;
2152 titlehist="Invariant Mass D0bar No Cuts Signal ptbin=";
2153 titlehist+=i;
2154 hInvMassD0barLSCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2155 hInvMassD0barLSCsign->SetXTitle("Invariant Mass [GeV]");
2156 hInvMassD0barLSCsign->SetYTitle("Entries");
2157 flistLsCutsSignal->Add(hInvMassD0barLSCsign);
e047b348 2158
2159 namehist="hetaLSCsign_pt";
2160 namehist+=i;
2161 titlehist="eta Loose Cuts Sign ptbin=";
2162 titlehist+=i;
2163 hetaLSCsign=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2164 hetaLSCsign->SetXTitle("Pseudorapidity");
2165 hetaLSCsign->SetYTitle("Entries");
2166 flistLsCutsSignal->Add(hetaLSCsign);
2167
2168 namehist="hCosPDPBLSCsign_pt";
2169 namehist+=i;
2170 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2171 titlehist+=i;
2172 hCosPDPBLSCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2173 hCosPDPBLSCsign->SetXTitle("Cosine between D0 momentum and B momentum");
2174 hCosPDPBLSCsign->SetYTitle("Entries");
2175 flistLsCutsSignal->Add(hCosPDPBLSCsign);
2176
2177 namehist="hCosPcPDLSCsign_pt";
2178 namehist+=i;
2179 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2180 titlehist+=i;
2181 hCosPcPDLSCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2182 hCosPcPDLSCsign->SetXTitle("Cosine between c quark momentum and D0 momentum");
2183 hCosPcPDLSCsign->SetYTitle("Entries");
2184 flistLsCutsSignal->Add(hCosPcPDLSCsign);
2185
2186
2187 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2188 namehist="hd0xd0LSCsign_pt";
2189 namehist+=i;
2190 titlehist="d0xd0 Loose Cuts Sign ptbin=";
2191 titlehist+=i;
2192 hd0xd0LSCsignpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2193 hd0xd0LSCsignpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2194 hd0xd0LSCsignpt->SetYTitle("Entries");
2195 flistLsCutsSignal->Add(hd0xd0LSCsignpt);
2196
2197
2198 namehist="hd0D0VSd0xd0LSCsign_pt";
2199 namehist+=i;
2200 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Sign ptbin=";
2201 titlehist+=i;
2202 hd0D0VSd0xd0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2203 hd0D0VSd0xd0LSCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2204 hd0D0VSd0xd0LSCsignpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2205 flistLsCutsSignal->Add(hd0D0VSd0xd0LSCsignpt);
2206
2207
2208 namehist="hangletracksVSd0xd0LSCsign_pt";
2209 namehist+=i;
2210 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Sign ptbin=";
2211 titlehist+=i;
2212 hangletracksVSd0xd0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2213 hangletracksVSd0xd0LSCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2214 hangletracksVSd0xd0LSCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
2215 flistLsCutsSignal->Add(hangletracksVSd0xd0LSCsignpt);
2216
2217
2218 namehist="hangletracksVSd0D0LSCsign_pt";
2219 namehist+=i;
2220 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts Sign ptbin=";
2221 titlehist+=i;
2222 hangletracksVSd0D0LSCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2223 hangletracksVSd0D0LSCsignpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2224 hangletracksVSd0D0LSCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
2225 flistLsCutsSignal->Add(hangletracksVSd0D0LSCsignpt);
2226
2227
2228 }
2229 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2230 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2231
2232
624c07ab 2233 // ####### d0 D0 histos ############
ac4c229c 2234 TH1F *hd0D0LSCsignPM = new TH1F("hd0D0LSCsignPM","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2235 hd0D0LSCsignPM->SetXTitle("Impact parameter [#mum]");
2236 hd0D0LSCsignPM->SetYTitle("Entries");
2237
2238 TH1F *hd0D0VtxTrueLSCsignPM = new TH1F("hd0D0VtxTrueLSCsignPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2239 hd0D0VtxTrueLSCsignPM->SetXTitle("Impact parameter [#mum]");
2240 hd0D0VtxTrueLSCsignPM->SetYTitle("Entries");
2241
2242 TH1F *hMCd0D0LSCsignPM = new TH1F("hMCd0D0LSCsignPM","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2243 hMCd0D0LSCsignPM->SetXTitle("MC Impact parameter [#mum]");
2244 hMCd0D0LSCsignPM->SetYTitle("Entries");
2245
2246 TH1F *hd0D0LSCsignSB = new TH1F("hd0D0LSCsignSB","D^{0} impact par. plot , Loose Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2247 hd0D0LSCsignSB->SetXTitle("Impact parameter [#mum]");
2248 hd0D0LSCsignSB->SetYTitle("Entries");
2249
2250 TH1F *hd0D0VtxTrueLSCsignSB = new TH1F("hd0D0VtxTrueLSCsignSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2251 hd0D0VtxTrueLSCsignSB->SetXTitle("Impact parameter [#mum]");
2252 hd0D0VtxTrueLSCsignSB->SetYTitle("Entries");
2253
2254 TH1F *hMCd0D0LSCsignSB = new TH1F("hMCd0D0LSCsignSB","D^{0} impact par. plot, Loose Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
2255 hMCd0D0LSCsignSB->SetXTitle("MC Impact parameter [#mum]");
2256 hMCd0D0LSCsignSB->SetYTitle("Entries");
2257
2258 flistLsCutsSignal->Add(hd0D0LSCsignPM);
2259 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignPM);
2260 flistLsCutsSignal->Add(hMCd0D0LSCsignPM);
2261 flistLsCutsSignal->Add(hd0D0LSCsignSB);
2262 flistLsCutsSignal->Add(hd0D0VtxTrueLSCsignSB);
2263 flistLsCutsSignal->Add(hMCd0D0LSCsignSB);
2264
e047b348 2265 TH1F *hd0D0ptLSCsignPM;
2266 TH1F *hMCd0D0ptLSCsignPM;
2267 TH1F *hd0D0VtxTrueptLSCsignPM;
2268 TH1F *hd0D0ptLSCsignSB;
2269 TH1F *hMCd0D0ptLSCsignSB;
2270 TH1F *hd0D0VtxTrueptLSCsignSB;
ac4c229c 2271 namehist="hd0D0ptLSCsign_";
624c07ab 2272 titlehist="D^{0} impact par. plot, Loose Cuts, Signal, ";
2273 for(Int_t i=0;i<fnbins;i++){
2274 strnamept=namehist;
2275 strnamept.Append("PkMss_pt");
2276 strnamept+=i;
2277
2278 strtitlept=titlehist;
2279 strtitlept.Append(" Mass Peak, ");
2280 strtitlept+=fptbins[i];
2281 strtitlept.Append("<= pt <");
2282 strtitlept+=fptbins[i+1];
2283 strtitlept.Append(" [GeV/c]");
2284
e047b348 2285 hd0D0ptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2286 hd0D0ptLSCsignPM->SetXTitle("Impact parameter [#mum] ");
2287 hd0D0ptLSCsignPM->SetYTitle("Entries");
2288 flistLsCutsSignal->Add(hd0D0ptLSCsignPM);
624c07ab 2289
2290 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2291 hMCd0D0ptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2292 hMCd0D0ptLSCsignPM->SetXTitle("MC Impact parameter [#mum] ");
2293 hMCd0D0ptLSCsignPM->SetYTitle("Entries");
2294 flistLsCutsSignal->Add(hMCd0D0ptLSCsignPM);
624c07ab 2295
2296
2297 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2298 hd0D0VtxTrueptLSCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2299 hd0D0VtxTrueptLSCsignPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2300 hd0D0VtxTrueptLSCsignPM->SetYTitle("Entries");
2301 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignPM);
624c07ab 2302
2303 strnamept=namehist;
2304 strnamept.Append("SBMss_pt");
2305 strnamept+=i;
2306
2307 strtitlept=titlehist;
2308 strtitlept.Append(" Side Bands, ");
2309 strtitlept+=fptbins[i];
2310 strtitlept.Append("<= pt <");
2311 strtitlept+=fptbins[i+1];
2312 strtitlept.Append(" [GeV/c]");
2313
e047b348 2314 hd0D0ptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2315 hd0D0ptLSCsignSB->SetXTitle("Impact parameter [#mum] ");
2316 hd0D0ptLSCsignSB->SetYTitle("Entries");
2317 flistLsCutsSignal->Add(hd0D0ptLSCsignSB);
624c07ab 2318
2319 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2320 hMCd0D0ptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2321 hMCd0D0ptLSCsignSB->SetXTitle("MC Impact parameter [#mum] ");
2322 hMCd0D0ptLSCsignSB->SetYTitle("Entries");
2323 flistLsCutsSignal->Add(hMCd0D0ptLSCsignSB);
624c07ab 2324
2325 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2326 hd0D0VtxTrueptLSCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2327 hd0D0VtxTrueptLSCsignSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2328 hd0D0VtxTrueptLSCsignSB->SetYTitle("Entries");
2329 flistLsCutsSignal->Add(hd0D0VtxTrueptLSCsignSB);
624c07ab 2330 }
2331
2332
2333 //############ LOOSE CUTS BACKGROUND HISTOGRAMS ###########
2334 //
2335 // ######## global properties histos #######
e047b348 2336 TH2F *hCPtaVSd0d0LSCback=new TH2F("hCPtaVSd0d0LSCback","hCPtaVSd0d0_LooseCuts_Background",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2337 TH1F *hSecVtxZLSCback=new TH1F("hSecVtxZLSCback","hSecVtxZ_LooseCuts_Background",1000,-8.,8.);
2338 TH1F *hSecVtxXLSCback=new TH1F("hSecVtxXLSCback","hSecVtxX_LooseCuts_Background",1000,-3000.,3000.);
2339 TH1F *hSecVtxYLSCback=new TH1F("hSecVtxYLSCback","hSecVtxY_LooseCuts_Background",1000,-3000.,3000.);
2340 TH2F *hSecVtxXYLSCback=new TH2F("hSecVtxXYLSCback","hSecVtxXY_LooseCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
2341 TH1F *hSecVtxPhiLSCback=new TH1F("hSecVtxPhiLSCback","hSecVtxPhi_LooseCuts_Background",180,-180.1,180.1);
e047b348 2342 TH1F *hd0singlTrackLSCback=new TH1F("hd0singlTrackLSCback","hd0singlTrackLooseCuts_Back",1000,-5000.,5000.);
2343 TH1F *hCPtaLSCback=new TH1F("hCPtaLSCback","hCPta_LooseCuts_Background",100,-1.,1.);
ac4c229c 2344 TH1F *hd0xd0LSCback=new TH1F("hd0xd0LSCback","hd0xd0_LooseCuts_Background",1000,-100000.,100000.);
2345 TH1F *hMassTrueLSCback=new TH1F("hMassTrueLSCback","D^{0} MC inv. Mass Loose Cuts Background(All momenta)",600,1.600,2.200);
2346 TH1F *hMassLSCback=new TH1F("hMassLSCback","D^{0} inv. Mass Loose Cuts Background (All momenta)",600,1.600,2.200);
2347 hMassLSCback->Sumw2();
2348 TH1F *hMassTrueLSCbackPM=new TH1F("hMassTrueLSCbackPM","D^{0} MC inv. Mass Loose Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
2349 TH1F *hMassLSCbackPM=new TH1F("hMassLSCbackPM","D^{0} inv. Mass Loose Cuts Background (All momenta), MassPeak",600,1.600,2.200);
2350 hMassLSCbackPM->Sumw2();
2351 TH1F *hMassTrueLSCbackSB=new TH1F("hMassTrueLSCbackSB","D^{0} MC inv. Mass in Side Bands Loose Cuts Background(All momenta)",600,1.600,2.200);
2352 TH1F *hMassLSCbackSB=new TH1F("hMassLSCbackSB","D^{0} inv. Mass in Side Bands Loose Cuts Background (All momenta)",600,1.600,2.200);
2353 hMassLSCbackSB->Sumw2();
2354
2355 flistLsCutsBack->Add(hCPtaVSd0d0LSCback);
2356 flistLsCutsBack->Add(hSecVtxZLSCback);
2357 flistLsCutsBack->Add(hSecVtxYLSCback);
2358 flistLsCutsBack->Add(hSecVtxXLSCback);
2359 flistLsCutsBack->Add(hSecVtxXYLSCback);
2360 flistLsCutsBack->Add(hSecVtxPhiLSCback);
e047b348 2361 flistLsCutsBack->Add(hd0singlTrackLSCback);
ac4c229c 2362 flistLsCutsBack->Add(hCPtaLSCback);
2363 flistLsCutsBack->Add(hd0xd0LSCback);
2364 flistLsCutsBack->Add(hMassTrueLSCback);
2365 flistLsCutsBack->Add(hMassLSCback);
2366 flistLsCutsBack->Add(hMassTrueLSCbackPM);
2367 flistLsCutsBack->Add(hMassLSCbackPM);
2368 flistLsCutsBack->Add(hMassTrueLSCbackSB);
2369 flistLsCutsBack->Add(hMassLSCbackSB);
624c07ab 2370
2371
e047b348 2372
2373
2374
2375
2376
2377
2378 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2379 TH1F *hdcaLSCback=new TH1F("hdcaLSCback","hdca_LooseCuts_Backgr",100,0.,1000.);
2380 hdcaLSCback->SetXTitle("dca [#mum]");
2381 hdcaLSCback->SetYTitle("Entries");
2382 TH1F *hcosthetastarLSCback=new TH1F("hcosthetastarLSCback","hCosThetaStar_LooseCuts_Backgr",50,-1.,1.);
2383 hcosthetastarLSCback->SetXTitle("cos #theta^{*}");
2384 hcosthetastarLSCback->SetYTitle("Entries");
2385 TH1F *hptD0LSCback=new TH1F("hptD0LSCback","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2386 hptD0LSCback->SetXTitle("p_{t} [GeV/c]");
2387 hptD0LSCback->SetYTitle("Entries");
2388 TH1F *hptD0VsMaxPtLSCback=new TH1F("hptD0VsMaxPtLSCback","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2389 TH2F *hptD0PTallsqrtLSCback=new TH2F("hptD0PTallsqrtLSCback","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2390 TH2F *hptD0PTallLSCback=new TH2F("hptD0PTallLSCback","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2391 TH2F *hptD0vsptBLSCback=new TH2F("hptD0vsptBLSCback","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2392 TH2F *hpD0vspBLSCback=new TH2F("hpD0vspBLSCback","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2393 TH2F *hptD0vsptcquarkLSCback=new TH2F("hptD0vsptcquarkLSCback","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2394 TH2F *hpD0vspcquarkLSCback=new TH2F("hpD0vspcquarkLSCback","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2395 flistLsCutsBack->Add(hdcaLSCback);
2396 flistLsCutsBack->Add(hcosthetastarLSCback);
2397 flistLsCutsBack->Add(hptD0LSCback);
2398 flistLsCutsBack->Add(hptD0VsMaxPtLSCback);
2399 flistLsCutsBack->Add(hptD0PTallsqrtLSCback);
2400 flistLsCutsBack->Add(hptD0PTallLSCback);
2401 flistLsCutsBack->Add(hptD0vsptBLSCback);
2402 flistLsCutsBack->Add(hpD0vspBLSCback);
2403 flistLsCutsBack->Add(hptD0vsptcquarkLSCback);
2404 flistLsCutsBack->Add(hpD0vspcquarkLSCback);
2405
2406 TH1F *hd0zD0ptLSCback;
cc3209fb 2407 TH1F *hInvMassD0LSCback,*hInvMassD0barLSCback;
e047b348 2408 TH2F *hInvMassPtLSCback=new TH2F("hInvMassPtLSCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
2409 TH1F *hetaLSCback;
2410 TH1F *hCosPDPBLSCback;
2411 TH1F *hCosPcPDLSCback;
2412 flistLsCutsBack->Add(hInvMassPtLSCback);
2413 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2414 TH2F *hd0D0VSd0xd0LSCbackpt;
2415 TH2F *hangletracksVSd0xd0LSCbackpt;
2416 TH2F *hangletracksVSd0D0LSCbackpt;
2417 TH1F *hd0xd0LSCbackpt;
2418
2419 TH2F *hTOFpidLSCback=new TH2F("hTOFpidLSCback","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2420 flistLsCutsBack->Add(hTOFpidLSCback);
2421
2422 for(Int_t i=0;i<fnbins;i++){
2423 namehist="hd0zD0ptLSCback_pt";
2424 namehist+=i;
2425 titlehist="d0(z) Loose Cuts Backgr ptbin=";
2426 titlehist+=i;
2427 hd0zD0ptLSCback=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2428 hd0zD0ptLSCback->SetXTitle("d_{0}(z) [#mum]");
2429 hd0zD0ptLSCback->SetYTitle("Entries");
2430 flistLsCutsBack->Add(hd0zD0ptLSCback);
2431
cc3209fb 2432 namehist="hInvMassD0LSCback_pt";
e047b348 2433 namehist+=i;
2434 titlehist="Invariant Mass Loose Cuts Backgr ptbin=";
2435 titlehist+=i;
cc3209fb 2436 hInvMassD0LSCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2437 hInvMassD0LSCback->SetXTitle("Invariant Mass [GeV]");
2438 hInvMassD0LSCback->SetYTitle("Entries");
2439 flistLsCutsBack->Add(hInvMassD0LSCback);
2440
2441 namehist="hInvMassD0barLSCback_pt";
2442 namehist+=i;
2443 titlehist="Invariant Mass D0bar No Cuts Back ptbin=";
2444 titlehist+=i;
2445 hInvMassD0barLSCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2446 hInvMassD0barLSCback->SetXTitle("Invariant Mass [GeV]");
2447 hInvMassD0barLSCback->SetYTitle("Entries");
2448 flistLsCutsBack->Add(hInvMassD0barLSCback);
2449
e047b348 2450
2451 namehist="hetaLSCback_pt";
2452 namehist+=i;
2453 titlehist="eta Loose Cuts Backgr ptbin=";
2454 titlehist+=i;
2455 hetaLSCback=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2456 hetaLSCback->SetXTitle("Pseudorapidity");
2457 hetaLSCback->SetYTitle("Entries");
2458 flistLsCutsBack->Add(hetaLSCback);
2459
2460 namehist="hCosPDPBLSCback_pt";
2461 namehist+=i;
2462 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2463 titlehist+=i;
2464 hCosPDPBLSCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2465 hCosPDPBLSCback->SetXTitle("Cosine between D0 momentum and B momentum");
2466 hCosPDPBLSCback->SetYTitle("Entries");
2467 flistLsCutsBack->Add(hCosPDPBLSCback);
2468
2469 namehist="hCosPcPDLSCback_pt";
2470 namehist+=i;
2471 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2472 titlehist+=i;
2473 hCosPcPDLSCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2474 hCosPcPDLSCback->SetXTitle("Cosine between c quark momentum and D0 momentum");
2475 hCosPcPDLSCback->SetYTitle("Entries");
2476 flistLsCutsBack->Add(hCosPcPDLSCback);
2477
2478 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2479 namehist="hd0xd0LSCback_pt";
2480 namehist+=i;
2481 titlehist="d0xd0 Loose Cuts Back ptbin=";
2482 titlehist+=i;
2483 hd0xd0LSCbackpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2484 hd0xd0LSCbackpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2485 hd0xd0LSCbackpt->SetYTitle("Entries");
2486 flistLsCutsBack->Add(hd0xd0LSCbackpt);
2487
2488
2489 namehist="hd0D0VSd0xd0LSCback_pt";
2490 namehist+=i;
2491 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Back ptbin=";
2492 titlehist+=i;
2493 hd0D0VSd0xd0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2494 hd0D0VSd0xd0LSCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2495 hd0D0VSd0xd0LSCbackpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2496 flistLsCutsBack->Add(hd0D0VSd0xd0LSCbackpt);
2497
2498
2499 namehist="hangletracksVSd0xd0LSCback_pt";
2500 namehist+=i;
2501 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Back ptbin=";
2502 titlehist+=i;
2503 hangletracksVSd0xd0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2504 hangletracksVSd0xd0LSCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2505 hangletracksVSd0xd0LSCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
2506 flistLsCutsBack->Add(hangletracksVSd0xd0LSCbackpt);
2507
2508
2509 namehist="hangletracksVSd0D0LSCback_pt";
2510 namehist+=i;
2511 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts Back ptbin=";
2512 titlehist+=i;
2513 hangletracksVSd0D0LSCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2514 hangletracksVSd0D0LSCbackpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2515 hangletracksVSd0D0LSCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
2516 flistLsCutsBack->Add(hangletracksVSd0D0LSCbackpt);
2517
2518 }
2519 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2520 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2521
2522
2523
2524
2525
2526
2527
624c07ab 2528 // ####### d0 D0 histos ############
2529
ac4c229c 2530 TH1F *hd0D0LSCbackPM = new TH1F("hd0D0LSCbackPM","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2531 hd0D0LSCbackPM->SetXTitle("Impact parameter [#mum]");
2532 hd0D0LSCbackPM->SetYTitle("Entries");
2533
2534 TH1F *hd0D0VtxTrueLSCbackPM = new TH1F("hd0D0VtxTrueLSCbackPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2535 hd0D0VtxTrueLSCbackPM->SetXTitle("Impact parameter [#mum]");
2536 hd0D0VtxTrueLSCbackPM->SetYTitle("Entries");
2537
2538 TH1F *hMCd0D0LSCbackPM = new TH1F("hMCd0D0LSCbackPM","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2539 hMCd0D0LSCbackPM->SetXTitle("MC Impact parameter [#mum]");
2540 hMCd0D0LSCbackPM->SetYTitle("Entries");
2541
2542 TH1F *hd0D0LSCbackSB = new TH1F("hd0D0LSCbackSB","D^{0} impact par. plot , Loose Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2543 hd0D0LSCbackSB->SetXTitle("Impact parameter [#mum]");
2544 hd0D0LSCbackSB->SetYTitle("Entries");
2545
2546 TH1F *hd0D0VtxTrueLSCbackSB = new TH1F("hd0D0VtxTrueLSCbackSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2547 hd0D0VtxTrueLSCbackSB->SetXTitle("Impact parameter [#mum]");
2548 hd0D0VtxTrueLSCbackSB->SetYTitle("Entries");
2549
2550 TH1F *hMCd0D0LSCbackSB = new TH1F("hMCd0D0LSCbackSB","D^{0} impact par. plot, Loose Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
2551 hMCd0D0LSCbackSB->SetXTitle("MC Impact parameter [#mum]");
2552 hMCd0D0LSCbackSB->SetYTitle("Entries");
2553
2554 flistLsCutsBack->Add(hd0D0LSCbackPM);
2555 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackPM);
2556 flistLsCutsBack->Add(hMCd0D0LSCbackPM);
2557 flistLsCutsBack->Add(hd0D0LSCbackSB);
2558 flistLsCutsBack->Add(hd0D0VtxTrueLSCbackSB);
2559 flistLsCutsBack->Add(hMCd0D0LSCbackSB);
2560
e047b348 2561 TH1F *hd0D0ptLSCbackPM;
2562 TH1F *hMCd0D0ptLSCbackPM;
2563 TH1F *hd0D0VtxTrueptLSCbackPM;
2564 TH1F *hd0D0ptLSCbackSB;
2565 TH1F *hMCd0D0ptLSCbackSB;
2566 TH1F *hd0D0VtxTrueptLSCbackSB;
ac4c229c 2567 namehist="hd0D0ptLSCback_";
624c07ab 2568 titlehist="D^{0} impact par. plot, Loose Cuts, Background, ";
2569 for(Int_t i=0;i<fnbins;i++){
2570 strnamept=namehist;
2571 strnamept.Append("PkMss_pt");
2572 strnamept+=i;
2573
2574 strtitlept=titlehist;
2575 strtitlept.Append(" Mass Peak, ");
2576 strtitlept+=fptbins[i];
2577 strtitlept.Append("<= pt <");
2578 strtitlept+=fptbins[i+1];
2579 strtitlept.Append(" [GeV/c]");
2580
e047b348 2581 hd0D0ptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2582 hd0D0ptLSCbackPM->SetXTitle("Impact parameter [#mum] ");
2583 hd0D0ptLSCbackPM->SetYTitle("Entries");
2584 flistLsCutsBack->Add(hd0D0ptLSCbackPM);
624c07ab 2585
2586 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2587 hMCd0D0ptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2588 hMCd0D0ptLSCbackPM->SetXTitle("MC Impact parameter [#mum] ");
2589 hMCd0D0ptLSCbackPM->SetYTitle("Entries");
2590 flistLsCutsBack->Add(hMCd0D0ptLSCbackPM);
624c07ab 2591
2592
2593 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2594 hd0D0VtxTrueptLSCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2595 hd0D0VtxTrueptLSCbackPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2596 hd0D0VtxTrueptLSCbackPM->SetYTitle("Entries");
2597 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackPM);
624c07ab 2598
2599 strnamept=namehist;
2600 strnamept.Append("SBMss_pt");
2601 strnamept+=i;
2602
2603 strtitlept=titlehist;
2604 strtitlept.Append(" Side Bands, ");
2605 strtitlept+=fptbins[i];
2606 strtitlept.Append("<= pt <");
2607 strtitlept+=fptbins[i+1];
2608 strtitlept.Append(" [GeV/c]");
2609
e047b348 2610 hd0D0ptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2611 hd0D0ptLSCbackSB->SetXTitle("Impact parameter [#mum] ");
2612 hd0D0ptLSCbackSB->SetYTitle("Entries");
2613 flistLsCutsBack->Add(hd0D0ptLSCbackSB);
624c07ab 2614
2615 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2616 hMCd0D0ptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2617 hMCd0D0ptLSCbackSB->SetXTitle("MC Impact parameter [#mum] ");
2618 hMCd0D0ptLSCbackSB->SetYTitle("Entries");
2619 flistLsCutsBack->Add(hMCd0D0ptLSCbackSB);
624c07ab 2620
2621 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2622 hd0D0VtxTrueptLSCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2623 hd0D0VtxTrueptLSCbackSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2624 hd0D0VtxTrueptLSCbackSB->SetYTitle("Entries");
2625 flistLsCutsBack->Add(hd0D0VtxTrueptLSCbackSB);
624c07ab 2626 }
2627
2628
2629
2630 //############ LOOSE CUTS FROMB HISTOGRAMS ###########
2631 //
2632 //####### global properties histos
2633
e047b348 2634 TH2F *hCPtaVSd0d0LSCfromB=new TH2F("hCPtaVSd0d0LSCfromB","hCPtaVSd0d0_LooseCuts_FromB",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2635 TH1F *hSecVtxZLSCfromB=new TH1F("hSecVtxZLSCfromB","hSecVtxZ_LooseCuts_FromB",1000,-8.,8.);
2636 TH1F *hSecVtxXLSCfromB=new TH1F("hSecVtxXLSCfromB","hSecVtxX_LooseCuts_FromB",1000,-3000.,3000.);
2637 TH1F *hSecVtxYLSCfromB=new TH1F("hSecVtxYLSCfromB","hSecVtxY_LooseCuts_FromB",1000,-3000.,3000.);
2638 TH2F *hSecVtxXYLSCfromB=new TH2F("hSecVtxXYLSCfromB","hSecVtxXY_LooseCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
2639 TH1F *hSecVtxPhiLSCfromB=new TH1F("hSecVtxPhiLSCfromB","hSecVtxPhi_LooseCuts_FromB",180,-180.1,180.1);
e047b348 2640 TH1F *hd0singlTrackLSCfromB=new TH1F("hd0singlTrackLSCfromB","hd0singlTrackLooseCuts_FromB",1000,-5000.,5000.);
2641 TH1F *hCPtaLSCfromB=new TH1F("hCPtaLSCfromB","hCPta_LooseCuts_FromB",100,-1.,1.);
ac4c229c 2642 TH1F *hd0xd0LSCfromB=new TH1F("hd0xd0LSCfromB","hd0xd0_LooseCuts_FromB",1000,-100000.,100000.);
2643 TH1F *hMassTrueLSCfromB=new TH1F("hMassTrueLSCfromB","D^{0} MC inv. Mass Loose Cuts FromB(All momenta)",600,1.600,2.200);
2644 TH1F *hMassLSCfromB=new TH1F("hMassLSCfromB","D^{0} inv. Mass Loose Cuts FromB (All momenta)",600,1.600,2.200);
2645 hMassLSCfromB->Sumw2();
2646 TH1F *hMassTrueLSCfromBPM=new TH1F("hMassTrueLSCfromBPM","D^{0} MC inv. Mass Loose Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
2647 TH1F *hMassLSCfromBPM=new TH1F("hMassLSCfromBPM","D^{0} inv. Mass Loose Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
2648 hMassLSCfromBPM->Sumw2();
2649 TH1F *hMassTrueLSCfromBSB=new TH1F("hMassTrueLSCfromBSB","D^{0} MC inv. Mass in Side Bands Loose Cuts FromB(All momenta)",600,1.600,2.200);
2650 TH1F *hMassLSCfromBSB=new TH1F("hMassLSCfromBSB","D^{0} inv. Mass in Side Bands Loose Cuts FromB (All momenta)",600,1.600,2.200);
2651 hMassLSCfromBSB->Sumw2();
2652
2653 flistLsCutsFromB->Add(hCPtaVSd0d0LSCfromB);
2654 flistLsCutsFromB->Add(hSecVtxZLSCfromB);
2655 flistLsCutsFromB->Add(hSecVtxYLSCfromB);
2656 flistLsCutsFromB->Add(hSecVtxXLSCfromB);
2657 flistLsCutsFromB->Add(hSecVtxXYLSCfromB);
2658 flistLsCutsFromB->Add(hSecVtxPhiLSCfromB);
e047b348 2659 flistLsCutsFromB->Add(hd0singlTrackLSCfromB);
ac4c229c 2660 flistLsCutsFromB->Add(hCPtaLSCfromB);
2661 flistLsCutsFromB->Add(hd0xd0LSCfromB);
2662 flistLsCutsFromB->Add(hMassTrueLSCfromB);
2663 flistLsCutsFromB->Add(hMassLSCfromB);
2664 flistLsCutsFromB->Add(hMassTrueLSCfromBPM);
2665 flistLsCutsFromB->Add(hMassLSCfromBPM);
2666 flistLsCutsFromB->Add(hMassTrueLSCfromBSB);
2667 flistLsCutsFromB->Add(hMassLSCfromBSB);
624c07ab 2668
e047b348 2669
2670
2671
2672 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2673 TH1F *hdcaLSCfromB=new TH1F("hdcaLSCfromB","hdca_LooseCuts_FromB",100,0.,1000.);
2674 hdcaLSCfromB->SetXTitle("dca [#mum]");
2675 hdcaLSCfromB->SetYTitle("Entries");
2676 TH1F *hcosthetastarLSCfromB=new TH1F("hcosthetastarLSCfromB","hCosThetaStar_LooseCuts_FromB",50,-1.,1.);
2677 hcosthetastarLSCfromB->SetXTitle("cos #theta^{*}");
2678 hcosthetastarLSCfromB->SetYTitle("Entries");
2679 TH1F *hptD0LSCfromB=new TH1F("hptD0LSCfromB","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2680 hptD0LSCfromB->SetXTitle("p_{t} [GeV/c]");
2681 hptD0LSCfromB->SetYTitle("Entries");
2682 TH1F *hptD0VsMaxPtLSCfromB=new TH1F("hptD0VsMaxPtLSCfromB","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2683 TH2F *hptD0PTallsqrtLSCfromB=new TH2F("hptD0PTallsqrtLSCfromB","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2684 TH2F *hptD0PTallLSCfromB=new TH2F("hptD0PTallLSCfromB","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2685 TH2F *hptD0vsptBLSCfromB=new TH2F("hptD0vsptBLSCfromB","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2686 TH2F *hpD0vspBLSCfromB=new TH2F("hpD0vspBLSCfromB","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2687 TH2F *hptD0vsptcquarkLSCfromB=new TH2F("hptD0vsptcquarkLSCfromB","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2688 TH2F *hpD0vspcquarkLSCfromB=new TH2F("hpD0vspcquarkLSCfromB","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2689 flistLsCutsFromB->Add(hdcaLSCfromB);
2690 flistLsCutsFromB->Add(hcosthetastarLSCfromB);
2691 flistLsCutsFromB->Add(hptD0LSCfromB);
2692 flistLsCutsFromB->Add(hptD0VsMaxPtLSCfromB);
2693 flistLsCutsFromB->Add(hptD0PTallsqrtLSCfromB);
2694 flistLsCutsFromB->Add(hptD0PTallLSCfromB);
2695 flistLsCutsFromB->Add(hptD0vsptBLSCfromB);
2696 flistLsCutsFromB->Add(hpD0vspBLSCfromB);
2697 flistLsCutsFromB->Add(hptD0vsptcquarkLSCfromB);
2698 flistLsCutsFromB->Add(hpD0vspcquarkLSCfromB);
2699
2700 TH1F *hd0zD0ptLSCfromB;
cc3209fb 2701 TH1F *hInvMassD0LSCfromB,*hInvMassD0barLSCfromB;
e047b348 2702 TH2F *hInvMassPtLSCfromB=new TH2F("hInvMassPtLSCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
2703 TH1F *hetaLSCfromB;
2704 TH1F *hCosPDPBLSCfromB;
2705 TH1F *hCosPcPDLSCfromB;
2706 flistLsCutsFromB->Add(hInvMassPtLSCfromB);
2707 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2708 TH2F *hd0D0VSd0xd0LSCfromBpt;
2709 TH2F *hangletracksVSd0xd0LSCfromBpt;
2710 TH2F *hangletracksVSd0D0LSCfromBpt;
2711 TH1F *hd0xd0LSCfromBpt;
2712
2713
2714 TH2F *hTOFpidLSCfromB=new TH2F("hTOFpidLSCfromB","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
2715 flistLsCutsFromB->Add(hTOFpidLSCfromB);
2716
2717 for(Int_t i=0;i<fnbins;i++){
2718 namehist="hd0zD0ptLSCfromB_pt";
2719 namehist+=i;
2720 titlehist="d0(z) Loose Cuts FromBm ptbin=";
2721 titlehist+=i;
2722 hd0zD0ptLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
2723 hd0zD0ptLSCfromB->SetXTitle("d_{0}(z) [#mum]");
2724 hd0zD0ptLSCfromB->SetYTitle("Entries");
2725 flistLsCutsFromB->Add(hd0zD0ptLSCfromB);
2726
cc3209fb 2727 namehist="hInvMassD0LSCfromB_pt";
e047b348 2728 namehist+=i;
2729 titlehist="Invariant Mass Loose Cuts FromB ptbin=";
2730 titlehist+=i;
cc3209fb 2731 hInvMassD0LSCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2732 hInvMassD0LSCfromB->SetXTitle("Invariant Mass [GeV]");
2733 hInvMassD0LSCfromB->SetYTitle("Entries");
2734 flistLsCutsFromB->Add(hInvMassD0LSCfromB);
2735
2736 namehist="hInvMassD0barLSCfromB_pt";
2737 namehist+=i;
2738 titlehist="Invariant Mass D0bar No Cuts FromB ptbin=";
2739 titlehist+=i;
2740 hInvMassD0barLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
2741 hInvMassD0barLSCfromB->SetXTitle("Invariant Mass [GeV]");
2742 hInvMassD0barLSCfromB->SetYTitle("Entries");
2743 flistLsCutsFromB->Add(hInvMassD0barLSCfromB);
e047b348 2744
2745 namehist="hetaLSCfromB_pt";
2746 namehist+=i;
2747 titlehist="eta Loose Cuts FromB ptbin=";
2748 titlehist+=i;
2749 hetaLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
2750 hetaLSCfromB->SetXTitle("Pseudorapidity");
2751 hetaLSCfromB->SetYTitle("Entries");
2752 flistLsCutsFromB->Add(hetaLSCfromB);
2753
2754 namehist="hCosPDPBLSCfromB_pt";
2755 namehist+=i;
2756 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
2757 titlehist+=i;
2758 hCosPDPBLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2759 hCosPDPBLSCfromB->SetXTitle("Cosine between D0 momentum and B momentum");
2760 hCosPDPBLSCfromB->SetYTitle("Entries");
2761 flistLsCutsFromB->Add(hCosPDPBLSCfromB);
2762
2763 namehist="hCosPcPDLSCfromB_pt";
2764 namehist+=i;
2765 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
2766 titlehist+=i;
2767 hCosPcPDLSCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
2768 hCosPcPDLSCfromB->SetXTitle("Cosine between c quark momentum and D0 momentum");
2769 hCosPcPDLSCfromB->SetYTitle("Entries");
2770 flistLsCutsFromB->Add(hCosPcPDLSCfromB);
2771
2772 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
2773 namehist="hd0xd0LSCfromB_pt";
2774 namehist+=i;
2775 titlehist="d0xd0 Loose Cuts FromB ptbin=";
2776 titlehist+=i;
2777 hd0xd0LSCfromBpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
2778 hd0xd0LSCfromBpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
2779 hd0xd0LSCfromBpt->SetYTitle("Entries");
2780 flistLsCutsFromB->Add(hd0xd0LSCfromBpt);
2781
2782
2783 namehist="hd0D0VSd0xd0LSCfromB_pt";
2784 namehist+=i;
2785 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromB ptbin=";
2786 titlehist+=i;
2787 hd0D0VSd0xd0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
2788 hd0D0VSd0xd0LSCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2789 hd0D0VSd0xd0LSCfromBpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
2790 flistLsCutsFromB->Add(hd0D0VSd0xd0LSCfromBpt);
2791
2792
2793 namehist="hangletracksVSd0xd0LSCfromB_pt";
2794 namehist+=i;
2795 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromB ptbin=";
2796 titlehist+=i;
2797 hangletracksVSd0xd0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
2798 hangletracksVSd0xd0LSCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
2799 hangletracksVSd0xd0LSCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
2800 flistLsCutsFromB->Add(hangletracksVSd0xd0LSCfromBpt);
2801
2802
2803 namehist="hangletracksVSd0D0LSCfromB_pt";
2804 namehist+=i;
2805 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts FromB ptbin=";
2806 titlehist+=i;
2807 hangletracksVSd0D0LSCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
2808 hangletracksVSd0D0LSCfromBpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
2809 hangletracksVSd0D0LSCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
2810 flistLsCutsFromB->Add(hangletracksVSd0D0LSCfromBpt);
2811
2812 }
2813 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
2814 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2815
2816
2817
2818
2819
624c07ab 2820 // ######### d0 D0 histos ##############
ac4c229c 2821 TH1F *hd0D0LSCfromBPM = new TH1F("hd0D0LSCfromBPM","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2822 hd0D0LSCfromBPM->SetXTitle("Impact parameter [#mum]");
2823 hd0D0LSCfromBPM->SetYTitle("Entries");
2824
2825 TH1F *hd0D0VtxTrueLSCfromBPM = new TH1F("hd0D0VtxTrueLSCfromBPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2826 hd0D0VtxTrueLSCfromBPM->SetXTitle("Impact parameter [#mum]");
2827 hd0D0VtxTrueLSCfromBPM->SetYTitle("Entries");
2828
2829 TH1F *hMCd0D0LSCfromBPM = new TH1F("hMCd0D0LSCfromBPM","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2830 hMCd0D0LSCfromBPM->SetXTitle("MC Impact parameter [#mum]");
2831 hMCd0D0LSCfromBPM->SetYTitle("Entries");
2832
2833 TH1F *hd0D0LSCfromBSB = new TH1F("hd0D0LSCfromBSB","D^{0} impact par. plot , Loose Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2834 hd0D0LSCfromBSB->SetXTitle("Impact parameter [#mum]");
2835 hd0D0LSCfromBSB->SetYTitle("Entries");
2836
2837 TH1F *hd0D0VtxTrueLSCfromBSB = new TH1F("hd0D0VtxTrueLSCfromBSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2838 hd0D0VtxTrueLSCfromBSB->SetXTitle("Impact parameter [#mum]");
2839 hd0D0VtxTrueLSCfromBSB->SetYTitle("Entries");
2840
2841 TH1F *hMCd0D0LSCfromBSB = new TH1F("hMCd0D0LSCfromBSB","D^{0} impact par. plot, Loose Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
2842 hMCd0D0LSCfromBSB->SetXTitle("MC Impact parameter [#mum]");
2843 hMCd0D0LSCfromBSB->SetYTitle("Entries");
2844
2845 flistLsCutsFromB->Add(hd0D0LSCfromBPM);
2846 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBPM);
2847 flistLsCutsFromB->Add(hMCd0D0LSCfromBPM);
2848 flistLsCutsFromB->Add(hd0D0LSCfromBSB);
2849 flistLsCutsFromB->Add(hd0D0VtxTrueLSCfromBSB);
2850 flistLsCutsFromB->Add(hMCd0D0LSCfromBSB);
2851
e047b348 2852 TH1F *hd0D0ptLSCfromBPM;
2853 TH1F *hMCd0D0ptLSCfromBPM;
2854 TH1F *hd0D0VtxTrueptLSCfromBPM;
2855 TH1F *hd0D0ptLSCfromBSB;
2856 TH1F *hMCd0D0ptLSCfromBSB;
2857 TH1F *hd0D0VtxTrueptLSCfromBSB;
ac4c229c 2858 namehist="hd0D0ptLSCfromB_";
624c07ab 2859 titlehist="D^{0} impact par. plot, Loose Cuts, FromB, ";
2860 for(Int_t i=0;i<fnbins;i++){
2861 strnamept=namehist;
2862 strnamept.Append("PkMss_pt");
2863 strnamept+=i;
2864
2865 strtitlept=titlehist;
2866 strtitlept.Append(" Mass Peak, ");
2867 strtitlept+=fptbins[i];
2868 strtitlept.Append("<= pt <");
2869 strtitlept+=fptbins[i+1];
2870 strtitlept.Append(" [GeV/c]");
2871
e047b348 2872 hd0D0ptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2873 hd0D0ptLSCfromBPM->SetXTitle("Impact parameter [#mum] ");
2874 hd0D0ptLSCfromBPM->SetYTitle("Entries");
2875 flistLsCutsFromB->Add(hd0D0ptLSCfromBPM);
624c07ab 2876
2877 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2878 hMCd0D0ptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2879 hMCd0D0ptLSCfromBPM->SetXTitle("MC Impact parameter [#mum] ");
2880 hMCd0D0ptLSCfromBPM->SetYTitle("Entries");
2881 flistLsCutsFromB->Add(hMCd0D0ptLSCfromBPM);
624c07ab 2882
2883
2884 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2885 hd0D0VtxTrueptLSCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2886 hd0D0VtxTrueptLSCfromBPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2887 hd0D0VtxTrueptLSCfromBPM->SetYTitle("Entries");
2888 flistLsCutsFromB->Add(hd0D0VtxTrueptLSCfromBPM);
624c07ab 2889
2890 strnamept=namehist;
2891 strnamept.Append("SBMss_pt");
2892 strnamept+=i;
2893
2894 strtitlept=titlehist;
2895 strtitlept.Append(" Side Bands, ");
2896 strtitlept+=fptbins[i];
2897 strtitlept.Append("<= pt <");
2898 strtitlept+=fptbins[i+1];
2899 strtitlept.Append(" [GeV/c]");
2900
e047b348 2901 hd0D0ptLSCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2902 hd0D0ptLSCfromBSB->SetXTitle("Impact parameter [#mum] ");
2903 hd0D0ptLSCfromBSB->SetYTitle("Entries");
2904 flistLsCutsFromB->Add(hd0D0ptLSCfromBSB);
624c07ab 2905
2906 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 2907 hMCd0D0ptLSCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2908 hMCd0D0ptLSCfromBSB->SetXTitle("MC Impact parameter [#mum] ");
2909 hMCd0D0ptLSCfromBSB->SetYTitle("Entries");
2910 flistLsCutsFromB->Add(hMCd0D0ptLSCfromBSB);
624c07ab 2911
2912 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 2913 hd0D0VtxTrueptLSCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
2914 hd0D0VtxTrueptLSCfromBSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
2915 hd0D0VtxTrueptLSCfromBSB->SetYTitle("Entries");
2916 flistLsCutsFromB->Add(hd0D0VtxTrueptLSCfromBSB);
624c07ab 2917 }
2918
2919
2920
2921 //############ LOOSE CUTS FROM DSTAR HISTOGRAMS ###########
2922 //
2923 //############## global properties histos
e047b348 2924 TH2F *hCPtaVSd0d0LSCfromDstar=new TH2F("hCPtaVSd0d0LSCfromDstar","hCPtaVSd0d0_LooseCuts_FromDStar",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 2925 TH1F *hSecVtxZLSCfromDstar=new TH1F("hSecVtxZLSCfromDstar","hSecVtxZ_LooseCuts_FromDStar",1000,-8.,8.);
2926 TH1F *hSecVtxXLSCfromDstar=new TH1F("hSecVtxXLSCfromDstar","hSecVtxX_LooseCuts_FromDStar",1000,-3000.,3000.);
2927 TH1F *hSecVtxYLSCfromDstar=new TH1F("hSecVtxYLSCfromDstar","hSecVtxY_LooseCuts_FromDStar",1000,-3000.,3000.);
2928 TH2F *hSecVtxXYLSCfromDstar=new TH2F("hSecVtxXYLSCfromDstar","hSecVtxXY_LooseCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
2929 TH1F *hSecVtxPhiLSCfromDstar=new TH1F("hSecVtxPhiLSCfromDstar","hSecVtxPhi_LooseCuts_FromDStar",180,-180.1,180.1);
e047b348 2930 TH1F *hd0singlTrackLSCfromDstar=new TH1F("hd0singlTrackLSCfromDstar","hd0singlTrackLooseCuts_FromDstar",1000,-5000.,5000.);
2931 TH1F *hCPtaLSCfromDstar=new TH1F("hCPtaLSCfromDstar","hCPta_LooseCuts_FromDStar",100,-1.,1.);
ac4c229c 2932 TH1F *hd0xd0LSCfromDstar=new TH1F("hd0xd0LSCfromDstar","hd0xd0_LooseCuts_FromDStar",1000,-100000.,100000.);
2933 TH1F *hMassTrueLSCfromDstar=new TH1F("hMassTrueLSCfromDstar","D^{0} MC inv. Mass Loose Cuts FromDStar(All momenta)",600,1.600,2.200);
2934 TH1F *hMassLSCfromDstar=new TH1F("hMassLSCfromDstar","D^{0} inv. Mass Loose Cuts FromDStar (All momenta)",600,1.600,2.200);
2935 hMassLSCfromDstar->Sumw2();
2936 TH1F *hMassTrueLSCfromDstarPM=new TH1F("hMassTrueLSCfromDstarPM","D^{0} MC inv. Mass Loose Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
2937 TH1F *hMassLSCfromDstarPM=new TH1F("hMassLSCfromDstarPM","D^{0} inv. Mass Loose Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
2938 hMassLSCfromDstarPM->Sumw2();
2939 TH1F *hMassTrueLSCfromDstarSB=new TH1F("hMassTrueLSCfromDstarSB","D^{0} MC inv. Mass in Side Bands Loose Cuts FromDStar(All momenta)",600,1.600,2.200);
2940 TH1F *hMassLSCfromDstarSB=new TH1F("hMassLSCfromDstarSB","D^{0} inv. Mass in Side Bands Loose Cuts FromDStar (All momenta)",600,1.600,2.200);
2941 hMassLSCfromDstarSB->Sumw2();
2942
2943 flistLsCutsFromDstar->Add(hCPtaVSd0d0LSCfromDstar);
2944 flistLsCutsFromDstar->Add(hSecVtxZLSCfromDstar);
2945 flistLsCutsFromDstar->Add(hSecVtxYLSCfromDstar);
2946 flistLsCutsFromDstar->Add(hSecVtxXLSCfromDstar);
2947 flistLsCutsFromDstar->Add(hSecVtxXYLSCfromDstar);
2948 flistLsCutsFromDstar->Add(hSecVtxPhiLSCfromDstar);
e047b348 2949 flistLsCutsFromDstar->Add(hd0singlTrackLSCfromDstar);
ac4c229c 2950 flistLsCutsFromDstar->Add(hCPtaLSCfromDstar);
2951 flistLsCutsFromDstar->Add(hd0xd0LSCfromDstar);
2952 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstar);
2953 flistLsCutsFromDstar->Add(hMassLSCfromDstar);
e047b348 2954 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstarPM);
ac4c229c 2955 flistLsCutsFromDstar->Add(hMassLSCfromDstarPM);
2956 flistLsCutsFromDstar->Add(hMassTrueLSCfromDstarSB);
2957 flistLsCutsFromDstar->Add(hMassLSCfromDstarSB);
624c07ab 2958
e047b348 2959
2960
2961
2962
2963
2964
2965 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
2966 TH1F *hdcaLSCfromDstar=new TH1F("hdcaLSCfromDstar","hdca_LooseCuts_FromDstar",100,0.,1000.);
2967 hdcaLSCfromDstar->SetXTitle("dca [#mum]");
2968 hdcaLSCfromDstar->SetYTitle("Entries");
2969 TH1F *hcosthetastarLSCfromDstar=new TH1F("hcosthetastarLSCfromDstar","hCosThetaStar_LooseCuts_FromDstar",50,-1.,1.);
2970 hcosthetastarLSCfromDstar->SetXTitle("cos #theta^{*}");
2971 hcosthetastarLSCfromDstar->SetYTitle("Entries");
2972 TH1F *hptD0LSCfromDstar=new TH1F("hptD0LSCfromDstar","D^{0} transverse momentum distribution",34,ptbinsD0arr);
2973 hptD0LSCfromDstar->SetXTitle("p_{t} [GeV/c]");
2974 hptD0LSCfromDstar->SetYTitle("Entries");
2975 TH1F *hptD0VsMaxPtLSCfromDstar=new TH1F("hptD0VsMaxPtLSCfromDstar","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
2976 TH2F *hptD0PTallsqrtLSCfromDstar=new TH2F("hptD0PTallsqrtLSCfromDstar","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
2977 TH2F *hptD0PTallLSCfromDstar=new TH2F("hptD0PTallLSCfromDstar","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
2978 TH2F *hptD0vsptBLSCfromDstar=new TH2F("hptD0vsptBLSCfromDstar","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2979 TH2F *hpD0vspBLSCfromDstar=new TH2F("hpD0vspBLSCfromDstar","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2980 TH2F *hptD0vsptcquarkLSCfromDstar=new TH2F("hptD0vsptcquarkLSCfromDstar","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2981 TH2F *hpD0vspcquarkLSCfromDstar=new TH2F("hpD0vspcquarkLSCfromDstar","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
2982 flistLsCutsFromDstar->Add(hdcaLSCfromDstar);
2983 flistLsCutsFromDstar->Add(hcosthetastarLSCfromDstar);
2984 flistLsCutsFromDstar->Add(hptD0LSCfromDstar);
2985 flistLsCutsFromDstar->Add(hptD0VsMaxPtLSCfromDstar);
2986 flistLsCutsFromDstar->Add(hptD0PTallsqrtLSCfromDstar);
2987 flistLsCutsFromDstar->Add(hptD0PTallLSCfromDstar);
2988 flistLsCutsFromDstar->Add(hptD0vsptBLSCfromDstar);
2989 flistLsCutsFromDstar->Add(hpD0vspBLSCfromDstar);
2990 flistLsCutsFromDstar->Add(hptD0vsptcquarkLSCfromDstar);
2991 flistLsCutsFromDstar->Add(hpD0vspcquarkLSCfromDstar);
2992
2993 TH1F *hd0zD0ptLSCfromDstar;
cc3209fb 2994 TH1F *hInvMassD0LSCfromDstar,*hInvMassD0barLSCfromDstar;
e047b348 2995 TH2F *hInvMassPtLSCfromDstar=new TH2F("hInvMassPtLSCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
2996 TH1F *hetaLSCfromDstar;
2997 TH1F *hCosPDPBLSCfromDstar;
2998 TH1F *hCosPcPDLSCfromDstar;
2999 flistLsCutsFromDstar->Add(hInvMassPtLSCfromDstar);
3000 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3001 TH2F *hd0D0VSd0xd0LSCfromDstarpt;
3002 TH2F *hangletracksVSd0xd0LSCfromDstarpt;
3003 TH2F *hangletracksVSd0D0LSCfromDstarpt;
3004 TH1F *hd0xd0LSCfromDstarpt;
3005
3006 TH2F *hTOFpidLSCfromDstar=new TH2F("hTOFpidLSCfromDstar","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
3007 flistLsCutsFromDstar->Add(hTOFpidLSCfromDstar);
3008
3009 for(Int_t i=0;i<fnbins;i++){
3010 namehist="hd0zD0ptLSCfromDstar_pt";
3011 namehist+=i;
3012 titlehist="d0(z) Loose Cuts FromDstarm ptbin=";
3013 titlehist+=i;
3014 hd0zD0ptLSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
3015 hd0zD0ptLSCfromDstar->SetXTitle("d_{0}(z) [#mum]");
3016 hd0zD0ptLSCfromDstar->SetYTitle("Entries");
3017 flistLsCutsFromDstar->Add(hd0zD0ptLSCfromDstar);
3018
cc3209fb 3019 namehist="hInvMassD0LSCfromDstar_pt";
e047b348 3020 namehist+=i;
3021 titlehist="Invariant Mass Loose Cuts FromDstar ptbin=";
3022 titlehist+=i;
cc3209fb 3023 hInvMassD0LSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3024 hInvMassD0LSCfromDstar->SetXTitle("Invariant Mass [GeV]");
3025 hInvMassD0LSCfromDstar->SetYTitle("Entries");
3026 flistLsCutsFromDstar->Add(hInvMassD0LSCfromDstar);
3027
3028 namehist="hInvMassD0barLSCfromDstar_pt";
3029 namehist+=i;
3030 titlehist="Invariant Mass D0bar No Cuts FromDstar ptbin=";
3031 titlehist+=i;
3032 hInvMassD0barLSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3033 hInvMassD0barLSCfromDstar->SetXTitle("Invariant Mass [GeV]");
3034 hInvMassD0barLSCfromDstar->SetYTitle("Entries");
3035 flistLsCutsFromDstar->Add(hInvMassD0barLSCfromDstar);
e047b348 3036
3037 namehist="hetaLSCfromDstar_pt";
3038 namehist+=i;
3039 titlehist="eta Loose Cuts FromDstar ptbin=";
3040 titlehist+=i;
3041 hetaLSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
3042 hetaLSCfromDstar->SetXTitle("Pseudorapidity");
3043 hetaLSCfromDstar->SetYTitle("Entries");
3044 flistLsCutsFromDstar->Add(hetaLSCfromDstar);
3045
3046 namehist="hCosPDPBLSCfromDstar_pt";
3047 namehist+=i;
3048 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
3049 titlehist+=i;
3050 hCosPDPBLSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3051 hCosPDPBLSCfromDstar->SetXTitle("Cosine between D0 momentum and B momentum");
3052 hCosPDPBLSCfromDstar->SetYTitle("Entries");
3053 flistLsCutsFromDstar->Add(hCosPDPBLSCfromDstar);
3054
3055 namehist="hCosPcPDLSCfromDstar_pt";
3056 namehist+=i;
3057 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
3058 titlehist+=i;
3059 hCosPcPDLSCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3060 hCosPcPDLSCfromDstar->SetXTitle("Cosine between c quark momentum and D0 momentum");
3061 hCosPcPDLSCfromDstar->SetYTitle("Entries");
3062 flistLsCutsFromDstar->Add(hCosPcPDLSCfromDstar);
3063
3064 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3065 namehist="hd0xd0LSCfromDstar_pt";
3066 namehist+=i;
3067 titlehist="d0xd0 Loose Cuts FromDstar ptbin=";
3068 titlehist+=i;
3069 hd0xd0LSCfromDstarpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
3070 hd0xd0LSCfromDstarpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
3071 hd0xd0LSCfromDstarpt->SetYTitle("Entries");
3072 flistLsCutsFromDstar->Add(hd0xd0LSCfromDstarpt);
3073
3074
3075 namehist="hd0D0VSd0xd0LSCfromDstar_pt";
3076 namehist+=i;
3077 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromDstar ptbin=";
3078 titlehist+=i;
3079 hd0D0VSd0xd0LSCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
3080 hd0D0VSd0xd0LSCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3081 hd0D0VSd0xd0LSCfromDstarpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
3082 flistLsCutsFromDstar->Add(hd0D0VSd0xd0LSCfromDstarpt);
3083
3084
3085 namehist="hangletracksVSd0xd0LSCfromDstar_pt";
3086 namehist+=i;
3087 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts FromDstar ptbin=";
3088 titlehist+=i;
3089 hangletracksVSd0xd0LSCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
3090 hangletracksVSd0xd0LSCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3091 hangletracksVSd0xd0LSCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
3092 flistLsCutsFromDstar->Add(hangletracksVSd0xd0LSCfromDstarpt);
3093
3094
3095 namehist="hangletracksVSd0D0LSCfromDstar_pt";
3096 namehist+=i;
3097 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts FromDstar ptbin=";
3098 titlehist+=i;
3099 hangletracksVSd0D0LSCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
3100 hangletracksVSd0D0LSCfromDstarpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
3101 hangletracksVSd0D0LSCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
3102 flistLsCutsFromDstar->Add(hangletracksVSd0D0LSCfromDstarpt);
3103
3104
3105 }
3106 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
3107 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3108
3109
3110
3111
3112
3113
624c07ab 3114 //########## d0 D0 histos #############
ac4c229c 3115 TH1F *hd0D0LSCfromDstPM = new TH1F("hd0D0LSCfromDstarPM","D^{0} impact par. plot , Loose Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3116 hd0D0LSCfromDstPM->SetXTitle("Impact parameter [#mum]");
3117 hd0D0LSCfromDstPM->SetYTitle("Entries");
3118
3119 TH1F *hd0D0VtxTrueLSCfromDstPM = new TH1F("hd0D0VtxTrueLSCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3120 hd0D0VtxTrueLSCfromDstPM->SetXTitle("Impact parameter [#mum]");
3121 hd0D0VtxTrueLSCfromDstPM->SetYTitle("Entries");
3122
3123 TH1F *hMCd0D0LSCfromDstPM = new TH1F("hMCd0D0LSCfromDstarPM","D^{0} impact par. plot, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3124 hMCd0D0LSCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
3125 hMCd0D0LSCfromDstPM->SetYTitle("Entries");
3126
3127 TH1F *hd0D0LSCfromDstSB = new TH1F("hd0D0LSCfromDstarSB","D^{0} impact par. plot , Loose Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3128 hd0D0LSCfromDstSB->SetXTitle("Impact parameter [#mum]");
3129 hd0D0LSCfromDstSB->SetYTitle("Entries");
3130
3131 TH1F *hd0D0VtxTrueLSCfromDstSB = new TH1F("hd0D0VtxTrueLSCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3132 hd0D0VtxTrueLSCfromDstSB->SetXTitle("Impact parameter [#mum]");
3133 hd0D0VtxTrueLSCfromDstSB->SetYTitle("Entries");
3134
3135 TH1F *hMCd0D0LSCfromDstSB = new TH1F("hMCd0D0LSCfromDstarSB","D^{0} impact par. plot, Loose Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
3136 hMCd0D0LSCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
3137 hMCd0D0LSCfromDstSB->SetYTitle("Entries");
3138
3139 flistLsCutsFromDstar->Add(hd0D0LSCfromDstPM);
3140 flistLsCutsFromDstar->Add(hd0D0VtxTrueLSCfromDstPM);
3141 flistLsCutsFromDstar->Add(hMCd0D0LSCfromDstPM);
3142 flistLsCutsFromDstar->Add(hd0D0LSCfromDstSB);
3143 flistLsCutsFromDstar->Add(hd0D0VtxTrueLSCfromDstSB);
3144 flistLsCutsFromDstar->Add(hMCd0D0LSCfromDstSB);
3145
e047b348 3146 TH1F *hd0D0ptLSCfromDstPM;
3147 TH1F *hMCd0D0ptLSCfromDstPM;
3148 TH1F *hd0D0VtxTrueptLSCfromDstPM;
3149 TH1F *hd0D0ptLSCfromDstSB;
3150 TH1F *hMCd0D0ptLSCfromDstSB;
3151 TH1F *hd0D0VtxTrueptLSCfromDstSB;
ac4c229c 3152 namehist="hd0D0ptLSCfromDstar_";
624c07ab 3153 titlehist="D^{0} impact par. plot, Loose Cuts, FromDStar, ";
3154 for(Int_t i=0;i<fnbins;i++){
3155 strnamept=namehist;
3156 strnamept.Append("PkMss_pt");
3157 strnamept+=i;
3158
3159 strtitlept=titlehist;
3160 strtitlept.Append(" Mass Peak, ");
3161 strtitlept+=fptbins[i];
3162 strtitlept.Append("<= pt <");
3163 strtitlept+=fptbins[i+1];
3164 strtitlept.Append(" [GeV/c]");
3165
e047b348 3166 hd0D0ptLSCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3167 hd0D0ptLSCfromDstPM->SetXTitle("Impact parameter [#mum] ");
3168 hd0D0ptLSCfromDstPM->SetYTitle("Entries");
3169 flistLsCutsFromDstar->Add(hd0D0ptLSCfromDstPM);
624c07ab 3170
3171 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3172 hMCd0D0ptLSCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3173 hMCd0D0ptLSCfromDstPM->SetXTitle("MC Impact parameter [#mum] ");
3174 hMCd0D0ptLSCfromDstPM->SetYTitle("Entries");
3175 flistLsCutsFromDstar->Add(hMCd0D0ptLSCfromDstPM);
624c07ab 3176
3177
3178 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3179 hd0D0VtxTrueptLSCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3180 hd0D0VtxTrueptLSCfromDstPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3181 hd0D0VtxTrueptLSCfromDstPM->SetYTitle("Entries");
3182 flistLsCutsFromDstar->Add(hd0D0VtxTrueptLSCfromDstPM);
624c07ab 3183
3184 strnamept=namehist;
3185 strnamept.Append("SBMss_pt");
3186 strnamept+=i;
3187
3188 strtitlept=titlehist;
3189 strtitlept.Append(" Side Bands, ");
3190 strtitlept+=fptbins[i];
3191 strtitlept.Append("<= pt <");
3192 strtitlept+=fptbins[i+1];
3193 strtitlept.Append(" [GeV/c]");
3194
e047b348 3195 hd0D0ptLSCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3196 hd0D0ptLSCfromDstSB->SetXTitle("Impact parameter [#mum] ");
3197 hd0D0ptLSCfromDstSB->SetYTitle("Entries");
3198 flistLsCutsFromDstar->Add(hd0D0ptLSCfromDstSB);
624c07ab 3199
3200 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3201 hMCd0D0ptLSCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3202 hMCd0D0ptLSCfromDstSB->SetXTitle("MC Impact parameter [#mum] ");
3203 hMCd0D0ptLSCfromDstSB->SetYTitle("Entries");
3204 flistLsCutsFromDstar->Add(hMCd0D0ptLSCfromDstSB);
624c07ab 3205
3206 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3207 hd0D0VtxTrueptLSCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3208 hd0D0VtxTrueptLSCfromDstSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3209 hd0D0VtxTrueptLSCfromDstSB->SetYTitle("Entries");
3210 flistLsCutsFromDstar->Add(hd0D0VtxTrueptLSCfromDstSB);
624c07ab 3211 }
3212
3213
3214 //############ LOOSE CUTS OTHER HISTOGRAMS ###########
3215 //
3216 //########### global properties histos ###########
3217
e047b348 3218 TH2F *hCPtaVSd0d0LSCother=new TH2F("hCPtaVSd0d0LSCother","hCPtaVSd0d0_LooseCuts_other",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 3219 TH1F *hSecVtxZLSCother=new TH1F("hSecVtxZLSCother","hSecVtxZ_LooseCuts_other",1000,-8.,8.);
3220 TH1F *hSecVtxXLSCother=new TH1F("hSecVtxXLSCother","hSecVtxX_LooseCuts_other",1000,-3000.,3000.);
3221 TH1F *hSecVtxYLSCother=new TH1F("hSecVtxYLSCother","hSecVtxY_LooseCuts_other",1000,-3000.,3000.);
3222 TH2F *hSecVtxXYLSCother=new TH2F("hSecVtxXYLSCother","hSecVtxXY_LooseCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
3223 TH1F *hSecVtxPhiLSCother=new TH1F("hSecVtxPhiLSCother","hSecVtxPhi_LooseCuts_other",180,-180.1,180.1);
e047b348 3224 TH1F *hd0singlTrackLSCother=new TH1F("hd0singlTrackLSCother","hd0singlTrackLooseCuts_Other",1000,-5000.,5000.);
3225 TH1F *hCPtaLSCother=new TH1F("hCPtaLSCother","hCPta_LooseCuts_other",100,-1.,1.);
ac4c229c 3226 TH1F *hd0xd0LSCother=new TH1F("hd0xd0LSCother","hd0xd0_LooseCuts_other",1000,-100000.,100000.);
3227 TH1F *hMassTrueLSCother=new TH1F("hMassTrueLSCother","D^{0} MC inv. Mass Loose Cuts other(All momenta)",600,1.600,2.200);
3228 TH1F *hMassLSCother=new TH1F("hMassLSCother","D^{0} inv. Mass Loose Cuts other (All momenta)",600,1.600,2.200);
3229 hMassLSCother->Sumw2();
3230 TH1F *hMassTrueLSCotherPM=new TH1F("hMassTrueLSCotherPM","D^{0} MC inv. Mass Loose Cuts other, Mass Peak. (All momenta)",600,1.600,2.200);
3231 TH1F *hMassLSCotherPM=new TH1F("hMassLSCotherPM","D^{0} inv. Mass Loose Cuts other (All momenta), MassPeak",600,1.600,2.200);
3232 hMassLSCotherPM->Sumw2();
3233 TH1F *hMassTrueLSCotherSB=new TH1F("hMassTrueLSCotherSB","D^{0} MC inv. Mass in Side Bands Loose Cuts other(All momenta)",600,1.600,2.200);
3234 TH1F *hMassLSCotherSB=new TH1F("hMassLSCotherSB","D^{0} inv. Mass in Side Bands Loose Cuts other (All momenta)",600,1.600,2.200);
3235 hMassLSCotherSB->Sumw2();
3236
3237 flistLsCutsOther->Add(hCPtaVSd0d0LSCother);
3238 flistLsCutsOther->Add(hSecVtxZLSCother);
3239 flistLsCutsOther->Add(hSecVtxYLSCother);
3240 flistLsCutsOther->Add(hSecVtxXLSCother);
3241 flistLsCutsOther->Add(hSecVtxXYLSCother);
3242 flistLsCutsOther->Add(hSecVtxPhiLSCother);
e047b348 3243 flistLsCutsOther->Add(hd0singlTrackLSCother);
ac4c229c 3244 flistLsCutsOther->Add(hCPtaLSCother);
3245 flistLsCutsOther->Add(hd0xd0LSCother);
3246 flistLsCutsOther->Add(hMassTrueLSCother);
3247 flistLsCutsOther->Add(hMassLSCother);
3248 flistLsCutsOther->Add(hMassTrueLSCotherPM);
3249 flistLsCutsOther->Add(hMassLSCotherPM);
3250 flistLsCutsOther->Add(hMassTrueLSCotherSB);
3251 flistLsCutsOther->Add(hMassLSCotherSB);
624c07ab 3252
e047b348 3253
3254
3255
3256 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
3257 TH1F *hdcaLSCother=new TH1F("hdcaLSCother","hdca_LooseCuts_Other",100,0.,1000.);
3258 hdcaLSCother->SetXTitle("dca [#mum]");
3259 hdcaLSCother->SetYTitle("Entries");
3260 TH1F *hcosthetastarLSCother=new TH1F("hcosthetastarLSCother","hCosThetaStar_LooseCuts_Other",50,-1.,1.);
3261 hcosthetastarLSCother->SetXTitle("cos #theta^{*}");
3262 hcosthetastarLSCother->SetYTitle("Entries");
3263 TH1F *hptD0LSCother=new TH1F("hptD0LSCother","D^{0} transverse momentum distribution",34,ptbinsD0arr);
3264 hptD0LSCother->SetXTitle("p_{t} [GeV/c]");
3265 hptD0LSCother->SetYTitle("Entries");
3266 TH1F *hptD0VsMaxPtLSCother=new TH1F("hptD0VsMaxPtLSCother","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
3267 TH2F *hptD0PTallsqrtLSCother=new TH2F("hptD0PTallsqrtLSCother","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
3268 TH2F *hptD0PTallLSCother=new TH2F("hptD0PTallLSCother","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
3269 TH2F *hptD0vsptBLSCother=new TH2F("hptD0vsptBLSCother","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3270 TH2F *hpD0vspBLSCother=new TH2F("hpD0vspBLSCother","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3271 TH2F *hptD0vsptcquarkLSCother=new TH2F("hptD0vsptcquarkLSCother","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3272 TH2F *hpD0vspcquarkLSCother=new TH2F("hpD0vspcquarkLSCother","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3273 flistLsCutsOther->Add(hdcaLSCother);
3274 flistLsCutsOther->Add(hcosthetastarLSCother);
3275 flistLsCutsOther->Add(hptD0LSCother);
3276 flistLsCutsOther->Add(hptD0VsMaxPtLSCother);
3277 flistLsCutsOther->Add(hptD0PTallsqrtLSCother);
3278 flistLsCutsOther->Add(hptD0PTallLSCother);
3279 flistLsCutsOther->Add(hptD0vsptBLSCother);
3280 flistLsCutsOther->Add(hpD0vspBLSCother);
3281 flistLsCutsOther->Add(hptD0vsptcquarkLSCother);
3282 flistLsCutsOther->Add(hpD0vspcquarkLSCother);
3283
3284 TH1F *hd0zD0ptLSCother;
cc3209fb 3285 TH1F *hInvMassD0LSCother,*hInvMassD0barLSCother;
e047b348 3286 TH2F *hInvMassPtLSCother=new TH2F("hInvMassPtLSCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
3287 TH1F *hetaLSCother;
3288 TH1F *hCosPDPBLSCother;
3289 TH1F *hCosPcPDLSCother;
3290 flistLsCutsOther->Add(hInvMassPtLSCother);
3291 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3292 TH2F *hd0D0VSd0xd0LSCotherpt;
3293 TH2F *hangletracksVSd0xd0LSCotherpt;
3294 TH2F *hangletracksVSd0D0LSCotherpt;
3295 TH1F *hd0xd0LSCotherpt;
3296
3297 TH2F *hTOFpidLSCother=new TH2F("hTOFpidLSCother","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
3298 flistLsCutsOther->Add(hTOFpidLSCother);
3299
3300 for(Int_t i=0;i<fnbins;i++){
3301 namehist="hd0zD0ptLSCother_pt";
3302 namehist+=i;
3303 titlehist="d0(z) Loose Cuts Otherm ptbin=";
3304 titlehist+=i;
3305 hd0zD0ptLSCother=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
3306 hd0zD0ptLSCother->SetXTitle("d_{0}(z) [#mum]");
3307 hd0zD0ptLSCother->SetYTitle("Entries");
3308 flistLsCutsOther->Add(hd0zD0ptLSCother);
3309
cc3209fb 3310 namehist="hInvMassD0LSCother_pt";
e047b348 3311 namehist+=i;
3312 titlehist="Invariant Mass Loose Cuts Other ptbin=";
3313 titlehist+=i;
cc3209fb 3314 hInvMassD0LSCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3315 hInvMassD0LSCother->SetXTitle("Invariant Mass [GeV]");
3316 hInvMassD0LSCother->SetYTitle("Entries");
3317 flistLsCutsOther->Add(hInvMassD0LSCother);
3318
3319 namehist="hInvMassD0barLSCother_pt";
3320 namehist+=i;
3321 titlehist="Invariant Mass D0bar No Cuts Other ptbin=";
3322 titlehist+=i;
3323 hInvMassD0barLSCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3324 hInvMassD0barLSCother->SetXTitle("Invariant Mass [GeV]");
3325 hInvMassD0barLSCother->SetYTitle("Entries");
3326 flistLsCutsOther->Add(hInvMassD0barLSCother);
e047b348 3327
3328 namehist="hetaLSCother_pt";
3329 namehist+=i;
3330 titlehist="eta Loose Cuts Other ptbin=";
3331 titlehist+=i;
3332 hetaLSCother=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
3333 hetaLSCother->SetXTitle("Pseudorapidity");
3334 hetaLSCother->SetYTitle("Entries");
3335 flistLsCutsOther->Add(hetaLSCother);
3336
3337 namehist="hCosPDPBLSCother_pt";
3338 namehist+=i;
3339 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
3340 titlehist+=i;
3341 hCosPDPBLSCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3342 hCosPDPBLSCother->SetXTitle("Cosine between D0 momentum and B momentum");
3343 hCosPDPBLSCother->SetYTitle("Entries");
3344 flistLsCutsOther->Add(hCosPDPBLSCother);
3345
3346 namehist="hCosPcPDLSCother_pt";
3347 namehist+=i;
3348 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
3349 titlehist+=i;
3350 hCosPcPDLSCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3351 hCosPcPDLSCother->SetXTitle("Cosine between c quark momentum and D0 momentum");
3352 hCosPcPDLSCother->SetYTitle("Entries");
3353 flistLsCutsOther->Add(hCosPcPDLSCother);
3354
3355 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3356 namehist="hd0xd0LSCother_pt";
3357 namehist+=i;
3358 titlehist="d0xd0 Loose Cuts Other ptbin=";
3359 titlehist+=i;
3360 hd0xd0LSCotherpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
3361 hd0xd0LSCotherpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
3362 hd0xd0LSCotherpt->SetYTitle("Entries");
3363 flistLsCutsOther->Add(hd0xd0LSCotherpt);
3364
3365
3366 namehist="hd0D0VSd0xd0LSCother_pt";
3367 namehist+=i;
3368 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Other ptbin=";
3369 titlehist+=i;
3370 hd0D0VSd0xd0LSCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
3371 hd0D0VSd0xd0LSCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3372 hd0D0VSd0xd0LSCotherpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
3373 flistLsCutsOther->Add(hd0D0VSd0xd0LSCotherpt);
3374
3375
3376 namehist="hangletracksVSd0xd0LSCother_pt";
3377 namehist+=i;
3378 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Loose Cuts Other ptbin=";
3379 titlehist+=i;
3380 hangletracksVSd0xd0LSCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
3381 hangletracksVSd0xd0LSCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3382 hangletracksVSd0xd0LSCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
3383 flistLsCutsOther->Add(hangletracksVSd0xd0LSCotherpt);
3384
3385
3386 namehist="hangletracksVSd0D0LSCother_pt";
3387 namehist+=i;
3388 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Loose Cuts Other ptbin=";
3389 titlehist+=i;
3390 hangletracksVSd0D0LSCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
3391 hangletracksVSd0D0LSCotherpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
3392 hangletracksVSd0D0LSCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
3393 flistLsCutsOther->Add(hangletracksVSd0D0LSCotherpt);
3394
3395
3396 }
3397 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
3398 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3399
3400
3401
624c07ab 3402 //############# d0 D0 histos ###############à
ac4c229c 3403 TH1F *hd0D0LSCotherPM = new TH1F("hd0D0LSCotherPM","D^{0} impact par. plot , Loose Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3404 hd0D0LSCotherPM->SetXTitle("Impact parameter [#mum]");
3405 hd0D0LSCotherPM->SetYTitle("Entries");
3406
3407 TH1F *hd0D0VtxTrueLSCotherPM = new TH1F("hd0D0VtxTrueLSCotherPM","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3408 hd0D0VtxTrueLSCotherPM->SetXTitle("Impact parameter [#mum]");
3409 hd0D0VtxTrueLSCotherPM->SetYTitle("Entries");
3410
3411 TH1F *hMCd0D0LSCotherPM = new TH1F("hMCd0D0LSCotherPM","D^{0} impact par. plot, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3412 hMCd0D0LSCotherPM->SetXTitle("MC Impact parameter [#mum]");
3413 hMCd0D0LSCotherPM->SetYTitle("Entries");
3414
3415 TH1F *hd0D0LSCotherSB = new TH1F("hd0D0LSCotherSB","D^{0} impact par. plot , Loose Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3416 hd0D0LSCotherSB->SetXTitle("Impact parameter [#mum]");
3417 hd0D0LSCotherSB->SetYTitle("Entries");
3418
3419 TH1F *hd0D0VtxTrueLSCotherSB = new TH1F("hd0D0VtxTrueLSCotherSB","D^{0} impact par. w.r.t. True Vtx, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3420 hd0D0VtxTrueLSCotherSB->SetXTitle("Impact parameter [#mum]");
3421 hd0D0VtxTrueLSCotherSB->SetYTitle("Entries");
3422
3423 TH1F *hMCd0D0LSCotherSB = new TH1F("hMCd0D0LSCotherSB","D^{0} impact par. plot, Loose Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
3424 hMCd0D0LSCotherSB->SetXTitle("MC Impact parameter [#mum]");
3425 hMCd0D0LSCotherSB->SetYTitle("Entries");
3426
3427 flistLsCutsOther->Add(hd0D0LSCotherPM);
3428 flistLsCutsOther->Add(hd0D0VtxTrueLSCotherPM);
3429 flistLsCutsOther->Add(hMCd0D0LSCotherPM);
3430 flistLsCutsOther->Add(hd0D0LSCotherSB);
3431 flistLsCutsOther->Add(hd0D0VtxTrueLSCotherSB);
3432 flistLsCutsOther->Add(hMCd0D0LSCotherSB);
3433
e047b348 3434 TH1F *hd0D0ptLSCotherPM;
3435 TH1F *hMCd0D0ptLSCotherPM;
3436 TH1F *hd0D0VtxTrueptLSCotherPM;
3437 TH1F *hd0D0ptLSCotherSB;
3438 TH1F *hMCd0D0ptLSCotherSB;
3439 TH1F *hd0D0VtxTrueptLSCotherSB;
ac4c229c 3440 namehist="hd0D0ptLSCother_";
624c07ab 3441 titlehist="D^{0} impact par. plot, Loose Cuts, Other, ";
3442 for(Int_t i=0;i<fnbins;i++){
3443 strnamept=namehist;
3444 strnamept.Append("PkMss_pt");
3445 strnamept+=i;
3446
3447 strtitlept=titlehist;
3448 strtitlept.Append(" Mass Peak, ");
3449 strtitlept+=fptbins[i];
3450 strtitlept.Append("<= pt <");
3451 strtitlept+=fptbins[i+1];
3452 strtitlept.Append(" [GeV/c]");
3453
e047b348 3454 hd0D0ptLSCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3455 hd0D0ptLSCotherPM->SetXTitle("Impact parameter [#mum] ");
3456 hd0D0ptLSCotherPM->SetYTitle("Entries");
3457 flistLsCutsOther->Add(hd0D0ptLSCotherPM);
624c07ab 3458
3459 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3460 hMCd0D0ptLSCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3461 hMCd0D0ptLSCotherPM->SetXTitle("MC Impact parameter [#mum] ");
3462 hMCd0D0ptLSCotherPM->SetYTitle("Entries");
3463 flistLsCutsOther->Add(hMCd0D0ptLSCotherPM);
624c07ab 3464
3465
3466 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3467 hd0D0VtxTrueptLSCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3468 hd0D0VtxTrueptLSCotherPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3469 hd0D0VtxTrueptLSCotherPM->SetYTitle("Entries");
3470 flistLsCutsOther->Add(hd0D0VtxTrueptLSCotherPM);
624c07ab 3471
3472 strnamept=namehist;
3473 strnamept.Append("SBMss_pt");
3474 strnamept+=i;
3475
3476 strtitlept=titlehist;
3477 strtitlept.Append(" Side Bands, ");
3478 strtitlept+=fptbins[i];
3479 strtitlept.Append("<= pt <");
3480 strtitlept+=fptbins[i+1];
3481 strtitlept.Append(" [GeV/c]");
3482
e047b348 3483 hd0D0ptLSCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3484 hd0D0ptLSCotherSB->SetXTitle("Impact parameter [#mum] ");
3485 hd0D0ptLSCotherSB->SetYTitle("Entries");
3486 flistLsCutsOther->Add(hd0D0ptLSCotherSB);
624c07ab 3487
3488 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3489 hMCd0D0ptLSCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3490 hMCd0D0ptLSCotherSB->SetXTitle("MC Impact parameter [#mum] ");
3491 hMCd0D0ptLSCotherSB->SetYTitle("Entries");
3492 flistLsCutsOther->Add(hMCd0D0ptLSCotherSB);
624c07ab 3493
3494 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3495 hd0D0VtxTrueptLSCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3496 hd0D0VtxTrueptLSCotherSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3497 hd0D0VtxTrueptLSCotherSB->SetYTitle("Entries");
3498 flistLsCutsOther->Add(hd0D0VtxTrueptLSCotherSB);
624c07ab 3499 }
3500
e047b348 3501 Printf("END OF NOCUTS HISTOS CREATION \n");
624c07ab 3502
3503
3504 //################################################################################################
3505 // #
3506 // HISTOS FOR TIGHT CUTS #
3507 // #
3508 //################################################################################################
3509
3510 //############ TIGHT CUTS SIGNAL HISTOGRAMS ###############
3511 //
3512 // ####### global properties histo ############
3513
e047b348 3514 TH2F *hCPtaVSd0d0TGHCsign=new TH2F("hCPtaVSd0d0TGHCsign","hCPtaVSd0d0_TightCuts_Signal",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 3515 TH1F *hSecVtxZTGHCsign=new TH1F("hSecVtxZTGHCsign","hSecVtxZ_TightCuts_Signal",1000,-8.,8.);
3516 TH1F *hSecVtxXTGHCsign=new TH1F("hSecVtxXTGHCsign","hSecVtxX_TightCuts_Signal",1000,-3000.,3000.);
3517 TH1F *hSecVtxYTGHCsign=new TH1F("hSecVtxYTGHCsign","hSecVtxY_TightCuts_Signal",1000,-3000.,3000.);
3518 TH2F *hSecVtxXYTGHCsign=new TH2F("hSecVtxXYTGHCsign","hSecVtxXY_TightCuts_Signal",1000,-3000.,3000.,1000,-3000.,3000.);
3519 TH1F *hSecVtxPhiTGHCsign=new TH1F("hSecVtxPhiTGHCsign","hSecVtxPhi_TightCuts_Signal",180,-180.1,180.1);
e047b348 3520 TH1F *hd0singlTrackTGHCsign=new TH1F("hd0singlTrackTGHCsign","hd0singlTrackTightCuts_Signal",1000,-5000.,5000.);
3521 TH1F *hCPtaTGHCsign=new TH1F("hCPtaTGHCsign","hCPta_TightCuts_Signal",100,-1.,1.);
ac4c229c 3522 TH1F *hd0xd0TGHCsign=new TH1F("hd0xd0TGHCsign","hd0xd0_TightCuts_Signal",1000,-100000.,100000.);
3523 TH1F *hMassTrueTGHCsign=new TH1F("hMassTrueTGHCsign","D^{0} MC inv. Mass Tight Cuts Signal(All momenta)",600,1.600,2.200);
3524 TH1F *hMassTGHCsign=new TH1F("hMassTGHCsign","D^{0} inv. Mass Tight Cuts Signal (All momenta)",600,1.600,2.200);
3525 hMassTGHCsign->Sumw2();
3526 TH1F *hMassTrueTGHCsignPM=new TH1F("hMassTrueTGHCsignPM","D^{0} MC inv. Mass Tight Cuts Signal, Mass Peak. (All momenta)",600,1.600,2.200);
3527 TH1F *hMassTGHCsignPM=new TH1F("hMassTGHCsignPM","D^{0} inv. Mass Tight Cuts Signal (All momenta), MassPeak",600,1.600,2.200);
3528 hMassTGHCsignPM->Sumw2();
3529 TH1F *hMassTrueTGHCsignSB=new TH1F("hMassTrueTGHCsignSB","D^{0} MC inv. Mass in Side Bands Tight Cuts Signal(All momenta)",600,1.600,2.200);
3530 TH1F *hMassTGHCsignSB=new TH1F("hMassTGHCsignSB","D^{0} inv. Mass in Side Bands Tight Cuts Signal (All momenta)",600,1.600,2.200);
3531 hMassTGHCsignSB->Sumw2();
3532
3533 flistTghCutsSignal->Add(hCPtaVSd0d0TGHCsign);
3534 flistTghCutsSignal->Add(hSecVtxZTGHCsign);
3535 flistTghCutsSignal->Add(hSecVtxYTGHCsign);
3536 flistTghCutsSignal->Add(hSecVtxXTGHCsign);
3537 flistTghCutsSignal->Add(hSecVtxXYTGHCsign);
3538 flistTghCutsSignal->Add(hSecVtxPhiTGHCsign);
e047b348 3539 flistTghCutsSignal->Add(hd0singlTrackTGHCsign);
ac4c229c 3540 flistTghCutsSignal->Add(hCPtaTGHCsign);
3541 flistTghCutsSignal->Add(hd0xd0TGHCsign);
3542 flistTghCutsSignal->Add(hMassTrueTGHCsign);
3543 flistTghCutsSignal->Add(hMassTGHCsign);
3544 flistTghCutsSignal->Add(hMassTrueTGHCsignPM);
3545 flistTghCutsSignal->Add(hMassTGHCsignPM);
3546 flistTghCutsSignal->Add(hMassTrueTGHCsignSB);
3547 flistTghCutsSignal->Add(hMassTGHCsignSB);
624c07ab 3548
e047b348 3549
3550
3551
3552
3553
3554 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
3555 TH1F *hdcaTGHCsign=new TH1F("hdcaTGHCsign","hdca_TightCuts_Signal",100,0.,1000.);
3556 hdcaTGHCsign->SetXTitle("dca [#mum]");
3557 hdcaTGHCsign->SetYTitle("Entries");
3558 TH1F *hcosthetastarTGHCsign=new TH1F("hcosthetastarTGHCsign","hCosThetaStar_TightCuts_Signal",50,-1.,1.);
3559 hcosthetastarTGHCsign->SetXTitle("cos #theta^{*}");
3560 hcosthetastarTGHCsign->SetYTitle("Entries");
3561 TH1F *hptD0TGHCsign=new TH1F("hptD0TGHCsign","D^{0} transverse momentum distribution",34,ptbinsD0arr);
3562 hptD0TGHCsign->SetXTitle("p_{t} [GeV/c]");
3563 hptD0TGHCsign->SetYTitle("Entries");
3564 TH1F *hptD0VsMaxPtTGHCsign=new TH1F("hptD0VsMaxPtTGHCsign","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
3565 TH2F *hptD0PTallsqrtTGHCsign=new TH2F("hptD0PTallsqrtTGHCsign","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
3566 TH2F *hptD0PTallTGHCsign=new TH2F("hptD0PTallTGHCsign","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
3567 TH2F *hptD0vsptBTGHCsign=new TH2F("hptD0vsptBTGHCsign","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3568 TH2F *hpD0vspBTGHCsign=new TH2F("hpD0vspBTGHCsign","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3569 TH2F *hptD0vsptcquarkTGHCsign=new TH2F("hptD0vsptcquarkTGHCsign","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3570 TH2F *hpD0vspcquarkTGHCsign=new TH2F("hpD0vspcquarkTGHCsign","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3571 flistTghCutsSignal->Add(hdcaTGHCsign);
3572 flistTghCutsSignal->Add(hcosthetastarTGHCsign);
3573 flistTghCutsSignal->Add(hptD0TGHCsign);
3574 flistTghCutsSignal->Add(hptD0VsMaxPtTGHCsign);
3575 flistTghCutsSignal->Add(hptD0PTallsqrtTGHCsign);
3576 flistTghCutsSignal->Add(hptD0PTallTGHCsign);
3577 flistTghCutsSignal->Add(hptD0vsptBTGHCsign);
3578 flistTghCutsSignal->Add(hpD0vspBTGHCsign);
3579 flistTghCutsSignal->Add(hptD0vsptcquarkTGHCsign);
3580 flistTghCutsSignal->Add(hpD0vspcquarkTGHCsign);
3581
3582 TH1F *hd0zD0ptTGHCsign;
cc3209fb 3583 TH1F *hInvMassD0TGHCsign,*hInvMassD0barTGHCsign;
e047b348 3584 TH2F *hInvMassPtTGHCsign=new TH2F("hInvMassPtTGHCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
3585 TH1F *hetaTGHCsign;
3586 TH1F *hCosPDPBTGHCsign;
3587 TH1F *hCosPcPDTGHCsign;
3588 flistTghCutsSignal->Add(hInvMassPtTGHCsign);
3589// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3590 TH2F *hd0D0VSd0xd0TGHCsignpt;
3591 TH2F *hangletracksVSd0xd0TGHCsignpt;
3592 TH2F *hangletracksVSd0D0TGHCsignpt;
3593 TH1F *hd0xd0TGHCsignpt;
3594
3595 TH2F *hTOFpidTGHCsign=new TH2F("hTOFpidTGHCsign","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
3596 flistTghCutsSignal->Add(hTOFpidTGHCsign);
3597
3598 for(Int_t i=0;i<fnbins;i++){
3599 Printf("INSIDE FIRST LOOP FOR TIGHT CUTS HISTO CREATION %d\n", fnbins);
3600 namehist="hd0zD0ptTGHCsign_pt";
3601 namehist+=i;
3602 titlehist="d0(z) Tight Cuts Signal ptbin=";
3603 titlehist+=i;
3604 hd0zD0ptTGHCsign=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
3605 hd0zD0ptTGHCsign->SetXTitle("d_{0}(z) [#mum]");
3606 hd0zD0ptTGHCsign->SetYTitle("Entries");
3607 flistTghCutsSignal->Add(hd0zD0ptTGHCsign);
3608
cc3209fb 3609 namehist="hInvMassD0TGHCsign_pt";
e047b348 3610 namehist+=i;
3611 titlehist="Invariant Mass Tight Cuts Signal ptbin=";
3612 titlehist+=i;
cc3209fb 3613 hInvMassD0TGHCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3614 hInvMassD0TGHCsign->SetXTitle("Invariant Mass [GeV]");
3615 hInvMassD0TGHCsign->SetYTitle("Entries");
3616 flistTghCutsSignal->Add(hInvMassD0TGHCsign);
3617
3618 namehist="hInvMassD0barTGHCsign_pt";
3619 namehist+=i;
3620 titlehist="Invariant Mass D0bar No Cuts Signal ptbin=";
3621 titlehist+=i;
3622 hInvMassD0barTGHCsign=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3623 hInvMassD0barTGHCsign->SetXTitle("Invariant Mass [GeV]");
3624 hInvMassD0barTGHCsign->SetYTitle("Entries");
3625 flistTghCutsSignal->Add(hInvMassD0barTGHCsign);
3626
e047b348 3627
3628 namehist="hetaTGHCsign_pt";
3629 namehist+=i;
3630 titlehist="eta Tight Cuts Signal ptbin=";
3631 titlehist+=i;
3632 hetaTGHCsign=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
3633 hetaTGHCsign->SetXTitle("Pseudorapidity");
3634 hetaTGHCsign->SetYTitle("Entries");
3635 flistTghCutsSignal->Add(hetaTGHCsign);
3636
3637 namehist="hCosPDPBTGHCsign_pt";
3638 namehist+=i;
3639 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
3640 titlehist+=i;
3641 hCosPDPBTGHCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3642 hCosPDPBTGHCsign->SetXTitle("Cosine between D0 momentum and B momentum");
3643 hCosPDPBTGHCsign->SetYTitle("Entries");
3644 flistTghCutsSignal->Add(hCosPDPBTGHCsign);
3645
3646 namehist="hCosPcPDTGHCsign_pt";
3647 namehist+=i;
3648 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
3649 titlehist+=i;
3650 hCosPcPDTGHCsign=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3651 hCosPcPDTGHCsign->SetXTitle("Cosine between c quark momentum and D0 momentum");
3652 hCosPcPDTGHCsign->SetYTitle("Entries");
3653 flistTghCutsSignal->Add(hCosPcPDTGHCsign);
3654
3655 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3656 namehist="hd0xd0TGHCsign_pt";
3657 namehist+=i;
3658 titlehist="d0xd0 Tight Cuts Signal ptbin=";
3659 titlehist+=i;
3660 hd0xd0TGHCsignpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
3661 hd0xd0TGHCsignpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
3662 hd0xd0TGHCsignpt->SetYTitle("Entries");
3663 flistTghCutsSignal->Add(hd0xd0TGHCsignpt);
3664
3665
3666 namehist="hd0D0VSd0xd0TGHCsign_pt";
3667 namehist+=i;
3668 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Signal ptbin=";
3669 titlehist+=i;
3670 hd0D0VSd0xd0TGHCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
3671 hd0D0VSd0xd0TGHCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3672 hd0D0VSd0xd0TGHCsignpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
3673 flistTghCutsSignal->Add(hd0D0VSd0xd0TGHCsignpt);
3674
3675
3676 namehist="hangletracksVSd0xd0TGHCsign_pt";
3677 namehist+=i;
3678 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Signal ptbin=";
3679 titlehist+=i;
3680 hangletracksVSd0xd0TGHCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
3681 hangletracksVSd0xd0TGHCsignpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3682 hangletracksVSd0xd0TGHCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
3683 flistTghCutsSignal->Add(hangletracksVSd0xd0TGHCsignpt);
3684
3685
3686 namehist="hangletracksVSd0D0TGHCsign_pt";
3687 namehist+=i;
3688 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Tight Cuts Signal ptbin=";
3689 titlehist+=i;
3690 hangletracksVSd0D0TGHCsignpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
3691 hangletracksVSd0D0TGHCsignpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
3692 hangletracksVSd0D0TGHCsignpt->SetYTitle(" angle between K and #p tracks [rad]");
3693 flistTghCutsSignal->Add(hangletracksVSd0D0TGHCsignpt);
3694
3695 }
3696 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
3697 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3698
3699
3700
3701
3702
3703
3704
3705
624c07ab 3706 // ####### d0 D0 histos ############
ac4c229c 3707 TH1F *hd0D0TGHCsignPM = new TH1F("hd0D0TGHCsignPM","D^{0} impact par. plot , Tight Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3708 hd0D0TGHCsignPM->SetXTitle("Impact parameter [#mum]");
3709 hd0D0TGHCsignPM->SetYTitle("Entries");
3710
3711 TH1F *hd0D0VtxTrueTGHCsignPM = new TH1F("hd0D0VtxTrueTGHCsignPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3712 hd0D0VtxTrueTGHCsignPM->SetXTitle("Impact parameter [#mum]");
3713 hd0D0VtxTrueTGHCsignPM->SetYTitle("Entries");
3714
3715 TH1F *hMCd0D0TGHCsignPM = new TH1F("hMCd0D0TGHCsignPM","D^{0} impact par. plot, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3716 hMCd0D0TGHCsignPM->SetXTitle("MC Impact parameter [#mum]");
3717 hMCd0D0TGHCsignPM->SetYTitle("Entries");
3718
3719 TH1F *hd0D0TGHCsignSB = new TH1F("hd0D0TGHCsignSB","D^{0} impact par. plot , Tight Cuts ,Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3720 hd0D0TGHCsignSB->SetXTitle("Impact parameter [#mum]");
3721 hd0D0TGHCsignSB->SetYTitle("Entries");
3722
3723 TH1F *hd0D0VtxTrueTGHCsignSB = new TH1F("hd0D0VtxTrueTGHCsignSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3724 hd0D0VtxTrueTGHCsignSB->SetXTitle("Impact parameter [#mum]");
3725 hd0D0VtxTrueTGHCsignSB->SetYTitle("Entries");
3726
3727 TH1F *hMCd0D0TGHCsignSB = new TH1F("hMCd0D0TGHCsignSB","D^{0} impact par. plot, Tight Cuts, Signal,Mass Peak (All momenta)",1000,-1000.,1000.);
3728 hMCd0D0TGHCsignSB->SetXTitle("MC Impact parameter [#mum]");
3729 hMCd0D0TGHCsignSB->SetYTitle("Entries");
3730
3731 flistTghCutsSignal->Add(hd0D0TGHCsignPM);
3732 flistTghCutsSignal->Add(hd0D0VtxTrueTGHCsignPM);
3733 flistTghCutsSignal->Add(hMCd0D0TGHCsignPM);
3734 flistTghCutsSignal->Add(hd0D0TGHCsignSB);
3735 flistTghCutsSignal->Add(hd0D0VtxTrueTGHCsignSB);
3736 flistTghCutsSignal->Add(hMCd0D0TGHCsignSB);
3737
e047b348 3738 TH1F *hd0D0ptTGHCsignPM;
3739 TH1F *hMCd0D0ptTGHCsignPM;
3740 TH1F *hd0D0VtxTrueptTGHCsignPM;
3741 TH1F *hd0D0ptTGHCsignSB;
3742 TH1F *hMCd0D0ptTGHCsignSB;
3743 TH1F *hd0D0VtxTrueptTGHCsignSB;
ac4c229c 3744 namehist="hd0D0ptTGHCsign_";
624c07ab 3745 titlehist="D^{0} impact par. plot, Tight Cuts, Signal, ";
3746 for(Int_t i=0;i<fnbins;i++){
3747 strnamept=namehist;
3748 strnamept.Append("PkMss_pt");
3749 strnamept+=i;
3750
3751 strtitlept=titlehist;
3752 strtitlept.Append(" Mass Peak, ");
3753 strtitlept+=fptbins[i];
3754 strtitlept.Append("<= pt <");
3755 strtitlept+=fptbins[i+1];
3756 strtitlept.Append(" [GeV/c]");
3757
e047b348 3758 hd0D0ptTGHCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3759 hd0D0ptTGHCsignPM->SetXTitle("Impact parameter [#mum] ");
3760 hd0D0ptTGHCsignPM->SetYTitle("Entries");
3761 flistTghCutsSignal->Add(hd0D0ptTGHCsignPM);
624c07ab 3762
3763 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3764 hMCd0D0ptTGHCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3765 hMCd0D0ptTGHCsignPM->SetXTitle("MC Impact parameter [#mum] ");
3766 hMCd0D0ptTGHCsignPM->SetYTitle("Entries");
3767 flistTghCutsSignal->Add(hMCd0D0ptTGHCsignPM);
624c07ab 3768
3769
3770 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3771 hd0D0VtxTrueptTGHCsignPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3772 hd0D0VtxTrueptTGHCsignPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3773 hd0D0VtxTrueptTGHCsignPM->SetYTitle("Entries");
3774 flistTghCutsSignal->Add(hd0D0VtxTrueptTGHCsignPM);
624c07ab 3775
3776 strnamept=namehist;
3777 strnamept.Append("SBMss_pt");
3778 strnamept+=i;
3779
3780 strtitlept=titlehist;
3781 strtitlept.Append(" Side Bands, ");
3782 strtitlept+=fptbins[i];
3783 strtitlept.Append("<= pt <");
3784 strtitlept+=fptbins[i+1];
3785 strtitlept.Append(" [GeV/c]");
3786
e047b348 3787 hd0D0ptTGHCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3788 hd0D0ptTGHCsignSB->SetXTitle("Impact parameter [#mum] ");
3789 hd0D0ptTGHCsignSB->SetYTitle("Entries");
3790 flistTghCutsSignal->Add(hd0D0ptTGHCsignSB);
624c07ab 3791
3792 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 3793 hMCd0D0ptTGHCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3794 hMCd0D0ptTGHCsignSB->SetXTitle("MC Impact parameter [#mum] ");
3795 hMCd0D0ptTGHCsignSB->SetYTitle("Entries");
3796 flistTghCutsSignal->Add(hMCd0D0ptTGHCsignSB);
624c07ab 3797
3798 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 3799 hd0D0VtxTrueptTGHCsignSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
3800 hd0D0VtxTrueptTGHCsignSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
3801 hd0D0VtxTrueptTGHCsignSB->SetYTitle("Entries");
3802 flistTghCutsSignal->Add(hd0D0VtxTrueptTGHCsignSB);
624c07ab 3803 }
3804
3805
3806 //############ TIGHT CUTS BACKGROUND HISTOGRAMS ###########
3807 //
3808 // ######## global properties histos #######
e047b348 3809 TH2F *hCPtaVSd0d0TGHCback=new TH2F("hCPtaVSd0d0TGHCback","hCPtaVSd0d0_TightCuts_Background",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 3810 TH1F *hSecVtxZTGHCback=new TH1F("hSecVtxZTGHCback","hSecVtxZ_TightCuts_Background",1000,-8.,8.);
3811 TH1F *hSecVtxXTGHCback=new TH1F("hSecVtxXTGHCback","hSecVtxX_TightCuts_Background",1000,-3000.,3000.);
3812 TH1F *hSecVtxYTGHCback=new TH1F("hSecVtxYTGHCback","hSecVtxY_TightCuts_Background",1000,-3000.,3000.);
3813 TH2F *hSecVtxXYTGHCback=new TH2F("hSecVtxXYTGHCback","hSecVtxXY_TightCuts_Background",1000,-3000.,3000.,1000,-3000.,3000.);
3814 TH1F *hSecVtxPhiTGHCback=new TH1F("hSecVtxPhiTGHCback","hSecVtxPhi_TightCuts_Background",180,-180.1,180.1);
e047b348 3815 TH1F *hd0singlTrackTGHCback=new TH1F("hd0singlTrackTGHCback","hd0singlTrackTightCuts_Back",1000,-5000.,5000.);
3816 TH1F *hCPtaTGHCback=new TH1F("hCPtaTGHCback","hCPta_TightCuts_Background",100,-1.,1.);
ac4c229c 3817 TH1F *hd0xd0TGHCback=new TH1F("hd0xd0TGHCback","hd0xd0_TightCuts_Background",1000,-100000.,100000.);
3818 TH1F *hMassTrueTGHCback=new TH1F("hMassTrueTGHCback","D^{0} MC inv. Mass Tight Cuts Background(All momenta)",600,1.600,2.200);
3819 TH1F *hMassTGHCback=new TH1F("hMassTGHCback","D^{0} inv. Mass Tight Cuts Background (All momenta)",600,1.600,2.200);
3820 hMassTGHCback->Sumw2();
3821 TH1F *hMassTrueTGHCbackPM=new TH1F("hMassTrueTGHCbackPM","D^{0} MC inv. Mass Tight Cuts Background, Mass Peak. (All momenta)",600,1.600,2.200);
3822 TH1F *hMassTGHCbackPM=new TH1F("hMassTGHCbackPM","D^{0} inv. Mass Tight Cuts Background (All momenta), MassPeak",600,1.600,2.200);
3823 hMassTGHCbackPM->Sumw2();
3824 TH1F *hMassTrueTGHCbackSB=new TH1F("hMassTrueTGHCbackSB","D^{0} MC inv. Mass in Side Bands Tight Cuts Backgrround(All momenta)",600,1.600,2.200);
3825 TH1F *hMassTGHCbackSB=new TH1F("hMassTGHCbackSB","D^{0} inv. Mass in Side Bands Tight Cuts Background (All momenta)",600,1.600,2.200);
3826 hMassTGHCbackSB->Sumw2();
3827
3828 flistTghCutsBack->Add(hCPtaVSd0d0TGHCback);
3829 flistTghCutsBack->Add(hSecVtxZTGHCback);
3830 flistTghCutsBack->Add(hSecVtxYTGHCback);
3831 flistTghCutsBack->Add(hSecVtxXTGHCback);
3832 flistTghCutsBack->Add(hSecVtxXYTGHCback);
3833 flistTghCutsBack->Add(hSecVtxPhiTGHCback);
e047b348 3834 flistTghCutsBack->Add(hd0singlTrackTGHCback);
ac4c229c 3835 flistTghCutsBack->Add(hCPtaTGHCback);
3836 flistTghCutsBack->Add(hd0xd0TGHCback);
3837 flistTghCutsBack->Add(hMassTrueTGHCback);
3838 flistTghCutsBack->Add(hMassTGHCback);
3839 flistTghCutsBack->Add(hMassTrueTGHCbackPM);
3840 flistTghCutsBack->Add(hMassTGHCbackPM);
3841 flistTghCutsBack->Add(hMassTrueTGHCbackSB);
3842 flistTghCutsBack->Add(hMassTGHCbackSB);
624c07ab 3843
3844
e047b348 3845
3846
3847
3848
3849
3850 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
3851 TH1F *hdcaTGHCback=new TH1F("hdcaTGHCback","hdca_TightCuts_Backgr",100,0.,1000.);
3852 hdcaTGHCback->SetXTitle("dca [#mum]");
3853 hdcaTGHCback->SetYTitle("Entries");
3854 TH1F *hcosthetastarTGHCback=new TH1F("hcosthetastarTGHCback","hCosThetaStar_TightCuts_Backgr",50,-1.,1.);
3855 hcosthetastarTGHCback->SetXTitle("cos #theta^{*}");
3856 hcosthetastarTGHCback->SetYTitle("Entries");
3857 TH1F *hptD0TGHCback=new TH1F("hptD0TGHCback","D^{0} transverse momentum distribution",34,ptbinsD0arr);
3858 hptD0TGHCback->SetXTitle("p_{t} [GeV/c]");
3859 hptD0TGHCback->SetYTitle("Entries");
3860 TH1F *hptD0VsMaxPtTGHCback=new TH1F("hptD0VsMaxPtTGHCback","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
3861 TH2F *hptD0PTallsqrtTGHCback=new TH2F("hptD0PTallsqrtTGHCback","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
3862 TH2F *hptD0PTallTGHCback=new TH2F("hptD0PTallTGHCback","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
3863 TH2F *hptD0vsptBTGHCback=new TH2F("hptD0vsptBTGHCback","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3864 TH2F *hpD0vspBTGHCback=new TH2F("hpD0vspBTGHCback","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3865 TH2F *hptD0vsptcquarkTGHCback=new TH2F("hptD0vsptcquarkTGHCback","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3866 TH2F *hpD0vspcquarkTGHCback=new TH2F("hpD0vspcquarkTGHCback","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
3867 flistTghCutsBack->Add(hdcaTGHCback);
3868 flistTghCutsBack->Add(hcosthetastarTGHCback);
3869 flistTghCutsBack->Add(hptD0TGHCback);
3870 flistTghCutsBack->Add(hptD0VsMaxPtTGHCback);
3871 flistTghCutsBack->Add(hptD0PTallsqrtTGHCback);
3872 flistTghCutsBack->Add(hptD0PTallTGHCback);
3873 flistTghCutsBack->Add(hptD0vsptBTGHCback);
3874 flistTghCutsBack->Add(hpD0vspBTGHCback);
3875 flistTghCutsBack->Add(hptD0vsptcquarkTGHCback);
3876 flistTghCutsBack->Add(hpD0vspcquarkTGHCback);
3877
3878 TH1F *hd0zD0ptTGHCback;
cc3209fb 3879 TH1F *hInvMassD0TGHCback,*hInvMassD0barTGHCback;
e047b348 3880 TH2F *hInvMassPtTGHCback=new TH2F("hInvMassPtTGHCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
3881 TH1F *hetaTGHCback;
3882 TH1F *hCosPDPBTGHCback;
3883 TH1F *hCosPcPDTGHCback;
3884 flistTghCutsBack->Add(hInvMassPtTGHCback);
3885// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3886 TH2F *hd0D0VSd0xd0TGHCbackpt;
3887 TH2F *hangletracksVSd0xd0TGHCbackpt;
3888 TH2F *hangletracksVSd0D0TGHCbackpt;
3889 TH1F *hd0xd0TGHCbackpt;
3890
3891 TH2F *hTOFpidTGHCback=new TH2F("hTOFpidTGHCback","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
3892 flistTghCutsBack->Add(hTOFpidTGHCback);
3893
3894
3895 for(Int_t i=0;i<fnbins;i++){
3896 namehist="hd0zD0ptTGHCback_pt";
3897 namehist+=i;
3898 titlehist="d0(z) Tight Cuts Backgrm ptbin=";
3899 titlehist+=i;
3900 hd0zD0ptTGHCback=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
3901 hd0zD0ptTGHCback->SetXTitle("d_{0}(z) [#mum]");
3902 hd0zD0ptTGHCback->SetYTitle("Entries");
3903 flistTghCutsBack->Add(hd0zD0ptTGHCback);
3904
cc3209fb 3905 namehist="hInvMassD0TGHCback_pt";
e047b348 3906 namehist+=i;
3907 titlehist="Invariant Mass Tight Cuts Backgr ptbin=";
3908 titlehist+=i;
cc3209fb 3909 hInvMassD0TGHCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3910 hInvMassD0TGHCback->SetXTitle("Invariant Mass [GeV]");
3911 hInvMassD0TGHCback->SetYTitle("Entries");
3912 flistTghCutsBack->Add(hInvMassD0TGHCback);
3913
3914 namehist="hInvMassD0barTGHCback_pt";
3915 namehist+=i;
3916 titlehist="Invariant Mass D0bar No Cuts Back ptbin=";
3917 titlehist+=i;
3918 hInvMassD0barTGHCback=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
3919 hInvMassD0barTGHCback->SetXTitle("Invariant Mass [GeV]");
3920 hInvMassD0barTGHCback->SetYTitle("Entries");
3921 flistTghCutsBack->Add(hInvMassD0barTGHCback);
e047b348 3922
3923 namehist="hetaTGHCback_pt";
3924 namehist+=i;
3925 titlehist="eta Tight Cuts Backgr ptbin=";
3926 titlehist+=i;
3927 hetaTGHCback=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
3928 hetaTGHCback->SetXTitle("Pseudorapidity");
3929 hetaTGHCback->SetYTitle("Entries");
3930 flistTghCutsBack->Add(hetaTGHCback);
3931
3932 namehist="hCosPDPBTGHCback_pt";
3933 namehist+=i;
3934 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
3935 titlehist+=i;
3936 hCosPDPBTGHCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3937 hCosPDPBTGHCback->SetXTitle("Cosine between D0 momentum and B momentum");
3938 hCosPDPBTGHCback->SetYTitle("Entries");
3939 flistTghCutsBack->Add(hCosPDPBTGHCback);
3940
3941 namehist="hCosPcPDTGHCback_pt";
3942 namehist+=i;
3943 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
3944 titlehist+=i;
3945 hCosPcPDTGHCback=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
3946 hCosPcPDTGHCback->SetXTitle("Cosine between c quark momentum and D0 momentum");
3947 hCosPcPDTGHCback->SetYTitle("Entries");
3948 flistTghCutsBack->Add(hCosPcPDTGHCback);
3949
3950 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
3951 namehist="hd0xd0TGHCback_pt";
3952 namehist+=i;
3953 titlehist="d0xd0 Tight Cuts Back ptbin=";
3954 titlehist+=i;
3955 hd0xd0TGHCbackpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
3956 hd0xd0TGHCbackpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
3957 hd0xd0TGHCbackpt->SetYTitle("Entries");
3958 flistTghCutsBack->Add(hd0xd0TGHCbackpt);
3959
3960
3961 namehist="hd0D0VSd0xd0TGHCback_pt";
3962 namehist+=i;
3963 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Back ptbin=";
3964 titlehist+=i;
3965 hd0D0VSd0xd0TGHCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
3966 hd0D0VSd0xd0TGHCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3967 hd0D0VSd0xd0TGHCbackpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
3968 flistTghCutsBack->Add(hd0D0VSd0xd0TGHCbackpt);
3969
3970
3971 namehist="hangletracksVSd0xd0TGHCback_pt";
3972 namehist+=i;
3973 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Back ptbin=";
3974 titlehist+=i;
3975 hangletracksVSd0xd0TGHCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
3976 hangletracksVSd0xd0TGHCbackpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
3977 hangletracksVSd0xd0TGHCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
3978 flistTghCutsBack->Add(hangletracksVSd0xd0TGHCbackpt);
3979
3980
3981 namehist="hangletracksVSd0D0TGHCback_pt";
3982 namehist+=i;
3983 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Tight Cuts Back ptbin=";
3984 titlehist+=i;
3985 hangletracksVSd0D0TGHCbackpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
3986 hangletracksVSd0D0TGHCbackpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
3987 hangletracksVSd0D0TGHCbackpt->SetYTitle(" angle between K and #p tracks [rad]");
3988 flistTghCutsBack->Add(hangletracksVSd0D0TGHCbackpt);
3989
3990
3991 }
3992 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
3993 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3994
3995
3996
3997
624c07ab 3998 // ####### d0 D0 histos ############
3999
ac4c229c 4000 TH1F *hd0D0TGHCbackPM = new TH1F("hd0D0TGHCbackPM","D^{0} impact par. plot , Tight Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4001 hd0D0TGHCbackPM->SetXTitle("Impact parameter [#mum]");
4002 hd0D0TGHCbackPM->SetYTitle("Entries");
4003
4004 TH1F *hd0D0VtxTrueTGHCbackPM = new TH1F("hd0D0VtxTrueTGHCbackPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4005 hd0D0VtxTrueTGHCbackPM->SetXTitle("Impact parameter [#mum]");
4006 hd0D0VtxTrueTGHCbackPM->SetYTitle("Entries");
4007
4008 TH1F *hMCd0D0TGHCbackPM = new TH1F("hMCd0D0TGHCbackPM","D^{0} impact par. plot, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4009 hMCd0D0TGHCbackPM->SetXTitle("MC Impact parameter [#mum]");
4010 hMCd0D0TGHCbackPM->SetYTitle("Entries");
4011
4012 TH1F *hd0D0TGHCbackSB = new TH1F("hd0D0TGHCbackSB","D^{0} impact par. plot , Tight Cuts ,Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4013 hd0D0TGHCbackSB->SetXTitle("Impact parameter [#mum]");
4014 hd0D0TGHCbackSB->SetYTitle("Entries");
4015
4016 TH1F *hd0D0VtxTrueTGHCbackSB = new TH1F("hd0D0VtxTrueTGHCbackSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4017 hd0D0VtxTrueTGHCbackSB->SetXTitle("Impact parameter [#mum]");
4018 hd0D0VtxTrueTGHCbackSB->SetYTitle("Entries");
4019
4020 TH1F *hMCd0D0TGHCbackSB = new TH1F("hMCd0D0TGHCbackSB","D^{0} impact par. plot, Tight Cuts, Background,Mass Peak (All momenta)",1000,-1000.,1000.);
4021 hMCd0D0TGHCbackSB->SetXTitle("MC Impact parameter [#mum]");
4022 hMCd0D0TGHCbackSB->SetYTitle("Entries");
4023
4024 flistTghCutsBack->Add(hd0D0TGHCbackPM);
4025 flistTghCutsBack->Add(hd0D0VtxTrueTGHCbackPM);
4026 flistTghCutsBack->Add(hMCd0D0TGHCbackPM);
4027 flistTghCutsBack->Add(hd0D0TGHCbackSB);
4028 flistTghCutsBack->Add(hd0D0VtxTrueTGHCbackSB);
4029 flistTghCutsBack->Add(hMCd0D0TGHCbackSB);
4030
e047b348 4031 TH1F *hd0D0ptTGHCbackPM;
4032 TH1F *hMCd0D0ptTGHCbackPM;
4033 TH1F *hd0D0VtxTrueptTGHCbackPM;
4034 TH1F *hd0D0ptTGHCbackSB;
4035 TH1F *hMCd0D0ptTGHCbackSB;
4036 TH1F *hd0D0VtxTrueptTGHCbackSB;
ac4c229c 4037 namehist="hd0D0ptTGHCback_";
624c07ab 4038 titlehist="D^{0} impact par. plot, Tight Cuts, Background, ";
4039 for(Int_t i=0;i<fnbins;i++){
4040 strnamept=namehist;
4041 strnamept.Append("PkMss_pt");
4042 strnamept+=i;
4043
4044 strtitlept=titlehist;
4045 strtitlept.Append(" Mass Peak, ");
4046 strtitlept+=fptbins[i];
4047 strtitlept.Append("<= pt <");
4048 strtitlept+=fptbins[i+1];
4049 strtitlept.Append(" [GeV/c]");
4050
e047b348 4051 hd0D0ptTGHCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4052 hd0D0ptTGHCbackPM->SetXTitle("Impact parameter [#mum] ");
4053 hd0D0ptTGHCbackPM->SetYTitle("Entries");
4054 flistTghCutsBack->Add(hd0D0ptTGHCbackPM);
624c07ab 4055
4056 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4057 hMCd0D0ptTGHCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4058 hMCd0D0ptTGHCbackPM->SetXTitle("MC Impact parameter [#mum] ");
4059 hMCd0D0ptTGHCbackPM->SetYTitle("Entries");
4060 flistTghCutsBack->Add(hMCd0D0ptTGHCbackPM);
624c07ab 4061
4062
4063 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4064 hd0D0VtxTrueptTGHCbackPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4065 hd0D0VtxTrueptTGHCbackPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4066 hd0D0VtxTrueptTGHCbackPM->SetYTitle("Entries");
4067 flistTghCutsBack->Add(hd0D0VtxTrueptTGHCbackPM);
624c07ab 4068
4069 strnamept=namehist;
4070 strnamept.Append("SBMss_pt");
4071 strnamept+=i;
4072
4073 strtitlept=titlehist;
4074 strtitlept.Append(" Side Bands, ");
4075 strtitlept+=fptbins[i];
4076 strtitlept.Append("<= pt <");
4077 strtitlept+=fptbins[i+1];
4078 strtitlept.Append(" [GeV/c]");
4079
e047b348 4080 hd0D0ptTGHCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4081 hd0D0ptTGHCbackSB->SetXTitle("Impact parameter [#mum] ");
4082 hd0D0ptTGHCbackSB->SetYTitle("Entries");
4083 flistTghCutsBack->Add(hd0D0ptTGHCbackSB);
624c07ab 4084
4085 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4086 hMCd0D0ptTGHCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4087 hMCd0D0ptTGHCbackSB->SetXTitle("MC Impact parameter [#mum] ");
4088 hMCd0D0ptTGHCbackSB->SetYTitle("Entries");
4089 flistTghCutsBack->Add(hMCd0D0ptTGHCbackSB);
624c07ab 4090
4091 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4092 hd0D0VtxTrueptTGHCbackSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4093 hd0D0VtxTrueptTGHCbackSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4094 hd0D0VtxTrueptTGHCbackSB->SetYTitle("Entries");
4095 flistTghCutsBack->Add(hd0D0VtxTrueptTGHCbackSB);
624c07ab 4096 }
4097
4098
4099
4100 //############ TIGHT CUTS FROMB HISTOGRAMS ###########
4101 //
4102 //####### global properties histos
4103
e047b348 4104 TH2F *hCPtaVSd0d0TGHCfromB=new TH2F("hCPtaVSd0d0TGHCfromB","hCPtaVSd0d0_TightCuts_FromB",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 4105 TH1F *hSecVtxZTGHCfromB=new TH1F("hSecVtxZTGHCfromB","hSecVtxZ_TightCuts_FromB",1000,-8.,8.);
4106 TH1F *hSecVtxXTGHCfromB=new TH1F("hSecVtxXTGHCfromB","hSecVtxX_TightCuts_FromB",1000,-3000.,3000.);
4107 TH1F *hSecVtxYTGHCfromB=new TH1F("hSecVtxYTGHCfromB","hSecVtxY_TightCuts_FromB",1000,-3000.,3000.);
4108 TH2F *hSecVtxXYTGHCfromB=new TH2F("hSecVtxXYTGHCfromB","hSecVtxXY_TightCuts_FromB",1000,-3000.,3000.,1000,-3000.,3000.);
4109 TH1F *hSecVtxPhiTGHCfromB=new TH1F("hSecVtxPhiTGHCfromB","hSecVtxPhi_TightCuts_FromB",180,-180.1,180.1);
e047b348 4110 TH1F *hd0singlTrackTGHCfromB=new TH1F("hd0singlTrackTGHCfromB","hd0singlTrackTightCuts_FromB",1000,-5000.,5000.);
4111 TH1F *hCPtaTGHCfromB=new TH1F("hCPtaTGHCfromB","hCPta_TightCuts_FromB",100,-1.,1.);
ac4c229c 4112 TH1F *hd0xd0TGHCfromB=new TH1F("hd0xd0TGHCfromB","hd0xd0_TightCuts_FromB",1000,-100000.,100000.);
4113 TH1F *hMassTrueTGHCfromB=new TH1F("hMassTrueTGHCfromB","D^{0} MC inv. Mass Tight Cuts FromB(All momenta)",600,1.600,2.200);
4114 TH1F *hMassTGHCfromB=new TH1F("hMassTGHCfromB","D^{0} inv. Mass Tight Cuts FromB (All momenta)",600,1.600,2.200);
4115 hMassTGHCfromB->Sumw2();
4116 TH1F *hMassTrueTGHCfromBPM=new TH1F("hMassTrueTGHCfromBPM","D^{0} MC inv. Mass Tight Cuts FromB, Mass Peak. (All momenta)",600,1.600,2.200);
4117 TH1F *hMassTGHCfromBPM=new TH1F("hMassTGHCfromBPM","D^{0} inv. Mass Tight Cuts FromB (All momenta), MassPeak",600,1.600,2.200);
4118 hMassTGHCfromBPM->Sumw2();
4119 TH1F *hMassTrueTGHCfromBSB=new TH1F("hMassTrueTGHCfromBSB","D^{0} MC inv. Mass in Side Bands Tight Cuts FromB(All momenta)",600,1.600,2.200);
4120 TH1F *hMassTGHCfromBSB=new TH1F("hMassTGHCfromBSB","D^{0} inv. Mass in Side Bands Tight Cuts FromB (All momenta)",600,1.600,2.200);
4121 hMassTGHCfromBSB->Sumw2();
4122
4123 flistTghCutsFromB->Add(hCPtaVSd0d0TGHCfromB);
4124 flistTghCutsFromB->Add(hSecVtxZTGHCfromB);
4125 flistTghCutsFromB->Add(hSecVtxYTGHCfromB);
4126 flistTghCutsFromB->Add(hSecVtxXTGHCfromB);
4127 flistTghCutsFromB->Add(hSecVtxXYTGHCfromB);
4128 flistTghCutsFromB->Add(hSecVtxPhiTGHCfromB);
e047b348 4129 flistTghCutsFromB->Add(hd0singlTrackTGHCfromB);
ac4c229c 4130 flistTghCutsFromB->Add(hCPtaTGHCfromB);
4131 flistTghCutsFromB->Add(hd0xd0TGHCfromB);
4132 flistTghCutsFromB->Add(hMassTrueTGHCfromB);
4133 flistTghCutsFromB->Add(hMassTGHCfromB);
4134 flistTghCutsFromB->Add(hMassTrueTGHCfromBPM);
4135 flistTghCutsFromB->Add(hMassTGHCfromBPM);
4136 flistTghCutsFromB->Add(hMassTrueTGHCfromBSB);
4137 flistTghCutsFromB->Add(hMassTGHCfromBSB);
624c07ab 4138
ac4c229c 4139
ac4c229c 4140
e047b348 4141 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
4142 TH1F *hdcaTGHCfromB=new TH1F("hdcaTGHCfromB","hdca_TightCuts_FromB",100,0.,1000.);
4143 hdcaTGHCfromB->SetXTitle("dca [#mum]");
4144 hdcaTGHCfromB->SetYTitle("Entries");
4145 TH1F *hcosthetastarTGHCfromB=new TH1F("hcosthetastarTGHCfromB","hCosThetaStar_TightCuts_FromB",50,-1.,1.);
4146 hcosthetastarTGHCfromB->SetXTitle("cos #theta^{*}");
4147 hcosthetastarTGHCfromB->SetYTitle("Entries");
4148 TH1F *hptD0TGHCfromB=new TH1F("hptD0TGHCfromB","D^{0} transverse momentum distribution",34,ptbinsD0arr);
4149 hptD0TGHCfromB->SetXTitle("p_{t} [GeV/c]");
4150 hptD0TGHCfromB->SetYTitle("Entries");
4151 TH1F *hptD0VsMaxPtTGHCfromB=new TH1F("hptD0VsMaxPtTGHCfromB","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
4152 TH2F *hptD0PTallsqrtTGHCfromB=new TH2F("hptD0PTallsqrtTGHCfromB","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
4153 TH2F *hptD0PTallTGHCfromB=new TH2F("hptD0PTallTGHCfromB","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
4154 TH2F *hptD0vsptBTGHCfromB=new TH2F("hptD0vsptBTGHCfromB","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4155 TH2F *hpD0vspBTGHCfromB=new TH2F("hpD0vspBTGHCfromB","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4156 TH2F *hptD0vsptcquarkTGHCfromB=new TH2F("hptD0vsptcquarkTGHCfromB","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4157 TH2F *hpD0vspcquarkTGHCfromB=new TH2F("hpD0vspcquarkTGHCfromB","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4158 flistTghCutsFromB->Add(hdcaTGHCfromB);
4159 flistTghCutsFromB->Add(hcosthetastarTGHCfromB);
4160 flistTghCutsFromB->Add(hptD0TGHCfromB);
4161 flistTghCutsFromB->Add(hptD0VsMaxPtTGHCfromB);
4162 flistTghCutsFromB->Add(hptD0PTallsqrtTGHCfromB);
4163 flistTghCutsFromB->Add(hptD0PTallTGHCfromB);
4164 flistTghCutsFromB->Add(hptD0vsptBTGHCfromB);
4165 flistTghCutsFromB->Add(hpD0vspBTGHCfromB);
4166 flistTghCutsFromB->Add(hptD0vsptcquarkTGHCfromB);
4167 flistTghCutsFromB->Add(hpD0vspcquarkTGHCfromB);
4168
4169 TH1F *hd0zD0ptTGHCfromB;
cc3209fb 4170 TH1F *hInvMassD0TGHCfromB,*hInvMassD0barTGHCfromB;
e047b348 4171 TH2F *hInvMassPtTGHCfromB=new TH2F("hInvMassPtTGHCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
4172 TH1F *hetaTGHCfromB;
4173 TH1F *hCosPDPBTGHCfromB;
4174 TH1F *hCosPcPDTGHCfromB;
4175 flistTghCutsFromB->Add(hInvMassPtTGHCfromB);
4176// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4177 TH2F *hd0D0VSd0xd0TGHCfromBpt;
4178 TH2F *hangletracksVSd0xd0TGHCfromBpt;
4179 TH2F *hangletracksVSd0D0TGHCfromBpt;
4180 TH1F *hd0xd0TGHCfromBpt;
4181
4182 TH2F *hTOFpidTGHCfromB=new TH2F("hTOFpidTGHCfromB","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
4183 flistTghCutsFromB->Add(hTOFpidTGHCfromB);
ac4c229c 4184
e047b348 4185
4186 for(Int_t i=0;i<fnbins;i++){
4187 namehist="hd0zD0ptTGHCfromB_pt";
4188 namehist+=i;
4189 titlehist="d0(z) Tight Cuts FromBm ptbin=";
4190 titlehist+=i;
4191 hd0zD0ptTGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
4192 hd0zD0ptTGHCfromB->SetXTitle("d_{0}(z) [#mum]");
4193 hd0zD0ptTGHCfromB->SetYTitle("Entries");
4194 flistTghCutsFromB->Add(hd0zD0ptTGHCfromB);
4195
cc3209fb 4196 namehist="hInvMassD0TGHCfromB_pt";
e047b348 4197 namehist+=i;
4198 titlehist="Invariant Mass Tight Cuts FromB ptbin=";
4199 titlehist+=i;
cc3209fb 4200 hInvMassD0TGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4201 hInvMassD0TGHCfromB->SetXTitle("Invariant Mass [GeV]");
4202 hInvMassD0TGHCfromB->SetYTitle("Entries");
4203 flistTghCutsFromB->Add(hInvMassD0TGHCfromB);
4204
4205 namehist="hInvMassD0barTGHCfromB_pt";
4206 namehist+=i;
4207 titlehist="Invariant Mass D0bar No Cuts FromB ptbin=";
4208 titlehist+=i;
4209 hInvMassD0barTGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4210 hInvMassD0barTGHCfromB->SetXTitle("Invariant Mass [GeV]");
4211 hInvMassD0barTGHCfromB->SetYTitle("Entries");
4212 flistTghCutsFromB->Add(hInvMassD0barTGHCfromB);
e047b348 4213
4214 namehist="hetaTGHCfromB_pt";
4215 namehist+=i;
4216 titlehist="eta Tight Cuts FromB ptbin=";
4217 titlehist+=i;
4218 hetaTGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
4219 hetaTGHCfromB->SetXTitle("Pseudorapidity");
4220 hetaTGHCfromB->SetYTitle("Entries");
4221 flistTghCutsFromB->Add(hetaTGHCfromB);
4222
4223 namehist="hCosPDPBTGHCfromB_pt";
4224 namehist+=i;
4225 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
4226 titlehist+=i;
4227 hCosPDPBTGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4228 hCosPDPBTGHCfromB->SetXTitle("Cosine between D0 momentum and B momentum");
4229 hCosPDPBTGHCfromB->SetYTitle("Entries");
4230 flistTghCutsFromB->Add(hCosPDPBTGHCfromB);
4231
4232 namehist="hCosPcPDTGHCfromB_pt";
4233 namehist+=i;
4234 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
4235 titlehist+=i;
4236 hCosPcPDTGHCfromB=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4237 hCosPcPDTGHCfromB->SetXTitle("Cosine between c quark momentum and D0 momentum");
4238 hCosPcPDTGHCfromB->SetYTitle("Entries");
4239 flistTghCutsFromB->Add(hCosPcPDTGHCfromB);
4240
4241// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4242 namehist="hd0xd0TGHCfromB_pt";
4243 namehist+=i;
4244 titlehist="d0xd0 Tight Cuts FromB ptbin=";
4245 titlehist+=i;
4246 hd0xd0TGHCfromBpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
4247 hd0xd0TGHCfromBpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
4248 hd0xd0TGHCfromBpt->SetYTitle("Entries");
4249 flistTghCutsFromB->Add(hd0xd0TGHCfromBpt);
4250
4251
4252 namehist="hd0D0VSd0xd0TGHCfromB_pt";
4253 namehist+=i;
4254 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts FromB ptbin=";
4255 titlehist+=i;
4256 hd0D0VSd0xd0TGHCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
4257 hd0D0VSd0xd0TGHCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4258 hd0D0VSd0xd0TGHCfromBpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
4259 flistTghCutsFromB->Add(hd0D0VSd0xd0TGHCfromBpt);
4260
4261
4262 namehist="hangletracksVSd0xd0TGHCfromB_pt";
4263 namehist+=i;
4264 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts FromB ptbin=";
4265 titlehist+=i;
4266 hangletracksVSd0xd0TGHCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
4267 hangletracksVSd0xd0TGHCfromBpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4268 hangletracksVSd0xd0TGHCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
4269 flistTghCutsFromB->Add(hangletracksVSd0xd0TGHCfromBpt);
4270
4271
4272 namehist="hangletracksVSd0D0TGHCfromB_pt";
4273 namehist+=i;
4274 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Tight Cuts FromB ptbin=";
4275 titlehist+=i;
4276 hangletracksVSd0D0TGHCfromBpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
4277 hangletracksVSd0D0TGHCfromBpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
4278 hangletracksVSd0D0TGHCfromBpt->SetYTitle(" angle between K and #p tracks [rad]");
4279 flistTghCutsFromB->Add(hangletracksVSd0D0TGHCfromBpt);
4280
4281 }
4282 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
4283 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4284
4285
4286
4287
4288
4289 // ######### d0 D0 histos ##############
4290 TH1F *hd0D0TGHCfromBPM = new TH1F("hd0D0TGHCfromBPM","D^{0} impact par. plot , Tight Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
4291 hd0D0TGHCfromBPM->SetXTitle("Impact parameter [#mum]");
4292 hd0D0TGHCfromBPM->SetYTitle("Entries");
4293
4294 TH1F *hd0D0VtxTrueTGHCfromBPM = new TH1F("hd0D0VtxTrueTGHCfromBPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
4295 hd0D0VtxTrueTGHCfromBPM->SetXTitle("Impact parameter [#mum]");
4296 hd0D0VtxTrueTGHCfromBPM->SetYTitle("Entries");
4297
4298 TH1F *hMCd0D0TGHCfromBPM = new TH1F("hMCd0D0TGHCfromBPM","D^{0} impact par. plot, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
4299 hMCd0D0TGHCfromBPM->SetXTitle("MC Impact parameter [#mum]");
4300 hMCd0D0TGHCfromBPM->SetYTitle("Entries");
4301
4302 TH1F *hd0D0TGHCfromBSB = new TH1F("hd0D0TGHCfromBSB","D^{0} impact par. plot , Tight Cuts ,FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
ac4c229c 4303 hd0D0TGHCfromBSB->SetXTitle("Impact parameter [#mum]");
4304 hd0D0TGHCfromBSB->SetYTitle("Entries");
4305
4306 TH1F *hd0D0VtxTrueTGHCfromBSB = new TH1F("hd0D0VtxTrueTGHCfromBSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
4307 hd0D0VtxTrueTGHCfromBSB->SetXTitle("Impact parameter [#mum]");
4308 hd0D0VtxTrueTGHCfromBSB->SetYTitle("Entries");
4309
4310 TH1F *hMCd0D0TGHCfromBSB = new TH1F("hMCd0D0TGHCfromBSB","D^{0} impact par. plot, Tight Cuts, FromB,Mass Peak (All momenta)",1000,-1000.,1000.);
4311 hMCd0D0TGHCfromBSB->SetXTitle("MC Impact parameter [#mum]");
4312 hMCd0D0TGHCfromBSB->SetYTitle("Entries");
4313
4314 flistTghCutsFromB->Add(hd0D0TGHCfromBPM);
4315 flistTghCutsFromB->Add(hd0D0VtxTrueTGHCfromBPM);
4316 flistTghCutsFromB->Add(hMCd0D0TGHCfromBPM);
4317 flistTghCutsFromB->Add(hd0D0TGHCfromBSB);
4318 flistTghCutsFromB->Add(hd0D0VtxTrueTGHCfromBSB);
4319 flistTghCutsFromB->Add(hMCd0D0TGHCfromBSB);
4320
e047b348 4321 TH1F *hd0D0ptTGHCfromBPM;
4322 TH1F *hMCd0D0ptTGHCfromBPM;
4323 TH1F *hd0D0VtxTrueptTGHCfromBPM;
4324 TH1F *hd0D0ptTGHCfromBSB;
4325 TH1F *hMCd0D0ptTGHCfromBSB;
4326 TH1F *hd0D0VtxTrueptTGHCfromBSB;
ac4c229c 4327 namehist="hd0D0ptTGHCfromB_";
624c07ab 4328 titlehist="D^{0} impact par. plot, Tight Cuts, FromB, ";
4329 for(Int_t i=0;i<fnbins;i++){
4330 strnamept=namehist;
4331 strnamept.Append("PkMss_pt");
4332 strnamept+=i;
4333
4334 strtitlept=titlehist;
4335 strtitlept.Append(" Mass Peak, ");
4336 strtitlept+=fptbins[i];
4337 strtitlept.Append("<= pt <");
4338 strtitlept+=fptbins[i+1];
4339 strtitlept.Append(" [GeV/c]");
4340
e047b348 4341 hd0D0ptTGHCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4342 hd0D0ptTGHCfromBPM->SetXTitle("Impact parameter [#mum] ");
4343 hd0D0ptTGHCfromBPM->SetYTitle("Entries");
4344 flistTghCutsFromB->Add(hd0D0ptTGHCfromBPM);
624c07ab 4345
4346 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4347 hMCd0D0ptTGHCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4348 hMCd0D0ptTGHCfromBPM->SetXTitle("MC Impact parameter [#mum] ");
4349 hMCd0D0ptTGHCfromBPM->SetYTitle("Entries");
4350 flistTghCutsFromB->Add(hMCd0D0ptTGHCfromBPM);
624c07ab 4351
4352
4353 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4354 hd0D0VtxTrueptTGHCfromBPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4355 hd0D0VtxTrueptTGHCfromBPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4356 hd0D0VtxTrueptTGHCfromBPM->SetYTitle("Entries");
4357 flistTghCutsFromB->Add(hd0D0VtxTrueptTGHCfromBPM);
624c07ab 4358
4359 strnamept=namehist;
4360 strnamept.Append("SBMss_pt");
4361 strnamept+=i;
4362
4363 strtitlept=titlehist;
4364 strtitlept.Append(" Side Bands, ");
4365 strtitlept+=fptbins[i];
4366 strtitlept.Append("<= pt <");
4367 strtitlept+=fptbins[i+1];
4368 strtitlept.Append(" [GeV/c]");
4369
e047b348 4370 hd0D0ptTGHCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4371 hd0D0ptTGHCfromBSB->SetXTitle("Impact parameter [#mum] ");
4372 hd0D0ptTGHCfromBSB->SetYTitle("Entries");
4373 flistTghCutsFromB->Add(hd0D0ptTGHCfromBSB);
624c07ab 4374
4375 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4376 hMCd0D0ptTGHCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4377 hMCd0D0ptTGHCfromBSB->SetXTitle("MC Impact parameter [#mum] ");
4378 hMCd0D0ptTGHCfromBSB->SetYTitle("Entries");
4379 flistTghCutsFromB->Add(hMCd0D0ptTGHCfromBSB);
624c07ab 4380
4381 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4382 hd0D0VtxTrueptTGHCfromBSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4383 hd0D0VtxTrueptTGHCfromBSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4384 hd0D0VtxTrueptTGHCfromBSB->SetYTitle("Entries");
4385 flistTghCutsFromB->Add(hd0D0VtxTrueptTGHCfromBSB);
624c07ab 4386 }
4387
4388
4389
4390 //############ TIGHT CUTS FROM DSTAR HISTOGRAMS ###########
4391 //
4392 //############## global properties histos
e047b348 4393 TH2F *hCPtaVSd0d0TGHCfromDstar=new TH2F("hCPtaVSd0d0TGHCfromDstar","hCPtaVSd0d0_TightCuts_FromDStar",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 4394 TH1F *hSecVtxZTGHCfromDstar=new TH1F("hSecVtxZTGHCfromDstar","hSecVtxZ_TightCuts_FromDStar",1000,-8.,8.);
4395 TH1F *hSecVtxXTGHCfromDstar=new TH1F("hSecVtxXTGHCfromDstar","hSecVtxX_TightCuts_FromDStar",1000,-3000.,3000.);
4396 TH1F *hSecVtxYTGHCfromDstar=new TH1F("hSecVtxYTGHCfromDstar","hSecVtxY_TightCuts_FromDStar",1000,-3000.,3000.);
4397 TH2F *hSecVtxXYTGHCfromDstar=new TH2F("hSecVtxXYTGHCfromDstar","hSecVtxXY_TightCuts_FromDStar",1000,-3000.,3000.,1000,-3000.,3000.);
4398 TH1F *hSecVtxPhiTGHCfromDstar=new TH1F("hSecVtxPhiTGHCfromDstar","hSecVtxPhi_TightCuts_FromDStar",180,-180.1,180.1);
e047b348 4399 TH1F *hd0singlTrackTGHCfromDstar=new TH1F("hd0singlTrackTGHCfromDstar","hd0singlTrackTightCuts_FromDstar",1000,-5000.,5000.);
4400 TH1F *hCPtaTGHCfromDstar=new TH1F("hCPtaTGHCfromDstar","hCPta_TightCuts_FromDStar",100,-1.,1.);
ac4c229c 4401 TH1F *hd0xd0TGHCfromDstar=new TH1F("hd0xd0TGHCfromDstar","hd0xd0_TightCuts_FromDStar",1000,-100000.,100000.);
4402 TH1F *hMassTrueTGHCfromDstar=new TH1F("hMassTrueTGHCfromDstar","D^{0} MC inv. Mass Tight Cuts FromDStar(All momenta)",600,1.600,2.200);
4403 TH1F *hMassTGHCfromDstar=new TH1F("hMassTGHCfromDstar","D^{0} inv. Mass Tight Cuts FromDStar (All momenta)",600,1.600,2.200);
4404 hMassTGHCfromDstar->Sumw2();
4405 TH1F *hMassTrueTGHCfromDstarPM=new TH1F("hMassTrueTGHCfromDstarPM","D^{0} MC inv. Mass Tight Cuts FromDStar, Mass Peak. (All momenta)",600,1.600,2.200);
4406 TH1F *hMassTGHCfromDstarPM=new TH1F("hMassTGHCfromDstarPM","D^{0} inv. Mass Tight Cuts FromDStar (All momenta), MassPeak",600,1.600,2.200);
4407 hMassTGHCfromDstarPM->Sumw2();
4408 TH1F *hMassTrueTGHCfromDstarSB=new TH1F("hMassTrueTGHCfromDstarSB","D^{0} MC inv. Mass in Side Bands Tight Cuts FromDStar(All momenta)",600,1.600,2.200);
4409 TH1F *hMassTGHCfromDstarSB=new TH1F("hMassTGHCfromDstarSB","D^{0} inv. Mass in Side Bands Tight Cuts FromDStar (All momenta)",600,1.600,2.200);
4410 hMassTGHCfromDstarSB->Sumw2();
4411
4412 flistTghCutsFromDstar->Add(hCPtaVSd0d0TGHCfromDstar);
4413 flistTghCutsFromDstar->Add(hSecVtxZTGHCfromDstar);
4414 flistTghCutsFromDstar->Add(hSecVtxYTGHCfromDstar);
4415 flistTghCutsFromDstar->Add(hSecVtxXTGHCfromDstar);
4416 flistTghCutsFromDstar->Add(hSecVtxXYTGHCfromDstar);
4417 flistTghCutsFromDstar->Add(hSecVtxPhiTGHCfromDstar);
e047b348 4418 flistTghCutsFromDstar->Add(hd0singlTrackTGHCfromDstar);
ac4c229c 4419 flistTghCutsFromDstar->Add(hCPtaTGHCfromDstar);
4420 flistTghCutsFromDstar->Add(hd0xd0TGHCfromDstar);
4421 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstar);
4422 flistTghCutsFromDstar->Add(hMassTGHCfromDstar);
4423 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstarPM);
4424 flistTghCutsFromDstar->Add(hMassTGHCfromDstarPM);
4425 flistTghCutsFromDstar->Add(hMassTrueTGHCfromDstarSB);
4426 flistTghCutsFromDstar->Add(hMassTGHCfromDstarSB);
624c07ab 4427
e047b348 4428
4429
4430
4431
4432 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
4433 TH1F *hdcaTGHCfromDstar=new TH1F("hdcaTGHCfromDstar","hdca_TightCuts_FromDstar",100,0.,1000.);
4434 hdcaTGHCfromDstar->SetXTitle("dca [#mum]");
4435 hdcaTGHCfromDstar->SetYTitle("Entries");
4436 TH1F *hcosthetastarTGHCfromDstar=new TH1F("hcosthetastarTGHCfromDstar","hCosThetaStar_TightCuts_FromDstar",50,-1.,1.);
4437 hcosthetastarTGHCfromDstar->SetXTitle("cos #theta^{*}");
4438 hcosthetastarTGHCfromDstar->SetYTitle("Entries");
4439 TH1F *hptD0TGHCfromDstar=new TH1F("hptD0TGHCfromDstar","D^{0} transverse momentum distribution",34,ptbinsD0arr);
4440 hptD0TGHCfromDstar->SetXTitle("p_{t} [GeV/c]");
4441 hptD0TGHCfromDstar->SetYTitle("Entries");
4442 TH1F *hptD0VsMaxPtTGHCfromDstar=new TH1F("hptD0VsMaxPtTGHCfromDstar","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
4443 TH2F *hptD0PTallsqrtTGHCfromDstar=new TH2F("hptD0PTallsqrtTGHCfromDstar","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
4444 TH2F *hptD0PTallTGHCfromDstar=new TH2F("hptD0PTallTGHCfromDstar","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
4445 TH2F *hptD0vsptBTGHCfromDstar=new TH2F("hptD0vsptBTGHCfromDstar","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4446 TH2F *hpD0vspBTGHCfromDstar=new TH2F("hpD0vspBTGHCfromDstar","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4447 TH2F *hptD0vsptcquarkTGHCfromDstar=new TH2F("hptD0vsptcquarkTGHCfromDstar","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4448 TH2F *hpD0vspcquarkTGHCfromDstar=new TH2F("hpD0vspcquarkTGHCfromDstar","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4449 flistTghCutsFromDstar->Add(hdcaTGHCfromDstar);
4450 flistTghCutsFromDstar->Add(hcosthetastarTGHCfromDstar);
4451 flistTghCutsFromDstar->Add(hptD0TGHCfromDstar);
4452 flistTghCutsFromDstar->Add(hptD0VsMaxPtTGHCfromDstar);
4453 flistTghCutsFromDstar->Add(hptD0PTallsqrtTGHCfromDstar);
4454 flistTghCutsFromDstar->Add(hptD0PTallTGHCfromDstar);
4455 flistTghCutsFromDstar->Add(hptD0vsptBTGHCfromDstar);
4456 flistTghCutsFromDstar->Add(hpD0vspBTGHCfromDstar);
4457 flistTghCutsFromDstar->Add(hptD0vsptcquarkTGHCfromDstar);
4458 flistTghCutsFromDstar->Add(hpD0vspcquarkTGHCfromDstar);
4459
4460 TH1F *hd0zD0ptTGHCfromDstar;
cc3209fb 4461 TH1F *hInvMassD0TGHCfromDstar,*hInvMassD0barTGHCfromDstar;
e047b348 4462 TH1F *hetaTGHCfromDstar;
4463 TH2F *hInvMassPtTGHCfromDstar=new TH2F("hInvMassPtTGHCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
4464 TH1F *hCosPDPBTGHCfromDstar;
4465 TH1F *hCosPcPDTGHCfromDstar;
4466 flistTghCutsFromDstar->Add(hInvMassPtTGHCfromDstar);
4467// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4468 TH2F *hd0D0VSd0xd0TGHCfromDstarpt;
4469 TH2F *hangletracksVSd0xd0TGHCfromDstarpt;
4470 TH2F *hangletracksVSd0D0TGHCfromDstarpt;
4471 TH1F *hd0xd0TGHCfromDstarpt;
4472
4473 TH2F *hTOFpidTGHCfromDstar=new TH2F("hTOFpidTGHCfromDstar","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
4474 flistTghCutsFromDstar->Add(hTOFpidTGHCfromDstar);
4475
4476 for(Int_t i=0;i<fnbins;i++){
4477 namehist="hd0zD0ptTGHCfromDstar_pt";
4478 namehist+=i;
4479 titlehist="d0(z) Tight Cuts FromDstarm ptbin=";
4480 titlehist+=i;
4481 hd0zD0ptTGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
4482 hd0zD0ptTGHCfromDstar->SetXTitle("d_{0}(z) [#mum]");
4483 hd0zD0ptTGHCfromDstar->SetYTitle("Entries");
4484 flistTghCutsFromDstar->Add(hd0zD0ptTGHCfromDstar);
4485
cc3209fb 4486 namehist="hInvMassD0TGHCfromDstar_pt";
e047b348 4487 namehist+=i;
4488 titlehist="Invariant Mass Tight Cuts FromDstar ptbin=";
4489 titlehist+=i;
cc3209fb 4490 hInvMassD0TGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4491 hInvMassD0TGHCfromDstar->SetXTitle("Invariant Mass [GeV]");
4492 hInvMassD0TGHCfromDstar->SetYTitle("Entries");
4493 flistTghCutsFromDstar->Add(hInvMassD0TGHCfromDstar);
4494
4495 namehist="hInvMassD0barTGHCfromDstar_pt";
4496 namehist+=i;
4497 titlehist="Invariant Mass D0bar No Cuts FromDstar ptbin=";
4498 titlehist+=i;
4499 hInvMassD0barTGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4500 hInvMassD0barTGHCfromDstar->SetXTitle("Invariant Mass [GeV]");
4501 hInvMassD0barTGHCfromDstar->SetYTitle("Entries");
4502 flistTghCutsFromDstar->Add(hInvMassD0barTGHCfromDstar);
e047b348 4503
4504 namehist="hetaTGHCfromDstar_pt";
4505 namehist+=i;
4506 titlehist="eta Tight Cuts FromDstar ptbin=";
4507 titlehist+=i;
4508 hetaTGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
4509 hetaTGHCfromDstar->SetXTitle("Pseudorapidity");
4510 hetaTGHCfromDstar->SetYTitle("Entries");
4511 flistTghCutsFromDstar->Add(hetaTGHCfromDstar);
4512
4513 namehist="hCosPDPBTGHCfromDstar_pt";
4514 namehist+=i;
4515 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
4516 titlehist+=i;
4517 hCosPDPBTGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4518 hCosPDPBTGHCfromDstar->SetXTitle("Cosine between D0 momentum and B momentum");
4519 hCosPDPBTGHCfromDstar->SetYTitle("Entries");
4520 flistTghCutsFromDstar->Add(hCosPDPBTGHCfromDstar);
4521
4522 namehist="hCosPcPDTGHCfromDstar_pt";
4523 namehist+=i;
4524 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
4525 titlehist+=i;
4526 hCosPcPDTGHCfromDstar=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4527 hCosPcPDTGHCfromDstar->SetXTitle("Cosine between c quark momentum and D0 momentum");
4528 hCosPcPDTGHCfromDstar->SetYTitle("Entries");
4529 flistTghCutsFromDstar->Add(hCosPcPDTGHCfromDstar);
4530
4531 // %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4532 namehist="hd0xd0TGHCfromDstar_pt";
4533 namehist+=i;
4534 titlehist="d0xd0 Tight Cuts FromDstar ptbin=";
4535 titlehist+=i;
4536 hd0xd0TGHCfromDstarpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
4537 hd0xd0TGHCfromDstarpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
4538 hd0xd0TGHCfromDstarpt->SetYTitle("Entries");
4539 flistTghCutsFromDstar->Add(hd0xd0TGHCfromDstarpt);
4540
4541
4542 namehist="hd0D0VSd0xd0TGHCfromDstar_pt";
4543 namehist+=i;
4544 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts FromDstar ptbin=";
4545 titlehist+=i;
4546 hd0D0VSd0xd0TGHCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
4547 hd0D0VSd0xd0TGHCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4548 hd0D0VSd0xd0TGHCfromDstarpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
4549 flistTghCutsFromDstar->Add(hd0D0VSd0xd0TGHCfromDstarpt);
4550
4551
4552 namehist="hangletracksVSd0xd0TGHCfromDstar_pt";
4553 namehist+=i;
4554 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts FromDstar ptbin=";
4555 titlehist+=i;
4556 hangletracksVSd0xd0TGHCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
4557 hangletracksVSd0xd0TGHCfromDstarpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4558 hangletracksVSd0xd0TGHCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
4559 flistTghCutsFromDstar->Add(hangletracksVSd0xd0TGHCfromDstarpt);
4560
4561
4562 namehist="hangletracksVSd0D0TGHCfromDstar_pt";
4563 namehist+=i;
4564 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Tight Cuts FromDstar ptbin=";
4565 titlehist+=i;
4566 hangletracksVSd0D0TGHCfromDstarpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
4567 hangletracksVSd0D0TGHCfromDstarpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
4568 hangletracksVSd0D0TGHCfromDstarpt->SetYTitle(" angle between K and #p tracks [rad]");
4569 flistTghCutsFromDstar->Add(hangletracksVSd0D0TGHCfromDstarpt);
4570
4571
4572 }
4573 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
4574 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4575
4576
624c07ab 4577 //########## d0 D0 histos #############
ac4c229c 4578 TH1F *hd0D0TGHCfromDstPM = new TH1F("hd0D0TGHCfromDstarPM","D^{0} impact par. plot , Tight Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4579 hd0D0TGHCfromDstPM->SetXTitle("Impact parameter [#mum]");
4580 hd0D0TGHCfromDstPM->SetYTitle("Entries");
4581
4582 TH1F *hd0D0VtxTrueTGHCfromDstPM = new TH1F("hd0D0VtxTrueTGHCfromDstarPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4583 hd0D0VtxTrueTGHCfromDstPM->SetXTitle("Impact parameter [#mum]");
4584 hd0D0VtxTrueTGHCfromDstPM->SetYTitle("Entries");
4585
4586 TH1F *hMCd0D0TGHCfromDstPM = new TH1F("hMCd0D0TGHCfromDstarPM","D^{0} impact par. plot, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4587 hMCd0D0TGHCfromDstPM->SetXTitle("MC Impact parameter [#mum]");
4588 hMCd0D0TGHCfromDstPM->SetYTitle("Entries");
4589
4590 TH1F *hd0D0TGHCfromDstSB = new TH1F("hd0D0TGHCfromDstarSB","D^{0} impact par. plot , Tight Cuts ,FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4591 hd0D0TGHCfromDstSB->SetXTitle("Impact parameter [#mum]");
4592 hd0D0TGHCfromDstSB->SetYTitle("Entries");
4593
4594 TH1F *hd0D0VtxTrueTGHCfromDstSB = new TH1F("hd0D0VtxTrueTGHCfromDstarSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4595 hd0D0VtxTrueTGHCfromDstSB->SetXTitle("Impact parameter [#mum]");
4596 hd0D0VtxTrueTGHCfromDstSB->SetYTitle("Entries");
4597
4598 TH1F *hMCd0D0TGHCfromDstSB = new TH1F("hMCd0D0TGHCfromDstarSB","D^{0} impact par. plot, Tight Cuts, FromDStar,Mass Peak (All momenta)",1000,-1000.,1000.);
4599 hMCd0D0TGHCfromDstSB->SetXTitle("MC Impact parameter [#mum]");
4600 hMCd0D0TGHCfromDstSB->SetYTitle("Entries");
4601
4602 flistTghCutsFromDstar->Add(hd0D0TGHCfromDstPM);
4603 flistTghCutsFromDstar->Add(hd0D0VtxTrueTGHCfromDstPM);
4604 flistTghCutsFromDstar->Add(hMCd0D0TGHCfromDstPM);
4605 flistTghCutsFromDstar->Add(hd0D0TGHCfromDstSB);
4606 flistTghCutsFromDstar->Add(hd0D0VtxTrueTGHCfromDstSB);
4607 flistTghCutsFromDstar->Add(hMCd0D0TGHCfromDstSB);
4608
e047b348 4609 TH1F *hd0D0ptTGHCfromDstPM;
4610 TH1F *hMCd0D0ptTGHCfromDstPM;
4611 TH1F *hd0D0VtxTrueptTGHCfromDstPM;
4612 TH1F *hd0D0ptTGHCfromDstSB;
4613 TH1F *hMCd0D0ptTGHCfromDstSB;
4614 TH1F *hd0D0VtxTrueptTGHCfromDstSB;
ac4c229c 4615 namehist="hd0D0ptTGHCfromDstar_";
624c07ab 4616 titlehist="D^{0} impact par. plot, Tight Cuts, FromDStar, ";
4617 for(Int_t i=0;i<fnbins;i++){
4618 strnamept=namehist;
4619 strnamept.Append("PkMss_pt");
4620 strnamept+=i;
4621
4622 strtitlept=titlehist;
4623 strtitlept.Append(" Mass Peak, ");
4624 strtitlept+=fptbins[i];
4625 strtitlept.Append("<= pt <");
4626 strtitlept+=fptbins[i+1];
4627 strtitlept.Append(" [GeV/c]");
4628
e047b348 4629 hd0D0ptTGHCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4630 hd0D0ptTGHCfromDstPM->SetXTitle("Impact parameter [#mum] ");
4631 hd0D0ptTGHCfromDstPM->SetYTitle("Entries");
4632 flistTghCutsFromDstar->Add(hd0D0ptTGHCfromDstPM);
624c07ab 4633
4634 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4635 hMCd0D0ptTGHCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4636 hMCd0D0ptTGHCfromDstPM->SetXTitle("MC Impact parameter [#mum] ");
4637 hMCd0D0ptTGHCfromDstPM->SetYTitle("Entries");
4638 flistTghCutsFromDstar->Add(hMCd0D0ptTGHCfromDstPM);
624c07ab 4639
4640
4641 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4642 hd0D0VtxTrueptTGHCfromDstPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4643 hd0D0VtxTrueptTGHCfromDstPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4644 hd0D0VtxTrueptTGHCfromDstPM->SetYTitle("Entries");
4645 flistTghCutsFromDstar->Add(hd0D0VtxTrueptTGHCfromDstPM);
624c07ab 4646
4647 strnamept=namehist;
4648 strnamept.Append("SBMss_pt");
4649 strnamept+=i;
4650
4651 strtitlept=titlehist;
4652 strtitlept.Append(" Side Bands, ");
4653 strtitlept+=fptbins[i];
4654 strtitlept.Append("<= pt <");
4655 strtitlept+=fptbins[i+1];
4656 strtitlept.Append(" [GeV/c]");
4657
e047b348 4658 hd0D0ptTGHCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4659 hd0D0ptTGHCfromDstSB->SetXTitle("Impact parameter [#mum] ");
4660 hd0D0ptTGHCfromDstSB->SetYTitle("Entries");
4661 flistTghCutsFromDstar->Add(hd0D0ptTGHCfromDstSB);
624c07ab 4662
4663 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4664 hMCd0D0ptTGHCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4665 hMCd0D0ptTGHCfromDstSB->SetXTitle("MC Impact parameter [#mum] ");
4666 hMCd0D0ptTGHCfromDstSB->SetYTitle("Entries");
4667 flistTghCutsFromDstar->Add(hMCd0D0ptTGHCfromDstSB);
624c07ab 4668
4669 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4670 hd0D0VtxTrueptTGHCfromDstSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4671 hd0D0VtxTrueptTGHCfromDstSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4672 hd0D0VtxTrueptTGHCfromDstSB->SetYTitle("Entries");
4673 flistTghCutsFromDstar->Add(hd0D0VtxTrueptTGHCfromDstSB);
624c07ab 4674 }
4675
4676
4677 //############ TIGHT CUTS OTHER HISTOGRAMS ###########
4678 //
4679 //########### global properties histos ###########
4680
e047b348 4681 TH2F *hCPtaVSd0d0TGHCother=new TH2F("hCPtaVSd0d0TGHCother","hCPtaVSd0d0_TightCuts_other",1000,-100000.,100000.,100,-1.,1.);
ac4c229c 4682 TH1F *hSecVtxZTGHCother=new TH1F("hSecVtxZTGHCother","hSecVtxZ_TightCuts_other",1000,-8.,8.);
4683 TH1F *hSecVtxXTGHCother=new TH1F("hSecVtxXTGHCother","hSecVtxX_TightCuts_other",1000,-3000.,3000.);
4684 TH1F *hSecVtxYTGHCother=new TH1F("hSecVtxYTGHCother","hSecVtxY_TightCuts_other",1000,-3000.,3000.);
4685 TH2F *hSecVtxXYTGHCother=new TH2F("hSecVtxXYTGHCother","hSecVtxXY_TightCuts_other",1000,-3000.,3000.,1000,-3000.,3000.);
4686 TH1F *hSecVtxPhiTGHCother=new TH1F("hSecVtxPhiTGHCother","hSecVtxPhi_TightCuts_other",180,-180.1,180.1);
e047b348 4687 TH1F *hd0singlTrackTGHCother=new TH1F("hd0singlTrackTGHCother","hd0singlTrackTightCuts_Other",1000,-5000.,5000.);
4688 TH1F *hCPtaTGHCother=new TH1F("hCPtaTGHCother","hCPta_TightCuts_other",100,-1.,1.);
ac4c229c 4689 TH1F *hd0xd0TGHCother=new TH1F("hd0xd0TGHCother","hd0xd0_TightCuts_other",1000,-100000.,100000.);
4690 TH1F *hMassTrueTGHCother=new TH1F("hMassTrueTGHCother","D^{0} MC inv. Mass Tight Cuts other(All momenta)",600,1.600,2.200);
4691 TH1F *hMassTGHCother=new TH1F("hMassTGHCother","D^{0} inv. Mass Tight Cuts other (All momenta)",600,1.600,2.200);
4692 hMassTGHCother->Sumw2();
4693 TH1F *hMassTrueTGHCotherPM=new TH1F("hMassTrueTGHCotherPM","D^{0} MC inv. Mass Tight Cuts other, Mass Peak. (All momenta)",600,1.600,2.200);
4694 TH1F *hMassTGHCotherPM=new TH1F("hMassTGHCotherPM","D^{0} inv. Mass Tight Cuts other (All momenta), MassPeak",600,1.600,2.200);
4695 hMassTGHCotherPM->Sumw2();
4696 TH1F *hMassTrueTGHCotherSB=new TH1F("hMassTrueTGHCotherSB","D^{0} MC inv. Mass in Side Bands Tight Cuts other(All momenta)",600,1.600,2.200);
4697 TH1F *hMassTGHCotherSB=new TH1F("hMassTGHCotherSB","D^{0} inv. Mass in Side Bands Tight Cuts other (All momenta)",600,1.600,2.200);
4698 hMassTGHCotherSB->Sumw2();
4699
4700 flistTghCutsOther->Add(hCPtaVSd0d0TGHCother);
4701 flistTghCutsOther->Add(hSecVtxZTGHCother);
4702 flistTghCutsOther->Add(hSecVtxYTGHCother);
4703 flistTghCutsOther->Add(hSecVtxXTGHCother);
4704 flistTghCutsOther->Add(hSecVtxXYTGHCother);
4705 flistTghCutsOther->Add(hSecVtxPhiTGHCother);
e047b348 4706 flistTghCutsOther->Add(hd0singlTrackTGHCother);
ac4c229c 4707 flistTghCutsOther->Add(hCPtaTGHCother);
4708 flistTghCutsOther->Add(hd0xd0TGHCother);
4709 flistTghCutsOther->Add(hMassTrueTGHCother);
4710 flistTghCutsOther->Add(hMassTGHCother);
4711 flistTghCutsOther->Add(hMassTrueTGHCotherPM);
4712 flistTghCutsOther->Add(hMassTGHCotherPM);
4713 flistTghCutsOther->Add(hMassTrueTGHCotherSB);
4714 flistTghCutsOther->Add(hMassTGHCotherSB);
624c07ab 4715
e047b348 4716
4717
4718
4719 //%%% NEW HISTOS %%%%%%%%%%%%%%%%
4720 TH1F *hdcaTGHCother=new TH1F("hdcaTGHCother","hdca_TightCuts_Other",100,0.,1000.);
4721 hdcaTGHCother->SetXTitle("dca [#mum]");
4722 hdcaTGHCother->SetYTitle("Entries");
4723 TH1F *hcosthetastarTGHCother=new TH1F("hcosthetastarTGHCother","hCosThetaStar_TightCuts_Other",50,-1.,1.);
4724 hcosthetastarTGHCother->SetXTitle("cos #theta^{*}");
4725 hcosthetastarTGHCother->SetYTitle("Entries");
4726 TH1F *hptD0TGHCother=new TH1F("hptD0TGHCother","D^{0} transverse momentum distribution",34,ptbinsD0arr);
4727 hptD0TGHCother->SetXTitle("p_{t} [GeV/c]");
4728 hptD0TGHCother->SetYTitle("Entries");
4729 TH1F *hptD0VsMaxPtTGHCother=new TH1F("hptD0VsMaxPtTGHCother","Difference between D^{0} pt and highest (or second) pt",400,-50.,50.);
4730 TH2F *hptD0PTallsqrtTGHCother=new TH2F("hptD0PTallsqrtTGHCother","D^{0} pt Vs Sqrt(Sum pt square)",34,ptbinsD0arr,200,dumbinning);
4731 TH2F *hptD0PTallTGHCother=new TH2F("hptD0PTallTGHCother","D^{0} pt Vs Sum pt ",34,ptbinsD0arr,200,dumbinning);
4732 TH2F *hptD0vsptBTGHCother=new TH2F("hptD0vsptBTGHCother","D^{0} pt Vs B pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4733 TH2F *hpD0vspBTGHCother=new TH2F("hpD0vspBTGHCother","D^{0} tot momentum Vs B tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4734 TH2F *hptD0vsptcquarkTGHCother=new TH2F("hptD0vsptcquarkTGHCother","D^{0} pt Vs cquark pt distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4735 TH2F *hpD0vspcquarkTGHCother=new TH2F("hpD0vspcquarkTGHCother","D^{0} tot momentum Vs cquark tot momentum distribution",34,ptbinsD0arr,34,ptbinsD0arr);
4736 flistTghCutsOther->Add(hdcaTGHCother);
4737 flistTghCutsOther->Add(hcosthetastarTGHCother);
4738 flistTghCutsOther->Add(hptD0TGHCother);
4739 flistTghCutsOther->Add(hptD0VsMaxPtTGHCother);
4740 flistTghCutsOther->Add(hptD0PTallsqrtTGHCother);
4741 flistTghCutsOther->Add(hptD0PTallTGHCother);
4742 flistTghCutsOther->Add(hptD0vsptBTGHCother);
4743 flistTghCutsOther->Add(hpD0vspBTGHCother);
4744 flistTghCutsOther->Add(hptD0vsptcquarkTGHCother);
4745 flistTghCutsOther->Add(hpD0vspcquarkTGHCother);
4746
4747 TH1F *hd0zD0ptTGHCother;
cc3209fb 4748 TH1F *hInvMassD0TGHCother,*hInvMassD0barTGHCother;
e047b348 4749 TH2F *hInvMassPtTGHCother=new TH2F("hInvMassPtTGHCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
4750 TH1F *hetaTGHCother;
4751 TH1F *hCosPDPBTGHCother;
4752 TH1F *hCosPcPDTGHCother;
4753 flistTghCutsOther->Add(hInvMassPtTGHCother);
4754// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4755 TH2F *hd0D0VSd0xd0TGHCotherpt;
4756 TH2F *hangletracksVSd0xd0TGHCotherpt;
4757 TH2F *hangletracksVSd0D0TGHCotherpt;
4758 TH1F *hd0xd0TGHCotherpt;
4759
4760 TH2F *hTOFpidTGHCother=new TH2F("hTOFpidTGHCother","TOF time VS momentum",10,0.,4.,50,-50000.,50000.);
4761 flistTghCutsOther->Add(hTOFpidTGHCother);
4762
4763 for(Int_t i=0;i<fnbins;i++){
4764 namehist="hd0zD0ptTGHCother_pt";
4765 namehist+=i;
4766 titlehist="d0(z) Tight Cuts Otherm ptbin=";
4767 titlehist+=i;
4768 hd0zD0ptTGHCother=new TH1F(namehist.Data(),titlehist.Data(),1000,-3000,3000.);
4769 hd0zD0ptTGHCother->SetXTitle("d_{0}(z) [#mum]");
4770 hd0zD0ptTGHCother->SetYTitle("Entries");
4771 flistTghCutsOther->Add(hd0zD0ptTGHCother);
4772
cc3209fb 4773 namehist="hInvMassD0TGHCother_pt";
e047b348 4774 namehist+=i;
4775 titlehist="Invariant Mass Tight Cuts Other ptbin=";
4776 titlehist+=i;
cc3209fb 4777 hInvMassD0TGHCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4778 hInvMassD0TGHCother->SetXTitle("Invariant Mass [GeV]");
4779 hInvMassD0TGHCother->SetYTitle("Entries");
4780 flistTghCutsOther->Add(hInvMassD0TGHCother);
4781
4782 namehist="hInvMassD0barTGHCother_pt";
4783 namehist+=i;
4784 titlehist="Invariant Mass D0bar No Cuts Other ptbin=";
4785 titlehist+=i;
4786 hInvMassD0barTGHCother=new TH1F(namehist.Data(),titlehist.Data(),600,1.600,2.200);
4787 hInvMassD0barTGHCother->SetXTitle("Invariant Mass [GeV]");
4788 hInvMassD0barTGHCother->SetYTitle("Entries");
4789 flistTghCutsOther->Add(hInvMassD0barTGHCother);
e047b348 4790
4791 namehist="hetaTGHCother_pt";
4792 namehist+=i;
4793 titlehist="eta Tight Cuts Other ptbin=";
4794 titlehist+=i;
4795 hetaTGHCother=new TH1F(namehist.Data(),titlehist.Data(),100,-3.,3.);
4796 hetaTGHCother->SetXTitle("Pseudorapidity");
4797 hetaTGHCother->SetYTitle("Entries");
4798 flistTghCutsOther->Add(hetaTGHCother);
4799
4800 namehist="hCosPDPBTGHCother_pt";
4801 namehist+=i;
4802 titlehist="Cosine between D0 momentum and B momentum, ptbin=";
4803 titlehist+=i;
4804 hCosPDPBTGHCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4805 hCosPDPBTGHCother->SetXTitle("Cosine between D0 momentum and B momentum");
4806 hCosPDPBTGHCother->SetYTitle("Entries");
4807 flistTghCutsOther->Add(hCosPDPBTGHCother);
4808
4809 namehist="hCosPcPDTGHCother_pt";
4810 namehist+=i;
4811 titlehist="Cosine between cquark momentum and D0 momentum, ptbin=";
4812 titlehist+=i;
4813 hCosPcPDTGHCother=new TH1F(namehist.Data(),titlehist.Data(),50,-1.,1.);
4814 hCosPcPDTGHCother->SetXTitle("Cosine between c quark momentum and D0 momentum");
4815 hCosPcPDTGHCother->SetYTitle("Entries");
4816 flistTghCutsOther->Add(hCosPcPDTGHCother);
4817
4818// %%%%%%%%%%% HERE THE ADDITIONAL HISTS %%%%%%%%%%%%%%%%%
4819 namehist="hd0xd0TGHCother_pt";
4820 namehist+=i;
4821 titlehist="d0xd0 Tight Cuts Other ptbin=";
4822 titlehist+=i;
4823 hd0xd0TGHCotherpt=new TH1F(namehist.Data(),titlehist.Data(),1000,-50000.,10000.);
4824 hd0xd0TGHCotherpt->SetXTitle("d_{0}^{K}xd_{0}^{#pi} [#mum^2]");
4825 hd0xd0TGHCotherpt->SetYTitle("Entries");
4826 flistTghCutsOther->Add(hd0xd0TGHCotherpt);
4827
4828
4829 namehist="hd0D0VSd0xd0TGHCother_pt";
4830 namehist+=i;
4831 titlehist="d_{0}^{D^{0}} Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Other ptbin=";
4832 titlehist+=i;
4833 hd0D0VSd0xd0TGHCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,100,-300,300);
4834 hd0D0VSd0xd0TGHCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4835 hd0D0VSd0xd0TGHCotherpt->SetYTitle(" d_{0}^{D^{0}} [#mum]");
4836 flistTghCutsOther->Add(hd0D0VSd0xd0TGHCotherpt);
4837
4838
4839 namehist="hangletracksVSd0xd0TGHCother_pt";
4840 namehist+=i;
4841 titlehist="Angle between K and #pi tracks Vs d_{0}^{K}xd_{0}^{#pi} Tight Cuts Other ptbin=";
4842 titlehist+=i;
4843 hangletracksVSd0xd0TGHCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-50000.,30000.,40,-0.1,3.24);
4844 hangletracksVSd0xd0TGHCotherpt->SetXTitle(" d_{0}^{K}xd_{0}^{#pi} [#mum]");
4845 hangletracksVSd0xd0TGHCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
4846 flistTghCutsOther->Add(hangletracksVSd0xd0TGHCotherpt);
4847
4848
4849 namehist="hangletracksVSd0D0TGHCother_pt";
4850 namehist+=i;
4851 titlehist="Angle between K and #pi tracks Vs d_{0}^{D^{0}} Tight Cuts Other ptbin=";
4852 titlehist+=i;
4853 hangletracksVSd0D0TGHCotherpt=new TH2F(namehist.Data(),titlehist.Data(),200,-400.,400.,40,-0.12,3.24);
4854 hangletracksVSd0D0TGHCotherpt->SetXTitle(" d_{0}^{D^{0}} [#mum]");
4855 hangletracksVSd0D0TGHCotherpt->SetYTitle(" angle between K and #p tracks [rad]");
4856 flistTghCutsOther->Add(hangletracksVSd0D0TGHCotherpt);
4857
4858 }
4859 // %%%%%%%% END OF NEW HISTOS %%%%%%%%%%%%%
4860 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4861
4862
4863
4864
4865
624c07ab 4866 //############# d0 D0 histos ###############à
ac4c229c 4867 TH1F *hd0D0TGHCotherPM = new TH1F("hd0D0TGHCotherPM","D^{0} impact par. plot , Tight Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4868 hd0D0TGHCotherPM->SetXTitle("Impact parameter [#mum]");
4869 hd0D0TGHCotherPM->SetYTitle("Entries");
4870
4871 TH1F *hd0D0VtxTrueTGHCotherPM = new TH1F("hd0D0VtxTrueTGHCotherPM","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4872 hd0D0VtxTrueTGHCotherPM->SetXTitle("Impact parameter [#mum]");
4873 hd0D0VtxTrueTGHCotherPM->SetYTitle("Entries");
4874
4875 TH1F *hMCd0D0TGHCotherPM = new TH1F("hMCd0D0TGHCotherPM","D^{0} impact par. plot, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4876 hMCd0D0TGHCotherPM->SetXTitle("MC Impact parameter [#mum]");
4877 hMCd0D0TGHCotherPM->SetYTitle("Entries");
4878
4879 TH1F *hd0D0TGHCotherSB = new TH1F("hd0D0TGHCotherSB","D^{0} impact par. plot , Tight Cuts ,Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4880 hd0D0TGHCotherSB->SetXTitle("Impact parameter [#mum]");
4881 hd0D0TGHCotherSB->SetYTitle("Entries");
4882
4883 TH1F *hd0D0VtxTrueTGHCotherSB = new TH1F("hd0D0VtxTrueTGHCotherSB","D^{0} impact par. w.r.t. True Vtx, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4884 hd0D0VtxTrueTGHCotherSB->SetXTitle("Impact parameter [#mum]");
4885 hd0D0VtxTrueTGHCotherSB->SetYTitle("Entries");
4886
4887 TH1F *hMCd0D0TGHCotherSB = new TH1F("hMCd0D0TGHCotherSB","D^{0} impact par. plot, Tight Cuts, Other,Mass Peak (All momenta)",1000,-1000.,1000.);
4888 hMCd0D0TGHCotherSB->SetXTitle("MC Impact parameter [#mum]");
4889 hMCd0D0TGHCotherSB->SetYTitle("Entries");
4890
4891 flistTghCutsOther->Add(hd0D0TGHCotherPM);
4892 flistTghCutsOther->Add(hd0D0VtxTrueTGHCotherPM);
4893 flistTghCutsOther->Add(hMCd0D0TGHCotherPM);
4894 flistTghCutsOther->Add(hd0D0TGHCotherSB);
4895 flistTghCutsOther->Add(hd0D0VtxTrueTGHCotherSB);
4896 flistTghCutsOther->Add(hMCd0D0TGHCotherSB);
4897
e047b348 4898 TH1F *hd0D0ptTGHCotherPM;
4899 TH1F *hMCd0D0ptTGHCotherPM;
4900 TH1F *hd0D0VtxTrueptTGHCotherPM;
4901 TH1F *hd0D0ptTGHCotherSB;
4902 TH1F *hMCd0D0ptTGHCotherSB;
4903 TH1F *hd0D0VtxTrueptTGHCotherSB;
ac4c229c 4904 namehist="hd0D0ptTGHCother_";
624c07ab 4905 titlehist="D^{0} impact par. plot, Tight Cuts, Other, ";
4906 for(Int_t i=0;i<fnbins;i++){
4907 strnamept=namehist;
4908 strnamept.Append("PkMss_pt");
4909 strnamept+=i;
4910
4911 strtitlept=titlehist;
4912 strtitlept.Append(" Mass Peak, ");
4913 strtitlept+=fptbins[i];
4914 strtitlept.Append("<= pt <");
4915 strtitlept+=fptbins[i+1];
4916 strtitlept.Append(" [GeV/c]");
4917
e047b348 4918 hd0D0ptTGHCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4919 hd0D0ptTGHCotherPM->SetXTitle("Impact parameter [#mum] ");
4920 hd0D0ptTGHCotherPM->SetYTitle("Entries");
4921 flistTghCutsOther->Add(hd0D0ptTGHCotherPM);
624c07ab 4922
4923 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4924 hMCd0D0ptTGHCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4925 hMCd0D0ptTGHCotherPM->SetXTitle("MC Impact parameter [#mum] ");
4926 hMCd0D0ptTGHCotherPM->SetYTitle("Entries");
4927 flistTghCutsOther->Add(hMCd0D0ptTGHCotherPM);
624c07ab 4928
4929
4930 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4931 hd0D0VtxTrueptTGHCotherPM = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4932 hd0D0VtxTrueptTGHCotherPM->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4933 hd0D0VtxTrueptTGHCotherPM->SetYTitle("Entries");
4934 flistTghCutsOther->Add(hd0D0VtxTrueptTGHCotherPM);
624c07ab 4935
4936 strnamept=namehist;
4937 strnamept.Append("SBMss_pt");
4938 strnamept+=i;
4939
4940 strtitlept=titlehist;
4941 strtitlept.Append(" Side Bands, ");
4942 strtitlept+=fptbins[i];
4943 strtitlept.Append("<= pt <");
4944 strtitlept+=fptbins[i+1];
4945 strtitlept.Append(" [GeV/c]");
4946
e047b348 4947 hd0D0ptTGHCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4948 hd0D0ptTGHCotherSB->SetXTitle("Impact parameter [#mum] ");
4949 hd0D0ptTGHCotherSB->SetYTitle("Entries");
4950 flistTghCutsOther->Add(hd0D0ptTGHCotherSB);
624c07ab 4951
4952 strnamept.ReplaceAll("hd0D0","hMCd0D0");
e047b348 4953 hMCd0D0ptTGHCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4954 hMCd0D0ptTGHCotherSB->SetXTitle("MC Impact parameter [#mum] ");
4955 hMCd0D0ptTGHCotherSB->SetYTitle("Entries");
4956 flistTghCutsOther->Add(hMCd0D0ptTGHCotherSB);
624c07ab 4957
4958 strnamept.ReplaceAll("hMCd0D0","hd0D0VtxTrue");
e047b348 4959 hd0D0VtxTrueptTGHCotherSB = new TH1F(strnamept.Data(),strtitlept.Data(),1000,-1000.,1000.);
4960 hd0D0VtxTrueptTGHCotherSB->SetXTitle("Impact parameter w.r.t. True Vtx [#mum] ");
4961 hd0D0VtxTrueptTGHCotherSB->SetYTitle("Entries");
4962 flistTghCutsOther->Add(hd0D0VtxTrueptTGHCotherSB);
624c07ab 4963 }
e047b348 4964 Printf("AFTER DATA HISTOS CREATION \n");
624c07ab 4965}
4966
624c07ab 4967//________________________________________________________________________
4968void AliAnalysisTaskSECharmFraction::UserExec(Option_t */*option*/)
4969{
4970 // Execute analysis for current event:
4971 // heavy flavor candidates association to MC truth
4972
4973 AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
e047b348 4974 if (!aod) {
4975 Printf("ERROR: aod not available");
4976 return;
4977 }
4978 TClonesArray *arrayD0toKpi;
b557eb43 4979 if(!aod && AODEvent() && IsStandardAOD()) {
4980 // In case there is an AOD handler writing a standard AOD, use the AOD
4981 // event in memory rather than the input (ESD) event.
4982 aod = dynamic_cast<AliAODEvent*> (AODEvent());
4983 // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
4984 // have to taken from the AOD event hold by the AliAODExtension
4985 AliAODHandler* aodHandler = (AliAODHandler*)
4986 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
e047b348 4987
b557eb43 4988 if(aodHandler->GetExtensions()) {
4989 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
e047b348 4990 AliAODEvent* aodFromExt = ext->GetAOD();
4991 if(fLikeSign){
4992 // load 2Prong Like Sign
4993 arrayD0toKpi =(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign2Prong");
4994 if(!arrayD0toKpi) {
4995 Printf("AliAnalysisTaskSECharmFraction::UserExec: LikeSign branch not found!\n");
4996 return;
4997 }
4998 }
4999 else {
5000 // load D0->Kpi candidates
5001 arrayD0toKpi = (TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi");
5002 if(!arrayD0toKpi) {
5003 Printf("AliAnalysisTaskSECharmFraction::UserExec: D0toKpi branch not found!\n");
5004 return;
5005 }
5006 }
b557eb43 5007 }
5008 } else {
e047b348 5009 if(fLikeSign){
5010 // load 2Prong Like Sign
5011 arrayD0toKpi =(TClonesArray*)aod->GetList()->FindObject("LikeSign2Prong");
5012 if(!arrayD0toKpi) {
5013 Printf("AliAnalysisTaskSECharmFraction::UserExec: LikeSign branch not found!\n");
5014 return;
5015 }
5016 }
5017 else {
5018 // load D0->Kpi candidates
5019 arrayD0toKpi = (TClonesArray*)aod->GetList()->FindObject("D0toKpi");
5020 if(!arrayD0toKpi) {
5021 Printf("AliAnalysisTaskSECharmFraction::UserExec: D0toKpi branch not found!\n");
5022 return;
5023 }
5024 }
b557eb43 5025 }
8931c313 5026
e047b348 5027
624c07ab 5028 if(!arrayD0toKpi) {
e047b348 5029 printf("AliAnalysisTaskSECharmFraction::UserExec: input branch not found!\n");
624c07ab 5030 return;
5031 }
7c23877d 5032
e047b348 5033
5034 // fix for temporary bug in ESDfilter
7c23877d 5035 // the AODs with null vertex pointer didn't pass the PhysSel
5806c290 5036 if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001) return;
7c23877d 5037
624c07ab 5038 // AOD primary vertex
5039 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
e047b348 5040 TClonesArray *arrayMC=0x0;
5041 AliAODMCHeader *aodmcHeader=0x0;
624c07ab 5042 Double_t vtxTrue[3];
e047b348 5043
bf74e6db 5044 if(fReadMC){
5045 // load MC particles
5046 arrayMC =
5047 (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
5048 if(!arrayMC) {
5049 Printf("AliAnalysisTaskSECharmFraction::UserExec: MC particles branch not found!\n");
5050 return;
5051 }
bf74e6db 5052 // load MC header
5053 aodmcHeader =
5054 (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
5055 if(!aodmcHeader) {
5056 Printf("AliAnalysisTaskSECharmFraction::UserExec: MC header branch not found!\n");
5057 return;
5058 }
bf74e6db 5059 // MC primary vertex
5060 aodmcHeader->GetVertex(vtxTrue);
e047b348 5061 // FILL HISTOS FOR D0 mesons, c quarks and D0 from B properties
5062 FillHistoMCproperties(arrayMC);
624c07ab 5063 }
5064 //histogram filled with 1 for every AOD
5065 fNentries->Fill(1);
5066 PostData(1,fNentries);
cc3209fb 5067 if(!fCutsTight->IsEventSelected(aod))return;
5068 if(!fCutsLoose->IsEventSelected(aod))return;
e047b348 5069
624c07ab 5070
5071 //Printf("There are %d tracks in this event", aod->GetNumberOfTracks());
5072 // Int_t nTotHF=0,nTotDstar=0,nTot3Prong=0;
5073 Int_t nTotD0toKpi=0;
e047b348 5074 Int_t okd0tight,okd0bartight,okd0loose,okd0barloose,okd0tightnopid,okd0bartightnopid;
624c07ab 5075 Bool_t isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,isSideBand;
ac4c229c 5076 Bool_t isinacceptance;
624c07ab 5077 Int_t signallevel=-1;
e047b348 5078 Int_t ptbin,nVtx;
624c07ab 5079 // const Int_t nptbins=10;
5080 Double_t invMassD0,invMassD0bar,ptD0,massmumtrue;
5081
5082
e047b348 5083 AliAODRecoDecayHF *aodDMC=0x0;// to be used to create a fake true sec vertex
624c07ab 5084 // make trkIDtoEntry register (temporary)
5085 Int_t trkIDtoEntry[100000];
e047b348 5086 fptAll=0.;
5087 fptAllSq=0.;
5088 fptMax[0]=0.;
5089 fptMax[1]=0.;
5090 fptMax[2]=0.;
624c07ab 5091 for(Int_t it=0;it<aod->GetNumberOfTracks();it++) {
5092 AliAODTrack *track = aod->GetTrack(it);
e047b348 5093 fptAll+=track->Pt();
5094 fptAllSq+=track->Pt()*track->Pt();
5095 if(track->Pt()>fptMax[0]){
5096 fptMax[2]=fptMax[1];
5097 fptMax[1]=fptMax[0];
5098 fptMax[0]=track->Pt();
5099 }
5100 else if(track->Pt()>fptMax[1]){
5101 fptMax[2]=fptMax[1];
5102 fptMax[1]=track->Pt();
5103 }
5104 else if(track->Pt()>fptMax[2])fptMax[2]=track->Pt();
624c07ab 5105 if(track->GetID()<0) {
5106 //printf("Track ID <0, id= %d\n",track->GetID());
5107 return;
5108 }
5109 trkIDtoEntry[track->GetID()]=it;
5110 }
5111
e047b348 5112
624c07ab 5113 // loop over D0->Kpi candidates
5114 Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
5115 nTotD0toKpi += nD0toKpi;
5116 // cout<<"Number of D0->Kpi: "<<nD0toKpi<<endl;
5117
5118 for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
e047b348 5119 if(aodDMC!=0x0)delete aodDMC;
624c07ab 5120
5121 isPeakD0=kFALSE;
5122 isPeakD0bar=kFALSE;
5123 isSideBandD0=kFALSE;
5124 isSideBandD0bar=kFALSE;
5125 isSideBand=kFALSE;
c387e585 5126 isinacceptance=kFALSE;
ac4c229c 5127 okd0tight=0;
5128 okd0bartight=0;
e047b348 5129 okd0tightnopid=0;
5130 okd0bartightnopid=0;
ac4c229c 5131 okd0loose=0;
5132 okd0barloose=0;
624c07ab 5133
5134 signallevel=-1;
5135
5136
5137 AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
5138 Bool_t unsetvtx=kFALSE;
5139 if(!d->GetOwnPrimaryVtx()) {
5140 d->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
5141 unsetvtx=kTRUE;
5142 }
624c07ab 5143
624c07ab 5144
e047b348 5145 //############# SIGNALLEVEL DESCRIPTION #####################
5146 // TO BE CONSIDERED WITH GREAT CARE, only =0 and =1 (and MC selection when possible) are reliable
5147 // For the other signallevel numbers the order in which cut are applied is relevant
5148 // signallevel =0,1: is selected as signal,is signal (MC)
5149 // from 2 to 20: MC information
5150 // from 21 to 29: "detector" selection (acceptance, pt, refits)
5151 // 21: acceptance, eta (N.B. before 24 May was signallevel=9)
5152 // 22: isinfiducialacceptance
5153 // 23: single track p
5154 // 25: ITS cluster selection
5155 // 26: TPC refit
5156 // 27: ITS refit
5157 // 28: no (TOF||TPC) pid information (no kTOFpid,kTOFout,kTIME,kTPCpid,...)
5158 //
5159 // from 30 to 39: PID selection
5160 // 31: no Kaon compatible tracks found between daughters
5161 // 32: no Kaon identified tracks found (strong sel. at low momenta)
5162 // 33: both mass hypotheses are rejected
5163 // from 40 to 45: standard cut selection
5164 // from 45 to 49: special cut signal kinematic selection
5165 // 46: pstar cut
5166 // from 50 to 60: special cut selection
5167 // 51: Nvtx contributors
5168 // 52: angle between tracks
5169 // 53: vtx not reconstructed when excludind daughters
5170 // 54: track not propagated to dca when the vtx is recalculated
5171 // 55: single track normalized impact par.
5172 // 56: normalized d0xd0
5173 // 57: d0xd0 cut with vtx on the fly
5174 // 58,59: cut normalized decay lenght and decay lenght
ac4c229c 5175 //####### DATA SELECTION ####################################
5176 //
5177 // ######## CHECK FOR ACCEPTANCE ##########
5178 ptD0=d->Pt();
e047b348 5179 ptbin=fCutsTight->PtBin(ptD0);
5180 Double_t relangle=d->ProngsRelAngle(0,1);
5181 // UPV: HERE TO CHANGE WITH:
5182 // isinacceptance = (TMath::Abs(d->EtaProng(0))<fAcceptanceCuts[0]&&TMath::Abs(d->EtaProng(1))<fAcceptanceCuts[0]); //eta acceptance
5183
624c07ab 5184 //######## INVARIANT MASS SELECTION ###############
5185 CheckInvMassD0(d,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar);
c387e585 5186 if((isSideBandD0||isSideBandD0bar)&&!(isPeakD0||isPeakD0bar))isSideBand=kTRUE;// TEMPORARY, NOT DONE IN THE METHOD CALLED ABOVE ONLY FOR FURTHER SIDE BAND STUDY
624c07ab 5187
5188 // INVESTIGATE SIGNAL TYPE : ACCESS TO MC INFORMATION
bf74e6db 5189 if(fReadMC){
5190 aodDMC=GetD0toKPiSignalType(d,arrayMC,signallevel,massmumtrue,vtxTrue);
5191 }
5192 else signallevel=0;
e047b348 5193 // ACCOUNT FOR ETA & ITS CLUSTER SELECTION
5194 isinacceptance=fCutsTight->AreDaughtersSelected(d);
5195 if(!isinacceptance)signallevel=21;
5196 if(!fCutsTight->IsInFiducialAcceptance(ptD0,d->Y(421))){
5197 isinacceptance=kFALSE;
5198 signallevel=22;
5199 }
5200
5201 //###################################################################################
5202 //
5203 // ################ SPECIAL ADDITIONAL CUTS FOR SIGNAL SEARCH #######################
5204 // UPV: ITS CLUSTER SELECTION ALREADY DONE , COUNT THEM THE SAME
5205 //
5206 Int_t nlayers=0,nSPD=0,nSSD=0;
5207 Bool_t spd1=kFALSE;
5208
5209 for(Int_t idg=0;idg<d->GetNDaughters();idg++){
5210
5211 AliAODTrack *dgTrack = (AliAODTrack*)d->GetDaughter(idg);
5212 if(TESTBIT(dgTrack->GetITSClusterMap(),5)){
5213 nlayers++;
5214 nSSD++;
5215 }
5216 if(TESTBIT(dgTrack->GetITSClusterMap(),4)){
5217 nlayers++;
5218 nSSD++;
5219 }
5220 if(TESTBIT(dgTrack->GetITSClusterMap(),3))nlayers++;
5221 if(TESTBIT(dgTrack->GetITSClusterMap(),2))nlayers++;
5222 if(TESTBIT(dgTrack->GetITSClusterMap(),1)){
5223 nlayers++;
5224 nSPD++;
5225 }
5226 if(TESTBIT(dgTrack->GetITSClusterMap(),0)){
5227 nlayers++;
5228 nSPD++;
5229 spd1=kTRUE;
5230 }
5231 }
5232 /*
5233 // ######## NOW SELECTION ##########
5234 if(dgTrack->Pt()<0.5){
5235 // ########## k-Both selection ##############
5236 if(nlayers<5)signallevel=25;
5237 if(nSPD<2)signallevel=25;
5238 }
5239 else if(dgTrack->Pt()<1.){
5240 // ########## 4 its clust (1 SSD,1 SPD) && k-Any selection ##############
5241 if(nlayers<4)signallevel=25;
5242 if(nSSD<1)signallevel=25;
5243 if(nSPD<1)signallevel=25;
5244 }
5245 else{
5246 // ########## 3 its clust (1 SPD, 1 SSD) && k-Any selection ##########
5247 if(nlayers<3)signallevel=25;
5248 if(nSSD<1)signallevel=25;
5249 if(nSPD<1)signallevel=25;
5250 }
5251 }
5252 */
5253
5254
5255
5256
5257
5258
5259 //########### END OF SPECIAL CUTS ######################
5260 //
5261 //###############################################################
5262
5263 // NOW APPLY CUTS
5264 // Check tighter cuts w/o PID:
5265 //
5266 Int_t ncont=vtx1->GetNContributors();
5267 if(vtx1->GetNContributors()<1)signallevel=51;
5268 Bool_t defaultNC=SpecialSelD0(d,nVtx);
5269 Bool_t iscutusingpid=fCutsTight->GetIsUsePID();
5270 fCutsTight->SetUsePID(kFALSE);
5271 Int_t isSelectedTightNoPid=fCutsTight->IsSelected(d,AliRDHFCuts::kAll,aod);
5272 switch(isSelectedTightNoPid){
5273 case 0:
5274 okd0tightnopid=kFALSE;
5275 okd0bartightnopid=kFALSE;
5276 break;
5277 case 1:
5278 okd0tightnopid=kTRUE;
5279 okd0bartightnopid=kFALSE;
5280 break;
5281 case 2:
5282 okd0tightnopid=kFALSE;
5283 okd0bartightnopid=kTRUE;
5284 break;
5285 case 3:
5286 okd0tightnopid=kTRUE;
5287 okd0bartightnopid=kTRUE;
5288 break;
5289 default:
5290 okd0tightnopid=kTRUE;
5291 okd0bartightnopid=kTRUE;
5292 break;
5293 }
5294
5295 if(!defaultNC){
5296 okd0tightnopid=kFALSE;
5297 okd0bartightnopid=kFALSE;
5298 }
5299 // signallevel=fCutsTight->GetSelectionStep();
c387e585 5300 fSignalType->Fill(signallevel);
5301
e047b348 5302
624c07ab 5303
e047b348 5304
5305 // ######### SPECIAL SELECTION PID ##############
5306 fCutsTight->SetUsePID(iscutusingpid);
5307 Int_t isSelectedPid=fCutsTight->IsSelected(d,AliRDHFCuts::kPID,aod);
5308 Int_t isSelectedTight=fCutsTight->CombineSelectionLevels(3,isSelectedTightNoPid,isSelectedPid);
5309 switch(isSelectedTight){
5310 case 0:
5311 okd0tight=kFALSE;
5312 okd0bartight=kFALSE;
5313 break;
5314 case 1:
5315 okd0tight=kTRUE;
5316 okd0bartight=kFALSE;
5317 break;
5318 case 2:
5319 okd0tight=kFALSE;
5320 okd0bartight=kTRUE;
5321 break;
5322 case 3:
5323 okd0tight=kTRUE;
5324 okd0bartight=kTRUE;
5325 break;
5326 default:
5327 okd0tight=kTRUE;
5328 okd0bartight=kTRUE;
5329 break;
5330 }
5331
5332
624c07ab 5333
e047b348 5334
5335
ac4c229c 5336 if(((isPeakD0&&okd0tight)||(isPeakD0bar&&okd0bartight))&&isinacceptance)fSignalTypeTghCuts->Fill(signallevel);
624c07ab 5337
5338 // CHECK LOOSER CUTS
e047b348 5339 //ptbin=SetStandardCuts(ptD0,flargeInvMassCut);
5340
5341 // d->SelectD0(fCutsLoose->GetD0toKpiCuts(),okd0loose,okd0barloose);
5342 Int_t isSelectedLoose=fCutsLoose->IsSelected(d,AliRDHFCuts::kAll,aod);
5343 switch(isSelectedLoose){
5344 case 0:
5345 okd0loose=kFALSE;
5346 okd0barloose=kFALSE;
5347 break;
5348 case 1:
5349 okd0loose=kTRUE;
5350 okd0barloose=kFALSE;
5351 break;
5352 case 2:
5353 okd0loose=kFALSE;
5354 okd0barloose=kTRUE;
5355 break;
5356 case 3:
5357 okd0loose=kTRUE;
5358 okd0barloose=kTRUE;
5359 break;
5360 default:
5361 okd0loose=kTRUE;
5362 okd0barloose=kTRUE;
5363 break;
5364 }
5365 if(!defaultNC){
5366 okd0loose=kFALSE;
5367 okd0barloose=kFALSE;
5368 }
5369
5370
5371
ac4c229c 5372 if(((isPeakD0&&okd0loose)||(isPeakD0bar&&okd0barloose))&&isinacceptance)fSignalTypeLsCuts->Fill(signallevel);
624c07ab 5373
5374
e047b348 5375
624c07ab 5376 //################### FILL HISTOS ########################
5377 //################################################################
5378 //
5379 //######## improvement: SPEED HERE CAN BE IMPROVED: CALCULATE ONCE AND FOR ALL
5380 // CANDIDATE VARIABLES
5381
e047b348 5382
5383
624c07ab 5384 //NO CUTS Case: force okD0 and okD0bar = kTRUE
e047b348 5385 // special cuts are applied also in the "NO Cuts" case
5386 //
5387 //
5388 // SPECIAL modification:
5389 // IMPORTANT!!!!!! ONLY FOR TEMPORARY CONVENIENCE
5390 // IF fusePID is kTRUE, NO CUTS BECOMES NO PID case with tight cuts (fill signal histos when 30<=signallevel<40 )!!!!!!!!!!
5391 if(!fusePID){
5392 okd0tightnopid=defaultNC;
5393 okd0bartightnopid=defaultNC;
5394 }
5395 // ############ MISALIGN HERE: TEMPORARY SOLUTION ##########
5396 //d->Misalign("full14");
5397 if(signallevel==1||signallevel==0)FillHistos(d,flistNoCutsSignal,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue); // else if(fusePID&&signallevel>=30&&signallevel<40)FillHistos(d,flistNoCutsSignal,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);// OLD LINE, COULD BE REMOVED
5398 else if(signallevel==2)FillHistos(d,flistNoCutsFromDstar,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5399 else if(signallevel==3||signallevel==4)FillHistos(d,flistNoCutsFromB,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5400 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==9)FillHistos(d,flistNoCutsBack,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5401 else if(signallevel==5||signallevel==6)FillHistos(d,flistNoCutsOther,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5402
624c07ab 5403
e047b348 5404
624c07ab 5405 //LOOSE CUTS Case
bf74e6db 5406 if(signallevel==1||signallevel==0)FillHistos(d,flistLsCutsSignal,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
ac4c229c 5407 else if(signallevel==2)FillHistos(d,flistLsCutsFromDstar,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5408 else if(signallevel==3||signallevel==4)FillHistos(d,flistLsCutsFromB,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
c387e585 5409 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10)FillHistos(d,flistLsCutsBack,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
ac4c229c 5410 else if(signallevel==5||signallevel==6)FillHistos(d,flistLsCutsOther,ptbin,okd0loose,okd0barloose,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
624c07ab 5411
5412 //TIGHT CUTS Case
bf74e6db 5413 if(signallevel==1||signallevel==0)FillHistos(d,flistTghCutsSignal,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
ac4c229c 5414 else if(signallevel==2)FillHistos(d,flistTghCutsFromDstar,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5415 else if(signallevel==3||signallevel==4)FillHistos(d,flistTghCutsFromB,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
c387e585 5416 else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10)FillHistos(d,flistTghCutsBack,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
ac4c229c 5417 else if(signallevel==5||signallevel==6)FillHistos(d,flistTghCutsOther,ptbin,okd0tight,okd0bartight,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBand,massmumtrue,aodDMC,vtxTrue);
5418
624c07ab 5419
e047b348 5420
5421
5422 // ######## PRINTING INFO FOR D0-like candidate
5423
5424 if(nSPD==2&&ptD0>2.){
5425 if((okd0tight&&TMath::Abs(invMassD0-1.864)<0.01)||(okd0bartight&&TMath::Abs(invMassD0bar-1.864)<0.01)){
5426 printf("INFO FOR DRAWING: \n pt: %f \n Rapidity: %f \n Period Number: %d \n Run Number: %d \n BunchCrossNumb: %d \n OrbitNumber: %d \n",ptD0,d->Y(421),aod->GetPeriodNumber(),aod->GetRunNumber(),aod->GetBunchCrossNumber(),aod->GetOrbitNumber());
5427printf("PrimVtx NContributors: %d \n Prongs Rel Angle: %f \n \n",ncont,relangle);
5428 }
5429 }
5430 if(aodDMC!=0x0){
624c07ab 5431 delete aodDMC;
e047b348 5432 aodDMC=0x0;
624c07ab 5433 }
ac4c229c 5434
624c07ab 5435 if(unsetvtx) d->UnsetOwnPrimaryVtx();
ac4c229c 5436
624c07ab 5437 }
c387e585 5438
624c07ab 5439 // ####################### POST OUTPUT TLIST DATA #########################
5440 // ####### histo for #AOD entries already posted
5441
5442 PostData(2,fSignalType);
5443 PostData(3,fSignalTypeLsCuts);
5444 PostData(4,fSignalTypeTghCuts);
e047b348 5445 PostData(5,flistMCproperties);
5446 PostData(6,flistNoCutsSignal);
5447 PostData(7,flistNoCutsBack);
5448 PostData(8,flistNoCutsFromB);
5449 PostData(9,flistNoCutsFromDstar);
5450 PostData(10,flistNoCutsOther);
5451 PostData(11,flistLsCutsSignal);
5452 PostData(12,flistLsCutsBack);
5453 PostData(13,flistLsCutsFromB);
5454 PostData(14,flistLsCutsFromDstar);
5455 PostData(15,flistLsCutsOther);
5456 PostData(16,flistTghCutsSignal);
5457 PostData(17,flistTghCutsBack);
5458 PostData(18,flistTghCutsFromB);
5459 PostData(19,flistTghCutsFromDstar);
5460 PostData(20,flistTghCutsOther);
624c07ab 5461
5462 return;
5463}
e047b348 5464
cc3209fb 5465
5466
5467//_________________________________________
5468Int_t AliAnalysisTaskSECharmFraction::SetStandardCuts(Float_t *&ptbinlimits){
5469 //
5470 // creating cuts for D0 -> Kpi
5471 //
5472 // const Double_t ptmin = 0.1;
5473 const Double_t ptmax = 9999.;
5474 const Int_t nptbins =13;
5475 const Int_t nvars=9;
5476 Int_t varycuts=-1;
5477
e047b348 5478 if(fCutsTight){
5479 delete fCutsTight;fCutsTight=NULL;
5480 }
5481 if(fCutsLoose){
5482 delete fCutsLoose;fCutsLoose=NULL;
5483 }
cc3209fb 5484
5485
e047b348 5486 fCutsTight = new AliRDHFCutsD0toKpi();
5487 fCutsTight->SetName("D0toKpiCutsStandard");
5488 fCutsTight->SetTitle("Standard Cuts for D0 analysis");
5489
5490 fCutsLoose = new AliRDHFCutsD0toKpi();
5491 fCutsLoose->SetName("D0toKpiCutsLoose");
5492 fCutsLoose->SetTitle("Loose Cuts for D0 analysis");
5493
5494 // EVENT CUTS
cc3209fb 5495 fCutsTight->SetMinVtxContr(1);
5496 fCutsLoose->SetMinVtxContr(1);
5497
e047b348 5498 // TRACKS ON SINGLE TRACKS
5499 AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
5500 esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
5501 esdTrackCuts->SetRequireTPCRefit(kTRUE);
5502 esdTrackCuts->SetRequireITSRefit(kTRUE);
cc3209fb 5503 // esdTrackCuts->SetMinNClustersITS(4);
e047b348 5504 esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
5505 esdTrackCuts->SetMinDCAToVertexXY(0.);
5506 esdTrackCuts->SetEtaRange(-0.8,0.8);
5507 esdTrackCuts->SetPtRange(0.3,1.e10);
5508
cc3209fb 5509
e047b348 5510 fCutsTight->AddTrackCuts(esdTrackCuts);
cc3209fb 5511 fCutsLoose->AddTrackCuts(esdTrackCuts);
e047b348 5512
5513
cc3209fb 5514
5515 Float_t ptbins[nptbins+1];
5516 ptbins[0]=0.;
5517 ptbins[1]=0.5;
5518 ptbins[2]=1.;
5519 ptbins[3]=2.;
5520 ptbins[4]=3.;
5521 ptbins[5]=4.;
5522 ptbins[6]=5.;
5523 ptbins[7]=6.;
5524 ptbins[8]=8.;
5525 ptbins[9]=12.;
5526 ptbins[10]=16.;
5527 ptbins[11]=20.;
5528 ptbins[12]=24.;
5529 ptbins[13]=ptmax;
5530
5531 fCutsTight->SetGlobalIndex(nvars,nptbins);
5532 fCutsLoose->SetGlobalIndex(nvars,nptbins);
e047b348 5533 fCutsTight->SetPtBins(nptbins+1,ptbins);
5534 fCutsLoose->SetPtBins(nptbins+1,ptbins);
5535
cc3209fb 5536 /* Float_t cutsArrayD0toKpiStand_1[9]={0.200,300.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,-35000.*1E-8,0.7}; // pt<1
5537 Float_t cutsArrayD0toKpiStand_2[9]={0.200,200.*1E-4,0.8,0.4,0.4,1000.*1E-4,1000.*1E-4,-30000.*1E-8,0.8}; // 1<=pt<2
5538 Float_t cutsArrayD0toKpiStand_3[9]={0.200,200.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-26000.*1E-8,0.94}; // 2<=pt<3
5539 Float_t cutsArrayD0toKpiStand_4[9]={0.200,200.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-15000.*1E-8,0.88}; // 3<=pt<5
5540 Float_t cutsArrayD0toKpiStand_5[9]={0.200,150.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-10000.*1E-8,0.9}; // 5<=pt<8
5541 Float_t cutsArrayD0toKpiStand_6[9]={0.200,150.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-10000.*1E-8,0.9}; // 8<pt<12
5542 Float_t cutsArrayD0toKpiStand_7[9]={0.200,150.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-10000.*1E-8,0.9}; // pt>12
e047b348 5543 */
cc3209fb 5544
5545 const Int_t nvary=3;
5546 Float_t varyd0xd0[nptbins][nvary]={{-35000.*1E-8,-40000.*1E-8,-50000.*1E-8},/* pt<0.5*/
5547 {-35000.*1E-8,-40000.*1E-8,-50000.*1E-8},/* 0.5<pt<1*/
5548 {-25000.*1E-8,-32000.*1E-8,-38000.*1E-8},/* 1<pt<2 */
5549 {-22000.*1E-8,-26000.*1E-8,-30000.*1E-8},/* 2<pt<3 */
5550 {-12000.*1E-8,-15000.*1E-8,-20000.*1E-8},/* 3<pt<4 */
5551 {-12000.*1E-8,-15000.*1E-8,-20000.*1E-8},/* 4<pt<5 */
5552 {-5000.*1E-8,-10000.*1E-8,-15000.*1E-8},/* 5<pt<6 */
5553 {-5000.*1E-8,-10000.*1E-8,-15000.*1E-8},/* 6<pt<8 */
5554 {-0.*1E-8,-10000.*1E-8,-12000.*1E-8},/* 8<pt<12 */
5555 {5000.*1E-8,-5000.*1E-8,-10000.*1E-8},/* 12<pt<16 */
5556 {5000.*1E-8,-5000.*1E-8,-10000.*1E-8},/* 16<pt<20 */
5557 {5000.*1E-8,-5000.*1E-8,-10000.*1E-8},/* 20<pt<24 */
5558 {5000.*1E-8,-5000.*1E-8,-10000.*1E-8}};/* pt>24 */
5559
5560
5561 Float_t varyCosPoint[nptbins][nvary]={{0.75,0.80,0.85},/* 0<pt<0.5 */
5562 {0.75,0.80,0.85},/* 0.5<pt<1*/
5563 {0.75,0.80,0.85},/* 1<pt<2 */
5564 {0.92,0.94,0.95},/* 2<pt<3 */
5565 {0.85,0.88,0.91},/* 3<pt<4 */
5566 {0.85,0.88,0.91},/* 4<pt<5 */
5567 {0.88,0.90,0.92},/* 5<pt<6 */
5568 {0.88,0.90,0.92},/* 6<pt<8 */
5569 {0.85,0.90,0.92},/* 8<pt<12 */
5570 {0.85,0.90,0.92},/* 12<pt<16 */
5571 {0.8,0.85,0.9},/* 16<pt<20 */
5572 {0.8,0.85,0.9},/* 20<pt<24 */
5573 {0.75,0.82,0.9}};/* pt>24 */
e047b348 5574
e047b348 5575
cc3209fb 5576
5577 if(varycuts==-1){//DEFAULT CUTS
5578 varycuts=11;
5579 varyd0xd0[9][1]=-10000.*1E-8;
5580 varyd0xd0[10][1]=-10000.*1E-8;
5581 varyd0xd0[11][1]=-10000.*1E-8;
5582 varyd0xd0[12][1]=-10000.*1E-8;
5583 }
5584 Int_t vcd0xd0=varycuts/10;
5585 Int_t vccospoint=varycuts%10;
5586 // ######################## STAND VARY CUTS ###########################################
5587 Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.400,300.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,varyd0xd0[0][vcd0xd0],varyCosPoint[0][vccospoint]},/* 0<pt<0.5*/
5588 {0.400,300.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,varyd0xd0[1][vcd0xd0],varyCosPoint[1][vccospoint]},/* 0.5<pt<1*/
5589 {0.400,300.*1E-4,0.8,0.4,0.4,1000.*1E-4,1000.*1E-4,varyd0xd0[2][vcd0xd0],varyCosPoint[2][vccospoint]},/* 1<pt<2 */
5590 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[3][vcd0xd0],varyCosPoint[3][vccospoint]},/* 2<pt<3 */
5591 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[4][vcd0xd0],varyCosPoint[4][vccospoint]},/* 3<pt<4 */
5592 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[5][vcd0xd0],varyCosPoint[5][vccospoint]},/* 4<pt<5*/
5593 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[6][vcd0xd0],varyCosPoint[6][vccospoint]},/* 5<pt<6 */
5594 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[7][vcd0xd0],varyCosPoint[7][vccospoint]},/* 6<pt<8 */
5595 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[8][vcd0xd0],varyCosPoint[8][vccospoint]},/* 8<pt<12 */
5596 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[9][vcd0xd0],varyCosPoint[9][vccospoint]},/*12< pt <16*/
5597 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[10][vcd0xd0],varyCosPoint[10][vccospoint]}, /*16< pt <20*/
5598 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[11][vcd0xd0],varyCosPoint[11][vccospoint]}, /*20< pt <24*/
5599 {0.400,250.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,varyd0xd0[12][vcd0xd0],varyCosPoint[12][vccospoint]}
5600 };/* pt > 24*/
5601
5602 Float_t cutsMatrixD0toKpiLoose[nptbins][nvars]={{0.400,300.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,-35000.*1E-8,0.73},/* pt<0.5*/
5603 {0.400,300.*1E-4,0.8,0.3,0.3,1000.*1E-4,1000.*1E-4,-35000.*1E-8,0.73},/* 0.5<pt<1*/
5604 {0.400,300.*1E-4,0.8,0.4,0.4,1000.*1E-4,1000.*1E-4,-25000.*1E-8,0.75},/* 1<pt<2 */
5605 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-15000.*1E-8,0.8},/* 2<pt<3 */
5606 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-8000.*1E-8,0.85},/* 3<pt<4 */
5607 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-8000.*1E-8,0.85},/* 4<pt<5 */
5608 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-8000.*1E-8,0.85},/* 5<pt<6 */
5609 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-8000.*1E-8,0.85},/* 6<pt<8 */
5610 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-5000.*1E-8,0.85},/* 8<pt<12 */
5611 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-0.*1E-8,0.85},/* 12<pt<16 */
5612 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,0.*1E-8,0.85},/* 16<pt<20 */
5613 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,0.*1E-8,0.85},/* 20<pt<24 */
5614 {0.400,300.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,0.*1E-8,0.85}};/* pt>24 */
5615
5616
5617 //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts
5618 Float_t **cutsMatrixTransposeStand=new Float_t*[nvars];
5619 for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins];
5620 Float_t **cutsMatrixTransposeLoose=new Float_t*[nvars];
5621 for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeLoose[iv]=new Float_t[nptbins];
5622
5623 for (Int_t ibin=0;ibin<nptbins;ibin++){
5624 for (Int_t ivar = 0; ivar<nvars; ivar++){
5625 cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar];
5626 cutsMatrixTransposeLoose[ivar][ibin]=cutsMatrixD0toKpiLoose[ibin][ivar];
5627 //printf("cutsMatrixD0toKpi[%d][%d] = %f\n",ibin, ivar,cutsMatrixD0toKpiStand[ibin][ivar]);
5628 }
5629 }
5630
e047b348 5631
e047b348 5632
cc3209fb 5633 fCutsTight->SetCuts(nvars,nptbins,cutsMatrixTransposeStand);
5634 fCutsLoose->SetCuts(nvars,nptbins,cutsMatrixTransposeLoose);
5635
e11ae259 5636 for (Int_t ivar = 0; ivar<nvars; ivar++){
5637 delete [] cutsMatrixTransposeStand[ivar];
5638 delete [] cutsMatrixTransposeLoose[ivar];
5639 }
5640 delete [] cutsMatrixTransposeStand;
5641 cutsMatrixTransposeStand=NULL;
5642 delete [] cutsMatrixTransposeLoose;
5643 cutsMatrixTransposeLoose=NULL;
5644
cc3209fb 5645 fCutsTight->SetUseSpecialCuts(kTRUE);
5646 fCutsLoose->SetUseSpecialCuts(kTRUE);
5647 fCutsTight->SetRemoveDaughtersFromPrim(kTRUE);
5648 fCutsLoose->SetRemoveDaughtersFromPrim(kTRUE);
5649 // PID SETTINGS
5650 AliAODPidHF* pidObj=new AliAODPidHF();
5651 //pidObj->SetName("pid4D0");
5652 Int_t mode=1;
5653 const Int_t nlims=2;
5654 Double_t plims[nlims]={0.6,0.8}; //TPC limits in momentum [GeV/c]
5655 Bool_t compat=kTRUE; //effective only for this mode
5656 Bool_t asym=kTRUE;
5657 Double_t sigmas[5]={2.,1.,0.,3.,0.}; //to be checked and to be modified with new implementation of setters by Rossella
5658 pidObj->SetAsym(asym);// if you want to use the asymmetric bands in TPC
5659 pidObj->SetMatch(mode);
5660 pidObj->SetPLimit(plims,nlims);
5661 pidObj->SetSigma(sigmas);
5662 pidObj->SetCompat(compat);
5663 pidObj->SetTPC(kTRUE);
5664 pidObj->SetTOF(kTRUE);
5665
5666 fCutsTight->SetPidHF(pidObj);
5667 fCutsLoose->SetPidHF(pidObj);
e11ae259 5668 delete pidObj; pidObj=NULL;
cc3209fb 5669 fCutsTight->SetUsePID(kTRUE);
5670 fCutsLoose->SetUsePID(kTRUE);
5671
5672 fCutsTight->SetUseDefaultPID(kFALSE);
5673 fCutsLoose->SetUseDefaultPID(kFALSE);
5674
5675 // PILE UP REJECTION
5676 fCutsTight->SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
5677 fCutsLoose->SetOptPileup(AliRDHFCuts::kRejectPileupEvent);
5678
5679 ptbinlimits=ptbins;
5680 fCutsTight->PrintAll();
5681
5682 return nptbins;
5683
e047b348 5684}
624c07ab 5685
cc3209fb 5686
624c07ab 5687//_________________________________________
5688Int_t AliAnalysisTaskSECharmFraction::SetStandardCuts(Double_t pt,Double_t invMassCut){
e047b348 5689 // UPV: this should set the cut object
5690
624c07ab 5691 //#############
5692 // TEMPORARY: to be change in :
5693 // for(j<nptbins)
5694 // if pt < standardptbin[j+1]
5695 // SetCuts, bin=j
5696 // break
5697 //
5698 // the way the cuts are set is for further development
5699 // (to be interfaced with AliAnalsysTaskSETuneCuts)
c387e585 5700 //
5701 // Cuts:
5702 // 0 = inv. mass half width [GeV]
5703 // 1 = dca [cm]
5704 // 2 = cosThetaStar
5705 // 3 = pTK [GeV/c]
5706 // 4 = pTPi [GeV/c]
5707 // 5 = d0K [cm] upper limit!
5708 // 6 = d0Pi [cm] upper limit!
5709 // 7 = d0d0 [cm^2]
e047b348 5710 // 8 = cosThetaPoint
5711 Int_t ptbin=-1;
5712
5713
c387e585 5714
e047b348 5715 /*//#######################################################################
5716 //###########################################################################
5717 // STANDARD SETS OF CUTS ("tight"~PPR like; commented loose are more stringent than "tight")
5718 // #########################################################################
624c07ab 5719 Int_t ptbin=-1;
e047b348 5720 if(pt>0. && pt<=1.) {
5721 ptbin=0;
5722 fCutsTight->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.0002,0.5);
5723 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.00025,0.7);
5724 fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.3,0.3,1.,1.,-0.0002,0.7);
5725 }
5726 if(pt>1. && pt<=2.) {
624c07ab 5727 ptbin=1;
e047b348 5728 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.05,0.05,-0.0002,0.6);
5729 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5730 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.3,0.3,1.,1.,-0.0001,0.7);
624c07ab 5731 //printf("I'm in the bin %d\n",ptbin);
5732 }
e047b348 5733 if(pt>2. && pt<=3.) {
624c07ab 5734 ptbin=2;
e047b348 5735 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.05,0.05,-0.0002,0.6);
5736 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5737 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.3,0.3,1.,1.,-0.0001,0.7);
5738 //printf("I'm in the bin %d\n",ptbin);
5739 }
5740 if(pt>3. && pt<=5.){
5741 ptbin=3;
5742 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.0001,0.8);
5743 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.8);
5744 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.4,0.4,1.,1.,-0.0001,0.75);
624c07ab 5745 //printf("I'm in the bin %d\n",ptbin);
5746 }
5747 if(pt>5.){
e047b348 5748 ptbin=4;
5749 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00005,0.8);
5750 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
5751 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.5,0.5,1.,1.,-0.00005,0.75);
5752 }//if(pt>5)
5753 return ptbin;
5754 //############################################################################
5755 */
5756
5757
5758
5759 /* //#######################################################################
5760 //################# VARY CUTS for d0xd0 STUDY ##########################
5761
5762if(pt>0. && pt<=1.) {
5763 ptbin=0;
5764 fCutsTight->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.0002,0.5);
5765 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.00025,0.7);
5766 fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.3,0.3,1.,1.,-0.0002,0.7);
5767 }
5768 if(pt>1. && pt<=2.) {
5769 ptbin=1;
5770 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.05,0.05,0.2,0.6);
5771 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5772 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.3,0.3,1.,1.,-0.0001,0.1);
5773 //printf("I'm in the bin %d\n",ptbin);
5774 }
5775 if(pt>2. && pt<=3.) {
5776 ptbin=2;
5777 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.05,0.05,0.2,0.6);
5778 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5779 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.3,0.3,1.,1.,-0.0001,0.1);
5780 //printf("I'm in the bin %d\n",ptbin);
5781 }
5782 if(pt>3. && pt<=5.){
5783 ptbin=3;
5784 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,0.2,0.8);
5785 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.8);
5786 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.3,0.4,0.4,1.,1.,-0.0001,0.1);
5787 //printf("I'm in the bin %d\n",ptbin);
5788 }
5789 if(pt>5.){
5790 ptbin=4;
5791 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,0.2,0.8);
5792 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
5793 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.5,0.5,1.,1.,-0.00005,0.1);
5794 }//if(pt>5)
5795 return ptbin;
5796 // #################################################################
5797 */
5798
5799 //##########################################################################
5800 //################## CUTS with d0xd0 cut released #########################
5801 //### and TGHC cuts d0K and d0Pi to 0.1 instead of 0.05
5802 //### USED FOR PHDthesis
5803 //##########################################################################
5804
5805 /* if(pt>0. && pt<=1.) {
5806 ptbin=0;
5807 fCutsTight->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.1,0.1,-0.000,0.5);
5808 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.00025,0.7);
5809 fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.3,0.3,1.,1.,-0.000,0.7);
5810 }
5811 if(pt>1. && pt<=2.) {
5812 ptbin=1;
5813 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.1,0.1,-0.000,0.6);
5814 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5815 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.4,0.4,1.,1.,-0.0000,0.7);
5816 //printf("I'm in the bin %d\n",ptbin);
5817 }
5818 if(pt>2. && pt<=3.) {
5819 ptbin=2;
5820 fCutsTight->SetD0toKpiCuts(invMassCut,0.03,0.8,0.6,0.6,0.1,0.1,-0.000,0.6);
5821 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5822 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.4,0.4,1.,1.,-0.000,0.7);
5823 //printf("I'm in the bin %d\n",ptbin);
5824 }
5825 if(pt>3. && pt<=5.){
5826 ptbin=3;
5827 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.000,0.8);
5828 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.8);
5829 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.5,0.5,1.,1.,-0.000,0.75);
5830 //printf("I'm in the bin %d\n",ptbin);
5831 }
5832 if(pt>5.){
5833 ptbin=4;
5834 fCutsTight->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.0000,0.8);
5835 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
5836 fCutsLoose->SetD0toKpiCuts(invMassCut,0.03,0.8,0.5,0.5,1.,1.,-0.0000,0.75);
5837 }//if(pt>5)
5838 return ptbin;
5839 */
5840
5841
5842
5843
5844 //########## LOOKING FOR SIGNAL #####################
5845 /*
5846 if(pt>0. && pt<=1.) {
5847 ptbin=0;
5848 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.03,0.8,0.3,0.3,0.1,0.1,-0.00035,0.7);
5849 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.04,0.8,0.5,0.5,0.05,0.05,-0.00025,0.7);
5850 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.04,0.8,0.3,0.3,0.1,0.1,-0.00025,0.7);
5851 }
5852 if(pt>1. && pt<=2.) {
5853 ptbin=1;
5854 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.4,0.4,0.1,0.1,-0.00035,0.8);
5855 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5856 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.03,0.8,0.3,0.3,0.1,0.1,-0.0025,0.75);
5857 //printf("I'm in the bin %d\n",ptbin);
5858 }
5859 if(pt>2. && pt<=3.) {
5860 ptbin=2;
5861 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.00026,0.94);
5862 //fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,1,1,-0.00025,0.8);
5863 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.0002,0.92);
5864 //printf("I'm in the bin %d\n",ptbin);
5865 }
5866 if(pt>3. && pt<=5.){
5867 ptbin=3;
5868 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.00015,0.88);
5869 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.8);
5870 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.00015,0.9);
5871 //printf("I'm in the bin %d\n",ptbin);
5872 }
5873 if(pt>5.&& pt<=8.){
5874 ptbin=4;
5875 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.015,0.8,0.7,0.7,0.1,0.1,-0.0001,0.9);
5876 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
5877 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.02,0.8,0.7,0.7,0.1,0.1,-0.0000,0.88);
5878 }//if(pt>5)
5879 if(pt>8.&&pt<=12.){
5880 ptbin=5;
5881 fCutsTight->SetD0toKpiCuts(5*invMassCut,0.015,0.8,0.7,0.7,0.1,0.1,-0.0001,0.9);
5882 // fCutsLoose->SetD0toKpiCuts(invMassCut,0.02,0.8,0.7,0.7,0.05,0.05,-0.00015,0.9);
5883 fCutsLoose->SetD0toKpiCuts(5*invMassCut,0.015,0.8,0.7,0.7,0.1,0.1,-0.0005,0.88);
624c07ab 5884 }//if(pt>5)
e047b348 5885
624c07ab 5886 return ptbin;
e047b348 5887 */
5888 printf("AliAnalysisTaskSECharmFraction::Obsolete method! Parameters pt=%f,invmasscut=%f not used \n",pt,invMassCut);
5889 return ptbin;
5890
624c07ab 5891}
5892
5893//__________________________________________________________
5894void AliAnalysisTaskSECharmFraction::CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar){
5895 //Check wheter the candidate inv. mass is compatible with signal or sideband inv. mass selection
5896
5897 d->InvMassD0(invMassD0,invMassD0bar);
5898 //CHECK if ISPEAK
5899 if(TMath::Abs(invMassD0-fmD0PDG)<fsignalInvMassCut)isPeakD0=kTRUE;
5900 if(TMath::Abs(invMassD0bar-fmD0PDG)<fsignalInvMassCut)isPeakD0bar=kTRUE;
5901 //CHECK if ISSIDEBAND: no constraint is present between signal region definition and side band definition
5902 // ######## TO BE CHANGED the distinction between sidebandD0 and sidebandD0bar is meaningless
5903 // and it is present only for side band region study (see which inv mass has the D0(D0bar)
5904 // in case the D0bar(D0) is in the sideband) #######
5905 if(TMath::Abs(invMassD0-fmD0PDG)>fsidebandInvMassCut&&TMath::Abs(invMassD0-fmD0PDG)<fsidebandInvMassCut+fsidebandInvMassWindow){
5906 isSideBandD0=kTRUE;
5907 }
5908 if(TMath::Abs(invMassD0bar-fmD0PDG)>fsidebandInvMassCut&&TMath::Abs(invMassD0bar-fmD0PDG)<fsidebandInvMassCut+fsidebandInvMassWindow){
5909 isSideBandD0bar=kTRUE;
5910 }
5911
5912}
5913
5914
5915
5916//_______________________
ac4c229c 5917AliAODRecoDecayHF* AliAnalysisTaskSECharmFraction::GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx){
624c07ab 5918 //THIS METHOD CHECK THE TYPE OF SIGNAL/BACKGROUND THE CANDIDATE IS.
5919 // IF (!AND ONLY IF) THE TWO DAUGHTERS COME FROM A COMMONE MOTHER A FAKE TRUE SECONDARY VERTEX IS CONSTRUCTED (aodDMC)
5920 //
5921 // THE FOLLOWING SCHEME IS ADOPTED: signaltype is set to
e047b348 5922 // 1:signal (D0 prompt); 2: signal D0 from Dstar; 3: D0 fromB 4: D0 from Dstar fromB
5923 // then background categories: -1: one or both daughters is a fake track
5924 // 5: both daughters come from a D meson != D0
5925 // 6: both daughters come from a D0->4prongs
5926 // 7: both daughetrs are primaries
5927 // 8: generic background (can include one of the previous if desired)
5928 // 9: daughters out of acceptance
5929 // 10: pathologic cases (not clear)
5930 // 11: end of the method without output
5931 // 12: different result than MatchToMC method
5932
5933 AliAODMCParticle *mum1=0x0;
5934 AliAODMCParticle *b1=0x0,*b2=0x0;
5935 AliAODMCParticle *grandmoth1=0x0;
624c07ab 5936 massMumTrue=-1;
5937
5938 Int_t pdgmum,dglabels[2],matchtoMC;
5939 Int_t pdgdaughters[2]={211,321};
5940 // get daughter AOD tracks
5941 AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
5942 AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
e047b348 5943 AliAODRecoDecayHF *aodDMC=0x0;
5944 if(trk0==0x0||trk1==0x0){
624c07ab 5945 AliDebug(2,"Delete tracks I AM \n");
5946
5947 signaltype=-1;
5948 return aodDMC;
5949
5950 }
5951 dglabels[0]=trk0->GetLabel();
5952 dglabels[1]=trk1->GetLabel();
e047b348 5953 if(dglabels[0]<0||dglabels[1]<0){
624c07ab 5954 AliDebug(2,"HERE I AM \n");
5955
5956 //fake tracks
5957
7eb5a89e 5958 signaltype=-1;
624c07ab 5959 return aodDMC;
5960
5961 }
5962 // printf("Before entering the MC checks \n");
5963
5964 b1=(AliAODMCParticle*)arrayMC->At(trk0->GetLabel());
5965 b2=(AliAODMCParticle*)arrayMC->At(trk1->GetLabel());
e047b348 5966 if(!b1||!b2){
5967 //Tracks with no mother ??? FAKE DECAY VERTEX
43e4f69a 5968 signaltype=10;
5969 return aodDMC;
5970 }
43e4f69a 5971 if(b1->GetMother()<0||b2->GetMother()<0){
e047b348 5972 //Tracks with no mother ??? FAKE DECAY VERTEX
624c07ab 5973 signaltype=10;
5974 return aodDMC;
5975 }
5976
5977 mum1=(AliAODMCParticle*)arrayMC->At(b1->GetMother());
5978 // mum2=(AliAODMCParticle*)arrayMC->At(b2->GetMother());//FOR FURTHER USE
5979
5980 if(b1->GetMother()!=b2->GetMother()){
5981 //Check the label of the mother is the same
5982 // NOT SAME MOTHER
5983
5984
5985 signaltype=8;
5986 return aodDMC;
5987 }
5988 massMumTrue=mum1->GetCalcMass();
5989
5990 matchtoMC=d->MatchToMC(421,arrayMC,2,pdgdaughters);
5991 aodDMC=ConstructFakeTrueSecVtx(b1,b2,mum1,primaryVtx);
5992
e047b348 5993 if(aodDMC==0x0){
624c07ab 5994 signaltype=10;
5995 return aodDMC;
5996 }
5997
5998 // if((mum1->GetPdgCode()!=mum2->GetPdgCode()))continue; //Check the mother is the same particle
5999 // printf("Particle codes: tr1: %d, tr2: %d, mum1: %d, mum 2: %d \n",b1->GetPdgCode(),b2->GetPdgCode(),mum1->GetPdgCode(),mum2->GetPdgCode());
6000 if(!((TMath::Abs(b1->GetPdgCode())==321&&TMath::Abs(b1->GetPdgCode())!=211)||(TMath::Abs(b1->GetPdgCode())==211&&TMath::Abs(b1->GetPdgCode()!=321)))){
6001 // Not a Kaon and a Pion
6002
6003 signaltype=8;
6004 return aodDMC;
6005 }
6006
6007 pdgmum=mum1->GetPdgCode();
6008 if(TMath::Abs(pdgmum)!=421){
6009 if(TMath::Abs(pdgmum)==411||TMath::Abs(pdgmum)==431||TMath::Abs(pdgmum)==443){
6010 // IT IS A SECONDARY VERTEX FROM CHARM BUT NOT A D0
6011
6012 signaltype=5;
6013 return aodDMC;
6014 }
6015 else {
6016 signaltype=8;
6017 return aodDMC;
6018 }
6019 }
6020
6021 if(mum1->GetDaughter(1)-mum1->GetDaughter(0)+1!=2){
6022 // from D0 but NOT A 2 PRONG DECAY
6023 signaltype=6;
6024 return aodDMC;
6025
6026 }
6027
43e4f69a 6028 if(mum1->GetMother()<0){
624c07ab 6029 // A particle coming from nothing
6030 signaltype=10;
6031 return aodDMC;
c387e585 6032
624c07ab 6033 }
7eb5a89e 6034 Bool_t isfromDstar=kFALSE;
6035 // matchtoMC=d->MatchToMC(421,arrayMC,2,pdgdaughters);
624c07ab 6036 grandmoth1=(AliAODMCParticle*)arrayMC->At(mum1->GetMother());
7eb5a89e 6037 if(TMath::Abs(grandmoth1->GetPdgCode())==413||TMath::Abs(grandmoth1->GetPdgCode())==423)isfromDstar=kTRUE;// D0 COMING FROM A D0*
6038
c387e585 6039 /*
6040 //CHECK FOR CABIBBO SUPPRESSED DECAY
6041 Int_t isCabibSup=0,pdgKaon;
6042
6043 pdgKaon=b1->GetPdgCode();
6044 if(TMath::Abs(pdgKaon)!=321)pdgKaon=b2->GetPdgCode();
6045 if(pdgmum>0&&pdgKaon>0)isCabibSup=1;
6046 if(pdgmum<0&&pdgKaon<0)isCabibSup=1;
6047 if(isCabibSup){
6048 signaltype=0;
6049 return aodDMC;
6050 }
6051 */
624c07ab 6052 // if(fcheckMCD0){//THIS CHECK IS NEEDED TO AVOID POSSIBLE FAILURE IN THE SECOND WHILE, FOR DEBUGGING
6053 while(TMath::Abs(grandmoth1->GetPdgCode())!=4&&TMath::Abs(grandmoth1->GetPdgCode())!=5){
43e4f69a 6054 if(grandmoth1->GetMother()<0){
624c07ab 6055 //### THE FOLLOWING IN CASE OF DEBUGGING ##########à
6056 /*printf("mother=-1, pdgcode: %d \n",grandmoth1->GetPdgCode());
6057 Int_t son=grandmoth1->GetDaughter(0);
6058 sonpart=(AliAODMCParticle*)arrayMC->At(son);
6059 while(TMath::Abs(sonpart->GetPdgCode())!=421){
6060 printf("mother=-1, pdgcode: %d \n",sonpart->GetPdgCode());
6061 son++;
6062 sonpart=(AliAODMCParticle*)arrayMC->At(son);
6063 }*/
6064
6065 signaltype=10;
6066 return aodDMC;
6067 }
6068 grandmoth1=(AliAODMCParticle*)arrayMC->At(grandmoth1->GetMother());
6069 }
6070
6071 if(TMath::Abs(grandmoth1->GetPdgCode())==4){
6072 if(matchtoMC!=-1){
7eb5a89e 6073
6074 if(isfromDstar)signaltype=2;
6075 else signaltype=1;
624c07ab 6076 return aodDMC;
6077 }
6078 else {
6079 signaltype=12;
6080 return aodDMC;
7eb5a89e 6081
624c07ab 6082 }
6083 }
6084 else if(TMath::Abs(grandmoth1->GetPdgCode())==5){
6085 if(matchtoMC!=-1){
7eb5a89e 6086 if(isfromDstar)signaltype=4;
6087 else signaltype=3;
624c07ab 6088 return aodDMC;
6089
6090 }
6091 else {
6092
6093 signaltype=12;
6094 return aodDMC;
6095 }
6096 }
6097 signaltype=11;// JUST FOR SAFETY: SHOULD NEVER REACH THIS POINT
6098 return aodDMC;
6099 // return 11;
6100}
6101
6102//___________________________________
ac4c229c 6103AliAODRecoDecayHF* AliAnalysisTaskSECharmFraction::ConstructFakeTrueSecVtx(const AliAODMCParticle *b1, const AliAODMCParticle *b2, const AliAODMCParticle *mum,Double_t *primaryVtxTrue){
624c07ab 6104 // CONSTRUCT A FAKE TRUE SECONDARY VERTEX (aodDMC)
6105 //!!!NOTE THAT ONLY ONE MOTHER IS CONSIDERED: THE METHOD REQUIRES THE DAUGHTERS COME FROM THE SAME MOTHER !!
e047b348 6106 if(b1==0x0||b2==0x0)return 0x0;
6107 if(mum==0x0)return 0x0;
624c07ab 6108 Double_t pD[3],xD[3],pXtrTrue[2],pYtrTrue[2],pZtrTrue[2],xtr1[3],xtr2[3];
6109 Int_t charge[2]={0,0};
6110 if(b1->Charge()==-1)charge[0]=1;
6111 else {
6112 if(b2->Charge()==-1){
6113 //printf("Same charges for prongs \n");
e047b348 6114 if(!fLikeSign)return 0x0;
624c07ab 6115 }
6116 charge[1]=1;
6117 }
6118
6119 pXtrTrue[charge[0]]=b1->Px();
6120 pYtrTrue[charge[0]]=b1->Py();
6121 pZtrTrue[charge[0]]=b1->Pz();
6122 if(!b1->XvYvZv(xtr1)){
e047b348 6123 return 0x0;
624c07ab 6124 }
6125
6126 pXtrTrue[charge[1]]=b2->Px();
6127 pYtrTrue[charge[1]]=b2->Py();
6128 pZtrTrue[charge[1]]=b2->Pz();
6129
6130 if(!mum->PxPyPz(pD)){
6131 //printf("!D from B:Get momentum failed \n");
e047b348 6132 return 0x0;
624c07ab 6133 }
6134 if(!mum->XvYvZv(xD)){
6135 //printf("!D from B:Get position failed \n");
e047b348 6136 return 0x0;
624c07ab 6137 }
6138 /* ############ THIS HAPPENS FROM TIME TO TIME: NUMERIC PROBLEM KNOWN #################
6139 if(pXtrTrue[0]+pXtrTrue[1]!=pD[0]){
6140 }*/
6141
6142
6143 if(!b2->XvYvZv(xtr2)){
e047b348 6144 return 0x0;
624c07ab 6145 }
6146 Double_t d0dummy[2]={0.,0.};//TEMPORARY : dummy d0 for AliAODRecoDeay constructor
6147 AliAODRecoDecayHF* aodDMC=new AliAODRecoDecayHF(primaryVtxTrue,xD,2,0,pXtrTrue,pYtrTrue,pZtrTrue,d0dummy);
6148
6149 /* ######## THE FOLLOWINF FOR DEBUGGING ############
6150 Printf("testing the Fake vertex: SecVtxX: %f, Px: %f, Py: %f, Pz:%f \n ",aodDMC->GetSecVtxX(),aodDMC->Px(),aodDMC->Py(),aodDMC->Pz());
6151 Printf("pD: x=%f, y=%f,z=%f\n",pD[0],pD[1],pD[2]);
6152 Printf("Daughters :px1:%f, px2:%f \n",pXtrTrue[0],pXtrTrue[1]);
6153 Printf("Daughters :py1:%f, py2:%f \n",pYtrTrue[0],pYtrTrue[1]);
6154 Printf("Daughters :pz1:%f, pz2:%f \n",pZtrTrue[0],pZtrTrue[1]);
6155 Printf("Mother pdg: %d",mum->GetPdgCode());
6156 Printf("Impact Par Prod: %f\n",aodDMC->ImpParXY());
6157 */
6158
6159 return aodDMC;
6160}
6161
6162//________________________________________________________
ac4c229c 6163Bool_t AliAnalysisTaskSECharmFraction::FillHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Int_t okD0,Int_t okD0bar,Double_t invMassD0,Double_t invMassD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBand,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue){//FILL THE HISTOGRAMS: TAKE THE HISTOS FROM THE list NAME
6164
624c07ab 6165
6166 if((!okD0)&&(!okD0bar))return kTRUE;
e047b348 6167 if(ptbin==-1)return kTRUE;
6168 // flistNoCutsSignal->Add(hptD0NCsign);
6169 // flistNoCutsSignal->Add(hptD0VsMaxPtNCsign);
6170 // flistNoCutsSignal->Add(hptD0PTallsqrtNCsign);
6171 // flistNoCutsSignal->Add(hptD0PTallNCsign);
6172
6173 // %%%%%% TO BE DONE
6174 // flistNoCutsSignal->Add(hptD0vsptBNCsign);
6175 // flistNoCutsSignal->Add(hpD0vspBNCsign);
6176 //flistNoCutsSignal->Add(hptD0vsptcquarkNCsign);
6177 //flistNoCutsSignal->Add(hpD0vspcquarkNCsign);
6178 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%
6179 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
624c07ab 6180
e047b348 6181 // DONE
6182 //hd0zD0ptLSCsign_pt
cc3209fb 6183 //hInvMassD0LSCsign_pt
e047b348 6184 //hetaLSCsign_pt
6185 //
6186 // %%% TO BE DONE %%
6187 //hCosPDPBLSCsign_pt
6188 //hCosPcPDLSCsign_pt
6189
6190
6191
6192
6193
624c07ab 6194 // ######### Get Standard label for hist in tlist ###############
6195 TString namehist=list->GetName(),str;
6196 namehist.ReplaceAll("list","");
6197
6198 // ######### Global properties histos #################
ac4c229c 6199 // ####### take care: only for candidates which pass the cuts !! not for side band ########
6200 if((isPeakD0&&okD0)||(isPeakD0bar&&okD0bar)){
6201 str="hCPtaVSd0d0";
6202 str.Append(namehist.Data());
6203 ((TH1F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0(),d->CosPointingAngle());
6204
6205 str="hSecVtxZ";
6206 str.Append(namehist.Data());
6207 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxZ());
6208
6209 str="hSecVtxX";
6210 str.Append(namehist.Data());
6211 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxX()*10000.);
6212
6213 str="hSecVtxY";
6214 str.Append(namehist.Data());
6215 ((TH1F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxY()*10000.);
6216
6217 str="hSecVtxXY";
6218 str.Append(namehist.Data());
6219 ((TH2F*)list->FindObject(str.Data()))->Fill(d->GetSecVtxX()*10000.,d->GetSecVtxY()*10000.);
6220
6221 str="hSecVtxPhi";
6222 str.Append(namehist.Data());
6223 ((TH1F*)list->FindObject(str.Data()))->Fill(TMath::ATan2(d->GetSecVtxY()*10000.,d->GetSecVtxX()*10000.)*TMath::RadToDeg());
6224
e047b348 6225
6226 str="hd0singlTrack";
6227 str.Append(namehist.Data());
6228 ((TH1F*)list->FindObject(str.Data()))->Fill(d->Getd0Prong(0)*10000.);
6229 ((TH1F*)list->FindObject(str.Data()))->Fill(d->Getd0Prong(1)*10000.);
6230
ac4c229c 6231 str="hCPta";
6232 str.Append(namehist.Data());
6233 ((TH1F*)list->FindObject(str.Data()))->Fill(d->CosPointingAngle());
6234
6235 str="hd0xd0";
6236 str.Append(namehist.Data());
6237 ((TH1F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0());
e047b348 6238
6239 //%%%%%%%% NEW HISTO %%%%%%%%%%
6240 str="hdca";
6241 str.Append(namehist.Data());
6242 ((TH1F*)list->FindObject(str.Data()))->Fill(1e4*d->GetDCA());
6243
6244 str="hcosthetastar";
6245 str.Append(namehist.Data());
6246 if(okD0)((TH1F*)list->FindObject(str.Data()))->Fill(d->CosThetaStarD0());
6247 if(okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(d->CosThetaStarD0bar());
6248
6249 str="hptD0";
6250 str.Append(namehist.Data());
6251 ((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt());
6252
6253 str="hptD0VsMaxPt";
6254 str.Append(namehist.Data());
6255 Int_t pr=0;
6256 if(d->PtProng(1)>d->PtProng(0))pr=1;
6257 if(d->PtProng(pr)<fptMax[0]) ((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt()-fptMax[0]);
6258 else if(d->PtProng(TMath::Abs(pr-1))<fptMax[1])((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt()-fptMax[1]);
6259 else ((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt()-fptMax[2]);
6260
6261
6262 str="hptD0PTallsqrt";
6263 str.Append(namehist.Data());
6264 Double_t sumsqrpt=fptAllSq-d->PtProng(1)*d->PtProng(1)-d->PtProng(0)*d->PtProng(0);
6265 if(sumsqrpt>0.)((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt(),TMath::Sqrt(sumsqrpt));
6266
6267 str="hptD0PTall";
6268 str.Append(namehist.Data());
6269 ((TH1F*)list->FindObject(str.Data()))->Fill(d->Pt(),fptAll-d->PtProng(1)-d->PtProng(0));
6270
6271
6272 str="hd0zD0pt";
6273 str.Append(namehist.Data());
6274 str.Append("_pt");
6275 str+=ptbin;
6276 if(d->GetPrimaryVtx()!=0x0)((TH1F*)list->FindObject(str.Data()))->Fill(1e4*(d->Zv()-d->GetPrimaryVtx()->GetZ()));
6277
6278 str="heta";
6279 str.Append(namehist.Data());
6280 str.Append("_pt");
6281 str+=ptbin;
6282 ((TH1F*)list->FindObject(str.Data()))->Fill(d->Eta());
6283
6284 // OTHER NEW ADDITIONAL HISTOS
6285
6286 str="hd0xd0";
6287 str.Append(namehist.Data());
6288 str.Append("_pt");
6289 str+=ptbin;
6290 //printf("Hist name: %s \n",str.Data());
6291 ((TH1F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0());
6292
6293
6294 str="hd0D0VSd0xd0";
6295 str.Append(namehist.Data());
6296 str.Append("_pt");
6297 str+=ptbin;
6298 //printf("Hist name: %s \n",str.Data());
6299 ((TH2F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0(),d->ImpParXY()*10000.);
6300
6301
6302 str="hangletracksVSd0xd0";
6303 str.Append(namehist.Data());
6304 str.Append("_pt");
6305 str+=ptbin;
6306 //printf("Hist name: %s \n",str.Data());
6307 ((TH2F*)list->FindObject(str.Data()))->Fill(1e8*d->Prodd0d0(),d->ProngsRelAngle(0,1));
6308
6309 str="hangletracksVSd0D0";
6310 str.Append(namehist.Data());
6311 str.Append("_pt");
6312 str+=ptbin;
6313 // printf("Hist name: %s \n",str.Data());
6314 ((TH2F*)list->FindObject(str.Data()))->Fill(d->ImpParXY()*10000.,d->ProngsRelAngle(0,1));
6315 // ####################################################
6316 }
ac4c229c 6317
6318 // ######### Invariant mass histos #################
6319 str="hMass";
624c07ab 6320 str.Append(namehist.Data());
ac4c229c 6321 ((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
6322 ((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
624c07ab 6323
6324
ac4c229c 6325 if(isPeakD0||isPeakD0bar){
6326 str="hMass";
6327 str.Append(namehist.Data());
6328 str.Append("PM");
6329 if(isPeakD0&&okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
6330 if(isPeakD0bar&&okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6331 }
cc3209fb 6332 // The Following is a NEW HISTO
6333 str="hInvMassD0";
e047b348 6334 str.Append(namehist.Data());
6335 str.Append("_pt");
6336 str+=ptbin;
6337 if(okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
cc3209fb 6338 if((!fsplitMassD0D0bar)&&okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6339 str="hInvMassD0bar";
6340 str.Append(namehist.Data());
6341 str.Append("_pt");
6342 str+=ptbin;
6343 if(fsplitMassD0D0bar&&okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6344
6345
e047b348 6346
6347
6348 str="hInvMassPt";
6349 str.Append(namehist.Data());
6350 if(okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0,d->Pt());
6351 if(okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar,d->Pt());
6352
6353 /* if(isPeakD0||isPeakD0bar){
6354 str="hMass";
6355 str.Append(namehist.Data());
6356 str.Append("PM");
6357 if(isPeakD0&&okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
6358 if(isPeakD0bar&&okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6359 // The Following is a NEW HISTO
cc3209fb 6360 str="hInvMassD0";
e047b348 6361 str.Append(namehist.Data());
6362 str.Append("_pt");
6363 str+=ptbin;
6364 if(isPeakD0&&okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
6365 if(isPeakD0bar&&okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6366 }*/
ac4c229c 6367 if(isSideBand){
6368 str="hMass";
6369 str.Append(namehist.Data());
6370 str.Append("SB");
6371 if(okD0)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0);
6372 if(okD0bar)((TH1F*)list->FindObject(str.Data()))->Fill(invMassD0bar);
6373 }
bf74e6db 6374 if(fReadMC){
6375 if(massmumtrue>0.){
ac4c229c 6376 str="hMassTrue";
6377 str.Append(namehist.Data());
ac4c229c 6378 ((TH1F*)list->FindObject(str.Data()))->Fill(massmumtrue);
bf74e6db 6379
6380 if(isPeakD0||isPeakD0bar){
6381 str="hMassTrue";
6382 str.Append(namehist.Data());
6383 str.Append("PM");
6384 ((TH1F*)list->FindObject(str.Data()))->Fill(massmumtrue);
6385 }
6386 if(isSideBand){
6387 str="hMassTrue";
6388 str.Append(namehist.Data());
6389 str.Append("SB");
6390 ((TH1F*)list->FindObject(str.Data()))->Fill(massmumtrue);
6391 }
ac4c229c 6392 }
6393 }
ac4c229c 6394 // ################ D0 Impact Parameter Histos #####################
6395 if((isPeakD0&&okD0)||(isPeakD0bar&&okD0bar)){
6396 str="hd0D0";
6397 str.Append(namehist.Data());
6398 str.Append("PM");
6399 ((TH1F*)list->FindObject(str.Data()))->Fill(d->ImpParXY()*10000.);
6400
6401 str="hd0D0pt";
6402 str.Append(namehist.Data());
6403 str.Append("_PkMss_pt");
6404 str+=ptbin;
6405 ((TH1F*)list->FindObject(str.Data()))->Fill(d->ImpParXY()*10000.);
624c07ab 6406
ac4c229c 6407
e047b348 6408 if(fReadMC&&vtxTrue){
ac4c229c 6409 str="hd0D0VtxTrue";
6410 str.Append(namehist.Data());
6411 str.Append("PM");
6412 ((TH1F*)list->FindObject(str.Data()))->Fill(d->AliAODRecoDecay::ImpParXY(vtxTrue)*10000.);
6413
6414 str="hd0D0VtxTruept";
6415 str.Append(namehist.Data());
6416 str.Append("_PkMss_pt");
6417 str+=ptbin;
6418 ((TH1F*)list->FindObject(str.Data()))->Fill(d->AliAODRecoDecay::ImpParXY(vtxTrue)*10000.);
6419 }
6420
e047b348 6421 if(fReadMC&&aodDMC!=0x0){
ac4c229c 6422 aodDMC->Print("");
6423 aodDMC->ImpParXY();
6424 aodDMC->Print("");
6425 str="hMCd0D0";
6426 str.Append(namehist.Data());
6427 str.Append("PM");
6428 ((TH1F*)list->FindObject(str.Data()))->Fill(aodDMC->ImpParXY()*10000.);
6429
6430 str="hMCd0D0pt";
6431 str.Append(namehist.Data());
6432 str.Append("_PkMss_pt");
6433 str+=ptbin;
6434 ((TH1F*)list->FindObject(str.Data()))->Fill(aodDMC->ImpParXY()*10000.);
6435 }
6436
6437 }
6438 else if(isSideBand){
6439 str="hd0D0";
6440 str.Append(namehist.Data());
6441 str.Append("SB");
6442 ((TH1F*)list->FindObject(str.Data()))->Fill(d->ImpParXY()*10000.);
6443
6444 str="hd0D0pt";
6445 str.Append(namehist.Data());
6446 str.Append("_SBMss_pt");
6447 str+=ptbin;
6448 ((TH1F*)list->FindObject(str.Data()))->Fill(d->ImpParXY()*10000.);
6449
6450
bf74e6db 6451 if(fReadMC&&vtxTrue){
ac4c229c 6452 str="hd0D0VtxTrue";
6453 str.Append(namehist.Data());
6454 str.Append("SB");
6455 ((TH1F*)list->FindObject(str.Data()))->Fill(d->AliAODRecoDecay::ImpParXY(vtxTrue)*10000.);
6456
6457 str="hd0D0VtxTruept";
6458 str.Append(namehist.Data());
6459 str.Append("_SBMss_pt");
6460 str+=ptbin;
6461 ((TH1F*)list->FindObject(str.Data()))->Fill(d->AliAODRecoDecay::ImpParXY(vtxTrue)*10000.);
6462
6463 }
6464
e047b348 6465 if(fReadMC&&aodDMC!=0x0){
ac4c229c 6466 str="hMCd0D0";
6467 str.Append(namehist.Data());
6468 str.Append("SB");
6469 ((TH1F*)list->FindObject(str.Data()))->Fill(aodDMC->ImpParXY()*10000.);
6470
6471 str="hMCd0D0pt";
6472 str.Append(namehist.Data());
6473 str.Append("_SBMss_pt");
6474 str+=ptbin;
6475 ((TH1F*)list->FindObject(str.Data()))->Fill(aodDMC->ImpParXY()*10000.);
6476 }
6477
6478 }
624c07ab 6479
6480 return kTRUE;
6481}
6482
ac4c229c 6483
e047b348 6484 void AliAnalysisTaskSECharmFraction::FillHistoMCproperties(TClonesArray *arrayMC){
6485 //#############################################################
6486 // HERE LOOK AT global properties of D0 mesons, c quarks and B
6487 //
6488 //#############################################################
6489 Double_t pxyzMum[3],pxyzDaught[3],cosOpenAngle=-1.1,ptmum,ptdaught;
6490 Int_t ncdaught=0,cquarksMC=0,nD0all=0,nD0FromB=0,nBdaught=0,nD0bquark=0,nD0bMeson=0,nD0bBaryon=0;
6491 for (Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++) {
6492 AliAODMCParticle* mcPart = dynamic_cast<AliAODMCParticle*>(arrayMC->At(iPart));
6493 if (!mcPart) {
6494 AliWarning("Particle not found in tree, skipping");
6495 continue;
6496 }
6497 if (TMath::Abs(mcPart->GetPdgCode()) == 4){
6498 cquarksMC++;
6499 mcPart->PxPyPz(pxyzMum);
6500 ptmum=mcPart->Pt();
6501
6502 ((TH1F*)flistMCproperties->FindObject("hMCcquarkAllPt"))->Fill(ptmum);
6503 ((TH1F*)flistMCproperties->FindObject("hMCcquarkAllEta"))->Fill(mcPart->Eta());
6504 ((TH1F*)flistMCproperties->FindObject("hMCcquarkAllEnergy"))->Fill(mcPart->E());
6505 //NOW LOOK FOR A D0 among cquark daughters
6506 ncdaught=mcPart->GetDaughter(1)-mcPart->GetDaughter(0)+1;
6507 ((TH1F*)flistMCproperties->FindObject("hMCcquarkNdaught"))->Fill(ncdaught);
6508 if(ncdaught>1){
6509 for(Int_t iDaught=mcPart->GetDaughter(0);iDaught<mcPart->GetDaughter(1);iDaught++){
6510 AliAODMCParticle* mcPartD0 = dynamic_cast<AliAODMCParticle*>(arrayMC->At(iDaught));
6511 if(TMath::Abs(mcPartD0->GetPdgCode()) == 421){
6512 // a D0 coming from a c quark
6513 mcPartD0->PxPyPz(pxyzDaught);
6514 ptdaught=mcPartD0->Pt();
6515 ((TH1F*)flistMCproperties->FindObject("hMCD0fromcPt"))->Fill(ptdaught);
6516 ((TH1F*)flistMCproperties->FindObject("hMCD0fromcEta"))->Fill(mcPartD0->Eta());
6517 ((TH1F*)flistMCproperties->FindObject("hMCD0fromcEnergy"))->Fill(mcPartD0->E());
6518 // ##############################################################################################
6519 // Compare D0 momentum and c quarks:
6520 // NB: here ALL D0 are considered, also those not decaying in KPi !!!
6521 // ##############################################################################################
6522 ((TH2F*)flistMCproperties->FindObject("hMCD0VscquarkPt"))->Fill(mcPart->Pt(),mcPartD0->Pt());
6523 ((TH2F*)flistMCproperties->FindObject("hMCD0VscquarkEnergy"))->Fill(mcPart->E(),mcPartD0->E());
6524 ((TH1F*)flistMCproperties->FindObject("hMCD0deltacquarkEnergy"))->Fill(mcPartD0->E()/mcPart->E());
6525 ((TH1F*)flistMCproperties->FindObject("hMCD0EnergyVsAvcquarkDaughtEn"))->Fill((mcPartD0->E()-(mcPart->E()/ncdaught))/mcPart->E());
6526 //calculate open angle
6527 if((pxyzMum[0]!=0.||pxyzMum[1]!=0.||pxyzMum[2]!=0.)&&(pxyzDaught[0]!=0.||pxyzDaught[1]!=0.||pxyzDaught[2]!=0.))cosOpenAngle=(pxyzDaught[0]*pxyzMum[0]+pxyzDaught[1]*pxyzMum[1]+pxyzDaught[2]*pxyzMum[2])/(TMath::Sqrt(pxyzDaught[0]*pxyzDaught[0]+pxyzDaught[1]*pxyzDaught[1]+pxyzDaught[2]*pxyzDaught[2])*TMath::Sqrt(pxyzDaught[0]*pxyzDaught[0]+pxyzDaught[1]*pxyzDaught[1]+pxyzDaught[2]*pxyzDaught[2]));
6528 ((TH1F*)flistMCproperties->FindObject("hMCD0cquarkAngle"))->Fill(cosOpenAngle);
6529 ((TH2F*)flistMCproperties->FindObject("hMCD0cquarkAngleEnergy"))->Fill(mcPart->E(),cosOpenAngle);
6530 }
6531 }
6532 }
6533 }
6534
6535 // NOW LOOK FOR D0 not coming from cquarks
6536 if (TMath::Abs(mcPart->GetPdgCode()) == 421){
6537 nD0all++;
6538 if(mcPart->GetMother()<0)continue;
6539 AliAODMCParticle* mcD0Parent = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mcPart->GetMother()));
6540 Bool_t notfound=kFALSE,bMeson=kFALSE,bBaryon=kFALSE;
6541 //CheckOrigin
6542 while(TMath::Abs(mcD0Parent->GetPdgCode())!=4&&TMath::Abs(mcD0Parent->GetPdgCode())!=5){
6543 if(500<TMath::Abs(mcD0Parent->GetPdgCode())%10000&&TMath::Abs(mcD0Parent->GetPdgCode())<600){
6544 bMeson=kTRUE;
6545 break;
6546 }
6547 else if (5000<TMath::Abs(mcD0Parent->GetPdgCode())&&TMath::Abs(mcD0Parent->GetPdgCode())<6000){
6548 bBaryon=kTRUE;
6549 break;
6550 }
6551 if(mcD0Parent->GetMother()<0){
6552 notfound=kTRUE;
6553 break;
6554 }
6555 mcD0Parent=dynamic_cast<AliAODMCParticle*>(arrayMC->At(mcD0Parent->GetMother()));
6556 }
6557 if(notfound)continue;
6558 if(TMath::Abs(mcD0Parent->GetPdgCode())==4)continue;//D0 from c quarks already counted
6559 ((TH1F*)flistMCproperties->FindObject("hMCfromBpdgB"))->Fill(TMath::Abs(mcD0Parent->GetPdgCode()));
6560 if(bBaryon)nD0bBaryon++;
6561 else if(bMeson)nD0bMeson++;
6562 else nD0bquark++;
6563 nD0FromB++;
6564 mcD0Parent->PxPyPz(pxyzMum);
6565 ptmum=mcD0Parent->Pt();
6566 ((TH1F*)flistMCproperties->FindObject("hMCBhadrPt"))->Fill(ptmum);
6567 ((TH1F*)flistMCproperties->FindObject("hMCBhadrEta"))->Fill(mcD0Parent->Eta());
6568 ((TH1F*)flistMCproperties->FindObject("hMCBhadrEnergy"))->Fill(mcD0Parent->E());
6569
6570 nBdaught=mcD0Parent->GetDaughter(1)-mcD0Parent->GetDaughter(0)+1;
6571 ((TH1F*)flistMCproperties->FindObject("hMCBhadrNdaught"))->Fill(nBdaught);
6572
6573
6574 // Now take properties of this D0 coming from a B
6575 mcPart->PxPyPz(pxyzDaught);
6576 ptdaught=mcPart->Pt();
6577 ((TH1F*)flistMCproperties->FindObject("hMCD0fromBPt"))->Fill(ptdaught);
6578 ((TH1F*)flistMCproperties->FindObject("hMCD0fromBEta"))->Fill(mcPart->Eta());
6579 ((TH1F*)flistMCproperties->FindObject("hMCD0fromBEnergy"))->Fill(mcPart->E());
6580 // ##############################################################################################
6581 // Compare D0 momentum and b hadron:
6582 // NB: here ALL D0 are considered, also those not decaying in KPi !!!
6583 // ##############################################################################################
6584 ((TH2F*)flistMCproperties->FindObject("hMCD0VsBhadrPt"))->Fill(mcD0Parent->Pt(),mcPart->Pt());
6585 ((TH2F*)flistMCproperties->FindObject("hMCD0VsBhadrEnergy"))->Fill(mcD0Parent->E(),mcPart->E());
6586 ((TH1F*)flistMCproperties->FindObject("hMCD0deltaBhadrEnergy"))->Fill(mcPart->E()/mcD0Parent->E());
6587 ((TH1F*)flistMCproperties->FindObject("hMCD0EnergyVsAvBDaughtEn"))->Fill((mcPart->E()-(mcD0Parent->E()/nBdaught))/mcD0Parent->E());
6588 //calculate open angle
6589 if((pxyzMum[0]!=0.||pxyzMum[1]!=0.||pxyzMum[2]!=0.)&&(pxyzDaught[0]!=0.||pxyzDaught[1]!=0.||pxyzDaught[2]!=0.))cosOpenAngle=(pxyzDaught[0]*pxyzMum[0]+pxyzDaught[1]*pxyzMum[1]+pxyzDaught[2]*pxyzMum[2])/(TMath::Sqrt(pxyzDaught[0]*pxyzDaught[0]+pxyzDaught[1]*pxyzDaught[1]+pxyzDaught[2]*pxyzDaught[2])*TMath::Sqrt(pxyzDaught[0]*pxyzDaught[0]+pxyzDaught[1]*pxyzDaught[1]+pxyzDaught[2]*pxyzDaught[2]));
6590 ((TH1F*)flistMCproperties->FindObject("hMCD0BhadrAngle"))->Fill(cosOpenAngle);
6591 ((TH2F*)flistMCproperties->FindObject("hMCD0BhadrAngleEnergy"))->Fill(mcPart->E(),cosOpenAngle);
6592 }
6593 }
6594 ((TH1F*)flistMCproperties->FindObject("hMCPartFound"))->Fill(1,cquarksMC);
6595 ((TH1F*)flistMCproperties->FindObject("hMCPartFound"))->Fill(2,nD0all);
6596 ((TH1F*)flistMCproperties->FindObject("hMCPartFound"))->Fill(3,nD0FromB);
6597 ((TH1F*)flistMCproperties->FindObject("hMCPartFound"))->Fill(4,nD0bMeson);
6598 ((TH1F*)flistMCproperties->FindObject("hMCPartFound"))->Fill(5,nD0bBaryon);
6599
6600 }
6601
6602
6603void AliAnalysisTaskSECharmFraction::SetPtBins(Int_t nbins,const Float_t *ptbins){
6604 if((fptbins)!=0x0)delete fptbins;
6605 fnbins=nbins;fptbins=new Float_t[fnbins];
6606 memcpy(fptbins,ptbins,fnbins*sizeof(Float_t));
ac4c229c 6607 return;
6608}
6609
6610void AliAnalysisTaskSECharmFraction::SetStandardMassSelection(){
6611 //SET THE DEFAULT VALUES FOR INVARIANT MASS SELECTION
e047b348 6612
6613 /*HERE DEFAULT
6614 SetSignalInvMassCut();
6615 SetLargeInvMassCut();
6616 SetSideBandInvMassCut();
6617 SetSideBandInvMassWindow();
6618 */
6619
6620 // HERE FOR SEARCH FOR SIGNAL
ac4c229c 6621 SetSignalInvMassCut();
6622 SetLargeInvMassCut();
6623 SetSideBandInvMassCut();
6624 SetSideBandInvMassWindow();
6625 return;
e047b348 6626}
6627
6628Bool_t AliAnalysisTaskSECharmFraction::SpecialSelD0(AliAODRecoDecayHF2Prong *d,Int_t &nusedforVtx){
6629
6630 AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
6631 AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
6632 nusedforVtx=0;
6633 if(trk0->GetUsedForPrimVtxFit())nusedforVtx++;
6634 if(trk1->GetUsedForPrimVtxFit())nusedforVtx++;
6635 if(nusedforVtx>fNtrMaxforVtx)return kFALSE;
6636
6637 if(TMath::Abs(d->Getd0Prong(1)) < -99999. ||
6638 TMath::Abs(d->Getd0Prong(0)) < -99999.) return kFALSE;
6639
6640 return kTRUE;
6641}
6642
6643
6644
6645AliAODVertex* AliAnalysisTaskSECharmFraction::GetPrimaryVtxSkipped(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *d){
6646 //Calculate the primary vertex w/o the daughter tracks of the candidate
6647
6648 AliESDVertex *vertexESD=0x0;
6649 AliAODVertex *vertexAOD=0x0;
6650 AliVertexerTracks *vertexer = new AliVertexerTracks(aodev->GetMagneticField());
6651
6652 Int_t skipped[2];
6653 Int_t nTrksToSkip=2;
6654 AliAODTrack *dgTrack = (AliAODTrack*)d->GetDaughter(0);
6655 skipped[0]=dgTrack->GetID();
6656 dgTrack = (AliAODTrack*)d->GetDaughter(1);
6657 skipped[1]=dgTrack->GetID();
6658
6659
6660 //
6661 vertexer->SetSkipTracks(nTrksToSkip,skipped);
6662 vertexESD = (AliESDVertex*)vertexer->FindPrimaryVertex(aodev);
6663 vertexer->SetMinClusters(4);
6664 if(!vertexESD) return vertexAOD;
6665 if(vertexESD->GetNContributors()<=0) {
6666 AliDebug(2,"vertexing failed");
6667 delete vertexESD; vertexESD=NULL;
6668 return vertexAOD;
ac4c229c 6669 }
e047b348 6670
6671 delete vertexer; vertexer=NULL;
6672
6673
6674 // convert to AliAODVertex
6675 Double_t pos[3],cov[6],chi2perNDF;
6676 vertexESD->GetXYZ(pos); // position
6677 vertexESD->GetCovMatrix(cov); //covariance matrix
6678 chi2perNDF = vertexESD->GetChi2toNDF();
6679 delete vertexESD; vertexESD=NULL;
6680
6681 vertexAOD = new AliAODVertex(pos,cov,chi2perNDF);
6682 return vertexAOD;
6683
6684}
ac4c229c 6685
6686
624c07ab 6687void AliAnalysisTaskSECharmFraction::Terminate(const Option_t*){
6688 //TERMINATE METHOD: NOTHING TO DO
6689
6690
6691}