ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/dhidas/OSUAnalysis/Tools/src/RecoObjects/MET.cpp
Revision: 1.1.1.1 (vendor branch)
Committed: Thu Dec 1 16:28:48 2011 UTC (13 years, 5 months ago) by dhidas
Branch: dhidas, MAIN
CVS Tags: START, HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
Log Message:
osu copy modified

File Contents

# Content
1 /*
2 * MET.cpp
3 *
4 * Created on: Jun 25, 2010
5 * Author: lkreczko
6 */
7
8 #include "../../interface/RecoObjects/MET.h"
9
10 namespace BAT {
11
12
13 MET::MET() :
14 Particle(),
15 usedAlgorithm(METAlgorithm::Calo) {
16 }
17
18 MET::MET(float ex, float ey) :
19 Particle(sqrt(ex * ex + ey * ey), ex, ey, 0), usedAlgorithm(METAlgorithm::Calo) {
20
21 }
22
23 MET::~MET() {
24 }
25
26 bool MET::isGood() const {
27 return et() > 20;
28 }
29
30 void MET::setUsedAlgorithm(METAlgorithm::value algo) {
31 usedAlgorithm = algo;
32 }
33
34 METAlgorithm::value MET::getUsedAlgorithm() const {
35 return usedAlgorithm;
36 }
37
38
39 void MET::adjForUnc(const JetCollection &jets)
40 {
41 if (Jet::correctDirection == JetCorrDirection::NONE ||
42 jets.size() <= 0)
43 return;
44 FourVector new4vec = getFourVector();
45 for (unsigned int index = 0; index < jets.size(); ++index)
46 new4vec += jets.at(index)->DiffVec;
47 new4vec.SetPz(0.0); // Make sure no longitudinal component
48 new4vec.SetE(new4vec.Pt()); // Make sure it stays massless
49 setFourVector(new4vec);
50 }
51
52
53
54 }