5 gStyle->SetOptFit(1011);
7 if (!InFile.EndsWith(
".root")) InFile+=
"_fast.root";
10 TString OutFile=
"dummy_out.root";
13 FairLogger::GetLogger()->SetLogToFile(kFALSE);
15 FairRunAna*
fRun =
new FairRunAna();
16 fRun->SetGenerateRunInfo(kFALSE);
17 fRun->SetInputFile(InFile);
18 fRun->SetOutputFile(OutFile);
26 TFile *
out = TFile::Open(InFile+
"_ana.root",
"RECREATE");
39 if (nevts==0) nevts= theAnalysis->
GetEntries();
42 TString pidalg =
"PidChargedProbability";
52 double m0_jpsi = TDatabasePDG::Instance()->GetParticle(
"J/psi")->Mass();
56 double m0_p = TDatabasePDG::Instance()->GetParticle(
"proton")->Mass();
57 TLorentzVector ini(0, 0, pbarmom,
sqrt(m0_p*m0_p + pbarmom*pbarmom) + m0_p);
63 while (theAnalysis->
GetEvent() && i++<nevts)
65 if ((i%100)==0) cout<<
"evt " << i << endl;
68 theAnalysis->
FillList(mclist,
"McTruth");
70 nmc->
Column(
"ev", (Int_t) i);
71 qa.qaMcList(
"", mclist, nmc);
76 theAnalysis->
FillList(all,
"All", pidalg);
81 theAnalysis->
FillList(muplus,
"MuonAllPlus", pidalg);
82 theAnalysis->
FillList(muminus,
"MuonAllMinus", pidalg);
83 theAnalysis->
FillList(piplus,
"PionAllPlus", pidalg);
84 theAnalysis->
FillList(piminus,
"PionAllMinus", pidalg);
98 ntp1->
Column(
"ev", (Float_t) i);
99 ntp1->
Column(
"cand", (Float_t) j);
101 ntp1->
Column(
"nmct", (Float_t) njmct);
104 qa.qaP4(
"beam", ini, ntp1);
107 qa.qaComp(
"j", jpsi[j], ntp1);
110 qa.qaEventShapeShort(
"es",&evsh, ntp1);
116 if (truth) lv = truth->
P4();
117 qa.qaP4(
"trj", lv, ntp1);
130 psi2s.
Combine(jpsi, piplus, piminus);
137 ntp2->
Column(
"ev", (Float_t) i);
138 ntp2->
Column(
"cand", (Float_t) j);
140 ntp2->
Column(
"nmct", (Float_t) npsimct);
143 kinfit.Add4MomConstraint(ini);
149 qa.qaP4(
"beam", ini, ntp2);
152 qa.qaComp(
"psi", psi2s[j], ntp2);
153 qa.qaComp(
"fpsi",psifit, ntp2);
156 qa.qaEventShapeShort(
"es",&evsh, ntp2);
161 if (truth) lv = truth->
P4();
162 qa.qaP4(
"trpsi", lv, ntp2);
friend F32vec4 sqrt(const F32vec4 &a)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
void Combine(RhoCandList &l1, RhoCandList &l2)
void Select(RhoParticleSelectorBase *pidmgr)
TLorentzVector P4() const
void Column(const char *label, Bool_t value, Bool_t defval=0, const char *block=0)
void SetType(const TParticlePDG *pdt, int start=0)
TTree * GetInternalTree()
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
Int_t GetEvent(Int_t n=-1)