1 |
#ifndef MuonObj_H
|
2 |
#define MuonObj_H
|
3 |
#include "UserCode/L1RpcTriggerAnalysis/interface/TrackObj.h"
|
4 |
#include <ostream>
|
5 |
|
6 |
class MuonObj : public TrackObj {
|
7 |
public:
|
8 |
MuonObj(float pt=0., float eta=0., float phi=0., float charge=0.)
|
9 |
: TrackObj(pt,eta,phi,charge),
|
10 |
nRPCHits(0), nDTHits(0), nCSCHits(0), nTrackerHits(0), nMatchedStations(0),
|
11 |
isUnique(true), nAllMuons(0), theMuonBits(0) {}
|
12 |
virtual ~MuonObj(){}
|
13 |
void setBits(bool isGlobal, bool isTracker, bool isOuter, bool isCalo, bool isMatched) {
|
14 |
if (isGlobal) theMuonBits = 1 << 4;
|
15 |
if (isTracker) theMuonBits |= 1<<3;
|
16 |
if (isOuter) theMuonBits |= 1<<2;
|
17 |
if (isCalo) theMuonBits |= 1<<1;
|
18 |
if (isMatched) theMuonBits |= 1;
|
19 |
}
|
20 |
bool isGlobal() const { return (theMuonBits>>4)&1 ;}
|
21 |
bool isTracker() const { return (theMuonBits>>3)&1 ;}
|
22 |
bool isOuter() const { return (theMuonBits>>2)&1 ;}
|
23 |
bool isCalo() const { return (theMuonBits>>1)&1 ;}
|
24 |
bool isMatched() const { return theMuonBits&1 ;}
|
25 |
public:
|
26 |
unsigned int nRPCHits, nDTHits, nCSCHits, nTrackerHits, nMatchedStations;
|
27 |
bool isUnique;
|
28 |
unsigned int nAllMuons;
|
29 |
private:
|
30 |
unsigned int theMuonBits;
|
31 |
friend ostream & operator<< (ostream &out, const MuonObj &o);
|
32 |
public:
|
33 |
ClassDef(MuonObj,2)
|
34 |
};
|
35 |
#endif
|