1 |
#ifndef DetEfficiency_h
|
2 |
#define DetEfficiency_h
|
3 |
|
4 |
#include <stdint.h>
|
5 |
#include <cmath>
|
6 |
#include <string>
|
7 |
|
8 |
class DetEfficiency {
|
9 |
public:
|
10 |
|
11 |
DetEfficiency(uint32_t rawId) : theRawId(rawId), theHits(0), theMuons(0), theSimHits(0) {}
|
12 |
double detId() const { return theRawId; }
|
13 |
bool isDummy() const;
|
14 |
void addHit() {theHits++; }
|
15 |
void addMuon() {theMuons++; }
|
16 |
void addSimHit() { theSimHits++; }
|
17 |
uint32_t numberOfSimHits() const { return theSimHits; }
|
18 |
uint32_t numberOfHits() const { return theHits; }
|
19 |
uint32_t numberOfMuons() const { return theMuons; }
|
20 |
double efficiency() const;
|
21 |
double efficiencyError() const;
|
22 |
std::string print() const;
|
23 |
private:
|
24 |
uint32_t theRawId;
|
25 |
uint32_t theHits, theMuons, theSimHits;
|
26 |
};
|
27 |
#endif
|