 |
ATLAS Offline Software
|
Go to the documentation of this file.
31 #include "TLorentzVector.h"
39 , m_expression1(
"true")
41 , m_mass1Hypothesis(0.0)
53 "No SG name provided for the output of the transverse mass tool!");
54 return StatusCode::FAILURE;
79 return StatusCode::SUCCESS;
88 auto masses = std::make_unique<std::vector<float>>();
94 return StatusCode::SUCCESS;
99 std::vector<float>&
masses)
const
102 const std::vector<float>* pt1 =
nullptr;
105 pt1 = readHandle.ptr();
107 const std::vector<float>* pt2 =
nullptr;
110 pt2 = readHandle.ptr();
113 const std::vector<float>* phi1 =
nullptr;
116 phi1 = readHandle.ptr();
118 const std::vector<float>* phi2 =
nullptr;
121 phi2 = readHandle.ptr();
133 if (particles2->
empty()) {
136 return StatusCode::SUCCESS;
140 return StatusCode::SUCCESS;
144 float MET = pt2 ? (*pt2)[0] : particles2->
at(0)->met();
145 float MET_phi = phi2 ? (*phi2)[0] : particles2->
at(0)->phi();
149 return StatusCode::SUCCESS;
152 std::vector<int> entries1 = m_parser->evaluateAsVector();
153 unsigned int nEntries1 = entries1.size();
158 return StatusCode::SUCCESS;
161 if (particles1->
size() != nEntries1) {
163 return StatusCode::FAILURE;
165 if ((pt1 && pt1->size() != nEntries1) ||
166 (phi1 && phi1->size() != nEntries1)) {
168 return StatusCode::FAILURE;
174 if (entries1[
iter] != 1)
176 float apt1 = pt1 ? (*pt1)[
iter] : ((*particles1)[
iter])->p4().Pt();
177 float aphi1 = phi1 ? (*phi1)[
iter] : ((*particles1)[
iter])->p4().Phi();
179 TLorentzVector v1,
v2;
181 v2.SetPtEtaPhiM(
MET, 0., MET_phi, 0.);
182 float mass = (v1 +
v2).M();
185 return StatusCode::SUCCESS;
const std::string & key() const
Return the StoreGate ID for the referenced object.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Container for xAOD::MissingET_v1 objects.
#define ATH_MSG_WARNING(x)
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.