cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.3
A generic central exclusive processes event generator
Loading...
Searching...
No Matches

Compute the matrix element for a generic factorised process defined in a Fortran weighting function. More...

#include <CepGen/Process/FortranFactorisedProcess.h>

+ Inheritance diagram for FortranFactorisedProcess:
+ Collaboration diagram for FortranFactorisedProcess:

Public Types

enum class  Mapping { linear = 0 , exponential , square , power_law }
 Type of mapping to apply on the variable. More...
 

Public Member Functions

 FortranFactorisedProcess (const ParametersList &, const std::function< double(void)> &func)
 Construct a Fortran-CepGen interface object using a double precision argument-less F77 function.
 
ProcessPtr clone () const override
 Copy all process attributes into a new object.
 
double computeWeight () override
 Compute the phase space point weight.
 
void fillKinematics () override final
 Fill the Event object with the particles' kinematics.
 
void clear ()
 Reset process prior to the phase space and variables definition.
 
void clearEvent ()
 Restore the event object to its initial state.
 
void initialise ()
 Initialise the process once the kinematics has been set.
 
const Kinematicskinematics () const
 Constant reference to the process kinematics.
 
Kinematicskinematics ()
 Reference to the process kinematics.
 
void setKinematics ()
 
double weight (const std::vector< double > &)
 Compute the weight for a phase-space point.
 
void dumpPoint (std::ostream *=nullptr) const
 Dump the coordinate of the phase-space point being evaluated.
 
void dumpVariables (std::ostream *=nullptr) const
 List all variables handled by this generic process.
 
size_t ndim () const
 Number of dimensions on which the integration is performed.
 
bool hasEvent () const
 Does the process contain (and hold) an event?
 
const Eventevent () const
 Handled particles objects and their relationships.
 
Eventevent ()
 Event object read/write accessor.
 
EventeventPtr ()
 Event pointer read/write accessor.
 
const MomentumpA () const
 Positive-z incoming beam particle's 4-momentum.
 
MomentumpA ()
 Positive-z incoming beam particle's 4-momentum.
 
double mA2 () const
 Positive-z incoming beam particle's squared mass.
 
double mA () const
 Positive-z incoming beam particle's mass.
 
const MomentumpB () const
 Negative-z incoming beam particle's 4-momentum.
 
MomentumpB ()
 Negative-z incoming beam particle's 4-momentum.
 
double mB2 () const
 Negative-z incoming beam particle's squared mass.
 
double mB () const
 Negative-z incoming beam particle's mass.
 
const MomentumpX () const
 Positive-z outgoing beam particle's 4-momentum.
 
MomentumpX ()
 Positive-z outgoing beam particle's 4-momentum.
 
double mX2 () const
 Positive-z outgoing beam particle's squared mass.
 
double & mX2 ()
 Positive-z outgoing beam particle's squared mass.
 
double mX () const
 Positive-z outgoing beam particle's mass.
 
const MomentumpY () const
 Negative-z outgoing beam particle's 4-momentum.
 
MomentumpY ()
 Negative-z outgoing beam particle's 4-momentum.
 
double mY2 () const
 Negative-z outgoing beam particle's squared mass.
 
double & mY2 ()
 Negative-z outgoing beam particle's squared mass.
 
double mY () const
 Negative-z outgoing beam particle's mass.
 
double x1 () const
 Positive-z incoming parton's fractional momentum.
 
double & x1 ()
 Positive-z incoming parton's fractional momentum.
 
double t1 () const
 Positive-z incoming parton's squared mass.
 
double & t1 ()
 Positive-z incoming parton's squared mass.
 
const Momentumq1 () const
 Positive-z incoming parton's 4-momentum.
 
Momentumq1 ()
 Positive-z incoming parton's 4-momentum.
 
double x2 () const
 Negative-z incoming parton's fractional momentum.
 
double & x2 ()
 Negative-z incoming parton's fractional momentum.
 
