CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ScoutingMuon.h
Go to the documentation of this file.
1 #ifndef DataFormats_ScoutingMuon_h
2 #define DataFormats_ScoutingMuon_h
3 
4 #include <vector>
5 
6 // Class for holding muon information, for use in data scouting
7 // IMPORTANT: the content of this class should be changed only in backwards compatible ways!
9 {
10  public:
11  //constructor with values for all data fields
12  ScoutingMuon(float pt, float eta, float phi, float m, float ecalIso, float hcalIso,
13  float trackIso, float chi2, float ndof, int charge, float dxy, float dz,
16  pt_(pt), eta_(eta), phi_(phi), m_(m),
17  ecalIso_(ecalIso), hcalIso_(hcalIso), trackIso_(trackIso),
18  chi2_(chi2), ndof_(ndof), charge_(charge), dxy_(dxy), dz_(dz),
19  nValidMuonHits_(nValidMuonHits), nValidPixelHits_(nValidPixelHits),
20  nMatchedStations_(nMatchedStations),
21  nTrackerLayersWithMeasurement_(nTrackerLayersWithMeasurement), type_(type) {}
22  //default constructor
23  ScoutingMuon():pt_(0), eta_(0), phi_(0), m_(0), ecalIso_(0), hcalIso_(0), trackIso_(0),
24  chi2_(0), ndof_(0), charge_(0), dxy_(0), dz_(0), nValidMuonHits_(0),
26  type_(0) {}
27 
28  //accessor functions
29  float pt() const { return pt_; }
30  float eta() const { return eta_; }
31  float phi() const { return phi_; }
32  float m() const { return m_; }
33  float ecalIso() const { return ecalIso_; }
34  float hcalIso() const { return hcalIso_; }
35  float trackIso() const { return trackIso_; }
36  float chi2() const { return chi2_; }
37  float ndof() const { return ndof_; }
38  int charge() const { return charge_; }
39  float dxy() const { return dxy_; }
40  float dz() const { return dz_; }
41  int nValidMuonHits() const { return nValidMuonHits_; }
42  int nValidPixelHits() const { return nValidPixelHits_; }
43  int nMatchedStations() const { return nMatchedStations_; }
45  int type() const { return type_; }
46  bool isGlobalMuon() const { return type_ & 1<<1; }
47  bool isTrackerMuon() const { return type_ & 1<<2; }
48 
49  private:
50  float pt_;
51  float eta_;
52  float phi_;
53  float m_;
54  float ecalIso_;
55  float hcalIso_;
56  float trackIso_;
57  float chi2_;
58  float ndof_;
59  int charge_;
60  float dxy_;
61  float dz_;
66  int type_;
67 };
68 
69 typedef std::vector<ScoutingMuon> ScoutingMuonCollection;
70 
71 #endif
type
Definition: HCALResponse.h:21
int nTrackerLayersWithMeasurement() const
Definition: ScoutingMuon.h:44
int nValidPixelHits_
Definition: ScoutingMuon.h:63
int nValidMuonHits() const
Definition: ScoutingMuon.h:41
int nTrackerLayersWithMeasurement_
Definition: ScoutingMuon.h:65
int nMatchedStations() const
Definition: ScoutingMuon.h:43
float ecalIso() const
Definition: ScoutingMuon.h:33
float dxy() const
Definition: ScoutingMuon.h:39
float ndof() const
Definition: ScoutingMuon.h:37
float eta() const
Definition: ScoutingMuon.h:30
bool isGlobalMuon() const
Definition: ScoutingMuon.h:46
float m() const
Definition: ScoutingMuon.h:32
int type() const
Definition: ScoutingMuon.h:45
float pt() const
Definition: ScoutingMuon.h:29
bool isTrackerMuon() const
Definition: ScoutingMuon.h:47
float chi2() const
Definition: ScoutingMuon.h:36
float ecalIso_
Definition: ScoutingMuon.h:54
ScoutingMuon(float pt, float eta, float phi, float m, float ecalIso, float hcalIso, float trackIso, float chi2, float ndof, int charge, float dxy, float dz, int nValidMuonHits, int nValidPixelHits, int nMatchedStations, int nTrackerLayersWithMeasurement, int type)
Definition: ScoutingMuon.h:12
float trackIso_
Definition: ScoutingMuon.h:56
std::vector< ScoutingMuon > ScoutingMuonCollection
Definition: ScoutingMuon.h:69
float trackIso() const
Definition: ScoutingMuon.h:35
float dz() const
Definition: ScoutingMuon.h:40
float hcalIso_
Definition: ScoutingMuon.h:55
int nMatchedStations_
Definition: ScoutingMuon.h:64
int charge() const
Definition: ScoutingMuon.h:38
int nValidMuonHits_
Definition: ScoutingMuon.h:62
float phi() const
Definition: ScoutingMuon.h:31
int nValidPixelHits() const
Definition: ScoutingMuon.h:42
float hcalIso() const
Definition: ScoutingMuon.h:34