YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
Model Class Reference

Class implementing a PWA model. More...

#include <Model.h>

Public Member Functions

 Model (std::unique_ptr< SpinAmplitudeCache > SAC, bool include_phsp_factors=true)
 
 Model (const Model &)=delete
 
Modeloperator= (const Model &)=delete
 
 Model (Model &&)=delete
 
Modeloperator= (Model &&)=delete
 
void calculate (DataPartition &D) const
 
virtual bool consistent () const
 Check consistency of object.
 
bool locked () const
 
void lock ()
 
void requireHelicityAngles ()
 tell model to calculate and store helicity angles
 
void requireMeasuredBreakupMomenta ()
 tell model to calculate and store measured breakup momenta
 
DataSet createDataSet (size_t n=0)
 
void setParameterFlagsToUnchanged ()
 Set VariableStatus'es of all Parameter's to unchanged, or leave as fixed.
 
void printDataAccessors (bool printParticleCombinations=true) const
 Print the list of DataAccessor's.
 
void printFlags (const StatusManager &sm) const
 Print all VariableStatus'es and CalculationStatus'es.
 
Getters
const bool includePhaseSpaceFactors () const
 
const CoordinateSystem< double, 3 > & coordinateSystem () const
 
std::shared_ptr< FourMomentafourMomenta ()
 
const std::shared_ptr
< FourMomenta
fourMomenta () const
 
std::shared_ptr
< MeasuredBreakupMomenta
measuredBreakupMomenta ()
 
const std::shared_ptr
< MeasuredBreakupMomenta
measuredBreakupMomenta () const
 
std::shared_ptr< HelicityAngleshelicityAngles ()
 
const std::shared_ptr
< HelicityAngles
helicityAngles () const
 
ParticleCombinationCacheparticleCombinationCache ()
 
const ParticleCombinationCacheparticleCombinationCache () const
 
SpinAmplitudeCachespinAmplitudeCache ()
 
const SpinAmplitudeCachespinAmplitudeCache () const
 
const FinalStateParticleVector & finalStateParticles () const
 
const InitialStateParticleMap & initialStateParticles () const
 
const DataAccessorSet & dataAccessors () const
 
Setters
void setFinalState (const FinalStateParticleVector &FSP)
 
template<typename... Types>
void setFinalState (Types...FSPs)
 
const
InitialStateParticleMap::value_type & 
addInitialStateParticle (std::shared_ptr< DecayingParticle > bg)
 
void setFinalStateMomenta (DataPoint &d, const std::vector< FourVector< double > > &P, StatusManager &sm) const
 
void setCoordinateSystem (const CoordinateSystem< double, 3 > &cs)
 set coordinate system
 
void setIncludePhaseSpaceFactors (bool b)
 turn on/off inclusion of phase-space factors
 
Monte Carlo Generation
const MassAxes massAxes (std::vector< std::vector< unsigned > > pcs={})
 

Protected Member Functions

virtual void addParticleCombination (std::shared_ptr< ParticleCombination > pc)
 

Private Attributes

bool Locked_
 
CoordinateSystem< double, 3 > CoordinateSystem_
 Lab coordinate system to use in calculating helicity angles.
 
bool IncludePhaseSpaceFactors_
 whether to include phase-space factors
 
ParticleCombinationCache ParticleCombinationCache_
 ParticleCombination cache.
 
std::unique_ptr
< SpinAmplitudeCache
SpinAmplitudeCache_
 SpinAmplitude cache.
 
DataAccessorSet DataAccessors_
 Set of all DataAccessor's registered to this model.
 
StaticDataAccessorVector StaticDataAccessors_
 
RecalculableDataAccessorSet RecalculableDataAccessors_
 set of pointers to RecalculableDataAccessors
 
InitialStateParticleMap InitialStateParticles_
 
FinalStateParticleVector FinalStateParticles_
 vector of final state particles
 
std::shared_ptr< FourMomentaFourMomenta_
 four momenta manager
 
std::shared_ptr
< MeasuredBreakupMomenta
MeasuredBreakupMomenta_
 Breakup momenta manager.
 
std::shared_ptr< HelicityAnglesHelicityAngles_
 helicity angles manager
 

Friends

class DataAccessor
 grant friend status to DataAccessor to register itself with this
 
class RecalculableDataAccessor
 grant friend status to DataAccessor to register itself with this
 
class StaticDataAccessor
 grant friend status to DataAccessor to register itself with this
 
class DecayingParticle
 grant friend status to DecayingParticle to call addParticleCombination
 

Detailed Description

Class implementing a PWA model.

Author
Johannes Rauch, Daniel Greenwald

Constructor & Destructor Documentation

Model ( std::unique_ptr< SpinAmplitudeCache SAC,
bool  include_phsp_factors = true 
)

Constructor

