AmpGen 2.1
Loading...
Searching...
No Matches
AmpGen::CoherentSum Class Reference

Detailed Description

An coherent sum of resonant contributions, where at a position in phase-space \(\psi\), the (unnormalised) probability density is given by

\[ \mathcal{P}(\psi) = \left| \sum_{i} g_i \mathcal{A}_i(\psi) \right|^2, \]

where \(\mathcal{P}(\psi)\) is the probability, \(g_i\) is the coupling to an isobar channel, and \(\mathcal{A}_i(\psi)\) is the amplitude of the ith channel.

Definition at line 44 of file CoherentSum.h.

Public Types

using EventList_type = EventList
 

Public Member Functions

 CoherentSum ()
 
 CoherentSum (const EventType &type, const AmpGen::MinuitParameterSet &mps, const std::string &prefix="")
 
virtual ~CoherentSum ()
 
std::string prefix () const
 
auto & operator[] (const size_t &index)
 
auto & operator[] (const size_t &index) const
 
size_t size () const
 
real_t getWeight () const
 
real_t norm (const Bilinears &norms) const
 
real_t norm () const
 
real_t getNorm (const Bilinears &normalisations)
 
complex_t norm (const size_t &x, const size_t &y) const
 
complex_t getVal (const Event &evt) const
 
complex_t getValNoCache (const Event &evt) const
 
void transferParameters ()
 
void prepare ()
 
void printVal (const Event &evt)
 
void updateNorms ()
 
void setWeight (MinuitProxy param)
 
void makeTotalExpression ()
 
void reset (bool resetEvents=false)
 
void setEvents (const EventList_type &list)
 
void setMC (const EventList_type &sim)
 
real_v operator() (const real_v *, const unsigned) const
 
real_t operator() (const Event &evt) const
 
void debug (const Event &evt, const std::string &nameMustContain="")
 
void generateSourceCode (const std::string &fname, const double &normalisation=1, bool add_mt=false)
 
std::vector< FitFractionfitFractions (const LinearErrorPropagator &linProp)
 
auto matrixElements () const
 
std::map< std::string, std::vector< unsigned int > > getGroupedAmplitudes ()
 
Bilinears norms () const
 
std::function< real_t(const Event &)> evaluator (const EventList_type *=nullptr) const
 
std::function< complex_t(const Event &)> amplitudeEvaluator (const EventList_type *=nullptr) const
 
KeyedFunctors< double(Event)> componentEvaluator (const EventList_type *=nullptr) const
 
EventType eventType () const
 
const auto & cache () const
 

Protected Member Functions

void addMatrixElement (std::pair< Particle, TotalCoupling > &particleWithCoupling, const MinuitParameterSet &mps)
 

Protected Attributes

std::vector< MatrixElementm_matrixElements
 Vector of matrix elements.
 
Bilinears m_normalisations
 Normalisation integrals.
 
Integrator m_integrator
 Tool to calculate integrals.
 
const EventList_typem_events = {nullptr}
 Data events to evaluate PDF on.
 
FunctionCache< EventList_type, complex_v, Alignment::AoSm_cache
 Store of intermediate values for the PDF calculation.
 
bool m_ownEvents = {false}
 Flag as to whether events are owned by this PDF or not.
 
EventType m_eventType
 Final state for this amplitude.
 
size_t m_prepareCalls = {0}
 Number of times prepare has been called.
 
size_t m_lastPrint = {0}
 Last time verbose PDF info was printed.
 
size_t m_printFreq = {0}
 Frequency to print verbose PDF info.
 
MinuitProxy m_weight = {nullptr, 1}
 Weight (i.e. the normalised yield)
 
double m_norm = {1}
 Normalisation integral.
 
bool m_isConstant = {false}
 Flag for a constant PDF.
 
bool m_dbThis = {false}
 Flag to generate amplitude level debugging.
 
bool m_verbosity = {false}
 Flag for verbose printing.
 
std::string m_objCache = {""}
 Directory that contains (cached) amplitude objects.
 
