35 FairTask(
"Panda Tutorial Analysis Task") {
57 TObjArray *tok = s.Tokenize(delim);
58 int N = tok->GetEntries();
62 TString st = ((TObjString*)tok->At(
i))->String();
63 st.ReplaceAll(
"\t",
"");
64 st = st.Strip(TString::kBoth);
65 if (st !=
"") toks.push_back(st);
107 fPidArrayNames =
"IdealPidProbability : ScEmcPidBarrelProbability;ScEmcPidFwCapProbability;ScEmcPidBwCapProbability : DrcBarrelProbability:";
108 fPidArrayNames +=
"DrcDiscProbability : MvdPidProbability : ScMdtPidBarrelProbability;ScMdtPidForwardProbability : SttPidProbability : RichProbability";
112 fPidArrayNames =
"PidAlgoIdealCharged : PidAlgoEmcBayes : PidAlgoDrc : PidAlgoDisc : PidAlgoMvd : PidAlgoMdtHardCuts : PidAlgoStt : PidAlgoRich : PidAlgoSciT : ";
128 for (
int i=1;
i<nalgos;++
i)
132 nonalgo.ReplaceAll(
";;",
";");
134 cout <<
"[PndParticleQATask] Algo["<<i<<
"] : "<<
fPidList[
i]<<
" Non-Algo : "<<nonalgo<<endl;
169 TLorentzVector dummy;
202 for (i=0;i<nalgos;++
i)
208 TLorentzVector chrgP4=dummy;
213 for (j=0; j<ntrk; ++j)
221 ntp->
Column(
"chrg", (Float_t) chrpid[0][j]->Charge(), 0.0
f );
223 qa.
qaP4(
"", chrpid[0][j]->P4(),
ntp);
228 qa.
qaPid(
"", chrpid[nalgos-1][j],
ntp);
230 for (i=1; i<nalgos-1; ++
i)
232 int nidx = (nalgos-2)/2;
233 int algidx = (i-1)%nidx;
238 if (algname.Contains(
";")) algname.Remove(algname.First(
";"),1000);
239 algname.ReplaceAll(
"Pid",
"");
240 algname.ReplaceAll(
"Algo",
"");
241 algname.ReplaceAll(
"Probability",
"");
243 algname=algname(0,10);
245 TString smpname = Form(
"a%d",algidx);
248 smpname =
"n" + smpname;
249 algname =
"n" + algname;
254 qa.
qaPid(smpname, chrpid[i][j],
ntp);
255 qa.
qaPid(algname, chrpid[i][j],
ntp);
275 if (!moth || abs(moth->
PdgCode()-88850)<100 )
278 chrgP4 = truth->
P4();
286 qa.
qaP4(
"tr", dummy,
ntp,
true);
307 for (j=0; j<ntrk; ++j)
315 ntpn->
Column(
"chrg", (Float_t) neut[j]->Charge(), 0.0
f );
328 if (!moth || abs(moth->
PdgCode()-88850)<100 ) prim = 1.0;
336 qa.
qaP4(
"moth", dummy,
ntpn,
true);
345 qa.
qaP4(
"moth", dummy,
ntpn,
true);
int SplitString(TString s, TString delim, StringList &toks)
void qaPid(TString pre, RhoCandidate *c, RhoTuple *n)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
virtual void SetParContainers()
void qaTrk(TString pre, RhoCandidate *c, RhoTuple *n)
void qaStt(TString pre, RhoCandidate *c, RhoTuple *n)
void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false)
void qaRich(TString pre, RhoCandidate *c, RhoTuple *n)
void qaMcList(TString pre, RhoCandList &l, RhoTuple *n, int max=10000)
int SelectTruePid(PndAnalysis *ana, RhoCandList &l)
std::vector< TString > StringList
void qaDsc(TString pre, RhoCandidate *c, RhoTuple *n)
void qaMvd(TString pre, RhoCandidate *c, RhoTuple *n)
TLorentzVector P4() const
void Column(const char *label, Bool_t value, Bool_t defval=0, const char *block=0)
Int_t Remove(RhoCandidate *)
PndParticleQATask(bool fastsim=false, bool dumpchrg=true, bool dumpneut=true, bool dumpmc=true, int mode=0)
void qaTof(TString pre, RhoCandidate *c, RhoTuple *n)
void qaEmc(TString pre, RhoCandidate *c, RhoTuple *n)
virtual void Exec(Option_t *opt)
virtual InitStatus Init()
TTree * GetInternalTree()
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
void qaDrc(TString pre, RhoCandidate *c, RhoTuple *n)
void qaPull(TString pre, RhoCandidate *c, RhoTuple *n, bool skip=false)
void qaMuo(TString pre, RhoCandidate *c, RhoTuple *n)
const RhoCandidate * TheMother() const