Go to the source code of this file.
void run_ana_sttcombi |
( |
TString |
fname = "pid_sttcombi.root" , |
|
|
int |
nevts = 0 |
|
) |
| |
Definition at line 1 of file run_ana_sttcombi.C.
References c1, ctime, Double_t, i, Mass, p1, p2, printf(), rtime, and timer.
6 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
8 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
11 PndEventReader evr(fname);
14 TH1F *invmass=
new TH1F(
"invmass",
"invariant mass",400,0.0,5.0);
21 if (nevts==0) nevts=evr.GetEntries();
22 cout <<
"nevts " << nevts <<
"\n";
23 int i=0,j=0, k=0, l=0;
28 while (evr.GetEvent() && i++<nevts)
33 evr.FillList(p1,
"Charged");
34 evr.FillList(p2,
"Charged");
36 cout << p1.GetLength() <<
" e+ candidates found" <<
"\n";
37 cout << p2.GetLength() <<
" e- candidates found" <<
"\n";
39 for (j=0;j<p1.GetLength();++j) {
40 p1[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
42 for (j=0;j<p2.GetLength();++j) {
43 p2[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
48 cout << jpsi.GetLength() <<
" J/Psi candidates found" <<
"\n";
50 for (l=0;l<jpsi.GetLength();++l) {
51 invmass->Fill(jpsi[l].M());
56 c1->cd(); invmass->Draw();
62 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)