8#include "Photos/Photos.h"
10#include "Photos/PhotosHepMC3Event.h"
14#include "Photos/Log.h"
19#include "CLHEP/Random/RandFlat.h"
49 return StatusCode::SUCCESS;
56 Photos::setInterference(
true);
57 Photos::setCorrectionWtForW(
true);
62 Photos::forceMassFrom4Vector(
true);
63 Photos::forceMassFromEventRecord(13);
64 Photos::forceMassFromEventRecord(15);
66 Photos::forceMassFromEventRecord(211);
67 Photos::setTopProcessRadiation(
false);
71 Photos::setExponentiation(
true);
73 Photos::setInfraredCutOff(0.01);
74 Photos::setDoubleBrem(
true);
75 Photos::setQuatroBrem(
false);
84 Photospp::Log::LogWarning(
false);
102 const EventContext& ctx)
const
105 rngWrapper->
setSeed( streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
115 ctx.setEventID (EventIDBase (conditionsRun,
116 EventIDBase::UNDEFEVT,
117 EventIDBase::UNDEFNUM,
118 EventIDBase::UNDEFNUM,
143 if (
sc.isFailure() || eventCollection == 0) {
145 return StatusCode::FAILURE;
154 return StatusCode::FAILURE;
156 switch(event->momentum_unit()) {
157 case HepMC3::Units::MomentumUnit::GEV:
158 Photos::setMomentumUnit(Photos::GEV);
161 case HepMC3::Units::MomentumUnit::MEV:
162 Photos::setMomentumUnit(Photos::MEV);
166 ATH_MSG_ERROR(
"Photospp_i received a event with unknown units.");
167 Photos::setMomentumUnit(Photos::DEFAULT_MOMENTUM);
171 photosEvent.process();
173 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
void ignore_unused_variable_warning(int *)
double phoranc_(int *idum)
A wrapper class for event-slot-local random engines.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
ServiceHandle< StoreGateSvc > & evtStore()
const T * back() const
Access the last element in the collection as an rvalue.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
BooleanProperty m_createHistory
Whether to create history entries (default = yes).
BooleanProperty m_photonSplitting
Whether to include photon splitting.
void setupPhotos()
Set up the Photos class This may be called in the initialize method or directly before the generation...
BooleanProperty m_stopCritical
Whether to stop on critical error (default = no).
Photospp_i(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena algorithm constructor.
BooleanProperty m_delayInitialisation
Delay initialisation until just before first event execution (default = no).
ServiceHandle< IAthRNGSvc > m_rndmSvc
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
BooleanProperty m_WMECorrection
Whether to apply ME correction to W decays (default = no, until validated).
IntegerProperty m_randomSeed
Seed for random number engine.
DoubleProperty m_maxWtInterference
void reseedRandomEngine(const std::string &streamName, const EventContext &ctx)
StatusCode execute(const EventContext &ctx)
Run Photos on one event Will require a pre-existing HepMC event in Storegate.
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const
DoubleProperty m_infraRedCutOff
StringProperty m_genEventKey
The GenEvent StoreGate key - FIXME should be using Read/WriteHandles here.
BooleanProperty m_ZMECorrection
Whether to apply ME correction to Z decays (default = no, until validated).
static CLHEP::HepRandomEngine * p_rndmEngine
BooleanProperty m_exponentiation
Whether to use exponentiation mode (default = yes).
StatusCode initialize()
Initialise the Photospp_i algorithm and required services.
DoubleProperty m_alphaQED
Value of alpha_QED.
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
HepMC3::GenEvent GenEvent
constexpr double electronMassInMeV
the mass of the electron (in MeV)
PhotosHepMC3Event PhotosHepMCEvent