20 int i=0,j=0, k=0, l=0;
21 gStyle->SetOptFit(1011);
24 TString OutFile=
"out_dummy.root";
29 TFile *
out = TFile::Open(prefix+
"_ana_mcmatch.root",
"RECREATE");
32 TH1F *hjpsim_all =
new TH1F(
"hjpsim_all",
"J/#psi mass",200,0,4.5);
33 TH1F *hjpsim_ftm =
new TH1F(
"hjpsim_ftm",
"J/#psi mass (full truth match)",200,0,4.5);
43 if (nevts==0) nevts= theAnalysis->
GetEntries();
54 while (theAnalysis->
GetEvent() && i++<nevts)
56 if ((i%100)==0) cout<<
"evt " << i << endl;
59 theAnalysis->
FillList(muplus,
"MuonAllPlus");
63 jpsi.
Combine(muplus, muminus, 443);
70 hjpsim_all->Fill( jpsi[j]->M() );
105 cout<<
"Writing "<<nhist<<
" histograms to file"<<endl;
FairRunAna * initrun(TString prefix, TString outfile, int min=-1, int max=-1)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
void Combine(RhoCandList &l1, RhoCandList &l2)
PndAnalysis(TString tname1="", TString tname2="", TString algnamec="PidAlgoIdealCharged", TString algnamen="PidAlgoIdealNeutral")
void Select(RhoParticleSelectorBase *pidmgr)
void tut_ana_mcmatch(int nevts=0, TString prefix="signal")
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
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)