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

Class template to define any process to compute using this MC integrator/events generator. More...

#include <CepGen/Process/Process.h>

+ Inheritance diagram for Process:
+ Collaboration diagram for Process:

Public Types

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

Public Member Functions

 Process (const ParametersList &)
 
 Process (const Process &)
 Copy constructor for a user process.
 
virtual ~Process ()=default
 
Processoperator= (const Process &)
 Assignment operator.
 
virtual std::unique_ptr< Processclone () const
 Copy all process attributes into a new object.
 
virtual double computeWeight ()=0
 Compute the phase space point weight.
 
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.
 
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.
 
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.
 
double mX2 () const
 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.
 
double mY2 () const
 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 t1 () const
 Positive-z incoming parton's squared mass.
 
const Momentumq1 () const
 Positive-z incoming parton's 4-momentum.
 
double x2 () const
 Negative-z incoming parton's fractional momentum.
 
double t2 () const
 Negative-z incoming parton's squared mass.
 
const Momentumq2 () const
 Negative-z incoming parton's 4-momentum.
 
Momentumq1 ()
 Positive-z incoming parton's 4-momentum.
 
Momentumq2 ()
 Negative-z incoming parton's 4-momentum.
 
double wCM () const
 Two-parton centre of mass energy.
 
MomentumpA ()
 Positive-z incoming beam particle's 4-momentum.
 
MomentumpB ()
 Negative-z incoming beam particle's 4-momentum.
 
MomentumpX ()
 Positive-z outgoing beam particle's 4-momentum.
 
MomentumpY ()
 Negative-z outgoing beam particle's 4-momentum.
 
double & mX2 ()
 Positive-z outgoing beam particle's squared mass.
 
double & mY2 ()
 Negative-z outgoing beam particle's squared mass.
 
double & t1 ()
 Positive-z incoming parton's squared mass.
 
double & x1 ()
 Positive-z incoming parton's fractional momentum.
 
double & t2 ()
 Negative-z incoming parton's squared mass.
 
double & x2 ()
 Negative-z incoming parton's fractional momentum.
 
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 ()
 

Protected Member Functions

virtual void addEventContent ()=0
 Set the incoming and outgoing state to be expected in the process.
 
virtual void prepareKinematics ()
 Compute the incoming state kinematics.
 
virtual void fillKinematics ()=0
 Fill the Event object with the particles' kinematics.
 
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

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.
 

Friends

class utils::ProcessVariablesAnalyser
 
std::ostream & operator<< (std::ostream &, const Mapping &)
 Human-friendly printout of the mapping type.
 

Detailed Description

Author
Laurent Forthomme laure.nosp@m.nt.f.nosp@m.ortho.nosp@m.mme@.nosp@m.cern..nosp@m.ch
Date
Jan 2014

Definition at line 34 of file Process.h.

Member Enumeration Documentation

◆ Mapping

enum class Mapping
strong
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

◆ Process() [1/2]

Process ( const ParametersList params)
explicit

Definition at line 47 of file Process.cpp.

◆ Process() [2/2]

Process ( const Process proc)

Definition at line 58 of file Process.cpp.

◆ ~Process()

virtual ~Process ( )
virtualdefault

Member Function Documentation

◆ addEventContent()

virtual void addEventContent ( )
protectedpure virtual

◆ alphaEM()

double alphaEM ( double  q) const
protected

Definition at line 350 of file Process.cpp.

◆ alphaS()

double alphaS ( double  q) const
protected

Definition at line 357 of file Process.cpp.

◆ clear()

void clear ( )

Definition at line 129 of file Process.cpp.

◆ clearEvent()

void clearEvent ( )

Definition at line 264 of file Process.cpp.

◆ clone()

std::unique_ptr< Process > clone ( ) const
virtual

Reimplemented in FortranFactorisedProcess, MadGraphProcessBuilder, LPAIR, PPtoFF, and PPtoWW.

Definition at line 85 of file Process.cpp.

◆ computeWeight()

virtual double computeWeight ( )
pure virtual

Implemented in FactorisedProcess, and LPAIR.

◆ defineVariable()

Process & defineVariable ( double &  out,
const Mapping type,
const Limits lim,
const std::string &  name,
const std::string &  description = "" 
)
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 ( )
static

Definition at line 407 of file Process.cpp.

◆ dumpPoint()

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

Definition at line 364 of file Process.cpp.

◆ dumpVariables()

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

Definition at line 137 of file Process.cpp.

◆ event() [1/2]

Event & event ( )

Definition at line 275 of file Process.cpp.

◆ event() [2/2]

const Event & event ( ) const

Definition at line 269 of file Process.cpp.

◆ eventPtr()

Event * eventPtr ( )

Definition at line 281 of file Process.cpp.

◆ fillKinematics()

virtual void fillKinematics ( )
protectedpure virtual

Implemented in LPAIR, and FactorisedProcess.

◆ generateVariables()

double generateVariables ( ) const
protected
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

