#include "TFile.h" #include "TH1F.h" #include "TH2F.h" #include "TCanvas.h" #include "TStopwatch.h" #include "TROOT.h" #include "TSystem.h" #include "TTree.h" #include "TString.h" void printCand(TLorentzVector l, TVector3 p) { cout <<"vtx("<Fill(jpsi[j].M()); } // for the 4C fit we need to add the daughters individually pp.Combine(jpsi,pip,pim); for (j=0;jFill(pp[j].M()); //do the 4C fit on the pbar p System Pnd4CFitter fitter(pp[j],ini); fitter.FitConserveMasses(); TCandidate *ppfit=fitter.FittedCand(pp[j]); pp2mass->Fill(ppfit->M()); TCandidate *epfit=fitter.FittedCand(*(pp[j].Daughter(0)->Daughter(0))); TCandidate *emfit=fitter.FittedCand(*(pp[j].Daughter(0)->Daughter(1))); TLorentzVector sum=epfit->P4()+emfit->P4(); jpsi2mass->Fill(sum.Mag()); } } // **** plot all that stuff // c1->Divide(2,2); c1->cd(1); jpsimass->Draw(); c1->cd(2); jpsi2mass->Draw(); c1->cd(3); ppmass->Draw(); c1->cd(4); pp2mass->Draw(); c1->cd(); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime); }