7 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
9 TFile *
out = TFile::Open(
"invmass_histo.root",
"RECREATE");
14 PndEventReader evr(fname);
18 TH1F *invmass=
new TH1F(
"invmass",
"invariant mass",100,2.5,3.5);
25 TLorentzVector ini(0,0,6.23164,7.24015);
27 if (nevts==0) nevts=evr.GetEntries();
29 int i=0,j=0, k=0, l=0;
34 while (evr.GetEvent() && i++<nevts)
37 if (!((i+1)%1000)) cout << i <<
"\n";
39 evr.FillList(p1,
"All");
40 evr.FillList(p2,
"All");
47 for (j=0;j<p1.GetLength();++j) {
49 if ((p1[j].GetMicroCandidate().GetEmcRawEnergy()/p1[j].GetMicroCandidate().GetMomentum().Mag())>0.0) {
50 p1[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
56 for (j=0;j<p2.GetLength();++j) {
58 if ((p2[j].GetMicroCandidate().GetEmcRawEnergy()/p2[j].GetMicroCandidate().GetMomentum().Mag())>0.0) {
59 p2[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(11)->
Mass());
70 for (l=0;l<jpsi.GetLength();++l) {
71 invmass->Fill(jpsi[l].M());
87 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
void run_ana_tpccombi(TString fname="pid_tpccombi.root", int nevts=0)