|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "Gaudi/Property.h"
17 #include "GaudiKernel/SystemOfUnits.h"
24 #include "AthLinks/ElementLinkVector.h"
42 ISvcLocator* pSvcLocator ) :
52 "Output location of the particles" );
56 "Number of particles to create" );
60 "Output location of a 2-body decay" );
64 "Output location of an Elephantino with 4 legs" );
68 "list of test-names to create data for "
69 "(default: test1,test2,test3)" );
86 return StatusCode::SUCCESS;
92 return StatusCode::SUCCESS;
99 for ( std::vector<std::string>::const_iterator
104 ATH_MSG_INFO(
"Generating data for [" << *itr <<
"]...");
105 if ( !
makeData(*itr).isSuccess() ) {
106 ATH_MSG_ERROR (
"Could not generate data for [" << *itr <<
"] !!");
107 return StatusCode::FAILURE;
111 return StatusCode::SUCCESS;
116 const std::string testName =
"_"+
test;
123 << particlesOutputName <<
"]");
126 return StatusCode::RECOVERABLE;
130 << particlesOutputName <<
"]");
147 if ( !
evtStore()->record(dcy, decayOutputName).isSuccess() ) {
148 ATH_MSG_ERROR(
"Could not store Decay at [" << decayOutputName <<
"] !!");
151 return StatusCode::RECOVERABLE;
153 if ( !
evtStore()->setConst(dcy).isSuccess() ) {
154 ATH_MSG_WARNING(
"Could not setConst Decay at [" << decayOutputName <<
"]");
159 return StatusCode::RECOVERABLE;
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
188 if ( !
evtStore()->record(eleph, elephantinoOutputName).isSuccess() ) {
190 << elephantinoOutputName <<
"] !!");
193 return StatusCode::RECOVERABLE;
195 if ( !
evtStore()->setConst(eleph).isSuccess() ) {
197 << elephantinoOutputName <<
"]");
203 ATH_MSG_WARNING(
"Could not symlink AthExParticles to AthExIParticles !!");
204 return StatusCode::RECOVERABLE;
211 ATH_MSG_WARNING(
"Could not retrieve the (symlinked) AthExIParticles at ["
212 << particlesOutputName <<
"] !!");
213 return StatusCode::RECOVERABLE;
216 if ( iparticles->
size() < 9 ) {
218 return StatusCode::RECOVERABLE;
223 " iparticles: " << iparticles->
size());
227 <<
" #iparticles: " << iparticles->
size() <<
endmsg
229 <<
" @iparticles: " << iparticles <<
endmsg
231 <<
"=== StoreGate content ===\n"
233 return StatusCode::FAILURE;
244 eleph->
setLegs( ip1, ip2, ip3, ip4 );
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);
258 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
StringProperty m_decayOutputName
Decay object output location.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::string > m_testNames
list of test-names to create data for (default: test1,test2,test3)
UnsignedIntegerProperty m_nbrParticles
Number of particles to generate.
StringProperty m_particlesOutputName
Particles output location.
Athena::TPCnvVers::Current AthExParticles
virtual double px() const
Implementation of the AthExIParticle interface.
virtual StatusCode initialize()
const AthExIParticle * leg4() const
virtual StatusCode execute()
const AthExIParticle * ear2() const
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const AthExIParticle * ear1() const
const AthExIParticle * leg2() const
::StatusCode StatusCode
StatusCode definition for legacy code.
const AthExParticle * l1() const
void setDecay(const ElementLink< AthExParticles > &p1, const ElementLink< AthExParticles > &p2, const ElementLink< AthExParticles > &l1, const ElementLink< AthExParticles > &l2)
StringProperty m_elephantinoOutputName
Elephantino object output location.
CreateData()
Default constructor:
void setLegs(const ElementLink< AthExIParticles > &p1, const ElementLink< AthExIParticles > &p2, const ElementLink< AthExIParticles > &p3, const ElementLink< AthExIParticles > &p4)
An STL vector of pointers that by default owns its pointed-to elements.
virtual double px() const =0
AthExIParticle interface.
#define ATH_MSG_WARNING(x)
const AthExParticle * p2() const
const AthExIParticle * leg1() const
const AthExParticle * p1() const
StatusCode makeData(const std::string &testName)
make data for a test
const AthExIParticle * leg3() const
size_type size() const noexcept
Returns the number of elements in the collection.
virtual StatusCode finalize()
const AthExParticle * l2() const
virtual ~CreateData()
Destructor:
void setEars(const ElementLink< AthExIParticles > &e1, const ElementLink< AthExIParticles > &e4)