13 #ifndef KFPartEfficiencies_H 14 #define KFPartEfficiencies_H 24 KFPartEfficiencies() : names(), indices(), ratio_reco(), mc(), reco(), ratio_ghost(), ratio_bg(), ratio_clone(), ghost(), bg(), clone()
30 310, 3122, -3122, 3312, -3312, 3334, -3334,
32 3224, 3114, -3114, -3224,
34 3324, -3324, 1003314, -1003314,
41 421, -421, 100421, -100421,
45 10421, -10421, 10411, -10411, 20411, -20411,
147 float mPartMHistoMin[
nParticles] = {0.3, 1., 1., 1., 1., 1., 1., 0.6, 0.6, 0.6, 0.6, 1., 1., 1., 1., 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.8, 1.8, 1.,
148 0.6, 0.1, 0.1, 0.1, 0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.};
149 float mPartMHistoMax[
nParticles] = {1.3, 2., 2., 3., 3., 3., 3., 2.6, 2.6, 2.6, 2.6, 3., 3., 3., 3., 3.4, 3.4, 3.4, 3.4, 3.4, 3.4, 3.8, 3.8, 3.,
150 1.6, 2.1, 2.1, 2.1, 3., 4., 4., 3., 3., 3., 3., 3., 3., 3., 3., 3.8, 3.8, 3.8, 3.8, 3.8, 3.8, 3.8, 3.8, 3.};
326 fPdgToIndex[mPartPDG[iP]] = iP;
333 std::map<int, int>::iterator it;
334 it = fPdgToIndex.find(pdg);
335 if (it != fPdgToIndex.end())
343 indices[shortname] = names.size();
344 names.push_back(name);
370 ratio_reco = reco / mc;
373 ratio_ghost = ghost / allReco;
374 ratio_bg = bg / allReco;
375 ratio_clone = clone / allReco;
378 void Inc(
bool isReco,
int nClones, TString name)
380 const int index = indices[name];
389 void IncReco(
bool isGhost,
bool isBg, TString name)
391 const int index = indices[name];
403 std::ios_base::fmtflags coutFlags = cout.flags();
405 std::cout.setf(ios::fixed);
406 std::cout.setf(ios::showpoint);
407 std::cout.precision(3);
408 std::cout <<
"Particle : " 423 <<
" N MC " << std::endl;
426 for (
int iC = 0; iC < NCounters; iC++) {
427 std::cout << names[iC] <<
" : " << setw(6) << ratio_reco.
counters[iC] <<
" / " << setw(6) << ratio_ghost.
counters[iC]
428 <<
" / " << setw(6) << ratio_bg.
counters[iC]
429 <<
" / " << setw(6) << ghost.
counters[iC] <<
" / " << setw(7) << bg.
counters[iC] <<
" / " << setw(6) << reco.
counters[iC] <<
" / " << setw(7)
434 cout.flags(coutFlags);
440 strm << a.ratio_reco;
443 strm << a.ratio_ghost;
445 strm << a.ratio_clone;
456 strm >> a.ratio_reco;
459 strm >> a.ratio_ghost;
461 strm >> a.ratio_clone;
471 std::fstream file(fileName.Data(), fstream::in);
486 vector<TString> names;
487 map<TString, int> indices;
489 map<int, int> fPdgToIndex;
void Inc(bool isReco, int nClones, TString name)
friend std::fstream & operator>>(std::fstream &strm, KFPartEfficiencies &a)
void IncReco(bool isGhost, bool isBg, TString name)
vector< vector< int > > partDaughterPdg
float partMHistoMin[nParticles]
TString partTitle[nParticles]
TString partName[nParticles]
KFPartEfficiencies & operator+=(KFPartEfficiencies &a)
virtual ~KFPartEfficiencies()
friend std::fstream & operator<<(std::fstream &strm, KFPartEfficiencies &a)
static const int nParticles
int GetParticleIndex(int pdg)
void AddFromFile(TString fileName)
virtual void AddCounter(TString shortname, TString name)
float partMHistoMax[nParticles]