![]() |
AmpTools
|
#include <AmpToolsInterface.h>
Public Types | |
enum | FunctionalityFlag { kFull, kMCGeneration, kPlotGeneration } |
Public Member Functions | |
AmpToolsInterface (FunctionalityFlag flag=kFull) | |
AmpToolsInterface (ConfigurationInfo *cfgInfo, FunctionalityFlag flag=kFull) | |
virtual | ~AmpToolsInterface () |
void | resetConfigurationInfo (ConfigurationInfo *cfgInfo) |
ConfigurationInfo * | configurationInfo () const |
MinuitMinimizationManager * | minuitMinimizationManager () const |
ParameterManager * | parameterManager () const |
IntensityManager * | intensityManager (const string &reactionName) const |
DataReader * | dataReader (const string &reactionName) const |
DataReader * | bkgndReader (const string &reactionName) const |
DataReader * | accMCReader (const string &reactionName) const |
DataReader * | genMCReader (const string &reactionName) const |
NormIntInterface * | normIntInterface (const string &reactionName) const |
const FitResults * | fitResults () const |
LikelihoodCalculator * | likelihoodCalculator (const string &reactionName) const |
double | likelihood () const |
double | likelihood (const string &reactionName) const |
virtual void | finalizeFit () |
void | clearEvents (unsigned int iDataSet=0) |
void | loadEvents (DataReader *dataReader, unsigned int iDataSet=0) |
void | loadEvent (Kinematics *kin, int iEvent=0, int nEventsTotal=1, unsigned int iDataSet=0) |
double | processEvents (string reactionName, unsigned int iDataSet=0) |
int | numEvents (unsigned int iDataSet=0) const |
double | intensity (int iEvent, unsigned int iDataSet=0) const |
double | alternateIntensity (int iEvent, unsigned int iDataSet=0) const |
complex< double > | decayAmplitude (int iEvent, string ampName, unsigned int iDataSet=0) const |
complex< double > | scaledProductionAmplitude (string ampName, unsigned int iDataSet=0) const |
Kinematics * | kinematics (int iEvent, unsigned int iDataSet=0) |
void | printKinematics (string reactionName, Kinematics *kin) const |
void | printAmplitudes (string reactionName, Kinematics *kin) const |
void | printIntensity (string reactionName, Kinematics *kin) const |
void | printEventDetails (string reactionName, Kinematics *kin) const |
Static Public Member Functions | |
static void | registerAmplitude (const Amplitude &defaultAmplitude) |
static void | registerDataReader (const DataReader &defaultDataReader) |
Protected Member Functions | |
AmpToolsInterface (const AmpToolsInterface &ati) | |
AmpToolsInterface & | operator= (AmpToolsInterface &ati) |
void | clear () |
Protected Attributes | |
FunctionalityFlag | m_functionality |
ConfigurationInfo * | m_configurationInfo |
MinuitMinimizationManager * | m_minuitMinimizationManager |
ParameterManager * | m_parameterManager |
vector< IntensityManager * > | m_intensityManagers |
map< string, DataReader * > | m_dataReaderMap |
map< string, DataReader * > | m_bkgndReaderMap |
map< string, DataReader * > | m_genMCReaderMap |
map< string, DataReader * > | m_accMCReaderMap |
map< string, NormIntInterface * > | m_normIntMap |
map< string, LikelihoodCalculator * > | m_likCalcMap |
AmpVecs | m_ampVecs [MAXAMPVECS] |
string | m_ampVecsReactionName [MAXAMPVECS] |
FitResults * | m_fitResults |
Static Protected Attributes | |
static vector< Amplitude * > | m_userAmplitudes |
static vector< DataReader * > | m_userDataReaders |
static const int | MAXAMPVECS = 50 |
A class to set up and interface with other classes within IUAmpTools.
The constructor takes a pointer to a ConfigurationInfo object; from there, all the major classes of IUAmpTools are configured and can be directly accessed via (non-const) pointers through member functions.
To reconfigure the AmpToolsInterface class with a new ConfigurationInfo object, use the resetConfigurationInfo method. This will recreate all the major classes of IUAmpTools.
Methods such as loadEvents, processEvents, decayAmplitude, and intensity are provided to perform calculations manually, which can be useful when generating Monte Carlo, for example.
For MPI implementations, use the AmpToolsInterfaceMPI class, which is derived from this class.
Definition at line 86 of file AmpToolsInterface.h.
Enumerator | |
---|---|
kFull | |
kMCGeneration | |
kPlotGeneration |
Definition at line 90 of file AmpToolsInterface.h.
AmpToolsInterface::AmpToolsInterface | ( | FunctionalityFlag | flag = kFull | ) |
Definition at line 55 of file AmpToolsInterface.cc.
AmpToolsInterface::AmpToolsInterface | ( | ConfigurationInfo * | cfgInfo, |
FunctionalityFlag | flag = kFull |
||
) |
Constructor. Constructs an AmpToolsInterface
[in] | cfgInfo | a pointer to a ConfigurationInfo object; IUAmpTools classes are set up and configured based on the information contained in this ConfigurationInfo object. |
Definition at line 66 of file AmpToolsInterface.cc.
|
inlinevirtual |
Destructor.
Definition at line 107 of file AmpToolsInterface.h.
|
protected |
DataReader * AmpToolsInterface::accMCReader | ( | const string & | reactionName | ) | const |
Returns a pointer to a DataReader (for accepted Monte Carlo). There is one for each reaction.
Definition at line 324 of file AmpToolsInterface.cc.
double AmpToolsInterface::alternateIntensity | ( | int | iEvent, |
unsigned int | iDataSet = 0 |
||
) | const |
Perform an alternate calculation of the intensity. If there are no precision problems, this should be identical to the value returned by the intensity method. This requires a prior call to processEvents.
Definition at line 555 of file AmpToolsInterface.cc.
DataReader * AmpToolsInterface::bkgndReader | ( | const string & | reactionName | ) | const |
Returns a pointer to a DataReader (for background). There is one for each reaction.
Definition at line 309 of file AmpToolsInterface.cc.
|
protected |
Definition at line 367 of file AmpToolsInterface.cc.
void AmpToolsInterface::clearEvents | ( | unsigned int | iDataSet = 0 | ) |
For manual calculations: clear all events and calculations. Call this before loading events from a new reaction or to start new calcuations.
[in] | iDataSet | used to index simultaneous manual calculations |
Definition at line 405 of file AmpToolsInterface.cc.
|
inline |
Return the ConfigurationInfo object stored in this class. After modifying this object, one can use the resetConfigurationInfo method to re-initialize the IUAmpTools classes.
Definition at line 135 of file AmpToolsInterface.h.
DataReader * AmpToolsInterface::dataReader | ( | const string & | reactionName | ) | const |
Returns a pointer to a DataReader (for data). There is one for each reaction.
Definition at line 302 of file AmpToolsInterface.cc.
complex< double > AmpToolsInterface::decayAmplitude | ( | int | iEvent, |
string | ampName, | ||
unsigned int | iDataSet = 0 |
||
) | const |
Retrieve a decay amplitude calculated for the specified event. This requires a prior call to processEvents.
[in] | ampName | this is the full amplitude name (as it appears in AmplitudeInfo::fullName) |
Definition at line 516 of file AmpToolsInterface.cc.
|
virtual |
Print final fit results to a file.
Reimplemented in AmpToolsInterfaceMPI.
Definition at line 259 of file AmpToolsInterface.cc.
|
inline |
Pointer to a FitResults class. Use this to access information that is stored after finalizeFit() is called.
Definition at line 197 of file AmpToolsInterface.h.
DataReader * AmpToolsInterface::genMCReader | ( | const string & | reactionName | ) | const |
Returns a pointer to a DataReader (for generated Monte Carlo). There is one for each reaction.
Definition at line 316 of file AmpToolsInterface.cc.
double AmpToolsInterface::intensity | ( | int | iEvent, |
unsigned int | iDataSet = 0 |
||
) | const |
Retrieve the intensity calculated for the specified event. This requires a prior call to processEvents.
Definition at line 497 of file AmpToolsInterface.cc.
IntensityManager * AmpToolsInterface::intensityManager | ( | const string & | reactionName | ) | const |
Pointer to an IntensityManager. There is one for each defined reaction. (Most applications will not likely need to access these.)
Definition at line 292 of file AmpToolsInterface.cc.
Kinematics * AmpToolsInterface::kinematics | ( | int | iEvent, |
unsigned int | iDataSet = 0 |
||
) |
Return the kinematics for a specified event as it was loaded using the loadEvent or loadEvents method.
Definition at line 483 of file AmpToolsInterface.cc.
double AmpToolsInterface::likelihood | ( | ) | const |
Return the total -2ln(likelihood) (summed over all reactions) using the parameters stored in the ParameterManager and the amplitudes in the AmplitudeManagers. Call this before performing a fit to get the pre-fit likelihood value and call it after the fit to get the post-fit value.
Definition at line 248 of file AmpToolsInterface.cc.
double AmpToolsInterface::likelihood | ( | const string & | reactionName | ) | const |
Return the -2ln(likelihood) associated with a particular reaction.
Definition at line 240 of file AmpToolsInterface.cc.
LikelihoodCalculator * AmpToolsInterface::likelihoodCalculator | ( | const string & | reactionName | ) | const |
Pointer to a Likelihood calculator (one per reaction). (Most applications will not likely need to access these.) One can also access the likelihood value through the likelihood methods below.
Definition at line 340 of file AmpToolsInterface.cc.
void AmpToolsInterface::loadEvent | ( | Kinematics * | kin, |
int | iEvent = 0 , |
||
int | nEventsTotal = 1 , |
||
unsigned int | iDataSet = 0 |
||
) |
For manual calculations: load kinematics one event at a time. Clear old events (clearEvents) before loading a new set of events. Load all events before performing calculations (processEvents).
[in] | kin | the kinematics to be loaded |
[in] | iEvent | the number of this event (between 0 and nEventsTotal-1) |
[in] | nEventsTotal | the total number of events to be loaded |
[in] | iDataSet | used to index simultaneous manual calculations |
Definition at line 434 of file AmpToolsInterface.cc.
void AmpToolsInterface::loadEvents | ( | DataReader * | dataReader, |
unsigned int | iDataSet = 0 |
||
) |
For manual calculations: load event kinematics from a DataReader. Call this after clearing old events (clearEvents) and before performing calculations (processEvents).
[in] | iDataSet | used to index simultaneous manual calculations |
Definition at line 419 of file AmpToolsInterface.cc.
|
inline |
Pointer to the MinuitMinimizationManager. Use the methods in MinuitMinimizationManager to do fits.
Definition at line 143 of file AmpToolsInterface.h.
NormIntInterface * AmpToolsInterface::normIntInterface | ( | const string & | reactionName | ) | const |
Pointer to a NormIntInterface (one per reaction). Use this to access normalization integrals.
Definition at line 332 of file AmpToolsInterface.cc.
int AmpToolsInterface::numEvents | ( | unsigned int | iDataSet = 0 | ) | const |
The number of events that have been loaded for manual calculations.
Definition at line 470 of file AmpToolsInterface.cc.
|
protected |
|
inline |
Pointer to the ParameterManager. Use this to get fit results, for example.
Definition at line 150 of file AmpToolsInterface.h.
void AmpToolsInterface::printAmplitudes | ( | string | reactionName, |
Kinematics * | kin | ||
) | const |
For debugging and diagnostics: print amplitude values to the screen in a readable format.
Definition at line 621 of file AmpToolsInterface.cc.
void AmpToolsInterface::printEventDetails | ( | string | reactionName, |
Kinematics * | kin | ||
) | const |
For debugging and diagnostics: print event details to the screen in a readable format.
Definition at line 723 of file AmpToolsInterface.cc.
void AmpToolsInterface::printIntensity | ( | string | reactionName, |
Kinematics * | kin | ||
) | const |
For debugging and diagnostics: print an intensity to the screen in a readable format.
Definition at line 709 of file AmpToolsInterface.cc.
void AmpToolsInterface::printKinematics | ( | string | reactionName, |
Kinematics * | kin | ||
) | const |
For debugging and diagnostics: print event kinematics to the screen in a readable format.
Definition at line 594 of file AmpToolsInterface.cc.
double AmpToolsInterface::processEvents | ( | string | reactionName, |
unsigned int | iDataSet = 0 |
||
) |
For manual calculations: perform all calculations on the loaded events. Load all events (loadEvent or loadEvents) before performing calculations. Returns the maximum intensity.
[in] | reactionName | the name of the reaction that will be calculated |
[in] | iDataSet | used to index simultaneous manual calculations |
Definition at line 448 of file AmpToolsInterface.cc.
|
static |
Static function to register a user Amplitude class. For example, to register a user-defined BreitWigner amplitude, one would use: AmpToolsInterface::registerAmplitude(BreitWigner());
Definition at line 349 of file AmpToolsInterface.cc.
|
static |
Static function to register a user DataReader class. For example, to register a user-defined CLEODataReader, one would use: AmpToolsInterface::registerDataReader(CLEODataReader());
Definition at line 358 of file AmpToolsInterface.cc.
void AmpToolsInterface::resetConfigurationInfo | ( | ConfigurationInfo * | cfgInfo | ) |
Use this method to re-initialize all IUAmpTools classes based on information in a new or modified ConfigurationInfo object.
Definition at line 79 of file AmpToolsInterface.cc.
complex< double > AmpToolsInterface::scaledProductionAmplitude | ( | string | ampName, |
unsigned int | iDataSet = 0 |
||
) | const |
Retrieve the production amplitude associated with a given amplitude. Recall that all amplitudes are defined as (production amplitude) x (decay amplitude)
The production amplitude that is returned is scaled by the scale factor that is set for that amplitude (if one has been set).
[in] | ampName | this is the full amplitude name (as it appears in AmplitudeInfo::fullName) |
Definition at line 543 of file AmpToolsInterface.cc.
|
protected |
Definition at line 420 of file AmpToolsInterface.h.
|
protected |
Definition at line 429 of file AmpToolsInterface.h.
|
protected |
Definition at line 430 of file AmpToolsInterface.h.
|
protected |
Definition at line 418 of file AmpToolsInterface.h.
|
protected |
Definition at line 410 of file AmpToolsInterface.h.
|
protected |
Definition at line 417 of file AmpToolsInterface.h.
|
protected |
Definition at line 432 of file AmpToolsInterface.h.
|
protected |
Definition at line 406 of file AmpToolsInterface.h.
|
protected |
Definition at line 419 of file AmpToolsInterface.h.
|
protected |
Definition at line 414 of file AmpToolsInterface.h.
|
protected |
Definition at line 423 of file AmpToolsInterface.h.
|
protected |
Definition at line 411 of file AmpToolsInterface.h.
|
protected |
Definition at line 422 of file AmpToolsInterface.h.
|
protected |
Definition at line 412 of file AmpToolsInterface.h.
|
staticprotected |
Definition at line 425 of file AmpToolsInterface.h.
|
staticprotected |
Definition at line 426 of file AmpToolsInterface.h.
|
staticprotected |
Definition at line 428 of file AmpToolsInterface.h.