#include "TCanvas.h"
#include "TTree.h"
#include "TChain.h"
Go to the source code of this file.
int ana_d0d0b |
( |
TString |
fname, |
|
|
int |
num = 1000000 |
|
) |
| |
Definition at line 5 of file ana_d0d0b.C.
References basiclibs(), c1, ctime, d0, Double_t, PndEventInfo::GetCharged(), PndEventInfo::GetNeutrals(), i, nc, num, printf(), rtime, and timer.
10 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C");
12 gSystem->Load(
"libRho");
15 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
18 TH1F *d0mass=
new TH1F(
"d0Mass",
"D0 mass",100,1.864-0.1,1.864+0.1);
19 TH1F *ppmass =
new TH1F(
"ppmass",
"pbar p mass", 100, 4.4,4.6);
20 TH1F *nneut=
new TH1F(
"nneut",
"neutrals",100,0,30);
21 TH1F *nchrg=
new TH1F(
"nchrg",
"charged",100,0,10);
23 PndEventReader evr(fname);
25 TCandList kp,km,pip,pim;
30 TPidMassSelector *msel=
new TPidMassSelector(
"d0 mass",1.864,0.1);
32 while (evr.GetEvent() && i<
num)
34 if (!(++i%100)) cout <<
"evt "<<i<<endl;
51 evr.FillList(kp,
"KaonVeryLoosePlus");
52 evr.FillList(km,
"KaonVeryLooseMinus");
53 evr.FillList(pip,
"PionVeryLoosePlus");
54 evr.FillList(pim,
"PionVeryLooseMinus");
59 for (j=0;j<d0.GetLength();j++) d0mass->Fill(d0[j].M());
60 for (j=0;j<d0b.GetLength();j++) d0mass->Fill(d0b[j].M());
65 pp.Combine(d0,d0b,pip,pim);
67 for (j=0;j<pp.GetLength();j++) ppmass->Fill(pp[j].M());
83 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)