CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
ZeeKinematicTools Class Reference

#include <ZeeKinematicTools.h>

Public Member Functions

 ZeeKinematicTools ()
 
 ~ZeeKinematicTools ()
 

Static Public Member Functions

static float calculateZEta (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZMass_noTK (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZMass_withTK (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZMassWithCorrectedElectrons_noTK (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
 
static float calculateZMassWithCorrectedElectrons_withTK (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
 
static float calculateZPhi (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZPt (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZRapidity (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float calculateZTheta (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate)
 
static float cosThetaElectrons_SC (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
 
static float cosThetaElectrons_TK (const std::pair< calib::CalibElectron *, calib::CalibElectron *> &aZCandidate, float ele1EnergyCorrection, float ele2EnergyCorrection)
 

Detailed Description

Definition at line 30 of file ZeeKinematicTools.h.

Constructor & Destructor Documentation

◆ ZeeKinematicTools()

ZeeKinematicTools::ZeeKinematicTools ( )

Definition at line 33 of file ZeeKinematicTools.cc.

33 {}

◆ ~ZeeKinematicTools()

ZeeKinematicTools::~ZeeKinematicTools ( )

Definition at line 35 of file ZeeKinematicTools.cc.

35 {}

Member Function Documentation

◆ calculateZEta()

float ZeeKinematicTools::calculateZEta ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 157 of file ZeeKinematicTools.cc.

Referenced by ZeePlots::fillZInfo().

157  {
158  TLorentzVector ele1LV(aZCandidate.first->getRecoElectron()->px(),
159  aZCandidate.first->getRecoElectron()->py(),
160  aZCandidate.first->getRecoElectron()->pz(),
161  aZCandidate.first->getRecoElectron()->superCluster()->energy());
162 
163  TLorentzVector ele2LV(aZCandidate.second->getRecoElectron()->px(),
164  aZCandidate.second->getRecoElectron()->py(),
165  aZCandidate.second->getRecoElectron()->pz(),
166  aZCandidate.second->getRecoElectron()->superCluster()->energy());
167 
168  return (ele1LV + ele2LV).Eta();
169 }

◆ calculateZMass_noTK()

float ZeeKinematicTools::calculateZMass_noTK ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 117 of file ZeeKinematicTools.cc.

References ZIterativeAlgorithmWithFit::invMassCalc().

118  {
119  return ZIterativeAlgorithmWithFit::invMassCalc(aZCandidate.first->getRecoElectron()->superCluster()->energy(),
120  aZCandidate.first->getRecoElectron()->superCluster()->eta(),
121  aZCandidate.first->getRecoElectron()->superCluster()->phi(),
122  aZCandidate.second->getRecoElectron()->superCluster()->energy(),
123  aZCandidate.second->getRecoElectron()->superCluster()->eta(),
124  aZCandidate.second->getRecoElectron()->superCluster()->phi());
125 }
static float invMassCalc(float Energy1, float Eta1, float Phi1, float Energy2, float Eta2, float Phi2)

◆ calculateZMass_withTK()

float ZeeKinematicTools::calculateZMass_withTK ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 129 of file ZeeKinematicTools.cc.

References ZIterativeAlgorithmWithFit::invMassCalc().

Referenced by ZeeCalibration::duringLoop().

130  {
131  return ZIterativeAlgorithmWithFit::invMassCalc(aZCandidate.first->getRecoElectron()->superCluster()->energy(),
132  aZCandidate.first->getRecoElectron()->eta(),
133  aZCandidate.first->getRecoElectron()->phi(),
134  aZCandidate.second->getRecoElectron()->superCluster()->energy(),
135  aZCandidate.second->getRecoElectron()->eta(),
136  aZCandidate.second->getRecoElectron()->phi());
137 }
static float invMassCalc(float Energy1, float Eta1, float Phi1, float Energy2, float Eta2, float Phi2)

◆ calculateZMassWithCorrectedElectrons_noTK()

float ZeeKinematicTools::calculateZMassWithCorrectedElectrons_noTK ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate,
float  ele1EnergyCorrection,
float  ele2EnergyCorrection 
)
static

Definition at line 87 of file ZeeKinematicTools.cc.

References ZIterativeAlgorithmWithFit::invMassCalc().

90  {
92  aZCandidate.first->getRecoElectron()->superCluster()->energy() / ele1EnergyCorrection,
93  aZCandidate.first->getRecoElectron()->superCluster()->eta(),
94  aZCandidate.first->getRecoElectron()->superCluster()->phi(),
95  aZCandidate.second->getRecoElectron()->superCluster()->energy() / ele2EnergyCorrection,
96  aZCandidate.second->getRecoElectron()->superCluster()->eta(),
97  aZCandidate.second->getRecoElectron()->superCluster()->phi());
98 }
static float invMassCalc(float Energy1, float Eta1, float Phi1, float Energy2, float Eta2, float Phi2)

◆ calculateZMassWithCorrectedElectrons_withTK()

float ZeeKinematicTools::calculateZMassWithCorrectedElectrons_withTK ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate,
float  ele1EnergyCorrection,
float  ele2EnergyCorrection 
)
static

Definition at line 102 of file ZeeKinematicTools.cc.

References ZIterativeAlgorithmWithFit::invMassCalc().

Referenced by ZeeCalibration::duringLoop().

105  {
107  aZCandidate.first->getRecoElectron()->superCluster()->energy() / ele1EnergyCorrection,
108  aZCandidate.first->getRecoElectron()->eta(),
109  aZCandidate.first->getRecoElectron()->phi(),
110  aZCandidate.second->getRecoElectron()->superCluster()->energy() / ele2EnergyCorrection,
111  aZCandidate.second->getRecoElectron()->eta(),
112  aZCandidate.second->getRecoElectron()->phi());
113 }
static float invMassCalc(float Energy1, float Eta1, float Phi1, float Energy2, float Eta2, float Phi2)

◆ calculateZPhi()

float ZeeKinematicTools::calculateZPhi ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 189 of file ZeeKinematicTools.cc.

Referenced by ZeePlots::fillZInfo().

189  {
190  TLorentzVector ele1LV(aZCandidate.first->getRecoElectron()->px(),
191  aZCandidate.first->getRecoElectron()->py(),
192  aZCandidate.first->getRecoElectron()->pz(),
193  aZCandidate.first->getRecoElectron()->superCluster()->energy());
194 
195  TLorentzVector ele2LV(aZCandidate.second->getRecoElectron()->px(),
196  aZCandidate.second->getRecoElectron()->py(),
197  aZCandidate.second->getRecoElectron()->pz(),
198  aZCandidate.second->getRecoElectron()->superCluster()->energy());
199 
200  return (ele1LV + ele2LV).Phi();
201 }

◆ calculateZPt()

float ZeeKinematicTools::calculateZPt ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 205 of file ZeeKinematicTools.cc.

Referenced by ZeePlots::fillZInfo().

205  {
206  TLorentzVector ele1LV(aZCandidate.first->getRecoElectron()->px(),
207  aZCandidate.first->getRecoElectron()->py(),
208  aZCandidate.first->getRecoElectron()->pz(),
209  aZCandidate.first->getRecoElectron()->superCluster()->energy());
210 
211  TLorentzVector ele2LV(aZCandidate.second->getRecoElectron()->px(),
212  aZCandidate.second->getRecoElectron()->py(),
213  aZCandidate.second->getRecoElectron()->pz(),
214  aZCandidate.second->getRecoElectron()->superCluster()->energy());
215 
216  return (ele1LV + ele2LV).Pt();
217 }

◆ calculateZRapidity()

float ZeeKinematicTools::calculateZRapidity ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 141 of file ZeeKinematicTools.cc.

Referenced by ZeePlots::fillZInfo().

141  {
142  TLorentzVector ele1LV(aZCandidate.first->getRecoElectron()->px(),
143  aZCandidate.first->getRecoElectron()->py(),
144  aZCandidate.first->getRecoElectron()->pz(),
145  aZCandidate.first->getRecoElectron()->superCluster()->energy());
146 
147  TLorentzVector ele2LV(aZCandidate.second->getRecoElectron()->px(),
148  aZCandidate.second->getRecoElectron()->py(),
149  aZCandidate.second->getRecoElectron()->pz(),
150  aZCandidate.second->getRecoElectron()->superCluster()->energy());
151 
152  return (ele1LV + ele2LV).Rapidity();
153 }

◆ calculateZTheta()

float ZeeKinematicTools::calculateZTheta ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate)
static

Definition at line 173 of file ZeeKinematicTools.cc.

Referenced by ZeePlots::fillZInfo().

173  {
174  TLorentzVector ele1LV(aZCandidate.first->getRecoElectron()->px(),
175  aZCandidate.first->getRecoElectron()->py(),
176  aZCandidate.first->getRecoElectron()->pz(),
177  aZCandidate.first->getRecoElectron()->superCluster()->energy());
178 
179  TLorentzVector ele2LV(aZCandidate.second->getRecoElectron()->px(),
180  aZCandidate.second->getRecoElectron()->py(),
181  aZCandidate.second->getRecoElectron()->pz(),
182  aZCandidate.second->getRecoElectron()->superCluster()->energy());
183 
184  return (ele1LV + ele2LV).Theta();
185 }

◆ cosThetaElectrons_SC()

float ZeeKinematicTools::cosThetaElectrons_SC ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate,
float  ele1EnergyCorrection,
float  ele2EnergyCorrection 
)
static

Definition at line 39 of file ZeeKinematicTools.cc.

References funct::cos(), JetChargeProducer_cfi::exp, funct::sin(), mathSSE::sqrt(), testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, testProducerWithPsetDescEmpty_cfi::y2, and testProducerWithPsetDescEmpty_cfi::z2.

Referenced by ZeeCalibration::duringLoop().

41  {
42  float theta1 = 2. * atan(exp(-aZCandidate.first->getRecoElectron()->superCluster()->eta()));
43  float phi1 = aZCandidate.first->getRecoElectron()->superCluster()->phi();
44 
45  float x1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * sin(theta1) * cos(phi1);
46  float y1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * sin(theta1) * sin(phi1);
47  float z1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * cos(theta1);
48  float mod1 = sqrt(x1 * x1 + y1 * y1 + z1 * z1);
49 
50  float theta2 = 2. * atan(exp(-aZCandidate.second->getRecoElectron()->superCluster()->eta()));
51  float phi2 = aZCandidate.second->getRecoElectron()->superCluster()->phi();
52 
53  float x2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * sin(theta2) * cos(phi2);
54  float y2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * sin(theta2) * sin(phi2);
55  float z2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * cos(theta2);
56  float mod2 = sqrt(x2 * x2 + y2 * y2 + z2 * z2);
57 
58  return (x1 * x2 + y1 * y2 + z1 * z2) / (mod1 * mod2);
59 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22

◆ cosThetaElectrons_TK()

float ZeeKinematicTools::cosThetaElectrons_TK ( const std::pair< calib::CalibElectron *, calib::CalibElectron *> &  aZCandidate,
float  ele1EnergyCorrection,
float  ele2EnergyCorrection 
)
static

Definition at line 63 of file ZeeKinematicTools.cc.

References funct::cos(), JetChargeProducer_cfi::exp, funct::sin(), mathSSE::sqrt(), testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, testProducerWithPsetDescEmpty_cfi::y2, and testProducerWithPsetDescEmpty_cfi::z2.

Referenced by ZeeCalibration::duringLoop().

65  {
66  float theta1 = 2. * atan(exp(-aZCandidate.first->getRecoElectron()->eta()));
67  float phi1 = aZCandidate.first->getRecoElectron()->phi();
68 
69  float x1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * sin(theta1) * cos(phi1);
70  float y1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * sin(theta1) * sin(phi1);
71  float z1 = aZCandidate.first->getRecoElectron()->superCluster()->energy() * cos(theta1);
72  float mod1 = sqrt(x1 * x1 + y1 * y1 + z1 * z1);
73 
74  float theta2 = 2. * atan(exp(-aZCandidate.second->getRecoElectron()->eta()));
75  float phi2 = aZCandidate.second->getRecoElectron()->phi();
76 
77  float x2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * sin(theta2) * cos(phi2);
78  float y2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * sin(theta2) * sin(phi2);
79  float z2 = aZCandidate.second->getRecoElectron()->superCluster()->energy() * cos(theta2);
80  float mod2 = sqrt(x2 * x2 + y2 * y2 + z2 * z2);
81 
82  return (x1 * x2 + y1 * y2 + z1 * z2) / (mod1 * mod2);
83 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22