MINT2
Public Member Functions | Protected Attributes | List of all members
DalitzPdfSaveInteg Class Reference

#include <DalitzPdfSaveInteg.h>

Inheritance diagram for DalitzPdfSaveInteg:
DalitzPdfBaseFastInteg MINT::PdfBase< IDalitzEvent > IDalitzPdf MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent >

Public Member Functions

double un_normalised_noPs (IDalitzEvent &evt)
 
 DalitzPdfSaveInteg (const DalitzEventPattern &pat, double precision=1.e-4, const std::string &integInputFiles="Integrator", const std::string &integEvtFile="integEvtFile.root", const std::string &topUpIntegOption="topUp", MINT::MinuitParameterSet *mps=0, const std::string &integOutputFile="")
 
 DalitzPdfSaveInteg (const DalitzEventPattern &pat, IFastAmplitudeIntegrable *amps, double precision=1.e-4, const std::string &integInputFiles="Integrator", const std::string &integEvtFile="integEvtFile.root", const std::string &topUpIntegOption="topUp", const std::string &integOutputFile="")
 
 ~DalitzPdfSaveInteg ()
 
- Public Member Functions inherited from DalitzPdfBaseFastInteg
 DalitzPdfBaseFastInteg (const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
 
 DalitzPdfBaseFastInteg (const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator=0, MINT::MinuitParameterSet *mps=0, double precision=1.e-3)
 
 DalitzPdfBaseFastInteg (const DalitzPdfBaseFastInteg &other)
 
virtual ~DalitzPdfBaseFastInteg ()
 
void setIntegrationPrecision (double prec)
 
void setEventGenerator (MINT::IEventGenerator< IDalitzEvent > *g)
 
MINT::IEventGenerator< IDalitzEvent > * getEventGenerator ()
 
const MINT::IEventGenerator< IDalitzEvent > * getEventGenerator () const
 
void parametersChanged ()
 
virtual double getVal (IDalitzEvent &evt)
 
virtual double getVal_withPs (IDalitzEvent &evt)
 
virtual double getVal_noPs (IDalitzEvent &evt)
 
virtual double getNewVal (IDalitzEvent &evt)
 
virtual double getVal (IDalitzEvent *evt)
 
virtual double getVal_withPs (IDalitzEvent *evt)
 
virtual double getVal_noPs (IDalitzEvent *evt)
 
virtual double getNewVal (IDalitzEvent *evt)
 
virtual void Gradient (IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
 
virtual void GradientForLasso (std::vector< double > &grad)
 
bool useAnalyticGradient ()
 
virtual double RealVal (IDalitzEvent &evt)
 
MINT::MinuitParameterSetgetMPS ()
 
const MINT::MinuitParameterSetgetMPS () const
 
bool saveIntegrator (const std::string &fname) const
 
bool makePlots (const std::string &filename) const
 
virtual DalitzHistoSet histoSet () const
 
virtual DalitzHistoSet histoSet ()
 
void saveEachAmpsHistograms (const std::string &prefix) const
 
std::vector< DalitzHistoSetGetEachAmpsHistograms ()
 
virtual DalitzHistoSet interferenceHistoSet () const
 
virtual DalitzHistoSet interferenceHistoSet ()
 
void saveInterferenceHistograms (const std::string &prefix) const
 
std::vector< DalitzHistoSetGetInterferenceHistograms ()
 
IFastAmplitudeIntegrablegetFitAmpSum ()
 
virtual void endFit ()
 
void setIntegratorFileName (const std::string &commaSeparatedList)
 
double getIntegralValue () const
 
double getIntegralValue ()
 
double redoIntegrator ()
 
double sumOfFitFractions ()
 
double absSumOfInterferenceFractions ()
 
double absSumOfSqrtInterferenceFractions ()
 
double sumOfSqrtFitFractions ()
 
int numberOfFitFractionsLargerThanThreshold (double threshold)
 
void doFinalStats (MINT::Minimiser *mini=0)
 
- Public Member Functions inherited from MINT::PdfBase< IDalitzEvent >
 PdfBase ()
 
 PdfBase (const PdfBase< IDalitzEvent > &)
 
virtual void beginFit ()
 
virtual ~PdfBase ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 

Protected Attributes

TRandom * _localRnd
 
SignalGenerator_sgGen
 
FromFileGenerator_fileGen
 
std::string _integratorEventFile
 
std::string _integratorOutputFile
 
- Protected Attributes inherited from DalitzPdfBaseFastInteg
MINT::MinuitParameterSet_mps
 
DalitzEventPattern _pat
 
double _norm
 
double _precision
 
FastAmplitudeIntegrator _faint
 
IFastAmplitudeIntegrable_amps
 
MINT::counted_ptr< IFastAmplitudeIntegrable_countedAmps
 
MINT::IEventGenerator< IDalitzEvent > * _generator
 
bool _integrating
 
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
 
std::string _commaSepList_of_SavedIntegrators
 
double _val
 
std::vector< double > _gradNorm
 
bool _redoGradNorm
 

Additional Inherited Members

- Protected Member Functions inherited from DalitzPdfBaseFastInteg
void setup ()
 
bool makeAmps ()
 
virtual double phaseSpace (IDalitzEvent &evt)
 
virtual bool getNorm ()
 
virtual bool integrating ()
 
IFastAmplitudeIntegrablegetAmps ()
 
MINT::IEventGenerator< IDalitzEvent > * makeDefaultGenerator ()
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 

Detailed Description

Definition at line 22 of file DalitzPdfSaveInteg.h.

Constructor & Destructor Documentation

◆ DalitzPdfSaveInteg() [1/2]

DalitzPdfSaveInteg::DalitzPdfSaveInteg ( const DalitzEventPattern pat,
double  precision = 1.e-4,
const std::string &  integInputFiles = "Integrator",
const std::string &  integEvtFile = "integEvtFile.root",
const std::string &  topUpIntegOption = "topUp",
MINT::MinuitParameterSet mps = 0,
const std::string &  integOutputFile = "" 
)

Definition at line 15 of file DalitzPdfSaveInteg.cpp.

23  : DalitzPdfBaseFastInteg(pat, 0, mps, precision)
24  , _localRnd(0)
25  , _sgGen(0)
26  , _fileGen(0)
27  , _integratorEventFile(integEvtFile)
28  , _integratorOutputFile(integOutputFile)
29  {
30  // _pat = pat;
31  setIntegratorFileName(integInputFiles);
32 
33  cout << "pset pointer in DalitzPdfSaveInteg " << mps << endl;
34  cout << "amps pointer in DalitzPdfSaveInteg " << _amps << endl;
35 
36  if("" == integOutputFile) _integratorOutputFile=integInputFiles;
37 
38  // here, SignalGenerator is used by FromFileGenerator, to fill
39  // up missing events in case more are needed than found in the
40  // file. Since we don't know with which random seed the
41  // events in the file were generated, we supply a random
42  // number generator with randomised seed.
43  _localRnd = new TRandom3(time(0));
44  if("topUp" == topUpIntegOption){
45  if(_pat.empty()){
46  cout << "cannot make SignalGenerator, pattern is empty" << endl;
47  cout << "bailing out" << endl;
48  throw "no pattern, no signal generator";
49  }
52  _sgGen->dontSaveEvents();// saving events is done by FromFileGenerator
53  }else{
54  _sgGen = 0;
55  }
58  }
void setIntegratorFileName(const std::string &commaSeparatedList)
std::string _integratorOutputFile
DalitzPdfBaseFastInteg(const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
SignalGenerator * _sgGen
void dontSaveEvents()
void setWeighted(bool w=true)
Definition: BaseGenerator.h:62
IFastAmplitudeIntegrable * _amps
FromFileGenerator * _fileGen
void setEventGenerator(MINT::IEventGenerator< IDalitzEvent > *g)
std::string _integratorEventFile

◆ DalitzPdfSaveInteg() [2/2]

DalitzPdfSaveInteg::DalitzPdfSaveInteg ( const DalitzEventPattern pat,
IFastAmplitudeIntegrable amps,
double  precision = 1.e-4,
const std::string &  integInputFiles = "Integrator",
const std::string &  integEvtFile = "integEvtFile.root",
const std::string &  topUpIntegOption = "topUp",
const std::string &  integOutputFile = "" 
)

Definition at line 60 of file DalitzPdfSaveInteg.cpp.

68  : DalitzPdfBaseFastInteg(pat, 0, amps, precision)
69  , _localRnd(0)
70  , _sgGen(0)
71  , _fileGen(0)
72  , _integratorEventFile(integEvtFile)
73  , _integratorOutputFile(integOutputFile)
74  {
75  //_pat = pat;
76  setIntegratorFileName(integInputFiles);
77 
78  if("" == integOutputFile) _integratorOutputFile=integInputFiles;
79 
80  // here, SignalGenerator is used by FromFileGenerator, to fill
81  // up missing events in case more are needed than found in the
82  // file. Since we don't know with which random seed the
83  // events in the file were generated, we supply a random
84  // number generator with randomised seed.
85  _localRnd = new TRandom3(time(0));
86  if("topUp" == topUpIntegOption){
87  if(0 == _amps){
88  cout << "cannot make SignalGenerator, _amps are empty" << endl;
89  cout << "bailing out" << endl;
90  throw "no amps, no signal generator";
91  }
92  if(_pat.empty()){
93  cout << "cannot make SignalGenerator, pattern is empty" << endl;
94  cout << "bailing out" << endl;
95  throw "no pattern, no signal generator";
96  }
99  _sgGen->dontSaveEvents();// saving events is done by FromFileGenerator
100  }else{
101  _sgGen = 0;
102  }
105  }
void setIntegratorFileName(const std::string &commaSeparatedList)
std::string _integratorOutputFile
DalitzPdfBaseFastInteg(const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
SignalGenerator * _sgGen
void dontSaveEvents()
void setWeighted(bool w=true)
Definition: BaseGenerator.h:62
IFastAmplitudeIntegrable * _amps
FromFileGenerator * _fileGen
void setEventGenerator(MINT::IEventGenerator< IDalitzEvent > *g)
std::string _integratorEventFile

◆ ~DalitzPdfSaveInteg()

DalitzPdfSaveInteg::~DalitzPdfSaveInteg ( )

Definition at line 109 of file DalitzPdfSaveInteg.cpp.

109  {
111  if(0 != _fileGen) delete _fileGen;
112  if(0 != _sgGen) delete _sgGen;
113  if(0 != _localRnd) delete _localRnd;
114 }
bool saveIntegrator(const std::string &fname) const
std::string _integratorOutputFile
SignalGenerator * _sgGen
FromFileGenerator * _fileGen

Member Function Documentation

◆ un_normalised_noPs()

double DalitzPdfSaveInteg::un_normalised_noPs ( IDalitzEvent evt)
inlinevirtual

Implements DalitzPdfBaseFastInteg.

Definition at line 32 of file DalitzPdfSaveInteg.h.

32  {
33  double ampSq = getAmps()->RealVal(evt);
34  return ampSq;
35  }
IFastAmplitudeIntegrable * getAmps()
virtual double RealVal(EVENT_TYPE &evt)=0

Member Data Documentation

◆ _fileGen

FromFileGenerator* DalitzPdfSaveInteg::_fileGen
protected

Definition at line 28 of file DalitzPdfSaveInteg.h.

◆ _integratorEventFile

std::string DalitzPdfSaveInteg::_integratorEventFile
protected

Definition at line 29 of file DalitzPdfSaveInteg.h.

◆ _integratorOutputFile

std::string DalitzPdfSaveInteg::_integratorOutputFile
protected

Definition at line 30 of file DalitzPdfSaveInteg.h.

◆ _localRnd

TRandom* DalitzPdfSaveInteg::_localRnd
protected

Definition at line 26 of file DalitzPdfSaveInteg.h.

◆ _sgGen

SignalGenerator* DalitzPdfSaveInteg::_sgGen
protected

Definition at line 27 of file DalitzPdfSaveInteg.h.


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