std::string m_prefix = {""}
 Prefix for matrix elements.
 
const MinuitParameterSetm_mps = {nullptr}
 
Inheritance diagram for AmpGen::CoherentSum:
AmpGen::IncoherentSum

Member Typedef Documentation

◆ EventList_type

Definition at line 50 of file CoherentSum.h.

Constructor & Destructor Documentation

◆ CoherentSum() [1/2]

AmpGen::CoherentSum::CoherentSum ( )

◆ CoherentSum() [2/2]

AmpGen::CoherentSum::CoherentSum ( const EventType & type,
const AmpGen::MinuitParameterSet & mps,
const std::string & prefix = "" )

◆ ~CoherentSum()

virtual AmpGen::CoherentSum::~CoherentSum ( )
virtual

Member Function Documentation

◆ addMatrixElement()

void AmpGen::CoherentSum::addMatrixElement ( std::pair< Particle, TotalCoupling > & particleWithCoupling,
const MinuitParameterSet & mps )
protected

◆ amplitudeEvaluator()

std::function< complex_t(const Event &)> AmpGen::CoherentSum::amplitudeEvaluator ( const EventList_type * = nullptr) const

◆ cache()

const auto & AmpGen::CoherentSum::cache ( ) const
inline

Definition at line 105 of file CoherentSum.h.

◆ componentEvaluator()

KeyedFunctors< double(Event)> AmpGen::CoherentSum::componentEvaluator ( const EventList_type * = nullptr) const

◆ debug()

void AmpGen::CoherentSum::debug ( const Event & evt,
const std::string & nameMustContain = "" )

◆ evaluator()

std::function< real_t(const Event &)> AmpGen::CoherentSum::evaluator ( const EventList_type * = nullptr) const

◆ eventType()

EventType AmpGen::CoherentSum::eventType ( ) const
inline

Definition at line 104 of file CoherentSum.h.

◆ fitFractions()

std::vector< FitFraction > AmpGen::CoherentSum::fitFractions ( const LinearErrorPropagator & linProp)

◆ generateSourceCode()

void AmpGen::CoherentSum::generateSourceCode ( const std::string & fname,
const double & normalisation = 1,
bool add_mt = false )

◆ getGroupedAmplitudes()

std::map< std::string, std::vector< unsigned int > > AmpGen::CoherentSum::getGroupedAmplitudes ( )

◆ getNorm()

real_t AmpGen::CoherentSum::getNorm ( const Bilinears & normalisations)

◆ getVal()

complex_t AmpGen::CoherentSum::getVal ( const Event & evt) const

◆ getValNoCache()

complex_t AmpGen::CoherentSum::getValNoCache ( const Event & evt) const

◆ getWeight()

real_t AmpGen::CoherentSum::getWeight ( ) const
inline

Definition at line 61 of file CoherentSum.h.

◆ makeTotalExpression()

void AmpGen::CoherentSum::makeTotalExpression ( )

◆ matrixElements()

auto AmpGen::CoherentSum::matrixElements ( ) const
inline

Definition at line 96 of file CoherentSum.h.

◆ norm() [1/3]

real_t AmpGen::CoherentSum::norm ( ) const

◆ norm() [2/3]

real_t AmpGen::CoherentSum::norm ( const Bilinears & norms) const

◆ norm() [3/3]

complex_t AmpGen::CoherentSum::norm ( const size_t & x,
const size_t & y ) const

◆ norms()

Bilinears AmpGen::CoherentSum::norms ( ) const
inline

Definition at line 99 of file CoherentSum.h.

◆ operator()() [1/2]

real_t AmpGen::CoherentSum::operator() ( const Event & evt) const
inline

Definition at line 90 of file CoherentSum.h.

◆ operator()() [2/2]

real_v AmpGen::CoherentSum::operator() ( const real_v * ,
const unsigned  ) const

◆ operator[]() [1/2]

auto & AmpGen::CoherentSum::operator[] ( const size_t & index)
inline

Definition at line 58 of file CoherentSum.h.

◆ operator[]() [2/2]

