87{
88
89 const std::vector<float>* pt1 = nullptr;
92 pt1 = readHandle.
ptr();
93 }
94 const std::vector<float>* pt2 = nullptr;
97 pt2 = readHandle.
ptr();
98 }
99
100 const std::vector<float>* phi1 = nullptr;
103 phi1 = readHandle.
ptr();
104 }
105 const std::vector<float>* phi2 = nullptr;
108 phi2 = readHandle.
ptr();
109 }
110
111
113 ctx };
115 ctx };
118
119
120 if (particles2->
empty()) {
121 if (!pt2) {
123 return StatusCode::SUCCESS;
124 }
125 if (pt2->empty()) {
127 return StatusCode::SUCCESS;
128 }
129 }
130
131 float MET = pt2 ? (*pt2)[0] : particles2->
at(0)->met();
132 float MET_phi = phi2 ? (*phi2)[0] : particles2->
at(0)->phi();
133
134
136 return StatusCode::SUCCESS;
137
138
139 std::vector<int> entries1 = m_parser->evaluateAsVector();
140 unsigned int nEntries1 = entries1.size();
141
142
143
144 if (nEntries1 == 0)
145 return StatusCode::SUCCESS;
146
147
148 if (particles1->
size() != nEntries1) {
150 return StatusCode::FAILURE;
151 }
152 if ((pt1 && pt1->size() != nEntries1) ||
153 (phi1 && phi1->size() != nEntries1)) {
155 return StatusCode::FAILURE;
156 }
157
158
160 for (iter = 0;
iter < nEntries1; ++
iter) {
161 if (entries1[iter] != 1)
162 continue;
163 float apt1 = pt1 ? (*pt1)[
iter] : ((*particles1)[
iter])->p4().Pt();
164 float aphi1 = phi1 ? (*phi1)[
iter] : ((*particles1)[
iter])->p4().Phi();
165
166 TLorentzVector v1,
v2;
168 v2.SetPtEtaPhiM(MET, 0., MET_phi, 0.);
169 float mass = (v1 +
v2).M();
171 }
172 return StatusCode::SUCCESS;
173}
#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.
const_pointer_type ptr()
Dereference the pointer.
MissingETContainer_v1 MissingETContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.