YAP
|
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 | |
Model & | operator= (const Model &)=delete |
Model (Model &&)=delete | |
Model & | operator= (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< FourMomenta > | fourMomenta () |
const std::shared_ptr < FourMomenta > | fourMomenta () const |
std::shared_ptr < MeasuredBreakupMomenta > | measuredBreakupMomenta () |
const std::shared_ptr < MeasuredBreakupMomenta > | measuredBreakupMomenta () const |
std::shared_ptr< HelicityAngles > | helicityAngles () |
const std::shared_ptr < HelicityAngles > | helicityAngles () const |
ParticleCombinationCache & | particleCombinationCache () |
const ParticleCombinationCache & | particleCombinationCache () const |
SpinAmplitudeCache * | spinAmplitudeCache () |
const SpinAmplitudeCache * | spinAmplitudeCache () 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< FourMomenta > | FourMomenta_ |
four momenta manager | |
std::shared_ptr < MeasuredBreakupMomenta > | MeasuredBreakupMomenta_ |
Breakup momenta manager. | |
std::shared_ptr< HelicityAngles > | HelicityAngles_ |
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 | |
Class implementing a PWA model.
Model | ( | std::unique_ptr< SpinAmplitudeCache > | SAC, |
bool | include_phsp_factors = true |
||
) |
Constructor
SAC | unique_ptr to SpinAmplitudeCache |
include_phsp_factors | whether to include phase-space factors in amplitudes |
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
|
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
D | DataPartition to calculate over |
|
inline |
DataSet createDataSet | ( | size_t | n = 0 | ) |
create an empty data set
n | Number of empty data points to place inside data set |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
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
|
inline |
const MassAxes massAxes | ( | std::vector< std::vector< unsigned > > | pcs = {} | ) |
|
inline |
|
inline |
copy assignment operator
|
inline |
|
inline |
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
FSP | vector of shared pointers to final-state particles |
|
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
FSPs | shared pointers to final-state particles |
void setFinalStateMomenta | ( | DataPoint & | d, |
const std::vector< FourVector< double > > & | P, | ||
StatusManager & | sm | ||
) | const |
set four momenta of data point
P | vector of FourVectors of final-state momenta |
sm | StatusManager to update |
|
inline |
|
inline |
|
private |
pointers to initial particles they will be summed in incoherently
|
private |
stores whether model structure can be modified (whether DataAccessors can be added or not)
|
private |
Vector of raw pointers to all StaticDataAccessor's registered to this model, in order in which they need be calculated