#include <EGTransverseMassTool.h>
Definition at line 27 of file EGTransverseMassTool.h.
◆ EGTransverseMassTool()
DerivationFramework::EGTransverseMassTool::EGTransverseMassTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::EGTransverseMassTool::addBranches |
( |
| ) |
const |
|
finaloverridevirtual |
Definition at line 83 of file EGTransverseMassTool.cxx.
85 const EventContext& ctx = Gaudi::Hive::currentContext();
89 auto masses = std::make_unique<std::vector<float>>();
95 return StatusCode::SUCCESS;
◆ getTransverseMasses()
StatusCode DerivationFramework::EGTransverseMassTool::getTransverseMasses |
( |
const EventContext & |
ctx, |
|
|
std::vector< float > & |
masses |
|
) |
| const |
|
private |
Definition at line 99 of file EGTransverseMassTool.cxx.
103 const std::vector<float>* pt1 =
nullptr;
106 pt1 = readHandle.ptr();
108 const std::vector<float>* pt2 =
nullptr;
111 pt2 = readHandle.ptr();
114 const std::vector<float>* phi1 =
nullptr;
117 phi1 = readHandle.ptr();
119 const std::vector<float>* phi2 =
nullptr;
122 phi2 = readHandle.ptr();
134 if (particles2->
empty()) {
137 return StatusCode::SUCCESS;
141 return StatusCode::SUCCESS;
145 float MET = pt2 ? (*pt2)[0] : particles2->
at(0)->met();
146 float MET_phi = phi2 ? (*phi2)[0] : particles2->
at(0)->phi();
150 return StatusCode::SUCCESS;
153 std::vector<int> entries1 = m_parser->evaluateAsVector();
154 unsigned int nEntries1 = entries1.size();
159 return StatusCode::SUCCESS;
162 if (particles1->
size() != nEntries1) {
164 return StatusCode::FAILURE;
166 if ((pt1 && pt1->size() != nEntries1) ||
167 (phi1 && phi1->size() != nEntries1)) {
169 return StatusCode::FAILURE;
174 for (iter = 0; iter < nEntries1; ++iter) {
175 if (entries1[iter] != 1)
177 float apt1 = pt1 ? (*pt1)[iter] : ((*particles1)[iter])->p4().Pt();
178 float aphi1 = phi1 ? (*phi1)[iter] : ((*particles1)[iter])->p4().Phi();
180 TLorentzVector v1,
v2;
182 v2.SetPtEtaPhiM(
MET, 0., MET_phi, 0.);
183 float mass = (v1 +
v2).M();
186 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::EGTransverseMassTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 49 of file EGTransverseMassTool.cxx.
53 "No SG name provided for the output of the transverse mass tool!");
54 return StatusCode::FAILURE;
79 return StatusCode::SUCCESS;
◆ m_container1Name
Initial value:{
this,
"ObjectContainerName",
"",
"SG key of first container"
}
Definition at line 51 of file EGTransverseMassTool.h.
◆ m_container2Name
Initial value:{
this,
"METContainerName",
"MET_LocHadTopo",
"SG key of second container"
}
Definition at line 57 of file EGTransverseMassTool.h.
◆ m_expression1
std::string DerivationFramework::EGTransverseMassTool::m_expression1 |
|
private |
◆ m_mass1Hypothesis
float DerivationFramework::EGTransverseMassTool::m_mass1Hypothesis |
|
private |
◆ m_METmin
float DerivationFramework::EGTransverseMassTool::m_METmin |
|
private |
◆ m_phi1BranchName
SG::ReadHandleKey<std::vector<float> > DerivationFramework::EGTransverseMassTool::m_phi1BranchName |
|
private |
Initial value:{
this,
"ObjectPhiBranchName",
"",
"Phi1 if different than default"
}
Definition at line 71 of file EGTransverseMassTool.h.
◆ m_phi2BranchName
SG::ReadHandleKey<std::vector<float> > DerivationFramework::EGTransverseMassTool::m_phi2BranchName |
|
private |
Initial value:{
this,
"METPhiBranchName",
"",
"Phi2 if different than default"
}
Definition at line 85 of file EGTransverseMassTool.h.
◆ m_pt1BranchName
SG::ReadHandleKey<std::vector<float> > DerivationFramework::EGTransverseMassTool::m_pt1BranchName |
|
private |
Initial value:{
this,
"ObjectPtBranchName",
"",
"Pt1 if different than default"
}
Definition at line 64 of file EGTransverseMassTool.h.
◆ m_pt2BranchName
SG::ReadHandleKey<std::vector<float> > DerivationFramework::EGTransverseMassTool::m_pt2BranchName |
|
private |
Initial value:{
this,
"METPtBranchName",
"",
"Pt2 if different than default"
}
Definition at line 78 of file EGTransverseMassTool.h.
◆ m_sgName
SG::WriteHandleKey<std::vector<float> > DerivationFramework::EGTransverseMassTool::m_sgName |
|
private |
Initial value:{ this,
"StoreGateEntryName",
"",
"SG key of output object" }
Definition at line 46 of file EGTransverseMassTool.h.
The documentation for this class was generated from the following files: