1 #ifndef KFPartEfficiencies_H 2 #define KFPartEfficiencies_H 12 KFPartEfficiencies() : names(), indices(), ratio_reco(), mc(), reco(), ratio_ghost(), ratio_bg(), ratio_clone(), ghost(), bg(), clone()
18 310, 3122, -3122, 3312, -3312, 3334, -3334,
20 3224, 3114, -3114, -3224,
22 3324, -3324, 1003314, -1003314,
29 421, -421, 100421, -100421,
33 10421, -10421, 10411, -10411, 20411, -20411,
135 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.,
136 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.};
137 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.,
138 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.};
314 fPdgToIndex[mPartPDG[iP]] = iP;
321 std::map<int, int>::iterator it;
322 it = fPdgToIndex.find(pdg);
323 if (it != fPdgToIndex.end())
331 indices[shortname] = names.size();
332 names.push_back(name);
358 ratio_reco = reco / mc;
361 ratio_ghost = ghost / allReco;
362 ratio_bg = bg / allReco;
363 ratio_clone = clone / allReco;
366 void Inc(
bool isReco,
int nClones, TString name)
368 const int index = indices[name];
377 void IncReco(
bool isGhost,
bool isBg, TString name)
379 const int index = indices[name];
391 std::ios_base::fmtflags coutFlags = cout.flags();
393 std::cout.setf(ios::fixed);
394 std::cout.setf(ios::showpoint);
395 std::cout.precision(3);
396 std::cout <<
"Particle : " 411 <<
" N MC " << std::endl;
414 for (
int iC = 0; iC < NCounters; iC++) {
415 std::cout << names[iC] <<
" : " << setw(6) << ratio_reco.
counters[iC] <<
" / " << setw(6) << ratio_ghost.
counters[iC]
416 <<
" / " << setw(6) << ratio_bg.
counters[iC]
417 <<
" / " << setw(6) << ghost.
counters[iC] <<
" / " << setw(7) << bg.
counters[iC] <<
" / " << setw(6) << reco.
counters[iC] <<
" / " << setw(7)
422 cout.flags(coutFlags);
428 strm << a.ratio_reco;
431 strm << a.ratio_ghost;
433 strm << a.ratio_clone;
444 strm >> a.ratio_reco;
447 strm >> a.ratio_ghost;
449 strm >> a.ratio_clone;
459 std::fstream file(fileName.Data(), fstream::in);
474 vector<TString> names;
475 map<TString, int> indices;
477 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]