ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/csander/HEPTutorial/MyMuon.h
Revision: 1.8
Committed: Fri Jul 6 08:19:51 2012 UTC (12 years, 9 months ago) by csander
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +2 -2 lines
Log Message:
v1.0, including a small ntupler for further skimming

File Contents

# User Rev Content
1 csander 1.1 /*
2     * MyMuon.h
3     *
4     * Created on: Feb 1, 2012
5     * Author: csander
6     */
7    
8     #ifndef MYMUON_H_
9     #define MYMUON_H_
10    
11     #include <TLorentzVector.h>
12    
13     class MyMuon: public TLorentzVector {
14    
15 csander 1.7 public:
16 csander 1.1
17 csander 1.7 MyMuon();
18     MyMuon(double px, double py, double pz, double e) {
19     SetPxPyPzE(px, py, pz, e);
20     }
21     ;
22     virtual ~MyMuon();
23    
24     void SetIsolation(double x) {
25     isolation = x;
26     }
27     ;
28    
29     void SetCharge(int q) {
30     charge = q;
31     }
32     ;
33    
34     void SetChargeGen(int q) {
35     chargegen = q;
36     }
37     ;
38    
39     const double GetIsolation() {
40     return isolation;
41     }
42     ;
43    
44 csander 1.8 const bool IsIsolated(double x = 0.2) {
45     return (isolation < x * Pt());
46 csander 1.7 }
47     ;
48    
49     const int GetCharge() {
50     return charge;
51     }
52     ;
53    
54     const int GetChargeGen() {
55     return chargegen;
56     }
57     ;
58    
59     void SetMatchedGenMuon(double px, double py, double pz, double e) {
60     genmuon.SetPxPyPzE(px, py, pz, e);
61     }
62     ;
63    
64     const TLorentzVector GetGenMuon() {
65     return genmuon;
66     }
67     ;
68    
69     private:
70    
71     double isolation;
72     int charge, chargegen;
73     TLorentzVector genmuon;
74 csander 1.1
75     };
76    
77     #endif /* MYMUON_H_ */