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

#include <AmpsPdfFlexiFast.h>

Inheritance diagram for AmpsPdfFlexiFast:
DalitzPdfBaseFlexiFastInteg DalitzPdfBaseFlexiFastInteg MINT::PdfBase< IDalitzEvent > IDalitzPdf MINT::PdfBase< IDalitzEvent > IDalitzPdf MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IPdf< IDalitzEvent > MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IPdf< IDalitzEvent >

Public Member Functions

double un_normalised_noPs (IDalitzEvent &evt)
 
std::complex< double > ComplexVal_un_normalised_noPs (IDalitzEvent &evt)
 
 AmpsPdfFlexiFast (const DalitzEventPattern &pat, IFastAmplitudeIntegrable *amps, MINT::MinuitParameterSet *mps, double precision=1.e-4, std::string method="efficient", std::string fname="SignalIntegrationEvents.root", bool genMoreEvents=false)
 
IFastAmplitudeIntegrablegetAmpSum ()
 
 ~AmpsPdfFlexiFast ()
 
double un_normalised_noPs (IDalitzEvent &evt)
 
std::complex< double > ComplexVal_un_normalised_noPs (IDalitzEvent &evt)
 
 AmpsPdfFlexiFast (const DalitzEventPattern &pat, IFastAmplitudeIntegrable *amps, MinuitParameterSet *mps, double precision=1.e-4, std::string method="efficient", std::string fname="SignalIntegrationEvents.root", bool genMoreEvents=false)
 
IFastAmplitudeIntegrablegetAmpSum ()
 
 ~AmpsPdfFlexiFast ()
 
