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