laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.

The base class for any slave process for simultaneous/combined fits. More...

#include <LauSimFitSlave.hh>

Inheritance diagram for LauSimFitSlave:
LauAbsFitModel LauCPFitModel LauSimpleFitModel

Public Member Functions

 LauSimFitSlave ()
 Constructor. More...
 
virtual ~LauSimFitSlave ()
 Destructor. More...
 
UInt_t nSlaves () const
 Obtain the number of slaves. More...
 
UInt_t slaveId () const
 Obtain the ID number of this slave. More...
 
virtual void setParsFromMinuit (Double_t *par, Int_t npar)=0
 This function sets the parameter values from Minuit. More...
 
virtual Double_t getTotNegLogLikelihood ()=0
 Calculates the total negative log-likelihood. More...
 

Protected Member Functions

void connectToMaster (const TString &addressMaster, const UInt_t portMaster)
 Establish the connection to the master process. More...
 
void processMasterRequests ()
 Listen for requests from the master and act accordingly. More...
 
virtual void prepareInitialParArray (TObjArray &array)=0
 Package the initial fit parameters for transmission to the master. More...
 
virtual void finaliseResults (const Int_t fitStat, const Double_t NLL, const TObjArray *parsFromMaster, const TMatrixD *covMat, TObjArray &parsToMaster)=0
 Perform all finalisation actions. More...
 
virtual UInt_t readExperimentData (const UInt_t exptIndex)=0
 Read in the data for the specified experiment. More...
 
virtual void cacheInputFitVars ()=0
 Cache the input data values to calculate the likelihood during the fit. More...
 
virtual void writeOutAllFitResults ()=0
 Write out any fit results. More...
 

Private Member Functions

 LauSimFitSlave (const LauSimFitSlave &rhs)
 Copy constructor (not implemented) More...
 
LauSimFitSlaveoperator= (const LauSimFitSlave &rhs)
 Copy assignment operator (not implemented) More...
 
 ClassDef (LauSimFitSlave, 0)
 

Private Attributes

TSocket * sMaster_
 A socket to enable parallel setup. More...
 
TMessage * messageFromMaster_
 Message from master to the slaves. More...
 
UInt_t slaveId_
 Slave id number. More...
 
UInt_t nSlaves_
 The total number of slaves. More...
 
UInt_t nParams_
 The total number of fit parameters. More...
 
Double_t * parValues_
 Parameter values array (for reading from the master) More...
 

Detailed Description

The base class for any slave process for simultaneous/combined fits.

Implementation of the JFit method described in arXiv:1409.5080 [physics.data-an].

This class acts as the base class from which slave's should inherit. This allows any fitting framework to plug in to the JFit method.

Definition at line 36 of file LauSimFitSlave.hh.

Constructor & Destructor Documentation

LauSimFitSlave::LauSimFitSlave ( )

Constructor.

Definition at line 31 of file LauSimFitSlave.cc.

LauSimFitSlave::~LauSimFitSlave ( )
virtual

Destructor.

Definition at line 41 of file LauSimFitSlave.cc.

LauSimFitSlave::LauSimFitSlave ( const LauSimFitSlave rhs)
private

Copy constructor (not implemented)

Member Function Documentation

virtual void LauSimFitSlave::cacheInputFitVars ( )
protectedpure virtual

Cache the input data values to calculate the likelihood during the fit.

Implemented in LauAbsFitModel, LauCPFitModel, and LauSimpleFitModel.

LauSimFitSlave::ClassDef ( LauSimFitSlave  ,
 
)
private
void LauSimFitSlave::connectToMaster ( const TString &  addressMaster,
const UInt_t  portMaster 
)
protected

Establish the connection to the master process.

Parameters
[in]addressMasterthe hostname of the machine running the master process
[in]portMasterthe port number on which the master process is listening

Definition at line 48 of file LauSimFitSlave.cc.

virtual void LauSimFitSlave::finaliseResults ( const Int_t  fitStat,
const Double_t  NLL,
const TObjArray *  parsFromMaster,
const TMatrixD *  covMat,
TObjArray &  parsToMaster 
)
protectedpure virtual

Perform all finalisation actions.

  • Receive the results of the fit from the master
  • Perform any finalisation routines
  • Package the finalised fit parameters for transmission back to the master
Parameters
[in]fitStatthe convergence/error matrix status of the fit
[in]NLLthe minimised negative log likelihood
[in]parsFromMasterthe parameters at the fit minimum
[in]covMatthe fit covariance matrix
[out]parsToMasterthe array to be filled with the finalised LauParameter objects

Implemented in LauAbsFitModel.

virtual Double_t LauSimFitSlave::getTotNegLogLikelihood ( )
pure virtual

Calculates the total negative log-likelihood.

Implemented in LauAbsFitModel.

UInt_t LauSimFitSlave::nSlaves ( ) const
inline

Obtain the number of slaves.

Definition at line 46 of file LauSimFitSlave.hh.

LauSimFitSlave& LauSimFitSlave::operator= ( const LauSimFitSlave rhs)
private

Copy assignment operator (not implemented)

virtual void LauSimFitSlave::prepareInitialParArray ( TObjArray &  array)
protectedpure virtual

Package the initial fit parameters for transmission to the master.

Parameters
[out]arraythe array to be filled with the LauParameter objects

Implemented in LauAbsFitModel.

void LauSimFitSlave::processMasterRequests ( )
protected

Listen for requests from the master and act accordingly.

Definition at line 68 of file LauSimFitSlave.cc.

virtual UInt_t LauSimFitSlave::readExperimentData ( const UInt_t  exptIndex)
protectedpure virtual

Read in the data for the specified experiment.

Parameters
[in]exptIndexthe experiment number to be read
Returns
the number of events read in

Implemented in LauAbsFitModel.

virtual void LauSimFitSlave::setParsFromMinuit ( Double_t *  par,
Int_t  npar 
)
pure virtual

This function sets the parameter values from Minuit.

Parameters
[in]paran array storing the various parameter values
[in]nparthe number of free parameters

Implemented in LauAbsFitModel.

UInt_t LauSimFitSlave::slaveId ( ) const
inline

Obtain the ID number of this slave.

Definition at line 49 of file LauSimFitSlave.hh.

virtual void LauSimFitSlave::writeOutAllFitResults ( )
protectedpure virtual

Write out any fit results.

Implemented in LauAbsFitModel.

Member Data Documentation

TMessage* LauSimFitSlave::messageFromMaster_
private

Message from master to the slaves.

Definition at line 116 of file LauSimFitSlave.hh.

UInt_t LauSimFitSlave::nParams_
private

The total number of fit parameters.

Definition at line 125 of file LauSimFitSlave.hh.

UInt_t LauSimFitSlave::nSlaves_
private

The total number of slaves.

Definition at line 122 of file LauSimFitSlave.hh.

Double_t* LauSimFitSlave::parValues_
private

Parameter values array (for reading from the master)

Definition at line 128 of file LauSimFitSlave.hh.

UInt_t LauSimFitSlave::slaveId_
private

Slave id number.

Definition at line 119 of file LauSimFitSlave.hh.

TSocket* LauSimFitSlave::sMaster_
private

A socket to enable parallel setup.

Definition at line 113 of file LauSimFitSlave.hh.


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