17 #ifndef PNDCACOUNTERS_H 18 #define PNDCACOUNTERS_H 41 AddCounter(
"ref_prim_long",
"LRefPrim efficiency");
45 AddCounter(
"extra_prim",
"ExtraPrim efficiency");
46 AddCounter(
"extra_sec",
"ExtraSec efficiency");
86 void Inc(
bool isReco,
bool isKilled,
double _ratio_length,
double _ratio_fakes,
int _nclones,
string name)
90 const int index =
indices[name];
101 std::cout.setf(ios::fixed);
102 std::cout.setf(ios::showpoint);
103 std::cout.precision(3);
104 std::cout <<
"Track category : " 116 <<
"All MC" << std::endl;
119 for (
int iC = 0; iC < NCounters; iC++) {
121 std::cout <<
names[iC] <<
" : " 150 isReconstructable = 0;
160 bool GetNClones() {
return (recoTrackIds.size() > 1) ? recoTrackIds.size() - 1 : 0; }
163 void Print() { cout <<
"Set: " <<
set <<
" RecoAble: " << isReconstructable <<
" NReco: " << recoTrackIds.size() << endl; }
167 bool isReconstructable;
169 std::vector<int> recoTrackIds;
179 mcTrackId = mcTrackId_;
186 bool IsGhost(
float minPurity = 0) {
return (mcTrackId == -1) || (purity < minPurity); }
187 bool IsReco(
float minPurity = 0,
int minNHits = 0) {
return (mcTrackId != -1) && (purity >= minPurity) && (nHits >= minNHits); }
190 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)