115{
116 const std::string testName =
"_"+
test;
118 + testName;
119
121 if ( !
evtStore()->record(particles, particlesOutputName).isSuccess() ) {
123 << particlesOutputName << "]");
126 return StatusCode::RECOVERABLE;
127 }
128 if ( !
evtStore()->setConst(particles).isSuccess() ) {
130 << particlesOutputName << "]");
131 }
132
134 AthExParticle *
p =
new AthExParticle( (i+1) * 10. * Gaudi::Units::GeV,
135 (i+1) * 10. * Gaudi::Units::GeV,
136 (i+1) * 10. * Gaudi::Units::GeV,
137 (i+2) * 10. * Gaudi::Units::GeV );
139 }
140
142 << " [" << particles << "]");
143
145
146 AthExDecay * dcy = new AthExDecay;
147 if ( !
evtStore()->record(dcy, decayOutputName).isSuccess() ) {
148 ATH_MSG_ERROR(
"Could not store Decay at [" << decayOutputName <<
"] !!");
149 delete dcy;
150 dcy = 0;
151 return StatusCode::RECOVERABLE;
152 }
153 if ( !
evtStore()->setConst(dcy).isSuccess() ) {
154 ATH_MSG_WARNING(
"Could not setConst Decay at [" << decayOutputName <<
"]");
155 }
156
159 return StatusCode::RECOVERABLE;
160 }
161
162
163
164 const ElementLink<AthExParticles>
p1( *particles, 0 );
165
166 const ElementLink<AthExParticles>
p2( (*particles)[4], *particles );
167
168
169 const ElementLink<AthExParticles>
l1( *particles, 1 );
170
171 const ElementLink<AthExParticles>
l2( (*particles)[9], *particles );
172
174
175 const double igev = 1. / Gaudi::Units::GeV;
177 (
"Created a Decay from :" <<
endmsg
178 <<
" p1: px= " << dcy->
p1()->
px() * igev <<
endmsg
179 <<
" p2: px= " << dcy->
p2()->
px() * igev <<
endmsg
180 <<
" l1: px= " << dcy->
l1()->
px() * igev <<
endmsg
181 <<
" l2: px= " << dcy->
l2()->
px() * igev
182 );
183
184
186 + testName;
188 if ( !
evtStore()->record(eleph, elephantinoOutputName).isSuccess() ) {
190 << elephantinoOutputName << "] !!");
191 delete eleph;
192 eleph = 0;
193 return StatusCode::RECOVERABLE;
194 }
195 if ( !
evtStore()->setConst(eleph).isSuccess() ) {
197 << elephantinoOutputName << "]");
198 }
199
200 {
201 const AthExIParticles* iparticles = 0;
202 if ( !
evtStore()->symLink( particles, iparticles ).isSuccess() ) {
203 ATH_MSG_WARNING(
"Could not symlink AthExParticles to AthExIParticles !!");
204 return StatusCode::RECOVERABLE;
205 }
206 }
207
208 const AthExIParticles* iparticles = 0;
210 0 == iparticles ) {
211 ATH_MSG_WARNING(
"Could not retrieve the (symlinked) AthExIParticles at ["
212 << particlesOutputName << "] !!");
213 return StatusCode::RECOVERABLE;
214 }
215
216 if ( iparticles->
size() < 9 ) {
218 return StatusCode::RECOVERABLE;
219 }
220
223 " iparticles: " << iparticles->
size());
224
227 <<
" #iparticles: " << iparticles->
size() <<
endmsg
229 <<
" @iparticles: " << iparticles <<
endmsg
230 <<
" @particles: " << particles <<
endmsg
231 << "=== StoreGate content ===\n"
233 return StatusCode::FAILURE;
234 }
235
236
237
238
239 const ElementLink<AthExIParticles> ip1( *iparticles, 0 );
240 const ElementLink<AthExIParticles> ip2( (*iparticles)[4], *iparticles );
241 const ElementLink<AthExIParticles> ip3( *iparticles, 7 );
242 const ElementLink<AthExIParticles> ip4( (*iparticles)[8], *iparticles );
243
244 eleph->
setLegs( ip1, ip2, ip3, ip4 );
245
246 const ElementLink<AthExIParticles> ie1( *iparticles, 1 );
247 const ElementLink<AthExIParticles> ie2( (*iparticles)[9], *iparticles );
249
251 <<
" leg1: px= " << eleph->
leg1()->
px() * igev <<
endmsg
252 <<
" leg2: px= " << eleph->
leg2()->
px() * igev <<
endmsg
253 <<
" leg3: px= " << eleph->
leg3()->
px() * igev <<
endmsg
254 <<
" leg4: px= " << eleph->
leg4()->
px() * igev <<
endmsg
255 <<
" ear1: px= " << eleph->
ear1()->
px() * igev <<
endmsg
256 <<
" ear2: px= " << eleph->
ear2()->
px() * igev);
257
258 return StatusCode::SUCCESS;
259}
Athena::TPCnvVers::Current AthExParticles
#define ATH_MSG_WARNING(x)
ServiceHandle< StoreGateSvc > & evtStore()
const AthExParticle * l1() const
const AthExParticle * l2() const
void setDecay(const ElementLink< AthExParticles > &p1, const ElementLink< AthExParticles > &p2, const ElementLink< AthExParticles > &l1, const ElementLink< AthExParticles > &l2)
const AthExParticle * p1() const
const AthExParticle * p2() const
void setEars(const ElementLink< AthExIParticles > &e1, const ElementLink< AthExIParticles > &e4)
const AthExIParticle * ear1() const
const AthExIParticle * leg4() const
const AthExIParticle * leg3() const
const AthExIParticle * leg1() const
const AthExIParticle * leg2() const
void setLegs(const ElementLink< AthExIParticles > &p1, const ElementLink< AthExIParticles > &p2, const ElementLink< AthExIParticles > &p3, const ElementLink< AthExIParticles > &p4)
const AthExIParticle * ear2() const
virtual double px() const =0
AthExIParticle interface.
virtual double px() const
Implementation of the AthExIParticle interface.
size_type size() const noexcept
Returns the number of elements in the collection.
std::ostream & dump(std::ostream &out, const I4MomIter iBeg, const I4MomIter iEnd)
Helper to stream out a range of I4Momentum objects.
retrieve(aClass, aKey=None)