AmpTools
ComplexParameter Class Reference

#include <ComplexParameter.h>

Inheritance diagram for ComplexParameter:
Collaboration diagram for ComplexParameter:

Public Member Functions

 ComplexParameter (const string &name, MinuitMinimizationManager &aManager, complex< double > initialValue=complex< double >(1, 0), bool purelyReal=false)
 
 ~ComplexParameter ()
 
void update (const MISubject *callingSubject)
 
void setValue (complex< double > value)
 
void fix ()
 
void free ()
 
const string & name () const
 
string realName () const
 
string imagName () const
 
bool isPurelyReal () const
 
bool isFixed () const
 
complex< double > value () const
 
const complex< double > * constValuePtr () const
 
complex< double > * valuePtr ()
 
- Public Member Functions inherited from MIObserver
 MIObserver ()
 
virtual ~MIObserver ()
 

Detailed Description

This class manages the conversion of complex parameters to real parameters that minuit minimizes.

If a valid MinuitMinimizationManager reference is passed in it it registers two parameters with MinuitParameterManager when created. It is an also MIObserver – on update calls it maintains a complex< double > that represents the value of the parameter.

It is also useful to be able to create ComplexParameter objects with no connection to MinuitMinimizationManager in MPI implementations of the fitter. These objects are valid, but are not registered to or updated by the minimization manager.

Definition at line 68 of file ComplexParameter.h.

Constructor & Destructor Documentation

◆ ComplexParameter()

ComplexParameter::ComplexParameter ( const string &  name,
MinuitMinimizationManager aManager,
complex< double >  initialValue = complex< double >( 1, 0 ),
bool  purelyReal = false 
)

This constructs the ComplexParameter.

Parameters
[in]namethe string giving the name of the parameter, real and imaginary parts of the parameter will be identified in MINUIT with this string plus "_re" or "_im" appened.
[in]aManageran instance of the MinuitMinimizationManager with which to create and register the parameters
[in]initialValuean optional initial value
[in]purelyRealan optional argument that when set true forces the imaginary part of the complex number to zero

Definition at line 46 of file ComplexParameter.cc.

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

◆ ~ComplexParameter()

ComplexParameter::~ComplexParameter ( )

This is the ComplexParameter destructor.

Definition at line 78 of file ComplexParameter.cc.

Member Function Documentation

◆ constValuePtr()

const complex< double >* ComplexParameter::constValuePtr ( ) const
inline

A function that returns a const pointer to the value of the parameter. This is useful, for example, when telling the AmplitudeManager to use an external parameter for a production amplitude.

See also
AmplitudeManager::setExternalProductionAmplitude

Definition at line 167 of file ComplexParameter.h.

Here is the caller graph for this function:

◆ fix()

void ComplexParameter::fix ( )

This fixes the parameter at its current value.

Definition at line 114 of file ComplexParameter.cc.

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

◆ free()

void ComplexParameter::free ( )

This allows the parameter to float.

Definition at line 121 of file ComplexParameter.cc.

Here is the call graph for this function:

◆ imagName()

string ComplexParameter::imagName ( ) const
inline

A function that returns the name of the parameter representing the imaginary part of the complex number.

Definition at line 142 of file ComplexParameter.h.

◆ isFixed()

bool ComplexParameter::isFixed ( ) const

A function to see if the parameter is floating.

Definition at line 128 of file ComplexParameter.cc.

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

◆ isPurelyReal()

bool ComplexParameter::isPurelyReal ( ) const
inline

A function that returns a boolean indicating whether the parameter is purely real or not.

Definition at line 148 of file ComplexParameter.h.

Here is the caller graph for this function:

◆ name()

const string& ComplexParameter::name ( ) const
inline

A function that returns the name of the ComplexParameter

Definition at line 130 of file ComplexParameter.h.

◆ realName()

string ComplexParameter::realName ( ) const
inline

A function that returns the name of the parameter representing the real part of the complex number.

Definition at line 136 of file ComplexParameter.h.

◆ setValue()

void ComplexParameter::setValue ( complex< double >  value)

This sets the value of the parameter.

Parameters
[in]valuethe desired value of the complex parameter

Definition at line 103 of file ComplexParameter.cc.

Here is the call graph for this function:

◆ update()

void ComplexParameter::update ( const MISubject callingSubject)
virtual

This is called by the MinuitInterface and triggers the updating of the values of the real and imaginary parts of the complex parameter.

Parameters
[in]callingSubjectpointer to the MinuitParameter representing either the real or imaginary part of the value

Implements MIObserver.

Definition at line 90 of file ComplexParameter.cc.

Here is the call graph for this function:

◆ value()

complex< double > ComplexParameter::value ( ) const
inline

A function that returns the current value of the complex parameter.

Definition at line 158 of file ComplexParameter.h.

Here is the caller graph for this function:

◆ valuePtr()

complex< double >* ComplexParameter::valuePtr ( )
inline

A function that returns a pointer (not const) to the value of the parameter.

Definition at line 173 of file ComplexParameter.h.


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