5 #ifndef PNDCACOUNTERS_H 6 #define PNDCACOUNTERS_H 29 AddCounter(
"ref_prim_long",
"LRefPrim efficiency");
33 AddCounter(
"extra_prim",
"ExtraPrim efficiency");
34 AddCounter(
"extra_sec",
"ExtraSec efficiency");
74 void Inc(
bool isReco,
bool isKilled,
double _ratio_length,
double _ratio_fakes,
int _nclones,
string name)
78 const int index =
indices[name];
89 std::cout.setf(ios::fixed);
90 std::cout.setf(ios::showpoint);
91 std::cout.precision(3);
92 std::cout <<
"Track category : " 104 <<
"All MC" << std::endl;
107 for (
int iC = 0; iC < NCounters; iC++) {
109 std::cout <<
names[iC] <<
" : " 138 isReconstructable = 0;
148 bool GetNClones() {
return (recoTrackIds.size() > 1) ? recoTrackIds.size() - 1 : 0; }
151 void Print() { cout <<
"Set: " <<
set <<
" RecoAble: " << isReconstructable <<
" NReco: " << recoTrackIds.size() << endl; }
155 bool isReconstructable;
157 std::vector<int> recoTrackIds;
167 mcTrackId = mcTrackId_;
174 bool IsGhost(
float minPurity = 0) {
return (mcTrackId == -1) || (purity < minPurity); }
175 bool IsReco(
float minPurity = 0,
int minNHits = 0) {
return (mcTrackId != -1) && (purity >= minPurity) && (nHits >= minNHits); }
178 void Print() { cout <<
"Track: " << mcTrackId <<
" Purity: " << purity << endl; }
TTracksCatCounters< double > ratio_clone
virtual void AddCounter(string shortname, string name)
TTracksCatCounters< double > ratio_killed
void Inc(bool isReco, bool isKilled, double _ratio_length, double _ratio_fakes, int _nclones, string name)
TTracksCatCounters< double > ratio_fakes
TTracksCatCounters< int > clone
virtual ~PndCAEfficiencies()
TTracksCatCounters< double > reco_length
void Inc(bool isReco, string name)
map< string, int > indices
TTracksCatCounters< double > ratio_reco
TTracksCatCounters< double > ratio_length
PndCAEfficiencies & operator+=(PndCAEfficiencies &a)
TTracksCatCounters< int > mc
TTracksCatCounters< int > reco
TTracksCatCounters< int > killed
TEfficiencies & operator+=(TEfficiencies &a)
TTracksCatCounters< double > reco_fakes
virtual void AddCounter(string shortname, string name)