22 #include "FairRootManager.h"
23 #include "FairRunAna.h"
24 #include "FairRuntimeDb.h"
26 #include "FairRuntimeDb.h"
29 #include "TClonesArray.h"
50 FairTask(
"Panda Pid Test Task") {
70 std::cout <<
"fPdgIndex.size()1 = " <<
fPdgIndex.size() << std::endl;
109 FairRun*
run = FairRun::Instance();
110 if ( ! run ) Fatal(
"SetParContainers",
"No analysis run");
141 int candListIndex = 0;
143 if (
fVerbose > 1) std::cout <<
"CandList " << candListIndex++ <<
" Entries: " << candidates->GetLength() << std::endl;
144 for (
int candInd = 0; candInd < candidates->GetLength(); candInd++){
147 if (
fVerbose > 1) std::cout << std::endl;
149 if (
fVerbose > 1) std::cout << candInd <<
" Cand: " << cand->
PdgCode() <<
" MCCand " << mccand->
PdgCode() << std::endl;
150 if (
fVerbose > 1) std::cout << *(FairMultiLinkedData_Interface*)mccand << std::endl;
154 std::cout <<
"-W- PndPidTestTask::Exec Wrong PDG Codes: Cand: " << cand->
PdgCode() <<
" MCCand: " << mccand->
PdgCode() << std::endl;
164 for (
int j = 0; j <
fPdgIndex.size(); j++){
165 if (relative ==
false)
168 std::cout << std::setw(5);
169 int entryCount = std::accumulate(fConfusionMatrix[
i].begin(), fConfusionMatrix[
i].end(), 0);
171 std::cout << std::fixed << std::setprecision(2) << fConfusionMatrix[
i][j] / (double)entryCount <<
" ";
173 std::cout << std::fixed << std::setprecision(2) << 0.0 <<
" ";
176 std::cout << std::endl;
virtual InitStatus Init()
void PrintConfusionMatrix(bool relative=false)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
std::vector< RhoCandList * > fCandLists
virtual void SetParContainers()
std::map< int, int > fPdgIndex
void PrintOn(std::ostream &o=std::cout) const
std::vector< std::string > fParticleNames
RhoCandidate * GetMcTruth() const
virtual void Exec(Option_t *opt)
std::vector< std::vector< int > > fConfusionMatrix