![]() |
AmpTools
|
#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 &Name="") const |
vector< ParameterInfo * > | parameterList (const string &reactionName="", const string &sumName="", const string &Name="", const string &parName="") const |
ReactionInfo * | reaction (const string &reactionName) const |
CoherentSumInfo * | coherentSum (const string &reactionName, const string &sumName) const |
AmplitudeInfo * | amplitude (const string &reactionName, const string &sumName, const string &Name) const |
ParameterInfo * | parameter (const string &parName) const |
ReactionInfo * | createReaction (const string &reactionName, const vector< string > &particleList) |
CoherentSumInfo * | createCoherentSum (const string &reactionName, const string &sumName) |
AmplitudeInfo * | createAmplitude (const string &reactionName, const string &sumName, const string &Name) |
ParameterInfo * | createParameter (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 &Name="") |
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 |
The ConfigurationInfo class holds four types of objects:
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.
Definition at line 111 of file ConfigurationInfo.h.
|
inline |
The constructor, which takes the name of the fit being done.
Definition at line 118 of file ConfigurationInfo.h.
ConfigurationInfo::~ConfigurationInfo | ( | ) |
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.
Definition at line 208 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaction |
[in] | sumName | the name of the sum |
[in] | ampName | the name of the amplitude |
Definition at line 179 of file ConfigurationInfo.cc.
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.
[in] | reactionName | (optional) the name of the reaction |
[in] | sumName | (optional) the name of the sum |
[in] | ampName | (optional) the name of the amplitude |
Definition at line 105 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaction |
[in] | sumName | the name of the sum |
Definition at line 165 of file ConfigurationInfo.cc.
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.
[in] | reactionName | (optional) the name of the reaction |
[in] | sumName | (optional) the name of the coherent sum |
Definition at line 91 of file ConfigurationInfo.cc.
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.
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.
[in] | reactionName | the name of the reaction for which to create the amplitude |
[in] | sumName | the coherent sum that the amplitude should be added to |
[in] | ampName | the name of amplitude to be created |
Definition at line 255 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaction for which to create the coherent sum |
[in] | sumName | the name of the sum to create |
Definition at line 233 of file ConfigurationInfo.cc.
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.
[in] | parameterName | the name of the parameter to create |
[in] | value | the initial value of the parameter |
Definition at line 284 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaciton to be created |
[in] | particleList | a vector of the strings that identify the particles in the reaction |
Definition at line 217 of file ConfigurationInfo.cc.
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.
[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.
void ConfigurationInfo::display | ( | string | fileName = "" , |
bool | append = false |
||
) |
|
inline |
A function to retreive the fit name.
Definition at line 124 of file ConfigurationInfo.h.
|
inline |
Name of the fit results file.
Definition at line 130 of file ConfigurationInfo.h.
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.
[in] | parName | the name of the parameter |
Definition at line 195 of file ConfigurationInfo.cc.
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.
[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 |
Definition at line 120 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaction |
Definition at line 153 of file ConfigurationInfo.cc.
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.
[in] | reactionName | (optional) the name of the reaction |
Definition at line 77 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaciton |
[in] | sumName | the name of the sum |
[in] | ampName | the name of the amplitude |
Definition at line 345 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaciton |
[in] | sumName | the name of the sum |
Definition at line 326 of file ConfigurationInfo.cc.
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
[in] | parName | the name of the parameter |
Definition at line 371 of file ConfigurationInfo.cc.
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.
[in] | reactionName | the name of the reaciton |
Definition at line 309 of file ConfigurationInfo.cc.
void ConfigurationInfo::removeUserKeyword | ( | const string & | userKeyword = "" | ) |
Remove a user-defined keyword. If userKeyword is not specified, all keywords are removed.
Definition at line 301 of file ConfigurationInfo.cc.
|
inline |
Set the name of a fit.
Definition at line 405 of file ConfigurationInfo.h.
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.
Definition at line 68 of file ConfigurationInfo.cc.
vector< string > ConfigurationInfo::userKeywords | ( | ) | const |
A list of user-defined keywords.
Definition at line 55 of file ConfigurationInfo.cc.
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.
Definition at line 424 of file ConfigurationInfo.cc.
ostream & ConfigurationInfo::write | ( | ostream & | output | ) | const |