19 int i=0,j=0, k=0, l=0;
20 gStyle->SetOptFit(1011);
23 TString OutFile=
"out_dummy.root";
28 TFile *
out = TFile::Open(prefix+
"_ana_fit.root",
"RECREATE");
31 TH1F *hjpsim_all =
new TH1F(
"hjpsim_all",
"J/#psi mass",200,0,4.5);
32 TH1F *hjpsim_vf =
new TH1F(
"hjpsim_vf",
"J/#psi mass (vertex fit)",200,0,4.5);
33 TH1F *hjpsi_chi2_vf =
new TH1F(
"hjpsi_chi2_vf",
"J/#psi: #chi^{2} vertex fit",100,0,10);
34 TH1F *hjpsi_prob_vf =
new TH1F(
"hjpsi_prob_vf",
"J/#psi: Prob vertex fit",100,0,1);
44 if (nevts==0) nevts= theAnalysis->
GetEntries();
50 double m0_jpsi = TDatabasePDG::Instance()->GetParticle(
"J/psi")->Mass();
54 TLorentzVector ini(0, 0, 6.231552, 7.240065);
59 while (theAnalysis->
GetEvent() && i++<nevts)
61 if ((i%100)==0) cout<<
"evt " << i << endl;
64 theAnalysis->
FillList(muplus,
"MuonAllPlus");
65 theAnalysis->
FillList(muminus,
"MuonAllMinus");
66 theAnalysis->
FillList(piplus,
"PionAllPlus");
67 theAnalysis->
FillList(piminus,
"PionAllMinus");
83 double chi2_vtx = vtxfitter.
GetChi2();
84 double prob_vtx = vtxfitter.
GetProb();
90 if ( prob_vtx > 0.01 )
93 TVector3 jVtx=jfit->
Pos();
104 pbarp.
Combine(jpsi, piplus, piminus);
118 double chi2_4c = fitter.
GetChi2();
119 double prob_4c = fitter.
GetProb();
125 if ( prob_4c > 0.01 )
161 cout<<
"Writing "<<nhist<<
" histograms to file"<<endl;
FairRunAna * initrun(TString prefix, TString outfile, int min=-1, int max=-1)
void AddMassConstraint(double mass)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
void Add4MomConstraint(TLorentzVector lv)
void Combine(RhoCandList &l1, RhoCandList &l2)
PndAnalysis(TString tname1="", TString tname2="", TString algnamec="PidAlgoIdealCharged", TString algnamen="PidAlgoIdealNeutral")
void Select(RhoParticleSelectorBase *pidmgr)
void tut_ana_fit(int nevts=0, TString prefix="signal")
Int_t GetEvent(Int_t n=-1)
int writemyhistos(int maxy=800, double asp=1.1)
void plotmyhistos(std::vector< TH1 * > h, int maxy=700, double asp=1.1)