MINT2
Public Member Functions | Protected Attributes | List of all members
AmpsPdf Class Reference
Inheritance diagram for AmpsPdf:
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)
 
 AmpsPdf (const DalitzEventPattern &pat, IFastAmplitudeIntegrable *amps, double precision=1.e-4, std::string method="efficient", std::string fname="SignalIntegrationEvents.root", bool genMoreEvents=false, MinuitParameterSet *mps=0)
 
IFastAmplitudeIntegrablegetAmpSum ()
 
 ~AmpsPdf ()
 
- 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
 
IEventGenerator< IDalitzEvent > * _chosenGen
 
NamedParameter< std::string > _integratorSource
 
std::string _integratorFileName
 
- 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 56 of file ampFit.cpp.

Constructor & Destructor Documentation

◆ AmpsPdf()

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

Definition at line 75 of file ampFit.cpp.

82  : DalitzPdfBaseFastInteg(pat, 0, amps, precision, mps)
83  , _localRnd(0)
84  , _sgGen(0)
85  , _fileGen(0)
86  , _chosenGen(0)
87  , _integratorSource("IntegratorSource", (std::string) "old", (char*) 0)
88 
89  , _integratorFileName(fname)
90  {
91  cout << " AmpsPdf with integ method " << method << endl;
92  bool nonFlat = "efficient" == method;
93  bool generateNew = ((string)_integratorSource == (string)"new");
94  if(nonFlat){
95  cout << "AmpsPdf uses nonFlat integration." << endl;
96  if(generateNew){
97  _sgGen = new SignalGenerator(pat, amps);
100  _chosenGen = _sgGen;
101  }else{
102  // here, SignalGenerator is used by FromFileGenerator, to fill
103  // up missing events in case more are needed than found in the
104  // file. Since we don't know with which random seed the
105  // events in the file were generated, we supply a random
106  // number generator with randomised seed.
107  cout << "Using else, AmpsPdf.h from ampFit " << endl;
108  _localRnd = new TRandom3(time(0));
109  _sgGen = new SignalGenerator(pat, amps, _localRnd);
110  _sgGen->setWeighted();
111  _sgGen->dontSaveEvents();// saving events is done by FromFileGenerator
112  if(genMoreEvents) _fileGen = new FromFileGenerator(_integratorFileName, _sgGen);
113  else{
115  cout << "not going to generate any more events" << endl;
116  }
117 
119  }
120 
122  }else{
123  cout << "AmpsPdf uses flat integration." << endl;
124  }
125  }
SignalGenerator * _sgGen
Definition: ampFit.cpp:61
NamedParameter< std::string > _integratorSource
Definition: ampFit.cpp:64
void setSaveEvents(const std::string &fname="GeneratorEvents.root", const std::string &opt="RECREATE")
DalitzPdfBaseFastInteg(const DalitzEventPattern &pat, MINT::IEventGenerator< IDalitzEvent > *generator, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::MinuitParameterSet *mps=0)
void dontSaveEvents()
FromFileGenerator * _fileGen
Definition: ampFit.cpp:62
std::string _integratorFileName
Definition: ampFit.cpp:65
void setWeighted(bool w=true)
Definition: BaseGenerator.h:62
TRandom * _localRnd
Definition: ampFit.cpp:60
void setEventGenerator(MINT::IEventGenerator< IDalitzEvent > *g)
IEventGenerator< IDalitzEvent > * _chosenGen
Definition: ampFit.cpp:63

◆ ~AmpsPdf()

AmpsPdf::~AmpsPdf ( )
inline

Definition at line 129 of file ampFit.cpp.

129  {
130  if(0 != _fileGen) delete _fileGen;
131  if(0 != _sgGen) delete _sgGen;
132  if(0 != _localRnd) delete _localRnd;
133  }
SignalGenerator * _sgGen
Definition: ampFit.cpp:61
FromFileGenerator * _fileGen
Definition: ampFit.cpp:62
TRandom * _localRnd
Definition: ampFit.cpp:60

Member Function Documentation

◆ getAmpSum()

IFastAmplitudeIntegrable* AmpsPdf::getAmpSum ( )
inline

Definition at line 127 of file ampFit.cpp.

127 { return _amps;}
IFastAmplitudeIntegrable * _amps

◆ un_normalised_noPs()

double AmpsPdf::un_normalised_noPs ( IDalitzEvent evt)
inlinevirtual

Implements DalitzPdfBaseFastInteg.

Definition at line 67 of file ampFit.cpp.

67  {
68  double ampSq = _amps->RealVal(evt);
69 
70  return ampSq;// * getEvent()->phaseSpace();
71 
72 
73  }
virtual double RealVal(EVENT_TYPE &evt)=0
IFastAmplitudeIntegrable * _amps

Member Data Documentation

◆ _chosenGen

IEventGenerator<IDalitzEvent>* AmpsPdf::_chosenGen
protected

Definition at line 63 of file ampFit.cpp.

◆ _fileGen

FromFileGenerator* AmpsPdf::_fileGen
protected

Definition at line 62 of file ampFit.cpp.

◆ _integratorFileName

std::string AmpsPdf::_integratorFileName
protected

Definition at line 65 of file ampFit.cpp.

◆ _integratorSource

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

Definition at line 64 of file ampFit.cpp.

◆ _localRnd

TRandom* AmpsPdf::_localRnd
protected

Definition at line 60 of file ampFit.cpp.

◆ _sgGen

SignalGenerator* AmpsPdf::_sgGen
protected

Definition at line 61 of file ampFit.cpp.


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