#include <FastSimulation/Utilities/interface/Looses.h>
Public Member Functions | |
void | count (const std::string &name, unsigned cut) |
Counting. | |
void | summary () |
Printing. | |
virtual | ~Looses () |
Virtual destructor (empty). | |
Static Public Member Functions | |
static Looses * | instance () |
Constructor is not public (only one instance needed). | |
Private Member Functions | |
Looses () | |
Private Attributes | |
std::map< std::string, std::vector< unsigned > > | theLosses |
Static Private Attributes | |
static Looses * | myself = 0 |
Definition at line 9 of file Looses.h.
Looses::~Looses | ( | ) | [virtual] |
Looses::Looses | ( | ) | [private] |
void Looses::count | ( | const std::string & | name, | |
unsigned | cut | |||
) |
Counting.
Definition at line 19 of file Looses.cc.
00019 { 00020 00021 if ( theLosses.find(name) == theLosses.end() ) { 00022 00023 std::vector<unsigned> myCounts; 00024 for ( unsigned i=0; i<20; ++i ) myCounts.push_back(0); 00025 theLosses[name] = myCounts; 00026 00027 } 00028 00029 if ( cut < 20 ) ++theLosses[name][cut]; 00030 00031 }
void Looses::summary | ( | ) |
Printing.
Definition at line 34 of file Looses.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), i, j, and theLosses.
Referenced by ~Looses().
00034 { 00035 00036 std::map< std::string, std::vector<unsigned> >::const_iterator lossItr; 00037 std::cout << "***** From LOOSES ***** : Cuts effects" << std::endl << std::endl; 00038 00039 for ( lossItr=theLosses.begin(); lossItr != theLosses.end(); ++lossItr ) { 00040 std::cout << lossItr->first << ":" << std::endl; 00041 for ( unsigned i=0; i<4; ++i ) { 00042 for ( unsigned j=0; j<5; ++j ) { 00043 std::cout << std::setw(8) << lossItr->second[5*i+j] << " "; 00044 } 00045 std::cout << std::endl; 00046 } 00047 std::cout << std::endl; 00048 } 00049 00050 }
Looses * Looses::myself = 0 [static, private] |
std::map< std::string, std::vector<unsigned> > Looses::theLosses [private] |