AmpTools
ConfigurationInfo Class Reference

#include <ConfigurationInfo.h>

Public Member Functions

 ConfigurationInfo (const string &fitName)
 
 ~ConfigurationInfo ()
 
string fitName () const
 
string fitOutputFileName () const
 
vector< string > userKeywords () const
 
vector< vector< string > > userKeywordArguments (const string &userKeyword) const
 
vector< ReactionInfo * > reactionList (const string &reactionName="") const
 
vector< CoherentSumInfo * > coherentSumList (const string &reactionName="", const string &sumName="") const
 
vector< AmplitudeInfo * > amplitudeList (const string &reactionName="", const string &sumName="", const string &ampName="") const
 
vector< ParameterInfo * > parameterList (const string &reactionName="", const string &sumName="", const string &ampName="", const string &parName="") const
 
ReactionInforeaction (const string &reactionName) const
 
CoherentSumInfocoherentSum (const string &reactionName, const string &sumName) const
 
AmplitudeInfoamplitude (const string &reactionName, const string &sumName, const string &ampName) const
 
ParameterInfoparameter (const string &parName) const
 
ReactionInfocreateReaction (const string &reactionName, const vector< string > &particleList)
 
CoherentSumInfocreateCoherentSum (const string &reactionName, const string &sumName)
 
AmplitudeInfocreateAmplitude (const string &reactionName, const string &sumName, const string &ampName)
 
ParameterInfocreateParameter (const string &parName, double value)
 
void removeReaction (const string &reactionName="")
 
void removeCoherentSum (const string &reactionName="", const string &sumName="")
 
void removeAmplitude (const string &reactionName="", const string &sumName="", const string &ampName="")
 
void removeParameter (const string &parName="")
 
void setFitName (const string &fitName)
 
void addUserKeyword (const string &uesrKeyword, const vector< string > &arguments)
 
void removeUserKeyword (const string &userKeyword="")
 
void display (string fileName="", bool append=false) const
 
void display (string fileName="", bool append=false)
 
void write (const string &fileName) const
 
ostream & write (ostream &output) const
 
map< string, vector< string > > constraintMap () const
 

Detailed Description

The ConfigurationInfo class holds four types of objects:

  1. REACTIONS (ReactionInfo Class)
    • Reactions are uniquely specified by a reaction name.
    • ReactionInfo must contain a vector of particle names. (These are used by the Kinematics class, for example, to keep track of four-vectors.)
    • It also holds instructions for how to read data and MC.
  2. COHERENT SUMS (CoherentSumInfo Class)
    • Coherent sums are uniquely specified by a reaction name and a sum name.
    • Every coherent sum must be associated with an existing reaction.
  3. AMPLITUDES (AmplitudeInfo Class)
    • Amplitudes are uniquely specified by a reaction name, a sum name, and an amplitude name
    • Every amplitude must be associated with an existing reaction and sum.
    • Every amplitude is a product of factors (specified by addFactor).
    • In every amplitude factor (vector<string>), the first element is the amplitude class name, the other elements are passed into the amplitude class as arguments.
  4. PARAMETERS (ParameterInfo Class)
    • Parameters are uniquely specified by the parameter name.
    • Associate parameters with amplitudes using the AmplitudeInfo class (addParameter)
    • These parameters are in addition to production amplitude parameters (which are implied for every amplitude)

Use the ConfigurationInfo class to create instances of the above objects with the createX methods.

Return lists of objects with the xList methods.

The purpose of the ConfigurationInfo class is to organize all information that is necessary to perform an amplitude analysis. It can be setup directly by the user from the provided member functions or, alternatively, created by some tool. Currently the most popular method for setting up the fit configuration is to utilize the provided ConfigFileParser to setup the ConfigurationInfo object from a user-supplied text file. ConfigurationInfo can then be used to configure the AmplitudeManager and the ParameterManager.

See also
reactionList
coherentSumList
amplitudeList
parameterList

Definition at line 111 of file ConfigurationInfo.h.

Constructor & Destructor Documentation

◆ ConfigurationInfo()

ConfigurationInfo::ConfigurationInfo ( const string &  fitName)
inline

The constructor, which takes the name of the fit being done.

Definition at line 118 of file ConfigurationInfo.h.

◆ ~ConfigurationInfo()

ConfigurationInfo::~ConfigurationInfo ( )

Definition at line 48 of file ConfigurationInfo.cc.

Here is the call graph for this function:

Member Function Documentation

◆ addUserKeyword()

void ConfigurationInfo::addUserKeyword ( const string &  uesrKeyword,
const vector< string > &  arguments 
)

Add a user-defined keyword and its arguments. A user-defined keyword can have multiple sets of arguments.

See also
userKeywords
userKeywordArguments
removeUserKeyword

Definition at line 208 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ amplitude()

AmplitudeInfo * ConfigurationInfo::amplitude ( const string &  reactionName,
const string &  sumName,
const string &  ampName 
) const

Similar to amplitudeList above but returns a pointer to a specific amplitude. Note that the pointer is not const. This routine can be used to modify a CoherentSumInfo object in the configuration.