Definition at line 62 of file Process.h.

◆ initialise()

void initialise ( )

Definition at line 287 of file Process.cpp.

◆ inverseSqrtS()

double inverseSqrtS ( ) const

Definition at line 109 of file Process.h.

◆ kinematics() [1/2]

Kinematics & kinematics ( )

Definition at line 51 of file Process.h.

◆ kinematics() [2/2]

const Kinematics & kinematics ( ) const

Definition at line 50 of file Process.h.

◆ lastCoordinates()

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

Definition at line 163 of file Process.h.

◆ mA()

double mA ( ) const

Definition at line 69 of file Process.h.

◆ mA2()

double mA2 ( ) const

Definition at line 68 of file Process.h.

◆ mB()

double mB ( ) const

Definition at line 72 of file Process.h.

◆ mB2()

double mB2 ( ) const

Definition at line 71 of file Process.h.

◆ mX()

double mX ( ) const

Definition at line 75 of file Process.h.

◆ mX2() [1/2]

double & mX2 ( )

Definition at line 97 of file Process.h.

◆ mX2() [2/2]

double mX2 ( ) const

Definition at line 74 of file Process.h.

◆ mY()

double mY ( ) const

Definition at line 78 of file Process.h.

◆ mY2() [1/2]

double & mY2 ( )

Definition at line 98 of file Process.h.

◆ mY2() [2/2]

double mY2 ( ) const

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

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=()

Process & operator= ( const Process proc)

Definition at line 60 of file Process.cpp.

◆ 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 ( )

Definition at line 89 of file Process.cpp.

◆ pA() [2/2]

const Momentum & pA ( ) const

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 ( )

Definition at line 93 of file Process.cpp.

◆ pB() [2/2]

const Momentum & pB ( ) const

Definition at line 95 of file Process.cpp.

◆ pc() [1/2]

Momentum & pc ( size_t  i)

Definition at line 113 of file Process.cpp.

◆ pc() [2/2]

const Momentum & pc ( size_t  i) const

Definition at line 120 of file Process.cpp.

◆ prepareKinematics()

virtual void prepareKinematics ( )
protectedvirtual

Reimplemented in LPAIR, and FactorisedProcess.

Definition at line 115 of file Process.h.

◆ pX() [1/2]

Momentum & pX ( )

Definition at line 97 of file Process.cpp.

◆ pX() [2/2]

const Momentum & pX ( ) const

Definition at line 99 of file Process.cpp.

◆ pY() [1/2]

Momentum & pY ( )

Definition at line 101 of file Process.cpp.

◆ pY() [2/2]

const Momentum & pY ( ) const

Definition at line 103 of file Process.cpp.

◆ q1() [1/2]

Momentum & q1 ( )

Definition at line 105 of file Process.cpp.

◆ q1() [2/2]

const Momentum & q1 ( ) const

Definition at line 107 of file Process.cpp.

◆ q2() [1/2]

Momentum & q2 ( )

Definition at line 109 of file Process.cpp.

◆ q2() [2/2]

const Momentum & q2 ( ) const

Definition at line 111 of file Process.cpp.

◆ randomGenerator()

utils::RandomGenerator & randomGenerator ( ) const

Definition at line 344 of file Process.cpp.

◆ s()

double s ( ) const

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)
protected

Definition at line 374 of file Process.cpp.

◆ setKinematics()

void setKinematics ( )

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
protected

Definition at line 127 of file Process.cpp.

◆ sqrtS()

double sqrtS ( ) const

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 ( )

Definition at line 99 of file Process.h.

◆ t1() [2/2]

double t1 ( ) const

Definition at line 81 of file Process.h.

◆ t2() [1/2]

double & t2 ( )

Definition at line 101 of file Process.h.

◆ t2() [2/2]

double t2 ( ) const

Definition at line 84 of file Process.h.

◆ variableValue()

double variableValue ( size_t  i,
double  x 
) const

Definition at line 190 of file Process.cpp.

◆ wCM()

double wCM ( ) const

Definition at line 90 of file Process.h.

◆ weight()

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

Definition at line 236 of file Process.cpp.

◆ x1() [1/2]

double & x1 ( )

Definition at line 100 of file Process.h.

◆ x1() [2/2]

double x1 ( ) const

Definition at line 80 of file Process.h.

◆ x2() [1/2]

double & x2 ( )

Definition at line 102 of file Process.h.

◆ x2() [2/2]

double x2 ( ) const

Definition at line 83 of file Process.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Mapping type 
)
friend

Definition at line 420 of file Process.cpp.

◆ utils::ProcessVariablesAnalyser

friend class utils::ProcessVariablesAnalyser
friend

Definition at line 196 of file Process.h.

Member Data Documentation

◆ mp2_

double mp2_
protected

Definition at line 122 of file Process.h.

◆ mp_

double mp_
protected

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.

◆ rnd_gen_

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

Definition at line 161 of file Process.h.