ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/PollackPrograms/src/TCElectron.cc
Revision: 1.2
Committed: Wed Feb 20 21:39:43 2013 UTC (12 years, 2 months ago) by bpollack
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +109 -59 lines
Log Message:
commiting moriond analysis package

File Contents

# User Rev Content
1 bpollack 1.1 #include "TCElectron.h"
2     #include <iostream>
3    
4     TCElectron::TCElectron() {
5     }
6    
7     TCElectron::~TCElectron() {
8     }
9    
10 bpollack 1.2
11 bpollack 1.1
12     // "get" methods -------------------------------------
13    
14 bpollack 1.2 float TCElectron::R9() const { return _r9; }
15    
16     float TCElectron::PtError() const {
17     return _ptError;
18     }
19    
20     int TCElectron::NumberOfValidPixelHits() const {
21     return _numberOfValidPixelHits;
22     }
23    
24     int TCElectron::NumberOfValidTrackerHits() const {
25     return _numberOfValidTrackerHits;
26 bpollack 1.1 }
27    
28 bpollack 1.2 int TCElectron::NumberOfLostPixelHits() const {
29     return _numberOfLostPixelHits;
30 bpollack 1.1 }
31    
32 bpollack 1.2 int TCElectron::NumberOfLostTrackerHits() const {
33     return _numberOfLostTrackerHits;
34 bpollack 1.1 }
35    
36 bpollack 1.2 float TCElectron::NormalizedChi2() const {
37     return _normalizedChi2;
38     }
39    
40     bool TCElectron::ConversionVeto() const {
41     return _convVeto;
42 bpollack 1.1 }
43    
44 bpollack 1.2 short TCElectron::ConversionMissHits() const {
45     return _convMissHits;
46 bpollack 1.1 }
47    
48 bpollack 1.2 float TCElectron::SCEta() const {
49     return _scEta;
50     }
51 bpollack 1.1
52     bool TCElectron::IsEB() const {
53     return _isEB;
54     }
55    
56     bool TCElectron::IsEE() const {
57     return _isEE;
58     }
59    
60     bool TCElectron::IsInGap() const {
61     return _isInGap;
62     }
63    
64 bpollack 1.2 float TCElectron::HadOverEm() const {
65     return _hadOverEm;
66     }
67     float TCElectron::DphiSuperCluster() const {
68     return _dPhiSuperCluster;
69     }
70     float TCElectron::DetaSuperCluster() const {
71     return _dEtaSuperCluster;
72     }
73     float TCElectron::SigmaIEtaIEta() const {
74     return _sigmaIetaIeta;
75     }
76    
77     float TCElectron::EOverP() const {
78     return _eOverP;
79     }
80    
81     float TCElectron::FBrem() const {
82     return _fBrem;
83     }
84 bpollack 1.1
85     int TCElectron::CutLevel(int lvl) const{
86     if(lvl==95){
87     return _cut95;
88     }else if(lvl==90) {
89     return _cut90;
90     }else if(lvl==85) {
91     return _cut85;
92     }else if(lvl==80) {
93     return _cut80;
94     }else if(lvl==70) {
95     return _cut70;
96     }else if(lvl==60) {
97     return _cut60;
98     }else{
99     return -99;
100     }
101     }
102    
103     bool TCElectron::PassID(int lvl) const {
104     unsigned c = CutLevel(lvl);
105     if (c & 0x01) return true;
106     else return false;
107     }
108    
109     bool TCElectron::PassIsolation(int lvl) const {
110     unsigned c = CutLevel(lvl);
111     if (c & 0x02) return true;
112     else return false;
113     }
114    
115     bool TCElectron::PassConversion(int lvl) const {
116     unsigned c = CutLevel(lvl);
117     if (c & 0x04) return true;
118     else return false;
119     }
120    
121 bpollack 1.2 TLorentzVector TCElectron::RegressionMomCombP4() const {
122     return _regressionMomCombP4;
123 bpollack 1.1 }
124    
125     //------------------------------------------------
126     // "set" methods ---------------------------------------------
127     //------------------------------------------------------------------------
128    
129    
130 bpollack 1.2 void TCElectron::SetR9(float r){ _r9 = r; }
131    
132     void TCElectron::SetPtError(float e) {
133     _ptError = e;
134     }
135     void TCElectron::SetNumberOfValidPixelHits(int n) {
136     _numberOfValidPixelHits = n;
137     }
138    
139     void TCElectron::SetNumberOfValidTrackerHits(int n) {
140     _numberOfValidTrackerHits = n;
141     }
142    
143     void TCElectron::SetNumberOfLostPixelHits(int n) {
144     _numberOfLostPixelHits = n;
145     }
146    
147     void TCElectron::SetNumberOfLostTrackerHits(int n) {
148     _numberOfLostTrackerHits = n;
149     }
150    
151     void TCElectron::SetNormalizedChi2(float n) {
152     _normalizedChi2 = n;
153     }
154    
155     void TCElectron::SetHadOverEm(float he){
156     _hadOverEm = he;
157     }
158     void TCElectron::SetDphiSuperCluster(float dp){
159     _dPhiSuperCluster = dp;
160     }
161     void TCElectron::SetDetaSuperCluster(float de){
162     _dEtaSuperCluster = de;
163     }
164    
165     void TCElectron::SetSigmaIEtaIEta(float sieie){
166     _sigmaIetaIeta = sieie;
167 bpollack 1.1 }
168    
169 bpollack 1.2 void TCElectron::SetEOverP(float e)
170     {
171     _eOverP = e;
172 bpollack 1.1 }
173    
174 bpollack 1.2 void TCElectron::SetFBrem(float fb)
175     {
176     _fBrem = fb;
177     }
178 bpollack 1.1
179 bpollack 1.2 void TCElectron::SetSCEta(float e)
180     {
181     _scEta = e;
182 bpollack 1.1 }
183    
184 bpollack 1.2 void TCElectron::SetConversionVeto(bool v) {
185     _convVeto = v;
186     }
187    
188     void TCElectron::SetConversionMissHits(short m) {
189     _convMissHits = m;
190     }
191 bpollack 1.1
192     void TCElectron::SetIsEB(bool b) {
193     _isEB = b;
194     }
195    
196     void TCElectron::SetIsEE(bool b) {
197     _isEE = b;
198     }
199    
200     void TCElectron::SetIsInGap(bool b) {
201     _isInGap = b;
202     }
203    
204     void TCElectron::SetCutLevel(int cut, int lvl){
205     if(lvl==95){
206     _cut95 = cut;
207     }else if(lvl==90) {
208     _cut90 = cut;
209     }else if(lvl==85) {
210     _cut85 = cut;
211     }else if(lvl==80) {
212     _cut80 = cut;
213     }else if(lvl==70) {
214     _cut70 = cut;
215     }else if(lvl==60) {
216     _cut60 = cut;
217     }
218     }
219 bpollack 1.2
220     void TCElectron::SetRegressionMomCombP4(TLorentzVector tmpP4){
221     _regressionMomCombP4 = tmpP4;
222     }
223