5 #include "TStopwatch.h"
14 cout <<
"vtx("<<p.X()<<
"/"<<p.Y()<<
"/"<<p.Z()<<
") p4("<<l.Px()<<
"/"<<l.Py()<<
"/"<<l.Pz()<<
")="<<l.Vect().Mag()<<endl;
23 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
26 PndEventReader evr(fname);
27 if (nevts==0) nevts=evr.GetEntries();
31 TH1F *jpsimass =
new TH1F(
"jpsimass",
"J/psi cands",100,3.1-0.3,3.1+0.3);
32 TH1F *jpsi2mass =
new TH1F(
"jpsi2mass",
"J/psi cands 4C fit",100,3.1-0.3,3.1+0.3);
34 TH1F *ppmass =
new TH1F(
"ppmass",
"pbarp cands",100,3.68598-0.3,3.68598+0.3);
35 TH1F *pp2mass =
new TH1F(
"pp2mass",
"pbarp fitted",100,3.68598-0.02,3.68598+0.02);
39 TCandList pip, pim, ep, em;
42 TPidMassSelector *jpsiMSel =
new TPidMassSelector(
"jpsiSelector" , 3.096 , 0.3);
44 TLorentzVector ini(0,0,6.23164,7.24015);
50 while (evr.GetEvent() && ++i<nevts)
53 cout <<
"evt "<<i<<endl;
57 evr.FillList(pip,
"PionVeryLoosePlus");
58 evr.FillList(pim,
"PionVeryLooseMinus");
59 evr.FillList(ep,
"ElectronVeryLoosePlus");
60 evr.FillList(em,
"ElectronVeryLooseMinus");
74 for (j=0;j<jpsi.GetLength();++j)
76 jpsimass->Fill(jpsi[j].M());
80 pp.Combine(jpsi,pip,pim);
82 for (j=0;j<pp.GetLength();++j)
84 ppmass->Fill(pp[j].M());
91 TCandidate *ppfit=fitter.FittedCand(pp[j]);
92 pp2mass->Fill(ppfit->M());
94 TCandidate *epfit=fitter.FittedCand(*(pp[j].Daughter(0)->Daughter(0)));
95 TCandidate *emfit=fitter.FittedCand(*(pp[j].Daughter(0)->Daughter(1)));
97 TLorentzVector sum=epfit->P4()+emfit->P4();
99 jpsi2mass->Fill(sum.Mag());
107 c1->cd(1); jpsimass->Draw();
108 c1->cd(2); jpsi2mass->Draw();
109 c1->cd(3); ppmass->Draw();
110 c1->cd(4); pp2mass->Draw();
117 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
Bool_t FitConserveMasses()
int ana_fast_psi2s(TString fname="sim_fast.root", int nevts=0)
void printCand(TLorentzVector l, TVector3 p)