Parameters
[in]reactionNamethe name of the reaction
[in]sumNamethe name of the sum
[in]ampNamethe name of the amplitude
See also
amplitudeList

Definition at line 179 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ amplitudeList()

vector< AmplitudeInfo * > ConfigurationInfo::amplitudeList ( const string &  reactionName = "",
const string &  sumName = "",
const string &  ampName = "" 
) const

This returns a vector of all amplitudes. Optionally the user can restrict the list to those associated with a particular reaction, coherent sum, or having a particular name. Passing in an empty string to any argumentimplies the search will not filter on that argument.

Parameters
[in]reactionName(optional) the name of the reaction
[in]sumName(optional) the name of the sum
[in]ampName(optional) the name of the amplitude
See also
amplitude

Definition at line 105 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ coherentSum()

CoherentSumInfo * ConfigurationInfo::coherentSum ( const string &  reactionName,
const string &  sumName 
) const

Similar to coherentSumList above but returns a pointer to a specific sum. Note that the pointer is not const. This routine can be used to modify a CoherentSumInfo object in the configuration.

Parameters
[in]reactionNamethe name of the reaction
[in]sumNamethe name of the sum
See also
coherentSumList

Definition at line 165 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ coherentSumList()

vector< CoherentSumInfo * > ConfigurationInfo::coherentSumList ( const string &  reactionName = "",
const string &  sumName = "" 
) const

This returns a vector of all coherent sums. Optionally the user can restrict the list to those registered to a particular reaction and with a specific name. Passing in an empty string to either argument implies the search will not filter on that argument.

Parameters
[in]reactionName(optional) the name of the reaction
[in]sumName(optional) the name of the coherent sum
See also
coherentSum

Definition at line 91 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ constraintMap()

map< string, vector< string > > ConfigurationInfo::constraintMap ( ) const

This produces a map where the keys are the names of the amplitudes and the values are vectors of the names of the amplitudes whose production parameters are constrained to be the same as the key amplitude's production parameter.

Definition at line 399 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ createAmplitude()

AmplitudeInfo * ConfigurationInfo::createAmplitude ( const string &  reactionName,
const string &  sumName,
const string &  ampName 
)

A routine to create a new amplitude. This returns a pointer to the amplitude that has been created so it can be further modified. If the amplitude already exists, it will be overwritten with a new amplitude.

Parameters
[in]reactionNamethe name of the reaction for which to create the amplitude
[in]sumNamethe coherent sum that the amplitude should be added to
[in]ampNamethe name of amplitude to be created
See also
removeAmplitude

Definition at line 255 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCoherentSum()

CoherentSumInfo * ConfigurationInfo::createCoherentSum ( const string &  reactionName,
const string &  sumName 
)

A routine to create a new coherent sum. This returns a pointer to the coherent sum that has been created so it can be further modified. If the coherent sum already exists, it will be overwritten with a new coherent sum.

Parameters
[in]reactionNamethe name of the reaction for which to create the coherent sum
[in]sumNamethe name of the sum to create
See also
removeCoherentSum

Definition at line 233 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createParameter()

ParameterInfo * ConfigurationInfo::createParameter ( const string &  parName,
double  value 
)

This creates a new parameter and returns a pointer to the ParameterInfo object for that parameter so it can be further modifed. If the parameter already exists, it will be overwritten with a new parameter.

Parameters
[in]parameterNamethe name of the parameter to create
[in]valuethe initial value of the parameter
See also
removeParameter

Definition at line 284 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createReaction()

ReactionInfo * ConfigurationInfo::createReaction ( const string &  reactionName,
const vector< string > &  particleList 
)

A routine to create a new reaction. This returns a pointer to the reaction that has been created so it can be further modified. If the reaction already exists, it will be overwritten with a new reaction.

Parameters
[in]reactionNamethe name of the reaciton to be created
[in]particleLista vector of the strings that identify the particles in the reaction
See also
removeReaction

Definition at line 217 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display() [1/2]

void ConfigurationInfo::display ( string  fileName = "",
bool  append = false 
) const

This displays a nicely formatted description of the configuration to the screen (when no arguments are specified) or prints to a file named by the first argument. If the second argument is set to true the configuration info will be appeneded to the file.

Parameters
[in]fileName(optional) name of file to write info
[in]append(optional) set to true to append to the file, default is to overwrite the file

Definition at line 604 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display() [2/2]

void ConfigurationInfo::display ( string  fileName = "",
bool  append = false 
)

Definition at line 618 of file ConfigurationInfo.cc.

Here is the call graph for this function:

◆ fitName()

string ConfigurationInfo::fitName ( ) const
inline

A function to retreive the fit name.

Definition at line 124 of file ConfigurationInfo.h.

Here is the caller graph for this function:

◆ fitOutputFileName()

string ConfigurationInfo::fitOutputFileName ( ) const
inline

Name of the fit results file.

Definition at line 130 of file ConfigurationInfo.h.

Here is the caller graph for this function:

◆ parameter()

ParameterInfo * ConfigurationInfo::parameter ( const string &  parName) const

Similar to parameterList above but returns a pointer to a specific parameter. Note that the pointer is not const. This routine can be used to modify a ParameterInfo object in the configuration.

Parameters
[in]parNamethe name of the parameter
See also
parameterList

Definition at line 195 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ parameterList()

vector< ParameterInfo * > ConfigurationInfo::parameterList ( const string &  reactionName = "",
const string &  sumName = "",
const string &  ampName = "",
const string &  parName = "" 
) const

This returns a vector of all parameters. The user can optionally restrict the list to those associated with a particular reaction, coherent sum, amplitude, or having a particular name. Passing in an empty string to any argumentimplies the search will not filter on that argument.

Parameters
[in]reactionName(optional) the name of the reaction
[in]sumName(optional) the name of the sum
[in]ampName(optional) the name of the amplitude
[in]parName(optional) the name of the parameter
See also
parameter

Definition at line 120 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ reaction()

ReactionInfo * ConfigurationInfo::reaction ( const string &  reactionName) const

Similar to reactionList above but returns a pointer to a specific reaction. Note that the pointer is not const. This routine can be used to modify a ReactionInfo object in the configuration.

Parameters
[in]reactionNamethe name of the reaction
See also
reactionList

Definition at line 153 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ reactionList()

vector< ReactionInfo * > ConfigurationInfo::reactionList ( const string &  reactionName = "") const

This returns a vector of all registered reactions (ReactionInfo) objects when called without an argument. With an argument it returns a vector containg just those reactions that match the reaction name. Note that the list does not contain const pointers so the reactions themselves may be modified.

Parameters
[in]reactionName(optional) the name of the reaction
See also
reaction

Definition at line 77 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ removeAmplitude()

void ConfigurationInfo::removeAmplitude ( const string &  reactionName = "",
const string &  sumName = "",
const string &  ampName = "" 
)

This removes an amplitude or amplitudes that are matched to the arguments. Passing in a null string to a particular argument will match all instances of that argument (like a wildcard). The null string is the default argument for all parameters.

Parameters
[in]reactionNamethe name of the reaciton
[in]sumNamethe name of the sum
[in]ampNamethe name of the amplitude
See also
createAmplitude

Definition at line 345 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCoherentSum()

void ConfigurationInfo::removeCoherentSum ( const string &  reactionName = "",
const string &  sumName = "" 
)

This removes a coherent sum or sums that are matched to the arguments. Passing in a null string to a particular argument will match all instances of that argument (like a wildcard). The null string is the default argument for all parameters.

Parameters
[in]reactionNamethe name of the reaciton
[in]sumNamethe name of the sum
See also
createCoherentSum

Definition at line 326 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeParameter()

void ConfigurationInfo::removeParameter ( const string &  parName = "")

This removes an a parameter or parameters matched to the arguments. Passing in a null string to a particular argument will match all instances of that argument (like a wildcard). The null string is the default argument for all parameters

Parameters
[in]parNamethe name of the parameter
See also
createParameter

Definition at line 371 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeReaction()

void ConfigurationInfo::removeReaction ( const string &  reactionName = "")

This removes a reaction or reactions that are matched to the arguments. Passing in a null string to a particular argument will match all instances of that argument (like a wildcard). The null string is the default argument for all parameters.

Parameters
[in]reactionNamethe name of the reaciton
See also
createReaction

Definition at line 309 of file ConfigurationInfo.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeUserKeyword()

void ConfigurationInfo::removeUserKeyword ( const string &  userKeyword = "")

Remove a user-defined keyword. If userKeyword is not specified, all keywords are removed.

See also
userKeywords
userKeywordArguments
addUserKeyword

Definition at line 301 of file ConfigurationInfo.cc.

◆ setFitName()

void ConfigurationInfo::setFitName ( const string &  fitName)
inline

Set the name of a fit.

Definition at line 405 of file ConfigurationInfo.h.

◆ userKeywordArguments()

vector< vector< string > > ConfigurationInfo::userKeywordArguments ( const string &  userKeyword) const

A list of arguments (in the form of vector<string>) associated with a given user-defined keyword.

See also
userKeywords
addUserKeyword
removeUserKeyword

Definition at line 68 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ userKeywords()

vector< string > ConfigurationInfo::userKeywords ( ) const

A list of user-defined keywords.

See also
userKeywordArguments
addUserKeyword
removeUserKeyword

Definition at line 55 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ write() [1/2]

void ConfigurationInfo::write ( const string &  fileName) const

This writes the current status of this ConfigurationInfo to a file. The output can be parsed by a ConfigFileParser object to recreate this ConfigurationInfo object.

See also
ConfigFileParser

Definition at line 424 of file ConfigurationInfo.cc.

Here is the caller graph for this function:

◆ write() [2/2]

ostream & ConfigurationInfo::write ( ostream &  output) const

Definition at line 432 of file ConfigurationInfo.cc.

Here is the call graph for this function:

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