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() ||
113 << particlesName <<
"] !!");
114 return StatusCode::RECOVERABLE;
120 if ( !
evtStore()->retrieve(iparticles, iparticlesName).isSuccess() ||
123 (
"Could not fetch iparticles at [" << iparticlesName <<
"] !!");
124 return StatusCode::RECOVERABLE;
128 const std::string decayName =
m_decayName.value()+
"_"+test;
130 if ( !
evtStore()->retrieve(decay, decayName).isSuccess() ||
133 (
"Could not fetch Decay at [" << decayName <<
"] !!");
134 return StatusCode::RECOVERABLE;
140 if ( !
evtStore()->retrieve(elephantino, elephantinoName).isSuccess() ||
143 (
"Could not fetch Elephantino at [" << elephantinoName <<
"] !!");
144 return StatusCode::RECOVERABLE;
147 const double igev = 1. / Gaudi::Units::GeV;
149 (
"IN particles: " << particles->size() <<
endmsg
150 <<
"IN iparticles: " << iparticles->
size() <<
endmsg
152 <<
" p1: px= " << decay->
p1()->
px() * igev <<
endmsg
153 <<
" p2: px= " << decay->
p2()->
px() * igev);
155 msg(MSG::INFO) <<
" l1: px= ";
156 if ( decay->
l1() ) {
msg(MSG::INFO) << decay->
l1()->
px() * igev <<
endmsg;
157 }
else {
msg(MSG::INFO) <<
"[thinned!]" <<
endmsg;
159 msg(MSG::INFO) <<
" l2: px= ";
160 if ( decay->
l2() ) {
msg(MSG::INFO) << decay->
l2()->
px() * igev <<
endmsg;
161 }
else {
msg(MSG::INFO) <<
"[thinned!]" <<
endmsg;
165 <<
"IN elephantino: " <<
endmsg
166 <<
" leg1: px= " << elephantino->
leg1()->
px() * igev <<
endmsg
167 <<
" leg2: px= " << elephantino->
leg2()->
px() * igev <<
endmsg
168 <<
" leg3: px= " << elephantino->
leg3()->
px() * igev <<
endmsg
169 <<
" leg4: px= " << elephantino->
leg4()->
px() * igev <<
endmsg;
171 msg(MSG::INFO) <<
" ear1: px= ";
172 if ( elephantino->
ear1() ) {
175 msg(MSG::INFO) <<
"[thinned!]" <<
endmsg;
177 msg(MSG::INFO) <<
" ear2: px= ";
178 if ( elephantino->
ear2() ) {
181 msg(MSG::INFO) <<
"[thinned!]" <<
endmsg;
184 msg(MSG::INFO) <<
"Particles | IParticles : " <<
endmsg;
185 for (
unsigned int i = 0; i != particles->size(); ++i ) {
187 << std::setw(9) << (* particles)[i]->px() * igev
189 << std::setw(9) << (*iparticles)[i]->px() * igev
192 msg(MSG::INFO) <<
"======================" <<
endmsg;
194 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
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()
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.