21 std::pair<float, float> sincos(
float arg ) {
return { std::sin( arg ), std::cos( arg ) }; }
29 class SimulationAlg :
public Functional::Transformer<MCHits( MCTracks const& )> {
32 : Transformer( name, pSvcLocator, { {
"MCTracksLocation",
"/Event/MCTracks" } },
33 {
"MCHitsLocation",
"/Event/MCHits" } ) {}
38 for (
auto const& track : tracks ) {
39 auto [s, c] = sincos( track.theta );
41 hits.emplace_back( i * c, i * s );
#define DECLARE_COMPONENT(type)
Gaudi::Accumulators::Counter n_hits
SimulationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< unsigned int > m_nbHitsPerTrack
MCHits operator()(MCTracks const &tracks) const override
Implementation of property with value of concrete type.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
std::vector< MCTrack > MCTracks
std::vector< MCHit > MCHits
A basic integral counter;.