1 |
#include "TrkUpgradeAnalysis/VHbb/interface/VHbbCandidateCuts.h"
|
2 |
|
3 |
#include "TrkUpgradeAnalysis/VHbb/interface/VHbbCandidateVariables.h"
|
4 |
#include "TrkUpgradeAnalysis/VHbb/interface/tools.h"
|
5 |
|
6 |
// Required to work out deltaPhi
|
7 |
#include "DataFormats/GeometryVector/interface/VectorUtil.h"
|
8 |
|
9 |
|
10 |
|
11 |
trkupgradeanalysis::CutOnVariable::CutOnVariable( const trkupgradeanalysis::variables::VHbbCandidateVariable& variable, const trkupgradeanalysis::cuts::ICutType& cut )
|
12 |
: pCut_( cut.copy() ), pVHbbCandidateVariable_( variable.copy() )
|
13 |
{
|
14 |
// No operation besides the initialiser list
|
15 |
}
|
16 |
|
17 |
trkupgradeanalysis::CutOnVariable::~CutOnVariable()
|
18 |
{
|
19 |
// No operation
|
20 |
}
|
21 |
|
22 |
std::string trkupgradeanalysis::CutOnVariable::name() const
|
23 |
{
|
24 |
return pVHbbCandidateVariable_->variableName()+pCut_->name();
|
25 |
}
|
26 |
|
27 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::CutOnVariable::cutVariable() const
|
28 |
{
|
29 |
return *pVHbbCandidateVariable_;
|
30 |
}
|
31 |
|
32 |
bool trkupgradeanalysis::CutOnVariable::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
33 |
{
|
34 |
pVHbbCandidateVariable_->set(vhbbCandidate);
|
35 |
return pCut_->apply( pVHbbCandidateVariable_->histogrammableValue() );
|
36 |
}
|
37 |
|
38 |
bool trkupgradeanalysis::CutOnVariable::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
39 |
{
|
40 |
pVHbbCandidateVariable_->set(ntupleRow);
|
41 |
return pCut_->apply( pVHbbCandidateVariable_->histogrammableValue() );
|
42 |
}
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
trkupgradeanalysis::CandidateTypeEquals::CandidateTypeEquals( VHbbCandidate::CandidateType candidateType )
|
51 |
{
|
52 |
requiredCandidateTypes_.push_back(candidateType);
|
53 |
}
|
54 |
|
55 |
trkupgradeanalysis::CandidateTypeEquals::CandidateTypeEquals( const std::vector<VHbbCandidate::CandidateType>& candidateTypes )
|
56 |
: requiredCandidateTypes_(candidateTypes)
|
57 |
{
|
58 |
// No operation besides the initialiser list.
|
59 |
}
|
60 |
|
61 |
trkupgradeanalysis::CandidateTypeEquals::~CandidateTypeEquals()
|
62 |
{
|
63 |
// No operation
|
64 |
}
|
65 |
|
66 |
std::string trkupgradeanalysis::CandidateTypeEquals::name() const
|
67 |
{
|
68 |
std::stringstream nameStream;
|
69 |
nameStream << variableName() << "==";
|
70 |
|
71 |
if( requiredCandidateTypes_.size()>1 ) nameStream << "(";
|
72 |
|
73 |
for( std::vector<VHbbCandidate::CandidateType>::const_iterator iRequiredCandidateType=requiredCandidateTypes_.begin(); iRequiredCandidateType!=requiredCandidateTypes_.end(); ++iRequiredCandidateType )
|
74 |
{
|
75 |
if( *iRequiredCandidateType==VHbbCandidate::Zmumu ) nameStream << "Zmumu";
|
76 |
else if( *iRequiredCandidateType==VHbbCandidate::Zee ) nameStream << "Zee";
|
77 |
else if( *iRequiredCandidateType==VHbbCandidate::Wmun ) nameStream << "Wmun";
|
78 |
else if( *iRequiredCandidateType==VHbbCandidate::Wen ) nameStream << "Wen";
|
79 |
else if( *iRequiredCandidateType==VHbbCandidate::Znn ) nameStream << "Znn";
|
80 |
else if( *iRequiredCandidateType==VHbbCandidate::UNKNOWN ) nameStream << "UNKNOWN";
|
81 |
|
82 |
// Add an "OR" separator if there's more than one
|
83 |
if( requiredCandidateTypes_.size()>1 && iRequiredCandidateType!=requiredCandidateTypes_.begin() ) nameStream << "||";
|
84 |
}
|
85 |
|
86 |
if( requiredCandidateTypes_.size()>1 ) nameStream << ")";
|
87 |
|
88 |
return nameStream.str();
|
89 |
}
|
90 |
|
91 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::CandidateTypeEquals::cutVariable() const
|
92 |
{
|
93 |
// This class implements the HistogramVariable interface to save on the
|
94 |
// number of classes, so just return a reference to this instance.
|
95 |
return *this;
|
96 |
}
|
97 |
|
98 |
bool trkupgradeanalysis::CandidateTypeEquals::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
99 |
{
|
100 |
lastValue_=vhbbCandidate.candidateType;
|
101 |
|
102 |
for( std::vector<VHbbCandidate::CandidateType>::const_iterator iRequiredCandidateType=requiredCandidateTypes_.begin(); iRequiredCandidateType!=requiredCandidateTypes_.end(); ++iRequiredCandidateType )
|
103 |
{
|
104 |
if( *iRequiredCandidateType==lastValue_ ) return true;
|
105 |
}
|
106 |
|
107 |
// If control reaches this far than non of the entries in the vector matched
|
108 |
return false;
|
109 |
}
|
110 |
|
111 |
bool trkupgradeanalysis::CandidateTypeEquals::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
112 |
{
|
113 |
lastValue_=static_cast<VHbbCandidate::CandidateType>( ntupleRow.getDouble( variableName() ) );
|
114 |
|
115 |
for( std::vector<VHbbCandidate::CandidateType>::const_iterator iRequiredCandidateType=requiredCandidateTypes_.begin(); iRequiredCandidateType!=requiredCandidateTypes_.end(); ++iRequiredCandidateType )
|
116 |
{
|
117 |
if( *iRequiredCandidateType==lastValue_ ) return true;
|
118 |
}
|
119 |
|
120 |
// If control reaches this far than non of the entries in the vector matched
|
121 |
return false;
|
122 |
}
|
123 |
|
124 |
std::string trkupgradeanalysis::CandidateTypeEquals::variableName() const
|
125 |
{
|
126 |
return "CandidateType";
|
127 |
}
|
128 |
|
129 |
double trkupgradeanalysis::CandidateTypeEquals::histogrammableValue() const
|
130 |
{
|
131 |
return lastValue_;
|
132 |
}
|
133 |
|
134 |
size_t trkupgradeanalysis::CandidateTypeEquals::suggestedNumberOfBins() const
|
135 |
{
|
136 |
return 6;
|
137 |
}
|
138 |
|
139 |
double trkupgradeanalysis::CandidateTypeEquals::suggestedLowerEdge() const
|
140 |
{
|
141 |
return -0.5;
|
142 |
}
|
143 |
|
144 |
double trkupgradeanalysis::CandidateTypeEquals::suggestedUpperEdge() const
|
145 |
{
|
146 |
return 5.5;
|
147 |
}
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
trkupgradeanalysis::NumberOfJets::NumberOfJets( const trkupgradeanalysis::cuts::ICutType& cut )
|
154 |
: pCut_( cut.copy() )
|
155 |
{
|
156 |
// No operation apart from the initialiser list
|
157 |
}
|
158 |
|
159 |
trkupgradeanalysis::NumberOfJets::~NumberOfJets()
|
160 |
{
|
161 |
// No operation
|
162 |
}
|
163 |
|
164 |
std::string trkupgradeanalysis::NumberOfJets::name() const
|
165 |
{
|
166 |
return variableName()+pCut_->name();
|
167 |
}
|
168 |
|
169 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::NumberOfJets::cutVariable() const
|
170 |
{
|
171 |
// This class implements the HistogramVariable interface to save on the
|
172 |
// number of classes, so just return a reference to this instance.
|
173 |
return *this;
|
174 |
}
|
175 |
|
176 |
bool trkupgradeanalysis::NumberOfJets::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
177 |
{
|
178 |
lastValue_=vhbbCandidate.H.jets.size();
|
179 |
return pCut_->apply(lastValue_);
|
180 |
}
|
181 |
|
182 |
bool trkupgradeanalysis::NumberOfJets::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
183 |
{
|
184 |
lastValue_=ntupleRow.getDouble( variableName() );
|
185 |
return pCut_->apply(lastValue_);
|
186 |
}
|
187 |
|
188 |
std::string trkupgradeanalysis::NumberOfJets::variableName() const { return "numberOfJets"; }
|
189 |
double trkupgradeanalysis::NumberOfJets::histogrammableValue() const { return lastValue_; }
|
190 |
size_t trkupgradeanalysis::NumberOfJets::suggestedNumberOfBins() const { return 6; }
|
191 |
double trkupgradeanalysis::NumberOfJets::suggestedLowerEdge() const { return -0.5; }
|
192 |
double trkupgradeanalysis::NumberOfJets::suggestedUpperEdge() const { return 5.5; }
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
trkupgradeanalysis::PtOfJetN::PtOfJetN( unsigned int jetNumber, const trkupgradeanalysis::cuts::ICutType& cut )
|
199 |
: jetNumber_(jetNumber), pCut_( cut.copy() )
|
200 |
{
|
201 |
// No operation apart from the initialiser list
|
202 |
}
|
203 |
|
204 |
trkupgradeanalysis::PtOfJetN::~PtOfJetN()
|
205 |
{
|
206 |
// No operation
|
207 |
}
|
208 |
|
209 |
std::string trkupgradeanalysis::PtOfJetN::name() const
|
210 |
{
|
211 |
return variableName()+pCut_->name();
|
212 |
}
|
213 |
|
214 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::PtOfJetN::cutVariable() const
|
215 |
{
|
216 |
// This class implements the HistogramVariable interface to save on the
|
217 |
// number of classes, so just return a reference to this instance.
|
218 |
return *this;
|
219 |
}
|
220 |
|
221 |
bool trkupgradeanalysis::PtOfJetN::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
222 |
{
|
223 |
if( vhbbCandidate.H.jets.size()<jetNumber_+1 ) lastValue_=-1; // Plus one because they're numbered from zero
|
224 |
else lastValue_=const_cast<VHbbCandidate&>(vhbbCandidate).H.jets.at(jetNumber_).Pt(); // const cast needed because this method isn't declared const for some reason
|
225 |
|
226 |
return pCut_->apply(lastValue_);
|
227 |
}
|
228 |
|
229 |
bool trkupgradeanalysis::PtOfJetN::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
230 |
{
|
231 |
lastValue_=ntupleRow.getDouble( variableName() );
|
232 |
return pCut_->apply(lastValue_);
|
233 |
}
|
234 |
|
235 |
std::string trkupgradeanalysis::PtOfJetN::variableName() const
|
236 |
{
|
237 |
std::stringstream nameStream;
|
238 |
nameStream << "PtOfJet" << jetNumber_;
|
239 |
return nameStream.str();
|
240 |
}
|
241 |
|
242 |
double trkupgradeanalysis::PtOfJetN::histogrammableValue() const { return lastValue_; }
|
243 |
size_t trkupgradeanalysis::PtOfJetN::suggestedNumberOfBins() const { return 60; }
|
244 |
double trkupgradeanalysis::PtOfJetN::suggestedLowerEdge() const { return 0; }
|
245 |
double trkupgradeanalysis::PtOfJetN::suggestedUpperEdge() const { return 150; }
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
trkupgradeanalysis::PtOfHiggs::PtOfHiggs( const trkupgradeanalysis::cuts::ICutType& cut )
|
253 |
: pCut_( cut.copy() )
|
254 |
{
|
255 |
// No operation apart from the initialiser list
|
256 |
}
|
257 |
|
258 |
trkupgradeanalysis::PtOfHiggs::~PtOfHiggs()
|
259 |
{
|
260 |
// No operation
|
261 |
}
|
262 |
|
263 |
std::string trkupgradeanalysis::PtOfHiggs::name() const
|
264 |
{
|
265 |
return variableName()+pCut_->name();
|
266 |
}
|
267 |
|
268 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::PtOfHiggs::cutVariable() const
|
269 |
{
|
270 |
// This class implements the HistogramVariable interface to save on the
|
271 |
// number of classes, so just return a reference to this instance.
|
272 |
return *this;
|
273 |
}
|
274 |
|
275 |
bool trkupgradeanalysis::PtOfHiggs::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
276 |
{
|
277 |
lastValue_=vhbbCandidate.H.p4.Pt();
|
278 |
return pCut_->apply( lastValue_ );
|
279 |
}
|
280 |
|
281 |
bool trkupgradeanalysis::PtOfHiggs::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
282 |
{
|
283 |
lastValue_=ntupleRow.getDouble( variableName() );
|
284 |
return pCut_->apply(lastValue_);
|
285 |
}
|
286 |
|
287 |
std::string trkupgradeanalysis::PtOfHiggs::variableName() const { return "PtOfHiggs"; }
|
288 |
double trkupgradeanalysis::PtOfHiggs::histogrammableValue() const { return lastValue_; }
|
289 |
size_t trkupgradeanalysis::PtOfHiggs::suggestedNumberOfBins() const { return 60; }
|
290 |
double trkupgradeanalysis::PtOfHiggs::suggestedLowerEdge() const { return 0; }
|
291 |
double trkupgradeanalysis::PtOfHiggs::suggestedUpperEdge() const { return 250; }
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
trkupgradeanalysis::PtOfVectorBoson::PtOfVectorBoson( const trkupgradeanalysis::cuts::ICutType& cut )
|
298 |
: pCut_( cut.copy() )
|
299 |
{
|
300 |
// No operation apart from the initialiser list
|
301 |
}
|
302 |
|
303 |
trkupgradeanalysis::PtOfVectorBoson::~PtOfVectorBoson()
|
304 |
{
|
305 |
// No operation
|
306 |
}
|
307 |
|
308 |
std::string trkupgradeanalysis::PtOfVectorBoson::name() const
|
309 |
{
|
310 |
return variableName()+pCut_->name();
|
311 |
}
|
312 |
|
313 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::PtOfVectorBoson::cutVariable() const
|
314 |
{
|
315 |
// This class implements the HistogramVariable interface to save on the
|
316 |
// number of classes, so just return a reference to this instance.
|
317 |
return *this;
|
318 |
}
|
319 |
|
320 |
bool trkupgradeanalysis::PtOfVectorBoson::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
321 |
{
|
322 |
lastValue_=vhbbCandidate.V.p4.Pt();
|
323 |
return pCut_->apply( lastValue_ );
|
324 |
}
|
325 |
|
326 |
bool trkupgradeanalysis::PtOfVectorBoson::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
327 |
{
|
328 |
lastValue_=ntupleRow.getDouble( variableName() );
|
329 |
return pCut_->apply(lastValue_);
|
330 |
}
|
331 |
|
332 |
std::string trkupgradeanalysis::PtOfVectorBoson::variableName() const
|
333 |
{
|
334 |
return "PtOfVectorBoson";
|
335 |
}
|
336 |
|
337 |
double trkupgradeanalysis::PtOfVectorBoson::histogrammableValue() const
|
338 |
{
|
339 |
return lastValue_;
|
340 |
}
|
341 |
|
342 |
size_t trkupgradeanalysis::PtOfVectorBoson::suggestedNumberOfBins() const
|
343 |
{
|
344 |
return 60;
|
345 |
}
|
346 |
|
347 |
double trkupgradeanalysis::PtOfVectorBoson::suggestedLowerEdge() const
|
348 |
{
|
349 |
return 0;
|
350 |
}
|
351 |
|
352 |
double trkupgradeanalysis::PtOfVectorBoson::suggestedUpperEdge() const
|
353 |
{
|
354 |
return 250;
|
355 |
}
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
trkupgradeanalysis::NumberOfAdditionalJetsCut::NumberOfAdditionalJetsCut( const trkupgradeanalysis::cuts::ICutType& cut, bool applyCleaning )
|
363 |
: pCut_( cut.copy() ), applyCleaning_(applyCleaning)
|
364 |
{
|
365 |
// No operation apart from the initialiser list
|
366 |
}
|
367 |
|
368 |
trkupgradeanalysis::NumberOfAdditionalJetsCut::~NumberOfAdditionalJetsCut()
|
369 |
{
|
370 |
// No operation
|
371 |
}
|
372 |
|
373 |
std::string trkupgradeanalysis::NumberOfAdditionalJetsCut::name() const
|
374 |
{
|
375 |
return variableName()+pCut_->name();
|
376 |
}
|
377 |
|
378 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::NumberOfAdditionalJetsCut::cutVariable() const
|
379 |
{
|
380 |
// This class implements the HistogramVariable interface to save on the
|
381 |
// number of classes, so just return a reference to this instance.
|
382 |
return *this;
|
383 |
}
|
384 |
|
385 |
bool trkupgradeanalysis::NumberOfAdditionalJetsCut::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
386 |
{
|
387 |
if( !applyCleaning_ ) lastValue_=vhbbCandidate.additionalJets.size();
|
388 |
else
|
389 |
{
|
390 |
lastValue_=0;
|
391 |
for( std::vector<VHbbEvent::SimpleJet>::const_iterator iJet=vhbbCandidate.additionalJets.begin(); iJet!=vhbbCandidate.additionalJets.end(); ++iJet )
|
392 |
{
|
393 |
if( jetId( *iJet )==true && fabs(iJet->p4.Eta()) < 2.5 && iJet->p4.Pt() > 20 ) ++lastValue_;
|
394 |
}
|
395 |
}
|
396 |
|
397 |
return pCut_->apply( lastValue_ );
|
398 |
}
|
399 |
|
400 |
bool trkupgradeanalysis::NumberOfAdditionalJetsCut::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
401 |
{
|
402 |
lastValue_=ntupleRow.getDouble( variableName() );
|
403 |
return pCut_->apply(lastValue_);
|
404 |
}
|
405 |
|
406 |
bool trkupgradeanalysis::NumberOfAdditionalJetsCut::jetId( const VHbbEvent::SimpleJet& jet ) const
|
407 |
{
|
408 |
if( jet.neutralHadronEFraction > 0.99 ) return false;
|
409 |
if( jet.neutralEmEFraction > 0.99 ) return false;
|
410 |
if( jet.nConstituents <= 1 ) return false;
|
411 |
if( fabs(jet.p4.Eta()) < 2.5 )
|
412 |
{
|
413 |
if( jet.chargedEmEFraction > 0.99 ) return false;
|
414 |
if( jet.chargedHadronEFraction == 0 ) return false;
|
415 |
if( jet.ntracks== 0 ) return false;
|
416 |
}
|
417 |
|
418 |
return true;
|
419 |
}
|
420 |
|
421 |
std::string trkupgradeanalysis::NumberOfAdditionalJetsCut::variableName() const
|
422 |
{
|
423 |
return "NumberOfAdditionalJetsCut";
|
424 |
}
|
425 |
|
426 |
double trkupgradeanalysis::NumberOfAdditionalJetsCut::histogrammableValue() const
|
427 |
{
|
428 |
return lastValue_;
|
429 |
}
|
430 |
|
431 |
size_t trkupgradeanalysis::NumberOfAdditionalJetsCut::suggestedNumberOfBins() const
|
432 |
{
|
433 |
return 91;
|
434 |
}
|
435 |
|
436 |
double trkupgradeanalysis::NumberOfAdditionalJetsCut::suggestedLowerEdge() const
|
437 |
{
|
438 |
return -0.5;
|
439 |
}
|
440 |
|
441 |
double trkupgradeanalysis::NumberOfAdditionalJetsCut::suggestedUpperEdge() const
|
442 |
{
|
443 |
return 90.5;
|
444 |
}
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
trkupgradeanalysis::NumberOfAdditionalLeptons::NumberOfAdditionalLeptons( const trkupgradeanalysis::cuts::ICutType& cut )
|
452 |
: pCut_( cut.copy() )
|
453 |
{
|
454 |
// No operation apart from the initialiser list
|
455 |
}
|
456 |
|
457 |
trkupgradeanalysis::NumberOfAdditionalLeptons::~NumberOfAdditionalLeptons()
|
458 |
{
|
459 |
// No operation
|
460 |
}
|
461 |
|
462 |
std::string trkupgradeanalysis::NumberOfAdditionalLeptons::name() const
|
463 |
{
|
464 |
return variableName()+pCut_->name();
|
465 |
}
|
466 |
|
467 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::NumberOfAdditionalLeptons::cutVariable() const
|
468 |
{
|
469 |
// This class implements the HistogramVariable interface to save on the
|
470 |
// number of classes, so just return a reference to this instance.
|
471 |
return *this;
|
472 |
}
|
473 |
|
474 |
bool trkupgradeanalysis::NumberOfAdditionalLeptons::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
475 |
{
|
476 |
int expectedLeptons=0;
|
477 |
if( vhbbCandidate.candidateType == VHbbCandidate::Wmun || vhbbCandidate.candidateType == VHbbCandidate::Wen ) expectedLeptons=1;
|
478 |
if( vhbbCandidate.candidateType == VHbbCandidate::Zmumu || vhbbCandidate.candidateType == VHbbCandidate::Zee ) expectedLeptons=2;
|
479 |
|
480 |
lastValue_=vhbbCandidate.V.muons.size()+vhbbCandidate.V.electrons.size()-expectedLeptons;
|
481 |
return pCut_->apply( lastValue_ );
|
482 |
}
|
483 |
|
484 |
bool trkupgradeanalysis::NumberOfAdditionalLeptons::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
485 |
{
|
486 |
lastValue_=ntupleRow.getDouble( variableName() );
|
487 |
return pCut_->apply(lastValue_);
|
488 |
}
|
489 |
|
490 |
std::string trkupgradeanalysis::NumberOfAdditionalLeptons::variableName() const
|
491 |
{
|
492 |
return "NumberOfAdditionalLeptons";
|
493 |
}
|
494 |
|
495 |
double trkupgradeanalysis::NumberOfAdditionalLeptons::histogrammableValue() const
|
496 |
{
|
497 |
return lastValue_;
|
498 |
}
|
499 |
|
500 |
size_t trkupgradeanalysis::NumberOfAdditionalLeptons::suggestedNumberOfBins() const
|
501 |
{
|
502 |
return 31;
|
503 |
}
|
504 |
|
505 |
double trkupgradeanalysis::NumberOfAdditionalLeptons::suggestedLowerEdge() const
|
506 |
{
|
507 |
return -0.5;
|
508 |
}
|
509 |
|
510 |
double trkupgradeanalysis::NumberOfAdditionalLeptons::suggestedUpperEdge() const
|
511 |
{
|
512 |
return 30.5;
|
513 |
}
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
trkupgradeanalysis::METSigma::METSigma( const trkupgradeanalysis::cuts::ICutType& cut )
|
523 |
: pCut_( cut.copy() )
|
524 |
{
|
525 |
// No operation apart from the initialiser list
|
526 |
}
|
527 |
|
528 |
trkupgradeanalysis::METSigma::~METSigma()
|
529 |
{
|
530 |
// No operation
|
531 |
}
|
532 |
|
533 |
std::string trkupgradeanalysis::METSigma::name() const
|
534 |
{
|
535 |
return variableName()+pCut_->name();
|
536 |
}
|
537 |
|
538 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::METSigma::cutVariable() const
|
539 |
{
|
540 |
// This class implements the HistogramVariable interface to save on the
|
541 |
// number of classes, so just return a reference to this instance.
|
542 |
return *this;
|
543 |
}
|
544 |
|
545 |
bool trkupgradeanalysis::METSigma::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
546 |
{
|
547 |
if( vhbbCandidate.V.mets.empty() ) lastValue_=-1;
|
548 |
else lastValue_=vhbbCandidate.V.mets[0].metSig;
|
549 |
|
550 |
return pCut_->apply( lastValue_ );
|
551 |
}
|
552 |
|
553 |
bool trkupgradeanalysis::METSigma::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
554 |
{
|
555 |
lastValue_=ntupleRow.getDouble( variableName() );
|
556 |
return pCut_->apply(lastValue_);
|
557 |
}
|
558 |
|
559 |
std::string trkupgradeanalysis::METSigma::variableName() const
|
560 |
{
|
561 |
return "METSigma";
|
562 |
}
|
563 |
|
564 |
double trkupgradeanalysis::METSigma::histogrammableValue() const
|
565 |
{
|
566 |
return lastValue_;
|
567 |
}
|
568 |
|
569 |
size_t trkupgradeanalysis::METSigma::suggestedNumberOfBins() const
|
570 |
{
|
571 |
return 60;
|
572 |
}
|
573 |
|
574 |
double trkupgradeanalysis::METSigma::suggestedLowerEdge() const
|
575 |
{
|
576 |
return 0;
|
577 |
}
|
578 |
|
579 |
double trkupgradeanalysis::METSigma::suggestedUpperEdge() const
|
580 |
{
|
581 |
return 100;
|
582 |
}
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
trkupgradeanalysis::PtOfElectronN::PtOfElectronN( unsigned int electronNumber, const trkupgradeanalysis::cuts::ICutType& cut )
|
591 |
: electronNumber_(electronNumber), pCut_( cut.copy() )
|
592 |
{
|
593 |
// No operation apart from the initialiser list
|
594 |
}
|
595 |
|
596 |
trkupgradeanalysis::PtOfElectronN::~PtOfElectronN()
|
597 |
{
|
598 |
// No operation
|
599 |
}
|
600 |
|
601 |
std::string trkupgradeanalysis::PtOfElectronN::name() const
|
602 |
{
|
603 |
return variableName()+pCut_->name();
|
604 |
}
|
605 |
|
606 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::PtOfElectronN::cutVariable() const
|
607 |
{
|
608 |
// This class implements the HistogramVariable interface to save on the
|
609 |
// number of classes, so just return a reference to this instance.
|
610 |
return *this;
|
611 |
}
|
612 |
|
613 |
bool trkupgradeanalysis::PtOfElectronN::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
614 |
{
|
615 |
if( vhbbCandidate.V.electrons.size()<electronNumber_+1 ) lastValue_=-1; // Plus one because they're numbered from zero
|
616 |
else lastValue_=vhbbCandidate.V.electrons.at(electronNumber_).p4.Pt();
|
617 |
|
618 |
return pCut_->apply( lastValue_ );
|
619 |
}
|
620 |
|
621 |
bool trkupgradeanalysis::PtOfElectronN::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
622 |
{
|
623 |
lastValue_=ntupleRow.getDouble( variableName() );
|
624 |
return pCut_->apply(lastValue_);
|
625 |
}
|
626 |
|
627 |
std::string trkupgradeanalysis::PtOfElectronN::variableName() const
|
628 |
{
|
629 |
std::stringstream nameStream;
|
630 |
nameStream << "PtOfElectron" << electronNumber_;
|
631 |
return nameStream.str();
|
632 |
}
|
633 |
|
634 |
double trkupgradeanalysis::PtOfElectronN::histogrammableValue() const
|
635 |
{
|
636 |
return lastValue_;
|
637 |
}
|
638 |
|
639 |
size_t trkupgradeanalysis::PtOfElectronN::suggestedNumberOfBins() const
|
640 |
{
|
641 |
return 60;
|
642 |
}
|
643 |
|
644 |
double trkupgradeanalysis::PtOfElectronN::suggestedLowerEdge() const
|
645 |
{
|
646 |
return 0;
|
647 |
}
|
648 |
|
649 |
double trkupgradeanalysis::PtOfElectronN::suggestedUpperEdge() const
|
650 |
{
|
651 |
return 150;
|
652 |
}
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
trkupgradeanalysis::MassOfVectorBoson::MassOfVectorBoson( const trkupgradeanalysis::cuts::ICutType& cut )
|
661 |
: pCut_( cut.copy() )
|
662 |
{
|
663 |
// No operation apart from the initialiser list
|
664 |
}
|
665 |
|
666 |
trkupgradeanalysis::MassOfVectorBoson::~MassOfVectorBoson()
|
667 |
{
|
668 |
// No operation
|
669 |
}
|
670 |
|
671 |
std::string trkupgradeanalysis::MassOfVectorBoson::name() const
|
672 |
{
|
673 |
return variableName()+pCut_->name();
|
674 |
}
|
675 |
|
676 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::MassOfVectorBoson::cutVariable() const
|
677 |
{
|
678 |
// This class implements the HistogramVariable interface to save on the
|
679 |
// number of classes, so just return a reference to this instance.
|
680 |
return *this;
|
681 |
}
|
682 |
|
683 |
bool trkupgradeanalysis::MassOfVectorBoson::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
684 |
{
|
685 |
lastValue_=vhbbCandidate.V.p4.M();
|
686 |
return pCut_->apply( lastValue_ );
|
687 |
}
|
688 |
|
689 |
bool trkupgradeanalysis::MassOfVectorBoson::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
690 |
{
|
691 |
lastValue_=ntupleRow.getDouble( variableName() );
|
692 |
return pCut_->apply(lastValue_);
|
693 |
}
|
694 |
|
695 |
std::string trkupgradeanalysis::MassOfVectorBoson::variableName() const
|
696 |
{
|
697 |
return "MassOfVectorBoson";
|
698 |
}
|
699 |
|
700 |
double trkupgradeanalysis::MassOfVectorBoson::histogrammableValue() const
|
701 |
{
|
702 |
return lastValue_;
|
703 |
}
|
704 |
|
705 |
size_t trkupgradeanalysis::MassOfVectorBoson::suggestedNumberOfBins() const
|
706 |
{
|
707 |
return 60;
|
708 |
}
|
709 |
|
710 |
double trkupgradeanalysis::MassOfVectorBoson::suggestedLowerEdge() const
|
711 |
{
|
712 |
return 0;
|
713 |
}
|
714 |
|
715 |
double trkupgradeanalysis::MassOfVectorBoson::suggestedUpperEdge() const
|
716 |
{
|
717 |
return 250;
|
718 |
}
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
trkupgradeanalysis::MassOfHiggsBoson::MassOfHiggsBoson( const trkupgradeanalysis::cuts::ICutType& cut )
|
727 |
: pCut_( cut.copy() )
|
728 |
{
|
729 |
// No operation apart from the initialiser list
|
730 |
}
|
731 |
|
732 |
trkupgradeanalysis::MassOfHiggsBoson::~MassOfHiggsBoson()
|
733 |
{
|
734 |
// No operation
|
735 |
}
|
736 |
|
737 |
std::string trkupgradeanalysis::MassOfHiggsBoson::name() const
|
738 |
{
|
739 |
return variableName()+pCut_->name();
|
740 |
}
|
741 |
|
742 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::MassOfHiggsBoson::cutVariable() const
|
743 |
{
|
744 |
// This class implements the HistogramVariable interface to save on the
|
745 |
// number of classes, so just return a reference to this instance.
|
746 |
return *this;
|
747 |
}
|
748 |
|
749 |
bool trkupgradeanalysis::MassOfHiggsBoson::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
750 |
{
|
751 |
lastValue_=vhbbCandidate.H.p4.M();
|
752 |
return pCut_->apply( lastValue_ );
|
753 |
}
|
754 |
|
755 |
bool trkupgradeanalysis::MassOfHiggsBoson::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
756 |
{
|
757 |
lastValue_=ntupleRow.getDouble( variableName() );
|
758 |
return pCut_->apply(lastValue_);
|
759 |
}
|
760 |
|
761 |
std::string trkupgradeanalysis::MassOfHiggsBoson::variableName() const
|
762 |
{
|
763 |
return "MassOfHiggsBoson";
|
764 |
}
|
765 |
|
766 |
double trkupgradeanalysis::MassOfHiggsBoson::histogrammableValue() const
|
767 |
{
|
768 |
return lastValue_;
|
769 |
}
|
770 |
|
771 |
size_t trkupgradeanalysis::MassOfHiggsBoson::suggestedNumberOfBins() const
|
772 |
{
|
773 |
return 60;
|
774 |
}
|
775 |
|
776 |
double trkupgradeanalysis::MassOfHiggsBoson::suggestedLowerEdge() const
|
777 |
{
|
778 |
return 0;
|
779 |
}
|
780 |
|
781 |
double trkupgradeanalysis::MassOfHiggsBoson::suggestedUpperEdge() const
|
782 |
{
|
783 |
return 250;
|
784 |
}
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 |
trkupgradeanalysis::CSVOfAnyJetGreaterThan::CSVOfAnyJetGreaterThan( double csvValue, unsigned int maximumJetNumber )
|
793 |
: maximumJetNumber_(maximumJetNumber), requiredCSV_(csvValue)
|
794 |
{
|
795 |
// No operation apart from the initialiser list
|
796 |
}
|
797 |
|
798 |
trkupgradeanalysis::CSVOfAnyJetGreaterThan::~CSVOfAnyJetGreaterThan()
|
799 |
{
|
800 |
// No operation
|
801 |
}
|
802 |
|
803 |
std::string trkupgradeanalysis::CSVOfAnyJetGreaterThan::name() const
|
804 |
{
|
805 |
std::stringstream nameStream;
|
806 |
nameStream << variableName() << "GreaterThan" << requiredCSV_;
|
807 |
return nameStream.str();
|
808 |
}
|
809 |
|
810 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::CSVOfAnyJetGreaterThan::cutVariable() const
|
811 |
{
|
812 |
// This class implements the HistogramVariable interface to save on the
|
813 |
// number of classes, so just return a reference to this instance.
|
814 |
return *this;
|
815 |
}
|
816 |
|
817 |
bool trkupgradeanalysis::CSVOfAnyJetGreaterThan::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
818 |
{
|
819 |
unsigned int numberOfJetsToCheck;
|
820 |
if( maximumJetNumber_==0 ) numberOfJetsToCheck=vhbbCandidate.H.jets.size();
|
821 |
else numberOfJetsToCheck=maximumJetNumber_;
|
822 |
|
823 |
lastValue_=-1; // Start off with a nonsensical default so I know if things go wrong
|
824 |
for( unsigned int a=0; a<numberOfJetsToCheck && a<vhbbCandidate.H.jets.size(); ++a )
|
825 |
{
|
826 |
if( vhbbCandidate.H.jets.at(a).csv > lastValue_ ) lastValue_=vhbbCandidate.H.jets.at(a).csv;
|
827 |
}
|
828 |
|
829 |
return lastValue_ > requiredCSV_;
|
830 |
}
|
831 |
|
832 |
bool trkupgradeanalysis::CSVOfAnyJetGreaterThan::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
833 |
{
|
834 |
lastValue_=ntupleRow.getDouble( variableName() );
|
835 |
return lastValue_ > requiredCSV_;
|
836 |
}
|
837 |
|
838 |
std::string trkupgradeanalysis::CSVOfAnyJetGreaterThan::variableName() const
|
839 |
{
|
840 |
std::stringstream nameStream;
|
841 |
nameStream << "CSVOf";
|
842 |
|
843 |
if( maximumJetNumber_==0 ) nameStream << "AnyJet";
|
844 |
else nameStream << "AnyOfFirst" << maximumJetNumber_ << "Jets";
|
845 |
|
846 |
return nameStream.str();
|
847 |
}
|
848 |
|
849 |
double trkupgradeanalysis::CSVOfAnyJetGreaterThan::histogrammableValue() const
|
850 |
{
|
851 |
return lastValue_;
|
852 |
}
|
853 |
|
854 |
size_t trkupgradeanalysis::CSVOfAnyJetGreaterThan::suggestedNumberOfBins() const
|
855 |
{
|
856 |
return 60;
|
857 |
}
|
858 |
|
859 |
double trkupgradeanalysis::CSVOfAnyJetGreaterThan::suggestedLowerEdge() const
|
860 |
{
|
861 |
return -1;
|
862 |
}
|
863 |
|
864 |
double trkupgradeanalysis::CSVOfAnyJetGreaterThan::suggestedUpperEdge() const
|
865 |
{
|
866 |
return 1.5;
|
867 |
}
|
868 |
|
869 |
|
870 |
|
871 |
|
872 |
|
873 |
|
874 |
|
875 |
trkupgradeanalysis::CSVOfAllJetsGreaterThan::CSVOfAllJetsGreaterThan( double csvValue, unsigned int maximumJetNumber )
|
876 |
: maximumJetNumber_(maximumJetNumber), requiredCSV_(csvValue)
|
877 |
{
|
878 |
// No operation apart from the initialiser list
|
879 |
}
|
880 |
|
881 |
trkupgradeanalysis::CSVOfAllJetsGreaterThan::~CSVOfAllJetsGreaterThan()
|
882 |
{
|
883 |
// No operation
|
884 |
}
|
885 |
|
886 |
std::string trkupgradeanalysis::CSVOfAllJetsGreaterThan::name() const
|
887 |
{
|
888 |
std::stringstream nameStream;
|
889 |
nameStream << variableName() << "GreaterThan" << requiredCSV_;
|
890 |
return nameStream.str();
|
891 |
}
|
892 |
|
893 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::CSVOfAllJetsGreaterThan::cutVariable() const
|
894 |
{
|
895 |
// This class implements the HistogramVariable interface to save on the
|
896 |
// number of classes, so just return a reference to this instance.
|
897 |
return *this;
|
898 |
}
|
899 |
|
900 |
bool trkupgradeanalysis::CSVOfAllJetsGreaterThan::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
901 |
{
|
902 |
unsigned int numberOfJetsToCheck;
|
903 |
if( maximumJetNumber_==0 ) numberOfJetsToCheck=vhbbCandidate.H.jets.size();
|
904 |
else numberOfJetsToCheck=maximumJetNumber_;
|
905 |
|
906 |
lastValue_=-1; // Start off with a nonsensical default so I know if things go wrong
|
907 |
for( unsigned int a=0; a<numberOfJetsToCheck && a<vhbbCandidate.H.jets.size(); ++a )
|
908 |
{
|
909 |
if( (vhbbCandidate.H.jets.at(a).csv<lastValue_) || lastValue_==-1 ) lastValue_=vhbbCandidate.H.jets.at(a).csv;
|
910 |
}
|
911 |
|
912 |
return lastValue_ > requiredCSV_;
|
913 |
}
|
914 |
|
915 |
bool trkupgradeanalysis::CSVOfAllJetsGreaterThan::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
916 |
{
|
917 |
lastValue_=ntupleRow.getDouble( variableName() );
|
918 |
return lastValue_ > requiredCSV_;
|
919 |
}
|
920 |
|
921 |
std::string trkupgradeanalysis::CSVOfAllJetsGreaterThan::variableName() const
|
922 |
{
|
923 |
std::stringstream nameStream;
|
924 |
nameStream << "CSVOf";
|
925 |
|
926 |
if( maximumJetNumber_==0 ) nameStream << "AllJets";
|
927 |
else nameStream << "AllOfFirst" << maximumJetNumber_ << "Jets";
|
928 |
|
929 |
return nameStream.str();
|
930 |
}
|
931 |
|
932 |
double trkupgradeanalysis::CSVOfAllJetsGreaterThan::histogrammableValue() const
|
933 |
{
|
934 |
return lastValue_;
|
935 |
}
|
936 |
|
937 |
size_t trkupgradeanalysis::CSVOfAllJetsGreaterThan::suggestedNumberOfBins() const
|
938 |
{
|
939 |
return 60;
|
940 |
}
|
941 |
|
942 |
double trkupgradeanalysis::CSVOfAllJetsGreaterThan::suggestedLowerEdge() const
|
943 |
{
|
944 |
return -1;
|
945 |
}
|
946 |
|
947 |
double trkupgradeanalysis::CSVOfAllJetsGreaterThan::suggestedUpperEdge() const
|
948 |
{
|
949 |
return 1.5;
|
950 |
}
|
951 |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
trkupgradeanalysis::NumberOfMETObjects::NumberOfMETObjects( const trkupgradeanalysis::cuts::ICutType& cut )
|
958 |
: pCut_( cut.copy() )
|
959 |
{
|
960 |
// No operation apart from the initialiser list
|
961 |
}
|
962 |
|
963 |
trkupgradeanalysis::NumberOfMETObjects::~NumberOfMETObjects()
|
964 |
{
|
965 |
// No operation
|
966 |
}
|
967 |
|
968 |
std::string trkupgradeanalysis::NumberOfMETObjects::name() const
|
969 |
{
|
970 |
return variableName()+pCut_->name();
|
971 |
}
|
972 |
|
973 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::NumberOfMETObjects::cutVariable() const
|
974 |
{
|
975 |
// This class implements the HistogramVariable interface to save on the
|
976 |
// number of classes, so just return a reference to this instance.
|
977 |
return *this;
|
978 |
}
|
979 |
|
980 |
bool trkupgradeanalysis::NumberOfMETObjects::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
981 |
{
|
982 |
lastValue_=vhbbCandidate.V.mets.size();
|
983 |
return pCut_->apply( lastValue_ );
|
984 |
}
|
985 |
|
986 |
bool trkupgradeanalysis::NumberOfMETObjects::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
987 |
{
|
988 |
lastValue_=ntupleRow.getDouble( variableName() );
|
989 |
return pCut_->apply(lastValue_);
|
990 |
}
|
991 |
|
992 |
std::string trkupgradeanalysis::NumberOfMETObjects::variableName() const { return "numberOfMETObjects"; }
|
993 |
double trkupgradeanalysis::NumberOfMETObjects::histogrammableValue() const { return lastValue_; }
|
994 |
size_t trkupgradeanalysis::NumberOfMETObjects::suggestedNumberOfBins() const { return 6; }
|
995 |
double trkupgradeanalysis::NumberOfMETObjects::suggestedLowerEdge() const { return -0.5; }
|
996 |
double trkupgradeanalysis::NumberOfMETObjects::suggestedUpperEdge() const { return 5.5; }
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
trkupgradeanalysis::PtOfMETN::PtOfMETN( unsigned int metNumber, const trkupgradeanalysis::cuts::ICutType& cut )
|
1007 |
: metNumber_(metNumber), pCut_( cut.copy() )
|
1008 |
{
|
1009 |
// No operation apart from the initialiser list
|
1010 |
}
|
1011 |
|
1012 |
trkupgradeanalysis::PtOfMETN::~PtOfMETN()
|
1013 |
{
|
1014 |
// No operation
|
1015 |
}
|
1016 |
|
1017 |
std::string trkupgradeanalysis::PtOfMETN::name() const
|
1018 |
{
|
1019 |
return variableName()+pCut_->name();
|
1020 |
}
|
1021 |
|
1022 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::PtOfMETN::cutVariable() const
|
1023 |
{
|
1024 |
// This class implements the HistogramVariable interface to save on the
|
1025 |
// number of classes, so just return a reference to this instance.
|
1026 |
return *this;
|
1027 |
}
|
1028 |
|
1029 |
bool trkupgradeanalysis::PtOfMETN::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
1030 |
{
|
1031 |
if( vhbbCandidate.V.mets.size()<metNumber_+1 ) // Plus one because they're numbered from zero
|
1032 |
{
|
1033 |
lastValue_=-1;
|
1034 |
return false;
|
1035 |
}
|
1036 |
|
1037 |
lastValue_=vhbbCandidate.V.mets.at(metNumber_).p4.Pt();
|
1038 |
return pCut_->apply( lastValue_ );
|
1039 |
}
|
1040 |
|
1041 |
bool trkupgradeanalysis::PtOfMETN::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
1042 |
{
|
1043 |
lastValue_=ntupleRow.getDouble( variableName() );
|
1044 |
return pCut_->apply(lastValue_);
|
1045 |
}
|
1046 |
|
1047 |
std::string trkupgradeanalysis::PtOfMETN::variableName() const
|
1048 |
{
|
1049 |
std::stringstream nameStream;
|
1050 |
nameStream << "PtOfMET" << metNumber_;
|
1051 |
return nameStream.str();
|
1052 |
}
|
1053 |
|
1054 |
double trkupgradeanalysis::PtOfMETN::histogrammableValue() const { return lastValue_; }
|
1055 |
size_t trkupgradeanalysis::PtOfMETN::suggestedNumberOfBins() const { return 60; }
|
1056 |
double trkupgradeanalysis::PtOfMETN::suggestedLowerEdge() const { return 0; }
|
1057 |
double trkupgradeanalysis::PtOfMETN::suggestedUpperEdge() const { return 150; }
|
1058 |
|
1059 |
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 |
|
1065 |
trkupgradeanalysis::DeltaPhiVHCut::DeltaPhiVHCut( const trkupgradeanalysis::cuts::ICutType& cut )
|
1066 |
: pCut_( cut.copy() )
|
1067 |
{
|
1068 |
// No operation apart from the initialiser list
|
1069 |
}
|
1070 |
|
1071 |
trkupgradeanalysis::DeltaPhiVHCut::~DeltaPhiVHCut()
|
1072 |
{
|
1073 |
// No operation
|
1074 |
}
|
1075 |
|
1076 |
std::string trkupgradeanalysis::DeltaPhiVHCut::name() const
|
1077 |
{
|
1078 |
return variableName()+pCut_->name();
|
1079 |
}
|
1080 |
|
1081 |
const trkupgradeanalysis::IHistogramVariable& trkupgradeanalysis::DeltaPhiVHCut::cutVariable() const
|
1082 |
{
|
1083 |
// This class implements the HistogramVariable interface to save on the
|
1084 |
// number of classes, so just return a reference to this instance.
|
1085 |
return *this;
|
1086 |
}
|
1087 |
|
1088 |
bool trkupgradeanalysis::DeltaPhiVHCut::applyCut( const VHbbCandidate& vhbbCandidate ) const
|
1089 |
{
|
1090 |
lastValue_=TMath::Abs( Geom::deltaPhi( vhbbCandidate.H.p4.Phi(), vhbbCandidate.V.p4.Phi() ) );
|
1091 |
return pCut_->apply( lastValue_ );
|
1092 |
}
|
1093 |
|
1094 |
bool trkupgradeanalysis::DeltaPhiVHCut::applyCut( const trkupgradeanalysis::tools::NTupleRow& ntupleRow ) const
|
1095 |
{
|
1096 |
lastValue_=ntupleRow.getDouble( variableName() );
|
1097 |
return pCut_->apply(lastValue_);
|
1098 |
}
|
1099 |
|
1100 |
std::string trkupgradeanalysis::DeltaPhiVHCut::variableName() const { return "DeltaPhiVHCut";}
|
1101 |
double trkupgradeanalysis::DeltaPhiVHCut::histogrammableValue() const { return lastValue_; }
|
1102 |
size_t trkupgradeanalysis::DeltaPhiVHCut::suggestedNumberOfBins() const { return 60; }
|
1103 |
double trkupgradeanalysis::DeltaPhiVHCut::suggestedLowerEdge() const { return 0; }
|
1104 |
double trkupgradeanalysis::DeltaPhiVHCut::suggestedUpperEdge() const { return M_PI; }
|