16#include "GaudiKernel/MsgStream.h"
17#include "Gaudi/Property.h"
18#include "GaudiKernel/SystemOfUnits.h"
38 ISvcLocator* pSvcLocator ) :
48 "Input location of particles" );
52 "Input location of Decay" );
56 "Input location of Elephantino" );
60 "List of tests to proceed with" );
75 return StatusCode::SUCCESS;
81 return StatusCode::SUCCESS;
88 for ( std::vector<std::string>::const_iterator
96 return StatusCode::FAILURE;
100 return StatusCode::SUCCESS;
105 const std::string& test = testName;
110 if ( !
evtStore()->retrieve(particles, particlesName).isSuccess() ||
112 ATH_MSG_WARNING(
"Could not fetch particles at [{}] !!", particlesName);
113 return StatusCode::RECOVERABLE;
119 if ( !
evtStore()->retrieve(iparticles, iparticlesName).isSuccess() ||
122 (
"Could not fetch iparticles at [{}] !!", iparticlesName);
123 return StatusCode::RECOVERABLE;
127 const std::string decayName =
m_decayName.value()+
"_"+test;
129 if ( !
evtStore()->retrieve(decay, decayName).isSuccess() ||
132 (
"Could not fetch Decay at [{}] !!", decayName);
133 return StatusCode::RECOVERABLE;
139 if ( !
evtStore()->retrieve(elephantino, elephantinoName).isSuccess() ||
142 (
"Could not fetch Elephantino at [{}] !!", elephantinoName);
143 return StatusCode::RECOVERABLE;
146 const double igev = 1. / Gaudi::Units::GeV;
155 std::to_string(decay->
l1()->
px() * igev) :
"[thinned!]");
158 std::to_string(decay->
l2()->
px() * igev) :
"[thinned!]");
167 elephantino->
ear1() ?
168 std::to_string(elephantino->
ear1()->
px() * igev) :
"[thinned!]");
170 elephantino->
ear2() ?
171 std::to_string(elephantino->
ear2()->
px() * igev) :
"[thinned!]");
174 for (
unsigned int i = 0; i != particles->size(); ++i ) {
176 (* particles)[i]->px() * igev,
177 (*iparticles)[i]->px() * igev);
181 return StatusCode::SUCCESS;
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const AthExParticle * l1() const
const AthExParticle * l2() const
const AthExParticle * p1() const
const AthExParticle * p2() const
object with 4 legs, so it is best modeled with a vector of ElementLink.
const AthExIParticle * ear1() const
const AthExIParticle * leg4() const
const AthExIParticle * leg3() const
const AthExIParticle * leg1() const
const AthExIParticle * leg2() const
const AthExIParticle * ear2() const
virtual double px() const =0
AthExIParticle interface.
virtual double px() const
Implementation of the AthExIParticle interface.
virtual StatusCode execute(const EventContext &ctx)
Execute method.
ReadThinnedData()
Default constructor:
StatusCode checkTest(const std::string &testName)
read the output of a given test (test1, test2, test3)
StringProperty m_decayName
Decay input location.
std::vector< std::string > m_testNames
list of test names
virtual StatusCode initialize()
StringProperty m_particlesName
Containers.
StringProperty m_elephantinoName
Elephantino input location.
virtual StatusCode finalize()
virtual ~ReadThinnedData()
Destructor:
size_type size() const noexcept
Returns the number of elements in the collection.