AmpTools
AmpToolsInterface Class Reference

#include <AmpToolsInterface.h>

Inheritance diagram for AmpToolsInterface:
Collaboration diagram for AmpToolsInterface:

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)
 
ConfigurationInfoconfigurationInfo () const
 
MinuitMinimizationManagerminuitMinimizationManager () const
 
ParameterManagerparameterManager () const
 
IntensityManagerintensityManager (const string &reactionName) const
 
DataReaderdataReader (const string &reactionName) const
 
DataReaderbkgndReader (const string &reactionName) const
 
DataReaderaccMCReader (const string &reactionName) const
 
DataReadergenMCReader (const string &reactionName) const
 
NormIntInterfacenormIntInterface (const string &reactionName) const
 
const FitResultsfitResults () const
 
LikelihoodCalculatorlikelihoodCalculator (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
 
Kinematicskinematics (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)
 
AmpToolsInterfaceoperator= (AmpToolsInterface &ati)
 
void clear ()
 

Protected Attributes

FunctionalityFlag m_functionality
 
ConfigurationInfom_configurationInfo
 
MinuitMinimizationManagerm_minuitMinimizationManager
 
ParameterManagerm_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]
 
FitResultsm_fitResults
 

Static Protected Attributes

static vector< Amplitude * > m_userAmplitudes
 
static vector< DataReader * > m_userDataReaders
 
static const int MAXAMPVECS = 50
 

Detailed Description

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.

Member Enumeration Documentation

◆ FunctionalityFlag

Enumerator
kFull 
kMCGeneration 
kPlotGeneration 

Definition at line 90 of file AmpToolsInterface.h.

Constructor & Destructor Documentation

◆ AmpToolsInterface() [1/3]

AmpToolsInterface::AmpToolsInterface ( FunctionalityFlag  flag = kFull)

Definition at line 55 of file AmpToolsInterface.cc.

◆ AmpToolsInterface() [2/3]

AmpToolsInterface::AmpToolsInterface ( ConfigurationInfo cfgInfo,
FunctionalityFlag  flag = kFull 
)

Constructor. Constructs an AmpToolsInterface

Parameters
[in]cfgInfoa 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.

Here is the call graph for this function:

◆ ~AmpToolsInterface()

virtual AmpToolsInterface::~AmpToolsInterface ( )
inlinevirtual

Destructor.

Definition at line 107 of file AmpToolsInterface.h.

◆ AmpToolsInterface() [3/3]

AmpToolsInterface::AmpToolsInterface ( const AmpToolsInterface ati)
protected

Member Function Documentation

◆ accMCReader()

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.

Here is the caller graph for this function:

◆ alternateIntensity()

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.

See also
clearEvents
loadEvent
loadEvents
processEvents

Definition at line 555 of file AmpToolsInterface.cc.

Here is the call graph for this function:

◆ bkgndReader()

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.

Here is the caller graph for this function:

◆ clear()

void AmpToolsInterface::clear ( )
protected

Definition at line 367 of file AmpToolsInterface.cc.

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

◆ clearEvents()

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.

Parameters
[in]iDataSetused to index simultaneous manual calculations
See also
loadEvent
loadEvents
processEvents

Definition at line 405 of file AmpToolsInterface.cc.

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

◆ configurationInfo()

ConfigurationInfo* AmpToolsInterface::configurationInfo ( ) const
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.

Here is the caller graph for this function:

◆ dataReader()

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.

Here is the caller graph for this function:

◆ decayAmplitude()

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.

Parameters
[in]ampNamethis is the full amplitude name (as it appears in AmplitudeInfo::fullName)
See also
clearEvents
loadEvent
loadEvents
processEvents

Definition at line 516 of file AmpToolsInterface.cc.

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

◆ finalizeFit()

void AmpToolsInterface::finalizeFit ( )
virtual

Print final fit results to a file.

Reimplemented in AmpToolsInterfaceMPI.

Definition at line 259 of file AmpToolsInterface.cc.

Here is the call graph for this function:

◆ fitResults()

const FitResults* AmpToolsInterface::fitResults ( ) const
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.

◆ genMCReader()

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.

Here is the caller graph for this function:

◆ intensity()

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.

See also
clearEvents
loadEvent
loadEvents
processEvents

Definition at line 497 of file AmpToolsInterface.cc.

Here is the caller graph for this function:

◆ intensityManager()

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.

Here is the caller graph for this function:

◆ kinematics()

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.

See also
clearEvents
loadEvent
loadEvents
processEvents

Definition at line 483 of file AmpToolsInterface.cc.

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

◆ likelihood() [1/2]

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.

Here is the call graph for this function:

◆ likelihood() [2/2]

double AmpToolsInterface::likelihood ( const string &  reactionName) const

Return the -2ln(likelihood) associated with a particular reaction.

Definition at line 240 of file AmpToolsInterface.cc.

Here is the call graph for this function:

◆ likelihoodCalculator()

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.

See also
likelihood

Definition at line 340 of file AmpToolsInterface.cc.

Here is the caller graph for this function:

◆ loadEvent()

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).

Parameters
[in]kinthe kinematics to be loaded
[in]iEventthe number of this event (between 0 and nEventsTotal-1)
[in]nEventsTotalthe total number of events to be loaded
[in]iDataSetused to index simultaneous manual calculations
See also
clearEvents
processEvents

Definition at line 434 of file AmpToolsInterface.cc.

