42 cout <<
" TTracksCatCounters: Error. Addition of counters of different sizes: " <<
NCounters <<
" " << a.
NCounters << endl;
58 template <
typename T2>
62 cout <<
" TTracksCatCounters: Error. Addition of counters of different sizes: " <<
NCounters <<
" " << a.
NCounters << endl;
72 template <
typename T2>
81 friend std::fstream & operator<<(std::fstream &strm, const TTracksCatCounters<T> &
a ){
82 strm <<
a.NCounters <<
" " <<
a.counters.size() <<
" ";
83 for(
unsigned int iV=0; iV<
a.counters.size(); iV++)
84 strm <<
a.counters[iV] <<
" ";
89 friend std::ostream & operator<<(std::ostream &strm, const TTracksCatCounters<T> &
a ){
90 strm <<
a.NCounters <<
" " <<
a.counters.size() <<
" ";
91 for(
unsigned int iV=0; iV<
a.counters.size(); iV++)
92 strm <<
a.counters[iV] <<
" ";
103 for(
int iV=0; iV<tmp; iV++)
113 double Div(
double a,
double b){
return (b > 0) ? a/b : -1.;};
127 void Inc(
bool isReco,
string name);
132 vector<string>
names;
149 names.push_back(name);
193 std::ios_base::fmtflags coutFlags = cout.flags();
195 cout.setf(ios::fixed);
196 cout.setf(ios::showpoint);
198 cout <<
"Track category : " <<
" Eff " <<
" | "<<
"All MC" << endl;
201 for (
int iC = 0; iC < NCounters; iC++){
202 cout <<
names[iC] <<
" : "
211 cout.flags(coutFlags);
TTracksCatCounters(int nCounters)
TTracksCatCounters< double > operator/(TTracksCatCounters< T2 > &a)
counters used for efficiency calculation
TTracksCatCounters< T2 > operator/(double a)
friend std::fstream & operator>>(std::fstream &strm, TTracksCatCounters< T > &a)
void Inc(bool isReco, string name)
TTracksCatCounters & operator+=(TTracksCatCounters &a)
map< string, int > indices
TTracksCatCounters< double > ratio_reco
TTracksCatCounters operator+(TTracksCatCounters &a)
double Div(double a, double b)
void AddCounters(int nCounters)
TTracksCatCounters< int > mc
TTracksCatCounters< int > reco
TEfficiencies & operator+=(TEfficiencies &a)
virtual void AddCounter(string shortname, string name)