Parameters
SACunique_ptr to SpinAmplitudeCache
include_phsp_factorswhether to include phase-space factors in amplitudes
Model ( const Model )
delete

copy constructor deleted

Todo:
Implement deep copy.
Model ( Model &&  )
delete

move constructor

Todo:
Implement move construction.

Member Function Documentation

const InitialStateParticleMap::value_type & addInitialStateParticle ( std::shared_ptr< DecayingParticle bg)

add an initial state particle The first particle added that decays to the full final state will become THE initial state particle, which can be retrieved by calling #initialStateParticle, and its amplitude will be fixed

void addParticleCombination ( std::shared_ptr< ParticleCombination pc)
protectedvirtual

add ParticleCombination to to FourMomenta_, HelicityAngles_, and MeasuredBreakupMomenta_ (along with it's daughters through recursive calling) if it is NOT for a FSP.

void calculate ( DataPartition D) const

Calculate model for each data point in the data partition

Parameters
DDataPartition to calculate over
Todo:
This need not be a member function!
const CoordinateSystem<double, 3>& coordinateSystem ( ) const
inline
Returns
coordinate system (const)
DataSet createDataSet ( size_t  n = 0)

create an empty data set

Parameters
nNumber of empty data points to place inside data set
const DataAccessorSet& dataAccessors ( ) const
inline
Returns
set of DataAccessors
const FinalStateParticleVector& finalStateParticles ( ) const
inline
Returns
vector of shared pointers to final state particles
std::shared_ptr<FourMomenta> fourMomenta ( )
inline
Returns
FourMomenta accessor
const std::shared_ptr<FourMomenta> fourMomenta ( ) const
inline
Returns
FourMomenta accessor (const)
std::shared_ptr<HelicityAngles> helicityAngles ( )
inline
Returns
HelicityAngles accessor is nullptr if not using helicity formalism
const std::shared_ptr<HelicityAngles> helicityAngles ( ) const
inline
Returns
HelicityAngles accessor (const) is nullptr if not using helicity formalism
const bool includePhaseSpaceFactors ( ) const
inline
Returns
IncludePhaseSpaceFactors_
const InitialStateParticleMap& initialStateParticles ( ) const
inline
Returns
InitialStateParticles_
void lock ( void  )

prepare model and mark as locked: removes expired DataAccessor's, prune's remaining, and assigns them indices; fixes amplitudes that needn't be free

bool locked ( ) const
inline
Returns
whether model has been locked
const MassAxes massAxes ( std::vector< std::vector< unsigned > >  pcs = {})

Build vector of mass axes for coordinates in phase space. Currently only supports two-particle masses. if argument is left empty, a default set of axes is constructed

Returns
MassAxes for requested particle combinations
Parameters
pcsvector of vectors of particle indices
Todo:
Find way to make const.
std::shared_ptr<MeasuredBreakupMomenta> measuredBreakupMomenta ( )
inline
Returns
MeasuredBreakupMomenta accessor
const std::shared_ptr<MeasuredBreakupMomenta> measuredBreakupMomenta ( ) const
inline
Returns
MeasuredBreakupMomenta accessor (const)
Model& operator= ( const Model )
delete

copy assignment operator

Todo:
Implement deep copy assignment.
Model& operator= ( Model &&  )
delete

move assignment operator

Todo:
Implement move assignment.
ParticleCombinationCache& particleCombinationCache ( )
inline
const ParticleCombinationCache& particleCombinationCache ( ) const
inline
Returns
ParticleCombinationCache (const)
void setFinalState ( const FinalStateParticleVector &  FSP)

Set final-state particle content. The order in which particles are given dictates the order in which four-momenta must be given in data points. The FinalStateParticle's have their Model pointer set to this

Parameters
FSPvector of shared pointers to final-state particles
void setFinalState ( Types...  FSPs)
inline

Set final-state particle content. The order in which particles are given dictates the order in which four-momenta must be given in data points. The FinalStateParticle's have their Model pointer set to this

Parameters
FSPsshared pointers to final-state particles
void setFinalStateMomenta ( DataPoint d,
const std::vector< FourVector< double > > &  P,
StatusManager sm 
) const

set four momenta of data point

Parameters
Pvector of FourVectors of final-state momenta
smStatusManager to update
SpinAmplitudeCache* spinAmplitudeCache ( )
inline
const SpinAmplitudeCache* spinAmplitudeCache ( ) const
inline
Returns
SpinAmplitudeCache (const)

Member Data Documentation

InitialStateParticleMap InitialStateParticles_
private

pointers to initial particles they will be summed in incoherently

bool Locked_
private

stores whether model structure can be modified (whether DataAccessors can be added or not)

StaticDataAccessorVector StaticDataAccessors_
private

Vector of raw pointers to all StaticDataAccessor's registered to this model, in order in which they need be calculated


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