double t2 () const
 Negative-z incoming parton's squared mass.
 
double & t2 ()
 Negative-z incoming parton's squared mass.
 
const Momentumq2 () const
 Negative-z incoming parton's 4-momentum.
 
Momentumq2 ()
 Negative-z incoming parton's 4-momentum.
 
double wCM () const
 Two-parton centre of mass energy.
 
Momentumpc (size_t)
 Central particle's 4-momentum.
 
const Momentumpc (size_t) const
 Central particle's 4-momentum.
 
double s () const
 Two-beam squared centre of mass energy.
 
double sqrtS () const
 Two-beam centre of mass energy.
 
double inverseSqrtS () const
 Inverse two-beam centre of mass energy.
 
utils::RandomGeneratorrandomGenerator () const
 Accessor for this process' random number generator.
 
ProcessdefineVariable (double &out, const Mapping &type, const Limits &lim, const std::string &name, const std::string &description="")
 Register a variable to be handled and populated whenever a new phase space point weight is to be calculated.
 
double variableValue (size_t i, double x) const
 Retrieve the physical value for one variable.
 
const std::string & name () const
 Module unique indexing name.
 
bool operator== (const SteeredObject &oth) const
 Equality operator.
 
bool operator!= (const SteeredObject &oth) const
 Inequality operator.
 
const ParametersListparameters () const override
 Module user-defined parameters.
 
virtual void setParameters (const ParametersList &params) override
 Set module parameters.
 
void setDescribedParameters (const ParametersList &params_orig)
 Set (documented) module parameters.
 

Static Public Member Functions

static ParametersDescription description ()
 

Static Public Attributes

static ParametersList kProcParameters
 List of parameters to steer the process.
 

Protected Member Functions

void addEventContent () override
 Set the incoming and outgoing state to be expected in the process.
 
void prepareKinematics () override final
 Compute the incoming state kinematics.
 
double that () const
 \(\hat t=\frac{1}{2}\left[(p_1-p_3)^2+(p_2-p_4)^2\right]\)
 
double uhat () const
 \(\hat u=\frac{1}{2}\left[(p_1-p_4)^2+(p_2-p_3)^2\right]\)
 
double shat () const
 \(\hat s=(p_1+p_2)^2=(p_3+...)^2\)
 
double generateVariables () const
 Generate and initialise all variables handled by this process.
 
void setEventContent (const std::unordered_map< Particle::Role, spdgids_t > &)
 Set the incoming and outgoing states to be defined in this process (and prepare the Event object accordingly)
 
double alphaEM (double q) const
 Compute the electromagnetic running coupling algorithm at a given scale.
 
double alphaS (double q) const
 Compute the strong coupling algorithm at a given scale.
 
const std::vector< double > & lastCoordinates () const
 Last coordinates fed.
 
template<typename T >
steer (const std::string &key) const
 Retrieve a parameters as previously steered.
 
template<typename T , typename U >
U steerAs (const std::string &key) const
 Retrieve a recasted parameters as previously steered.
 
std::string steerName () const
 Retrieve module name from parameters.
 
std::string steerPath (const std::string &key) const
 Retrieve a path from common search paths.
 

Protected Attributes

const std::unique_ptr< PhaseSpaceGeneratorpsgen_
 Kinematic variables generator for the phase space coverage.
 
const bool symmetrise_
 
const bool store_alphas_
 
double mp_
 Proton mass, in GeV/c \(^2\).
 
double mp2_
 Squared proton mass, in GeV \(^2\)/c \(^4\).
 
std::unique_ptr< utils::RandomGeneratorrnd_gen_
 Process-local random number generator engine.
 
const std::string name_
 Module unique indexing name.
 
ParametersList params_
 Module parameters.
 

Detailed Description

Definition at line 27 of file FortranFactorisedProcess.h.

Member Enumeration Documentation

◆ Mapping

enum class Mapping
stronginherited
Enumerator
linear 

a linear \({\rm d}x\) mapping

exponential 

an exponential \(\frac{\dot{x}}{x} = \dot{\log x}\) mapping

square 

a square \({\rm d}x^2=2x\cdot\dot{x}\) mapping

power_law 

a power-law mapping inherited from LPAIR

Definition at line 126 of file Process.h.

Constructor & Destructor Documentation

◆ FortranFactorisedProcess()

FortranFactorisedProcess ( const ParametersList params,
const std::function< double(void)> &  func 
)
explicit
Parameters
[in]funca double precision argument-less Fortran function returning the event weight

Definition at line 72 of file FortranFactorisedProcess.cpp.

Member Function Documentation

◆ addEventContent()

void addEventContent ( )
overrideprotectedvirtualinherited

Implements Process.

Reimplemented in MadGraphProcessBuilder.

Definition at line 47 of file FactorisedProcess.cpp.

◆ alphaEM()

double alphaEM ( double  q) const
protectedinherited

Definition at line 350 of file Process.cpp.

◆ alphaS()

double alphaS ( double  q) const
protectedinherited

Definition at line 357 of file Process.cpp.

◆ clear()

void clear ( )
inherited

Definition at line 129 of file Process.cpp.

◆ clearEvent()

void clearEvent ( )
inherited

Definition at line 264 of file Process.cpp.

◆ clone()

ProcessPtr clone ( ) const
overridevirtual

Reimplemented from Process.

Definition at line 32 of file FortranFactorisedProcess.h.

◆ computeWeight()

double computeWeight ( )
overridevirtualinherited

Implements Process.

Definition at line 85 of file FactorisedProcess.cpp.

◆ defineVariable()

Process & defineVariable ( double &  out,
const Mapping type,
const Limits lim,
const std::string &  name,
const std::string &  description = "" 
)
inherited
Note
To be run once per generation (before any point computation)
Parameters
[out]outReference to the variable to be mapped
[in]typeType of mapping to apply
[in]limIntegration limits
[in]nameComputer-readable variable name
[in]descriptionHuman-readable description of the variable

Definition at line 149 of file Process.cpp.

◆ description()

ParametersDescription description ( )
staticinherited

Definition at line 128 of file FactorisedProcess.cpp.

◆ dumpPoint()

void dumpPoint ( std::ostream *  os = nullptr) const
inherited

Definition at line 364 of file Process.cpp.

◆ dumpVariables()

void dumpVariables ( std::ostream *  os = nullptr) const
inherited

Definition at line 137 of file Process.cpp.

◆ event() [1/2]

Event & event ( )
inherited

Definition at line 275 of file Process.cpp.

◆ event() [2/2]

const Event & event ( ) const
inherited

Definition at line 269 of file Process.cpp.

◆ eventPtr()

Event * eventPtr ( )
inherited

Definition at line 281 of file Process.cpp.

◆ fillKinematics()

void fillKinematics ( )
finaloverridevirtualinherited

Implements Process.

Definition at line 93 of file FactorisedProcess.cpp.

◆ generateVariables()

double generateVariables ( ) const
protectedinherited
Returns
Phase space point-dependent component of the Jacobian weight of the point in the phase space for integration
Note
To be run at each point computation (therefore, to be optimised!)

Definition at line 195 of file Process.cpp.

◆ hasEvent()

bool hasEvent ( ) const
inherited

Definition at line 62 of file Process.h.

◆ initialise()

void initialise ( )
inherited

Definition at line 287 of file Process.cpp.

◆ inverseSqrtS()

double inverseSqrtS ( ) const
inherited

Definition at line 109 of file Process.h.

◆ kinematics() [1/2]

Kinematics & kinematics ( )
inherited

Definition at line 51 of file Process.h.

◆ kinematics() [2/2]

const Kinematics & kinematics ( ) const
inherited

Definition at line 50 of file Process.h.

◆ lastCoordinates()

const std::vector< double > & lastCoordinates ( ) const
protectedinherited

Definition at line 163 of file Process.h.

◆ mA()

double mA ( ) const
inherited

Definition at line 69 of file Process.h.

◆ mA2()

double mA2 ( ) const
inherited

Definition at line 68 of file Process.h.

◆ mB()

double mB ( ) const
inherited

Definition at line 72 of file Process.h.

◆ mB2()

double mB2 ( ) const
inherited

Definition at line 71 of file Process.h.

◆ mX()

double mX ( ) const
inherited

Definition at line 75 of file Process.h.

◆ mX2() [1/2]

double & mX2 ( )
inherited

Definition at line 97 of file Process.h.

◆ mX2() [2/2]

double mX2 ( ) const
inherited

Definition at line 74 of file Process.h.

◆ mY()

double mY ( ) const
inherited

Definition at line 78 of file Process.h.

◆ mY2() [1/2]

double & mY2 ( )
inherited

Definition at line 98 of file Process.h.

◆ mY2() [2/2]

double mY2 ( ) const
inherited

Definition at line 77 of file Process.h.

◆ name()

const std::string & name ( ) const
inherited

Definition at line 42 of file NamedModule.h.

◆ ndim()

size_t ndim ( ) const
inherited

Definition at line 60 of file Process.h.

◆ operator!=()

template<typename T >
bool operator!= ( const SteeredObject< T > &  oth) const
inherited

Definition at line 51 of file SteeredObject.h.

◆ operator==()

template<typename T >
bool operator== ( const SteeredObject< T > &  oth) const
inherited

Definition at line 49 of file SteeredObject.h.

◆ pA() [1/2]

Momentum & pA ( )
inherited

Definition at line 89 of file Process.cpp.

◆ pA() [2/2]

const Momentum & pA ( ) const
inherited

Definition at line 91 of file Process.cpp.

◆ parameters()

template<typename T >
const ParametersList & parameters ( ) const
overridevirtualinherited

Reimplemented from Steerable.

Definition at line 54 of file SteeredObject.h.

◆ pB() [1/2]

Momentum & pB ( )
inherited

Definition at line 93 of file Process.cpp.

◆ pB() [2/2]

const Momentum & pB ( ) const
inherited

Definition at line 95 of file Process.cpp.

◆ pc() [1/2]

Momentum & pc ( size_t  i)
inherited

Definition at line 113 of file Process.cpp.

◆ pc() [2/2]

const Momentum & pc ( size_t  i) const
inherited

Definition at line 120 of file Process.cpp.

◆ prepareKinematics()

void prepareKinematics ( )
finaloverrideprotectedvirtualinherited

Reimplemented from Process.

Definition at line 57 of file FactorisedProcess.cpp.

◆ pX() [1/2]

Momentum & pX ( )
inherited

Definition at line 97 of file Process.cpp.

◆ pX() [2/2]

const Momentum & pX ( ) const
inherited

Definition at line 99 of file Process.cpp.

◆ pY() [1/2]

Momentum & pY ( )
inherited

Definition at line 101 of file Process.cpp.

◆ pY() [2/2]

const Momentum & pY ( ) const
inherited

Definition at line 103 of file Process.cpp.

◆ q1() [1/2]

Momentum & q1 ( )
inherited

Definition at line 105 of file Process.cpp.

◆ q1() [2/2]

const Momentum & q1 ( ) const
inherited

Definition at line 107 of file Process.cpp.

◆ q2() [1/2]

Momentum & q2 ( )
inherited

Definition at line 109 of file Process.cpp.

◆ q2() [2/2]

const Momentum & q2 ( ) const
inherited

Definition at line 111 of file Process.cpp.

◆ randomGenerator()

utils::RandomGenerator & randomGenerator ( ) const
inherited

Definition at line 344 of file Process.cpp.

◆ s()

double s ( ) const
inherited

Definition at line 107 of file Process.h.

◆ setDescribedParameters()

template<typename T >
void setDescribedParameters ( const ParametersList params_orig)
inherited

Definition at line 73 of file SteeredObject.h.

◆ setEventContent()

void setEventContent ( const std::unordered_map< Particle::Role, spdgids_t > &  part_ids)
protectedinherited

Definition at line 374 of file Process.cpp.

◆ setKinematics()

void setKinematics ( )
inherited

Definition at line 397 of file Process.cpp.

◆ setParameters()

template<typename T >
virtual void setParameters ( const ParametersList params)
overridevirtualinherited

Reimplemented from Steerable.

Reimplemented in Initial, Remnants, CutsList, IncomingBeams, and Kinematics.

Definition at line 62 of file SteeredObject.h.

◆ shat()

double shat ( ) const
protectedinherited

Definition at line 127 of file Process.cpp.

◆ sqrtS()

double sqrtS ( ) const
inherited

Definition at line 108 of file Process.h.

◆ steer()

template<typename T >
T steer ( const std::string &  key) const
protectedinherited

Definition at line 39 of file Steerable.h.

◆ steerAs()

template<typename T , typename U >
U steerAs ( const std::string &  key) const
protectedinherited

Definition at line 44 of file Steerable.h.

◆ steerName()

std::string steerName ( ) const
protectedinherited

Definition at line 48 of file Steerable.h.

◆ steerPath()

std::string steerPath ( const std::string &  key) const
protectedinherited

Definition at line 30 of file Steerable.cpp.

◆ t1() [1/2]

double & t1 ( )
inherited

Definition at line 99 of file Process.h.

◆ t1() [2/2]

double t1 ( ) const
inherited

Definition at line 81 of file Process.h.

◆ t2() [1/2]

double & t2 ( )
inherited

Definition at line 101 of file Process.h.

◆ t2() [2/2]

double t2 ( ) const
inherited

Definition at line 84 of file Process.h.

◆ that()

double that ( ) const
protectedinherited

Definition at line 124 of file FactorisedProcess.cpp.

◆ uhat()

double uhat ( ) const
protectedinherited

Definition at line 126 of file FactorisedProcess.cpp.

◆ variableValue()

double variableValue ( size_t  i,
double  x 
) const
inherited

Definition at line 190 of file Process.cpp.

◆ wCM()

double wCM ( ) const
inherited

Definition at line 90 of file Process.h.

◆ weight()

double weight ( const std::vector< double > &  x)
inherited

Definition at line 236 of file Process.cpp.

◆ x1() [1/2]

double & x1 ( )
inherited

Definition at line 100 of file Process.h.

◆ x1() [2/2]

double x1 ( ) const
inherited

Definition at line 80 of file Process.h.

◆ x2() [1/2]

double & x2 ( )
inherited

Definition at line 102 of file Process.h.

◆ x2() [2/2]

double x2 ( ) const
inherited

Definition at line 83 of file Process.h.

Member Data Documentation

◆ kProcParameters

ParametersList kProcParameters
static

Definition at line 34 of file FortranFactorisedProcess.h.

◆ mp2_

double mp2_
protectedinherited

Definition at line 122 of file Process.h.

◆ mp_

double mp_
protectedinherited

Definition at line 121 of file Process.h.

◆ name_

const std::string name_
protectedinherited

Definition at line 45 of file NamedModule.h.

◆ params_

ParametersList params_
mutableprotectedinherited

Definition at line 50 of file Steerable.h.

◆ psgen_

const std::unique_ptr<PhaseSpaceGenerator> psgen_
protectedinherited

Definition at line 58 of file FactorisedProcess.h.

◆ rnd_gen_

std::unique_ptr<utils::RandomGenerator> rnd_gen_
protectedinherited

Definition at line 161 of file Process.h.

◆ store_alphas_

const bool store_alphas_
protectedinherited

Definition at line 60 of file FactorisedProcess.h.

◆ symmetrise_

const bool symmetrise_
protectedinherited

Definition at line 59 of file FactorisedProcess.h.