Here is the call graph for this function:

◆ loadEvents()

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).

Parameters
[in]iDataSetused to index simultaneous manual calculations
See also
clearEvents
processEvents

Definition at line 419 of file AmpToolsInterface.cc.

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

◆ minuitMinimizationManager()

MinuitMinimizationManager* AmpToolsInterface::minuitMinimizationManager ( ) const
inline

Pointer to the MinuitMinimizationManager. Use the methods in MinuitMinimizationManager to do fits.

Definition at line 143 of file AmpToolsInterface.h.

Here is the caller graph for this function:

◆ normIntInterface()

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.

Here is the caller graph for this function:

◆ numEvents()

int AmpToolsInterface::numEvents ( unsigned int  iDataSet = 0) const

The number of events that have been loaded for manual calculations.

See also
clearEvents
loadEvent
loadEvents
processEvents

Definition at line 470 of file AmpToolsInterface.cc.

Here is the caller graph for this function:

◆ operator=()

AmpToolsInterface& AmpToolsInterface::operator= ( AmpToolsInterface ati)
protected

◆ parameterManager()

ParameterManager* AmpToolsInterface::parameterManager ( ) const
inline

Pointer to the ParameterManager. Use this to get fit results, for example.

Definition at line 150 of file AmpToolsInterface.h.

Here is the caller graph for this function:

◆ printAmplitudes()

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.

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

◆ printEventDetails()

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.

Here is the call graph for this function:

◆ printIntensity()

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.

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

◆ printKinematics()

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.

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

◆ processEvents()

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.

Parameters
[in]reactionNamethe name of the reaction that will be calculated
[in]iDataSetused to index simultaneous manual calculations
See also
clearEvents
loadEvent
loadEvents

Definition at line 448 of file AmpToolsInterface.cc.

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

◆ registerAmplitude()

void AmpToolsInterface::registerAmplitude ( const Amplitude defaultAmplitude)
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.

Here is the call graph for this function:

◆ registerDataReader()

void AmpToolsInterface::registerDataReader ( const DataReader defaultDataReader)
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.

Here is the call graph for this function:

◆ resetConfigurationInfo()

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.

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

◆ scaledProductionAmplitude()

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).

Parameters
[in]ampNamethis is the full amplitude name (as it appears in AmplitudeInfo::fullName)
See also
AmplitudeManager::getScale

Definition at line 543 of file AmpToolsInterface.cc.

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

Member Data Documentation

◆ m_accMCReaderMap

map<string,DataReader*> AmpToolsInterface::m_accMCReaderMap
protected

Definition at line 420 of file AmpToolsInterface.h.

◆ m_ampVecs

AmpVecs AmpToolsInterface::m_ampVecs[MAXAMPVECS]
protected

Definition at line 429 of file AmpToolsInterface.h.

◆ m_ampVecsReactionName

string AmpToolsInterface::m_ampVecsReactionName[MAXAMPVECS]
protected

Definition at line 430 of file AmpToolsInterface.h.

◆ m_bkgndReaderMap

map<string,DataReader*> AmpToolsInterface::m_bkgndReaderMap
protected

Definition at line 418 of file AmpToolsInterface.h.

◆ m_configurationInfo

ConfigurationInfo* AmpToolsInterface::m_configurationInfo
protected

Definition at line 410 of file AmpToolsInterface.h.

◆ m_dataReaderMap

map<string,DataReader*> AmpToolsInterface::m_dataReaderMap
protected

Definition at line 417 of file AmpToolsInterface.h.

◆ m_fitResults

FitResults* AmpToolsInterface::m_fitResults
protected

Definition at line 432 of file AmpToolsInterface.h.

◆ m_functionality

FunctionalityFlag AmpToolsInterface::m_functionality
protected

Definition at line 406 of file AmpToolsInterface.h.

◆ m_genMCReaderMap

map<string,DataReader*> AmpToolsInterface::m_genMCReaderMap
protected

Definition at line 419 of file AmpToolsInterface.h.

◆ m_intensityManagers

vector<IntensityManager*> AmpToolsInterface::m_intensityManagers
protected

Definition at line 414 of file AmpToolsInterface.h.

◆ m_likCalcMap

map<string,LikelihoodCalculator*> AmpToolsInterface::m_likCalcMap
protected

Definition at line 423 of file AmpToolsInterface.h.

◆ m_minuitMinimizationManager

MinuitMinimizationManager* AmpToolsInterface::m_minuitMinimizationManager
protected

Definition at line 411 of file AmpToolsInterface.h.

◆ m_normIntMap

map<string,NormIntInterface*> AmpToolsInterface::m_normIntMap
protected

Definition at line 422 of file AmpToolsInterface.h.

◆ m_parameterManager

ParameterManager* AmpToolsInterface::m_parameterManager
protected

Definition at line 412 of file AmpToolsInterface.h.

◆ m_userAmplitudes

vector< Amplitude * > AmpToolsInterface::m_userAmplitudes
staticprotected

Definition at line 425 of file AmpToolsInterface.h.

◆ m_userDataReaders

vector< DataReader * > AmpToolsInterface::m_userDataReaders
staticprotected

Definition at line 426 of file AmpToolsInterface.h.

◆ MAXAMPVECS

const int AmpToolsInterface::MAXAMPVECS = 50
staticprotected

Definition at line 428 of file AmpToolsInterface.h.


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