auto & AmpGen::CoherentSum::operator[] ( const size_t & index) const
inline

Definition at line 59 of file CoherentSum.h.

◆ prefix()

std::string AmpGen::CoherentSum::prefix ( ) const
inline

Definition at line 56 of file CoherentSum.h.

◆ prepare()

void AmpGen::CoherentSum::prepare ( )

◆ printVal()

void AmpGen::CoherentSum::printVal ( const Event & evt)

◆ reset()

void AmpGen::CoherentSum::reset ( bool resetEvents = false)

◆ setEvents()

void AmpGen::CoherentSum::setEvents ( const EventList_type & list)

◆ setMC()

void AmpGen::CoherentSum::setMC ( const EventList_type & sim)

◆ setWeight()

void AmpGen::CoherentSum::setWeight ( MinuitProxy param)
inline

Definition at line 74 of file CoherentSum.h.

◆ size()

size_t AmpGen::CoherentSum::size ( ) const
inline

Definition at line 60 of file CoherentSum.h.

◆ transferParameters()

void AmpGen::CoherentSum::transferParameters ( )

◆ updateNorms()

void AmpGen::CoherentSum::updateNorms ( )

Member Data Documentation

◆ m_cache

FunctionCache<EventList_type, complex_v, Alignment::AoS> AmpGen::CoherentSum::m_cache
protected

Definition at line 112 of file CoherentSum.h.

◆ m_dbThis

bool AmpGen::CoherentSum::m_dbThis = {false}
protected

Definition at line 122 of file CoherentSum.h.

◆ m_events

const EventList_type* AmpGen::CoherentSum::m_events = {nullptr}
protected

Definition at line 111 of file CoherentSum.h.

◆ m_eventType

EventType AmpGen::CoherentSum::m_eventType
protected

Definition at line 115 of file CoherentSum.h.

◆ m_integrator

Integrator AmpGen::CoherentSum::m_integrator
protected

Definition at line 110 of file CoherentSum.h.

◆ m_isConstant

bool AmpGen::CoherentSum::m_isConstant = {false}
protected

Definition at line 121 of file CoherentSum.h.

◆ m_lastPrint

size_t AmpGen::CoherentSum::m_lastPrint = {0}
protected

Definition at line 117 of file CoherentSum.h.

◆ m_matrixElements

std::vector<MatrixElement> AmpGen::CoherentSum::m_matrixElements
protected

Definition at line 107 of file CoherentSum.h.

◆ m_mps

const MinuitParameterSet* AmpGen::CoherentSum::m_mps = {nullptr}
protected

Definition at line 126 of file CoherentSum.h.

◆ m_norm

double AmpGen::CoherentSum::m_norm = {1}
protected

Definition at line 120 of file CoherentSum.h.

◆ m_normalisations

Bilinears AmpGen::CoherentSum::m_normalisations
protected

Definition at line 108 of file CoherentSum.h.

◆ m_objCache

std::string AmpGen::CoherentSum::m_objCache = {""}
protected

Definition at line 124 of file CoherentSum.h.

◆ m_ownEvents

bool AmpGen::CoherentSum::m_ownEvents = {false}
protected

Definition at line 114 of file CoherentSum.h.

◆ m_prefix

std::string AmpGen::CoherentSum::m_prefix = {""}
protected

Definition at line 125 of file CoherentSum.h.

◆ m_prepareCalls

size_t AmpGen::CoherentSum::m_prepareCalls = {0}
protected

Definition at line 116 of file CoherentSum.h.

◆ m_printFreq

size_t AmpGen::CoherentSum::m_printFreq = {0}
protected

Definition at line 118 of file CoherentSum.h.

◆ m_verbosity

bool AmpGen::CoherentSum::m_verbosity = {false}
protected

Definition at line 123 of file CoherentSum.h.

◆ m_weight

MinuitProxy AmpGen::CoherentSum::m_weight = {nullptr, 1}
protected

Definition at line 119 of file CoherentSum.h.


The documentation for this class was generated from the following file: