Go to the source code of this file.
void run_ana_tpccombi |
( |
TString |
fname = "pid_tpccombi.root" , |
|
|
int |
nevts = 0 |
|
) |
| |
Definition at line 2 of file feb10/run_ana_tpccombi.C.
References c1, ctime, Double_t, i, Mass, p1, p2, printf(), rtime, and timer.
7 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
9 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
12 PndEventReader evr(fname);
15 TH1F *invmass=
new TH1F(
"invmass",
"invariant mass",400,0.0,5.0);
22 if (nevts==0) nevts=evr.GetEntries();
23 cout <<
"nevts " << nevts <<
"\n";
24 int i=0,j=0, k=0, l=0;
29 while (evr.GetEvent() && i++<nevts)
34 evr.FillList(p1,
"Charged");
35 evr.FillList(p2,
"Charged");
37 cout << p1.GetLength() <<
" e+ candidates found" <<
"\n";
38 cout << p2.GetLength() <<
" e- candidates found" <<
"\n";
40 for (j=0;j<p1.GetLength();++j) {
41 cout <<
"E/p for PID " << p1[j].GetMicroCandidate().GetEmcRawEnergy()/
42 p1[j].GetMicroCandidate().GetMomentum().Mag() <<
"\n";
45 for (j=0;j<p1.GetLength();++j) {
46 p1[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
48 for (j=0;j<p2.GetLength();++j) {
49 p2[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
54 cout << jpsi.GetLength() <<
" J/Psi candidates found" <<
"\n";
56 for (l=0;l<jpsi.GetLength();++l) {
57 invmass->Fill(jpsi[l].M());
62 c1->cd(); invmass->Draw();
68 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)