- Public Member Functions inherited from DalitzPdfBaseFlexiFastInteg
 DalitzPdfBaseFlexiFastInteg (const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
 
 DalitzPdfBaseFlexiFastInteg (const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator=0, MINT::MinuitParameterSet *mps=0, double precision=1.e-3)
 
 DalitzPdfBaseFlexiFastInteg (const DalitzPdfBaseFlexiFastInteg &other)
 
virtual ~DalitzPdfBaseFlexiFastInteg ()
 
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 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 beginFit ()
 
virtual void endFit ()
 
double getIntegralValue () const
 
double redoIntegrator ()
 
double integralForMatchingPatterns (bool match, int pattern_sign)
 
std::complex< double > ComplexSumForMatchingPatterns (bool match)
 
std::complex< double > ComplexIntegralForTags (int tag1, int tag2)
 
double sumOfFitFractions ()
 
double absSumOfInterferenceFractions ()
 
double absSumOfSqrtInterferenceFractions ()
 
double sumOfSqrtFitFractions ()
 
int numberOfFitFractionsLargerThanThreshold (double threshold)
 
FitFractionList getFractions () const
 
FitFractionList getInterferenceTerms () const
 
bool doFractions ()
 
void doFinalStats (MINT::Minimiser *mini=0)
 
void doFinalStatsAndSave (MINT::Minimiser *min=0, const std::string &fname="FitAmpResults.txt", const std::string &fnameROOT="fitFractions.root")
 
- Public Member Functions inherited from MINT::PdfBase< IDalitzEvent >
 PdfBase ()
 
 PdfBase (const PdfBase< IDalitzEvent > &)
 
virtual ~PdfBase ()
 
- Public Member Functions inherited from MINT::IPdf< IDalitzEvent >
virtual void Gradient (IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
 
virtual bool useAnalyticGradient ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 

Protected Attributes

TRandom * _localRnd
 
SignalGenerator_sgGen
 
FromFileGenerator_fileGen
 
MINT::IEventGenerator< IDalitzEvent > * _chosenGen
 
MINT::NamedParameter< std::string > _integratorSource
 
std::string _integratorFileName
 
IEventGenerator< IDalitzEvent > * _chosenGen
 
NamedParameter< std::string > _integratorSource
 
- Protected Attributes inherited from DalitzPdfBaseFlexiFastInteg
MINT::MinuitParameterSet_mps
 
DalitzEventPattern _pat
 
double _norm
 
double _precision
 
FlexiFastAmplitudeIntegrator _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
 

Additional Inherited Members

- Protected Member Functions inherited from DalitzPdfBaseFlexiFastInteg
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 18 of file AmpsPdfFlexiFast.h.

Constructor & Destructor Documentation

◆ AmpsPdfFlexiFast() [1/2]

AmpsPdfFlexiFast::AmpsPdfFlexiFast ( const DalitzEventPattern pat,
IFastAmplitudeIntegrable amps,
MINT::MinuitParameterSet mps,
double  precision = 1.e-4,
std::string  method = "efficient",
std::string  fname = "SignalIntegrationEvents.root",
bool  genMoreEvents = false 
)
inline

Definition at line 38 of file AmpsPdfFlexiFast.h.

45  : DalitzPdfBaseFlexiFastInteg(pat, 0, amps, precision, mps)
46  , _localRnd(0)
47  , _sgGen(0)
48  , _fileGen(0)
49  , _chosenGen(0)
50  , _integratorSource("IntegratorSource", (std::string) "new", (char*) 0)
51  , _integratorFileName(fname)
52  {
53  std::cout << " AmpsPdfFlexiFast with integ method " << method << std::endl;
54  bool nonFlat = "efficient" == method;
55  bool generateNew = ((std::string)_integratorSource == (std::string)"new");
56  if(nonFlat){
57  std::cout << "AmpsPdfFlexiFast uses nonFlat integration." << std::endl;
58  if(generateNew){
59  _sgGen = new SignalGenerator(pat);
61  //_sgGen->setSaveEvents(_integratorFileName);
63  }else{
64  // here, SignalGenerator is used by FromFileGenerator, to fill
65  // up missing events in case more are needed than found in the
66  // file. Since we don't know with which random seed the
67  // events in the file were generated, we supply a random
68  // number generator with randomised seed.
69  _localRnd = new TRandom3(time(0));
70  _sgGen = new SignalGenerator(pat, _localRnd);
72  _sgGen->dontSaveEvents();// saving events is done by FromFileGenerator
73  if(genMoreEvents) _fileGen = new FromFileGenerator(_integratorFileName, _sgGen);
74  else{
76  std::cout << "not going to generate any more events" << std::endl;
77  }
79  }
81  }else{
82  std::cout << "AmpsPdfFlexiFast uses flat integration." << std::endl;
83  }
84  }
FromFileGenerator * _fileGen
std::string _integratorFileName
void dontSaveEvents()
void setWeighted(bool w=true)
Definition: BaseGenerator.h:62
void setEventGenerator(MINT::IEventGenerator< IDalitzEvent > *g)
DalitzPdfBaseFlexiFastInteg(const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
SignalGenerator * _sgGen
MINT::NamedParameter< std::string > _integratorSource
MINT::IEventGenerator< IDalitzEvent > * _chosenGen

◆ ~AmpsPdfFlexiFast() [1/2]

AmpsPdfFlexiFast::~AmpsPdfFlexiFast ( )
inline

Definition at line 88 of file AmpsPdfFlexiFast.h.

88  {
89  if(0 != _fileGen) delete _fileGen;
90  if(0 != _sgGen) delete _sgGen;
91  if(0 != _localRnd) delete _localRnd;
92  }
FromFileGenerator * _fileGen
SignalGenerator * _sgGen

◆ AmpsPdfFlexiFast() [2/2]

AmpsPdfFlexiFast::AmpsPdfFlexiFast ( const DalitzEventPattern pat,
IFastAmplitudeIntegrable amps,
MinuitParameterSet mps,
double  precision = 1.e-4,
std::string  method = "efficient",
std::string  fname = "SignalIntegrationEvents.root",
bool  genMoreEvents = false 
)
inline

Definition at line 100 of file BsDsKpipi_TD_ampFit.cpp.

107  : DalitzPdfBaseFlexiFastInteg(pat, 0, amps, precision, mps)
108  , _localRnd(0)
109  , _sgGen(0)
110  , _fileGen(0)
111  , _chosenGen(0)
112  , _integratorSource("IntegratorSource", (std::string) "new", (char*) 0)
113  , _integratorFileName(fname)
114  {
115  cout << " AmpsPdfFlexiFast with integ method " << method << endl;
116  bool nonFlat = "efficient" == method;
117  bool generateNew = ((string)_integratorSource == (string)"new");
118  if(nonFlat){
119  cout << "AmpsPdfFlexiFast uses nonFlat integration." << endl;
120  if(generateNew){
121  _sgGen = new SignalGenerator(pat);
122  _sgGen->setWeighted();
123  //_sgGen->setSaveEvents(_integratorFileName);
124  _chosenGen = _sgGen;
125  }else{
126  // here, SignalGenerator is used by FromFileGenerator, to fill
127  // up missing events in case more are needed than found in the
128  // file. Since we don't know with which random seed the
129  // events in the file were generated, we supply a random
130  // number generator with randomised seed.
131  _localRnd = new TRandom3(time(0));
132  _sgGen = new SignalGenerator(pat, _localRnd);
133  _sgGen->setWeighted();
134  _sgGen->dontSaveEvents();// saving events is done by FromFileGenerator
135  if(genMoreEvents) _fileGen = new FromFileGenerator(_integratorFileName, _sgGen);
136  else{
137  _fileGen = new FromFileGenerator(_integratorFileName, 0, "UPDATE");
138  cout << "not going to generate any more events" << endl;
139  }
141  }
143  }else{
144  cout << "AmpsPdfFlexiFast uses flat integration." << endl;
145  }
146  }
FromFileGenerator * _fileGen
std::string _integratorFileName
void dontSaveEvents()
void setWeighted(bool w=true)
Definition: BaseGenerator.h:62
void setEventGenerator(MINT::IEventGenerator< IDalitzEvent > *g)
DalitzPdfBaseFlexiFastInteg(const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
SignalGenerator * _sgGen
MINT::NamedParameter< std::string > _integratorSource
MINT::IEventGenerator< IDalitzEvent > * _chosenGen

◆ ~AmpsPdfFlexiFast() [2/2]

AmpsPdfFlexiFast::~AmpsPdfFlexiFast ( )
inline

Definition at line 150 of file BsDsKpipi_TD_ampFit.cpp.

150  {
151  if(0 != _fileGen) delete _fileGen;
152  if(0 != _sgGen) delete _sgGen;
153  if(0 != _localRnd) delete _localRnd;
154  }
FromFileGenerator * _fileGen
SignalGenerator * _sgGen

Member Function Documentation

◆ ComplexVal_un_normalised_noPs() [1/2]

std::complex<double> AmpsPdfFlexiFast::ComplexVal_un_normalised_noPs ( IDalitzEvent evt)
inline

Definition at line 34 of file AmpsPdfFlexiFast.h.

34  {
35  return _amps->ComplexVal(evt);
36  }
virtual std::complex< double > ComplexVal(IDalitzEvent &evt)
IFastAmplitudeIntegrable * _amps

◆ ComplexVal_un_normalised_noPs() [2/2]

std::complex<double> AmpsPdfFlexiFast::ComplexVal_un_normalised_noPs ( IDalitzEvent evt)
inline

Definition at line 96 of file BsDsKpipi_TD_ampFit.cpp.

96  {
97  return _amps->ComplexVal(evt);
98  }
virtual std::complex< double > ComplexVal(IDalitzEvent &evt)
IFastAmplitudeIntegrable * _amps

◆ getAmpSum() [1/2]

IFastAmplitudeIntegrable* AmpsPdfFlexiFast::getAmpSum ( )
inline

Definition at line 86 of file AmpsPdfFlexiFast.h.

86 { return _amps;}
IFastAmplitudeIntegrable * _amps

◆ getAmpSum() [2/2]

IFastAmplitudeIntegrable* AmpsPdfFlexiFast::getAmpSum ( )
inline

Definition at line 148 of file BsDsKpipi_TD_ampFit.cpp.

148 { return _amps;}
IFastAmplitudeIntegrable * _amps

◆ un_normalised_noPs() [1/2]

double AmpsPdfFlexiFast::un_normalised_noPs ( IDalitzEvent evt)
inlinevirtual

Implements DalitzPdfBaseFlexiFastInteg.

Definition at line 29 of file AmpsPdfFlexiFast.h.

29  {
30  double ampSq = _amps->RealVal(evt);
31  return ampSq;// * getEvent()->phaseSpace();
32  }
virtual double RealVal(EVENT_TYPE &evt)=0
IFastAmplitudeIntegrable * _amps

◆ un_normalised_noPs() [2/2]

double AmpsPdfFlexiFast::un_normalised_noPs ( IDalitzEvent evt)
inlinevirtual

Implements DalitzPdfBaseFlexiFastInteg.

Definition at line 91 of file BsDsKpipi_TD_ampFit.cpp.

91  {
92  double ampSq = _amps->RealVal(evt);
93  return ampSq;// * getEvent()->phaseSpace();
94  }
virtual double RealVal(EVENT_TYPE &evt)=0
IFastAmplitudeIntegrable * _amps

Member Data Documentation

◆ _chosenGen [1/2]

MINT::IEventGenerator<IDalitzEvent>* AmpsPdfFlexiFast::_chosenGen
protected

Definition at line 25 of file AmpsPdfFlexiFast.h.

◆ _chosenGen [2/2]

IEventGenerator<IDalitzEvent>* AmpsPdfFlexiFast::_chosenGen
protected

Definition at line 87 of file BsDsKpipi_TD_ampFit.cpp.

◆ _fileGen

FromFileGenerator * AmpsPdfFlexiFast::_fileGen
protected

Definition at line 24 of file AmpsPdfFlexiFast.h.

◆ _integratorFileName

std::string AmpsPdfFlexiFast::_integratorFileName
protected

Definition at line 27 of file AmpsPdfFlexiFast.h.

◆ _integratorSource [1/2]

MINT::NamedParameter<std::string> AmpsPdfFlexiFast::_integratorSource
protected

Definition at line 26 of file AmpsPdfFlexiFast.h.

◆ _integratorSource [2/2]

NamedParameter<std::string> AmpsPdfFlexiFast::_integratorSource
protected

Definition at line 88 of file BsDsKpipi_TD_ampFit.cpp.

◆ _localRnd

TRandom * AmpsPdfFlexiFast::_localRnd
protected

Definition at line 22 of file AmpsPdfFlexiFast.h.

◆ _sgGen

SignalGenerator * AmpsPdfFlexiFast::_sgGen
protected

Definition at line 23 of file AmpsPdfFlexiFast.h.


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