MINT2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DalitzPdfBaseFastInteg Class Referenceabstract

#include <DalitzPdfBaseFastInteg.h>

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

Public Member Functions

 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 Member Functions

void setup ()
 
bool makeAmps ()
 
virtual double un_normalised_noPs (IDalitzEvent &evt)=0
 
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 ()
 

Protected Attributes

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
 

Detailed Description

Definition at line 52 of file DalitzPdfBaseFastInteg.h.

Constructor & Destructor Documentation

◆ DalitzPdfBaseFastInteg() [1/3]

DalitzPdfBaseFastInteg::DalitzPdfBaseFastInteg ( const DalitzEventPattern pat,
MINT::IEventGenerator< IDalitzEvent > *  generator,
IFastAmplitudeIntegrable amps,
double  precision = 1.e-3,
MINT::MinuitParameterSet mps = 0 
)

Definition at line 124 of file DalitzPdfBaseFastInteg.cpp.

133  , _mps(mps)
134  , _pat(pat)
135  , _norm(-1)
136  , _precision(prec)
137  , _amps(amps)
138  , _countedAmps(0)
139  //, _efficiency(0)
140  , _generator(generator)
141  , _integrating(0)
142  , _defaultGenerator(0)
144  , _val(-1)
145  , _gradNorm(1)
146  , _redoGradNorm(true)
147 {
148  setup();
149  _gradNorm.resize(this->getMPS()->size());
150  //_gradNorm= new Double_t[this->getMPS()->size()];
151  for(unsigned int i=0; i < _gradNorm.size(); i++) _gradNorm[i]= 0.;
152 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::counted_ptr< IFastAmplitudeIntegrable > _countedAmps
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
std::string _commaSepList_of_SavedIntegrators
MINT::MinuitParameterSet * _mps
IFastAmplitudeIntegrable * _amps
std::vector< double > _gradNorm
MINT::MinuitParameterSet * getMPS()

◆ DalitzPdfBaseFastInteg() [2/3]

DalitzPdfBaseFastInteg::DalitzPdfBaseFastInteg ( const DalitzEventPattern pat,
MINT::IEventGenerator< IDalitzEvent > *  generator = 0,
MINT::MinuitParameterSet mps = 0,
double  precision = 1.e-3 
)

Definition at line 154 of file DalitzPdfBaseFastInteg.cpp.

162  , _mps(mps)
163  , _pat(pat)
164  , _norm(-1)
165  , _precision(prec)
166  , _amps(0)
167  , _countedAmps(0)
168  // , _efficiency(eff)
169  , _generator(generator)
170  , _integrating(0)
171  , _defaultGenerator(0)
173  , _val(-1)
174  , _gradNorm(1)
175  , _redoGradNorm(true)
176 {
177  setup();
178  _gradNorm.resize(this->getMPS()->size());//= new Double_t[this->getMPS()->size()];
179  for(unsigned int i=0; i < _gradNorm.size(); i++) _gradNorm[i]= 0.;
180  // cout << "pset pointer in DalitzPdfBaseFastInteg " << _mps << " = " << getMPS() << endl;
181 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::counted_ptr< IFastAmplitudeIntegrable > _countedAmps
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
std::string _commaSepList_of_SavedIntegrators
MINT::MinuitParameterSet * _mps
IFastAmplitudeIntegrable * _amps
std::vector< double > _gradNorm
MINT::MinuitParameterSet * getMPS()

◆ DalitzPdfBaseFastInteg() [3/3]

DalitzPdfBaseFastInteg::DalitzPdfBaseFastInteg ( const DalitzPdfBaseFastInteg other)

Definition at line 183 of file DalitzPdfBaseFastInteg.cpp.

186  , IDalitzPdf()
187  , PdfBase<IDalitzEvent>(other)
188  , _mps(other._mps)
189  , _pat(other._pat)
190  , _norm(other._norm)
191  , _precision(other._precision)
192  , _amps(other._amps)
193  , _countedAmps(other._countedAmps)
194  //, _efficiency(other._efficiency)
195  , _generator(other._generator)
196  , _integrating(other._integrating)
199  , _val(-1)
200  , _gradNorm(1)
201  , _redoGradNorm(true)
202 {
203  setup();
204  _gradNorm.resize(this->getMPS()->size());//= new Double_t[this->getMPS()->size()];
205  for(unsigned int i=0; i < _gradNorm.size(); i++) _gradNorm[i]= 0.;
206 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::counted_ptr< IFastAmplitudeIntegrable > _countedAmps
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
std::string _commaSepList_of_SavedIntegrators
MINT::MinuitParameterSet * _mps
IFastAmplitudeIntegrable * _amps
std::vector< double > _gradNorm
MINT::MinuitParameterSet * getMPS()

◆ ~DalitzPdfBaseFastInteg()

DalitzPdfBaseFastInteg::~DalitzPdfBaseFastInteg ( )
virtual

Definition at line 208 of file DalitzPdfBaseFastInteg.cpp.

208  {
209  bool dbThis=false;
210  if(dbThis)cout << "DalitzPdfBaseFastInteg::~DalitzPdfBaseFastInteg() called" << endl;
211  //delete[] _gradNorm;
212  if(dbThis)cout << "DalitzPdfBaseFastInteg::~DalitzPdfBaseFastInteg() done" << endl;
213 }

Member Function Documentation

◆ absSumOfInterferenceFractions()

double DalitzPdfBaseFastInteg::absSumOfInterferenceFractions ( )
inline

Definition at line 197 of file DalitzPdfBaseFastInteg.h.

197  {
198  if(!_faint.initialised())getNorm();
200  }
FastAmplitudeIntegrator _faint

◆ absSumOfSqrtInterferenceFractions()

double DalitzPdfBaseFastInteg::absSumOfSqrtInterferenceFractions ( )
inline

Definition at line 202 of file DalitzPdfBaseFastInteg.h.

202  {
203  if(!_faint.initialised())getNorm();
205  }
FastAmplitudeIntegrator _faint

◆ doFinalStats()

void DalitzPdfBaseFastInteg::doFinalStats ( MINT::Minimiser mini = 0)

Definition at line 371 of file DalitzPdfBaseFastInteg.cpp.

371  {
372  _faint.doFinalStats(mini);
373 }
virtual void doFinalStats(MINT::Minimiser *mini=0)
FastAmplitudeIntegrator _faint

◆ endFit()

void DalitzPdfBaseFastInteg::endFit ( )
virtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 366 of file DalitzPdfBaseFastInteg.cpp.

366  {
367 
368  //_faint.doFinalStats();
369 }

◆ getAmps()

IFastAmplitudeIntegrable* DalitzPdfBaseFastInteg::getAmps ( )
inlineprotected

Definition at line 91 of file DalitzPdfBaseFastInteg.h.

91 { return _amps; }
IFastAmplitudeIntegrable * _amps

◆ GetEachAmpsHistograms()

std::vector< DalitzHistoSet > DalitzPdfBaseFastInteg::GetEachAmpsHistograms ( )

Definition at line 347 of file DalitzPdfBaseFastInteg.cpp.

347  {
348  return _faint.GetEachAmpsHistograms();
349 }
std::vector< DalitzHistoSet > GetEachAmpsHistograms()
FastAmplitudeIntegrator _faint

◆ getEventGenerator() [1/2]

IEventGenerator< IDalitzEvent > * DalitzPdfBaseFastInteg::getEventGenerator ( )

Definition at line 98 of file DalitzPdfBaseFastInteg.cpp.

98  {
100  return _generator;
101 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::IEventGenerator< IDalitzEvent > * makeDefaultGenerator()

◆ getEventGenerator() [2/2]

const IEventGenerator< IDalitzEvent > * DalitzPdfBaseFastInteg::getEventGenerator ( ) const

Definition at line 102 of file DalitzPdfBaseFastInteg.cpp.

102  {
103  if(0 == _generator){
104  cout << "WARNING in DalitzPdfBaseFastInteg::getEventGenerator() const"
105  << " returning 0 pointer." << endl;
106  }
107  return _generator;
108 }
MINT::IEventGenerator< IDalitzEvent > * _generator

◆ getFitAmpSum()

IFastAmplitudeIntegrable* DalitzPdfBaseFastInteg::getFitAmpSum ( )
inline

Definition at line 174 of file DalitzPdfBaseFastInteg.h.

174 { return _amps;}
IFastAmplitudeIntegrable * _amps

◆ getIntegralValue() [1/2]

double DalitzPdfBaseFastInteg::getIntegralValue ( ) const
inline

Definition at line 180 of file DalitzPdfBaseFastInteg.h.

180  {
181  return _norm;
182  }

◆ getIntegralValue() [2/2]

double DalitzPdfBaseFastInteg::getIntegralValue ( )
inline

Definition at line 183 of file DalitzPdfBaseFastInteg.h.

183  {
184  if(_norm < 0) getNorm(); return _norm;
185  }

◆ GetInterferenceHistograms()

std::vector< DalitzHistoSet > DalitzPdfBaseFastInteg::GetInterferenceHistograms ( )

Definition at line 362 of file DalitzPdfBaseFastInteg.cpp.

362  {
364 }
std::vector< DalitzHistoSet > GetInterferenceHistograms()
FastAmplitudeIntegrator _faint

◆ getMPS() [1/2]

MinuitParameterSet * DalitzPdfBaseFastInteg::getMPS ( )

Definition at line 13 of file DalitzPdfBaseFastInteg.cpp.

13  {
14  return (0 == _mps ? MinuitParameterSet::getDefaultSet() : _mps);
15 }
MINT::MinuitParameterSet * _mps

◆ getMPS() [2/2]

const MinuitParameterSet * DalitzPdfBaseFastInteg::getMPS ( ) const

Definition at line 16 of file DalitzPdfBaseFastInteg.cpp.

16  {
17  return (0 == _mps ? MinuitParameterSet::getDefaultSet() : _mps);
18 }
MINT::MinuitParameterSet * _mps

◆ getNewVal() [1/2]

virtual double DalitzPdfBaseFastInteg::getNewVal ( IDalitzEvent evt)
inlinevirtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 125 of file DalitzPdfBaseFastInteg.h.

125  {
126  this->parametersChanged();
127  return getVal(evt);
128  };
virtual double getVal(IDalitzEvent &evt)

◆ getNewVal() [2/2]

virtual double DalitzPdfBaseFastInteg::getNewVal ( IDalitzEvent evt)
inlinevirtual

Definition at line 143 of file DalitzPdfBaseFastInteg.h.

143  {
144  this->parametersChanged();
145  if(0 == evt) return 0;
146  return getNewVal(*evt);
147  }
virtual double getNewVal(IDalitzEvent &evt)

◆ getNorm()

bool DalitzPdfBaseFastInteg::getNorm ( )
protectedvirtual

Definition at line 24 of file DalitzPdfBaseFastInteg.cpp.

24  {
25  _integrating = true;
26  if( ! _faint.initialised()){
27  if(_pat.empty()){
28  cout << "DalitzPdfBaseFastInteg::getNorm: don't know event pattern!"
29  << endl;
30  _integrating = false;
31  return false;
32  }
33  if(0 == getAmps()){
34  cout << "DalitzPdfBaseFastInteg::getNorm: don't have amps!"
35  << endl;
36  _integrating = false;
37  return false;
38  }
39 
40  /*
41  if("" != _commaSepList_of_SavedIntegrators){
42  _faint.initialiseFromFile(evtPtr->eventPattern()
43  , _amps
44  , _commaSepList_of_SavedIntegrators);
45  }else{
46  */
48  , _pat
49  , getAmps()
50  //, _efficiency
52  , gRandom
53  , _precision
54  );
55  //}
56 
57 #ifdef CHECK_INTEGRATOR
58  cout << "WARNING in DalitzPdfBaseFastInteg::getNorm!!!"
59  << " using old, inefficient integrator."
60  << " Won't work for efficiencies!!"
61  << endl;
62  _mcint.initialise(evtPtr->eventPattern()
63  , getAmps()//this
65  , gRandom
66  , _precision
67  );
68 #endif
69  }
70 
71  _norm = _faint.getVal();
72 
73 
74 #ifdef CHECK_INTEGRATOR
75  double fastVal = _norm;
76  double oldVal = _mcint.getVal();
77  cout << "DalitzPdfBaseFastInteg::getNorm:"
78  << " compare mcint integral with fast: "
79  << "\n\t old: " << oldVal << " , fast: " << fastVal
80  << ", ratio " << oldVal/fastVal
81  << endl;
82  _norm = oldVal;
83 #endif
84 
85 
86  _integrating = false;
87  return _norm > 0;
88 }
IFastAmplitudeIntegrable * getAmps()
MINT::IEventGenerator< IDalitzEvent > * getEventGenerator()
bool initialise(const DalitzEventPattern &pattern, IFastAmplitudeIntegrable *amps=0, MINT::IEventGenerator< IDalitzEvent > *eventGenerator=0, TRandom *rnd=0, double precision=1.e-2)
std::string _commaSepList_of_SavedIntegrators
FastAmplitudeIntegrator _faint

◆ getVal() [1/2]

double DalitzPdfBaseFastInteg::getVal ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 238 of file DalitzPdfBaseFastInteg.cpp.

238  {
239  if(_pat.empty()) _pat = evt.eventPattern();
240  if(_integrating) return getVal_withPs(evt);
241  else return getVal_noPs(evt);
242 }
virtual double getVal_noPs(IDalitzEvent &evt)
virtual double getVal_withPs(IDalitzEvent &evt)
virtual const DalitzEventPattern & eventPattern() const =0

◆ getVal() [2/2]

virtual double DalitzPdfBaseFastInteg::getVal ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 131 of file DalitzPdfBaseFastInteg.h.

131  {
132  if(0 == evt) return 0;
133  return getVal(*evt);
134  }
virtual double getVal(IDalitzEvent &evt)

◆ getVal_noPs() [1/2]

double DalitzPdfBaseFastInteg::getVal_noPs ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 243 of file DalitzPdfBaseFastInteg.cpp.

243  {
244  bool dbThis=false;
245  static double maxVal=0;
246  if(_pat.empty()) _pat = evt.eventPattern();
247 
248  if(_integrating){
249  // shouldn't really do that - use getVal or getVal_withPs
250  // when you integrate (automatically done in getVal()):
251  return un_normalised_noPs(evt);
252  }else{
253  if(_norm == -1) getNorm();
254  double num = un_normalised_noPs(evt);
255  if(dbThis){
256  double val=num/_norm;
257  if(fabs(val) > maxVal){
258  maxVal=fabs(val);
259  if(dbThis){
260  cout << "biggest un_normalised / norm, yet: "
261  << num << " / " <<_norm
262  << " = " << num/_norm
263  << ". ps = " << phaseSpace(evt)
264  << endl;
265  cout << "for event: "; evt.print(); cout << endl;
266  }
267  }
268  }
269 
270  /*
271  cout << "\n DalitzPdfBaseFastInteg::getVal_noPs():"
272  << " for event ptr " << getEvent()
273  << " returning "
274  << num << " / " << _norm << endl;
275  */
276 
277  _val= num/_norm;
278  if(dbThis) cout << "DalitzPdfBaseFastInteg::getVal_noPs: returning "
279  << _val << endl;
280  return num/_norm;
281  }
282 }
virtual void print(std::ostream &os=std::cout) const =0
virtual double un_normalised_noPs(IDalitzEvent &evt)=0
virtual const DalitzEventPattern & eventPattern() const =0
virtual double phaseSpace(IDalitzEvent &evt)

◆ getVal_noPs() [2/2]

virtual double DalitzPdfBaseFastInteg::getVal_noPs ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 139 of file DalitzPdfBaseFastInteg.h.

139  {
140  if(0 == evt) return 0;
141  return getVal_noPs(*evt);
142  }
virtual double getVal_noPs(IDalitzEvent &evt)

◆ getVal_withPs() [1/2]

double DalitzPdfBaseFastInteg::getVal_withPs ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 283 of file DalitzPdfBaseFastInteg.cpp.

283  {
284  if(_pat.empty()) _pat = evt.eventPattern();
285 
286  if(_integrating){
287  return un_normalised_noPs(evt)*phaseSpace(evt);
288  }else{
289  if(_norm == -1) getNorm();
290  double num = un_normalised_noPs(evt)*phaseSpace(evt);
291  return num/_norm;
292  }
293 }
virtual double un_normalised_noPs(IDalitzEvent &evt)=0
virtual const DalitzEventPattern & eventPattern() const =0
virtual double phaseSpace(IDalitzEvent &evt)

◆ getVal_withPs() [2/2]

virtual double DalitzPdfBaseFastInteg::getVal_withPs ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 135 of file DalitzPdfBaseFastInteg.h.

135  {
136  if(0 == evt) return 0;
137  return getVal_withPs(*evt);
138  }
virtual double getVal_withPs(IDalitzEvent &evt)

◆ Gradient()

void DalitzPdfBaseFastInteg::Gradient ( IDalitzEvent evt,
std::vector< double > &  grad,
MINT::MinuitParameterSet mps 
)
virtual

Reimplemented from MINT::IPdf< IDalitzEvent >.

Definition at line 295 of file DalitzPdfBaseFastInteg.cpp.

295  {
296 
297  if(_val == -1)un_normalised_noPs(evt);
298  if(_norm == -1) getNorm();
299 
300  unsigned int N= mps->size();
301 
302  std::vector<double> gradAmpSum(N);
303  for(unsigned int j=0; j < gradAmpSum.size(); j++) gradAmpSum[j]= 0.;
304 
305  _amps->Gradient(evt,gradAmpSum,mps);
306 
307  if(_redoGradNorm){
308  for(unsigned int j=0; j < _gradNorm.size(); j++) _gradNorm[j]= 0.;
309  _faint.Gradient(mps, _gradNorm);
310  _redoGradNorm=false;
311  }
312 
313  if(_gradNorm.size() != grad.size() || gradAmpSum.size() !=grad.size()
314  || gradAmpSum.size() != _gradNorm.size()){
315  cout << "array size mismatch in DalitzPdfBaseFastInteg::Gradient" << endl;
316  throw "out";
317  }
318 
319  for (unsigned int i=0; i<N; i++) {
320  if(mps->getParPtr(i)->hidden() || mps->getParPtr(i)->iFixInit())continue;
321  grad.at(i)= gradAmpSum.at(i)/_norm- _val/_norm*_gradNorm.at(i);
322  }
323 
324 
325 }
virtual int iFixInit() const =0
IMinuitParameter * getParPtr(unsigned int i)
unsigned int size() const
virtual double un_normalised_noPs(IDalitzEvent &evt)=0
virtual bool hidden() const =0
IFastAmplitudeIntegrable * _amps
std::vector< double > _gradNorm
virtual void Gradient(IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
FastAmplitudeIntegrator _faint
void Gradient(MINT::MinuitParameterSet *mps, std::vector< double > &grad)

◆ GradientForLasso()

void DalitzPdfBaseFastInteg::GradientForLasso ( std::vector< double > &  grad)
virtual

Definition at line 327 of file DalitzPdfBaseFastInteg.cpp.

327  {
328  _faint.GradientForLasso(this->getMPS(),grad);
329 }
void GradientForLasso(MINT::MinuitParameterSet *mps, std::vector< double > &grad)
MINT::MinuitParameterSet * getMPS()
FastAmplitudeIntegrator _faint

◆ histoSet() [1/2]

DalitzHistoSet DalitzPdfBaseFastInteg::histoSet ( ) const
virtual

Definition at line 334 of file DalitzPdfBaseFastInteg.cpp.

334  {
335  return (_faint.histoSet());
336 }
DalitzHistoSet histoSet() const
FastAmplitudeIntegrator _faint

◆ histoSet() [2/2]

DalitzHistoSet DalitzPdfBaseFastInteg::histoSet ( )
virtual

Implements IDalitzPdf.

Definition at line 337 of file DalitzPdfBaseFastInteg.cpp.

337  {
338  // non-const version to satisfy IDalitzPdf
339  return (_faint.histoSet());
340 }
DalitzHistoSet histoSet() const
FastAmplitudeIntegrator _faint

◆ integrating()

bool DalitzPdfBaseFastInteg::integrating ( )
protectedvirtual

Definition at line 231 of file DalitzPdfBaseFastInteg.cpp.

231  {
232  return _integrating;
233 }

◆ interferenceHistoSet() [1/2]

DalitzHistoSet DalitzPdfBaseFastInteg::interferenceHistoSet ( ) const
virtual

Definition at line 351 of file DalitzPdfBaseFastInteg.cpp.

351  {
352  return (_faint.interferenceHistoSet());
353 }
FastAmplitudeIntegrator _faint
DalitzHistoSet interferenceHistoSet() const

◆ interferenceHistoSet() [2/2]

DalitzHistoSet DalitzPdfBaseFastInteg::interferenceHistoSet ( )
virtual

Definition at line 354 of file DalitzPdfBaseFastInteg.cpp.

354  {
355  // non-const version to satisfy IDalitzPdf
356  return (_faint.interferenceHistoSet());
357 }
FastAmplitudeIntegrator _faint
DalitzHistoSet interferenceHistoSet() const

◆ makeAmps()

bool DalitzPdfBaseFastInteg::makeAmps ( )
protected

Definition at line 218 of file DalitzPdfBaseFastInteg.cpp.

218  {
219  cout << "DalitzPdfBaseFastInteg::makeAmps() with MPS pointer " << getMPS()
220  << " and _amps pointer " << _amps << endl;
221  if(0 == _amps && (! _pat.empty())){
222  cout << "DalitzPdfBaseFastInteg::getAmps() making _amps with pointer " << getMPS()
223  << endl;
224  _amps = new FitAmpSum(_pat, getMPS());
226  _countedAmps = cp;
227  }
228  return (bool) _amps;
229 }
MINT::counted_ptr< IFastAmplitudeIntegrable > _countedAmps
IFastAmplitudeIntegrable * _amps
MINT::MinuitParameterSet * getMPS()

◆ makeDefaultGenerator()

IEventGenerator< IDalitzEvent > * DalitzPdfBaseFastInteg::makeDefaultGenerator ( )
protected

Definition at line 89 of file DalitzPdfBaseFastInteg.cpp.

89  {
90  if(_pat.empty()) return 0;
91  if(0 == getAmps()) return 0;
93  ptr(getAmps()->makeEventGenerator(_pat));
94  _defaultGenerator = ptr;
95  return _defaultGenerator.get();
96 }
IFastAmplitudeIntegrable * getAmps()
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
X * get() const
Definition: counted_ptr.h:123

◆ makePlots()

bool DalitzPdfBaseFastInteg::makePlots ( const std::string &  filename) const

Definition at line 331 of file DalitzPdfBaseFastInteg.cpp.

331  {
332  return histoSet().save(filename);
333 }
virtual DalitzHistoSet histoSet() const
bool save(const std::string &filename="DalitzHistos.root") const

◆ numberOfFitFractionsLargerThanThreshold()

int DalitzPdfBaseFastInteg::numberOfFitFractionsLargerThanThreshold ( double  threshold)
inline

Definition at line 212 of file DalitzPdfBaseFastInteg.h.

212  {
214  }
FastAmplitudeIntegrator _faint
int numberOfFitFractionsLargerThanThreshold(double threshold)

◆ parametersChanged()

void DalitzPdfBaseFastInteg::parametersChanged ( )
virtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 118 of file DalitzPdfBaseFastInteg.cpp.

118  {
119  getNorm();
120  _val= -1;
121  _redoGradNorm=true;
122 }

◆ phaseSpace()

double DalitzPdfBaseFastInteg::phaseSpace ( IDalitzEvent evt)
protectedvirtual

Definition at line 235 of file DalitzPdfBaseFastInteg.cpp.

235  {
236  return evt.phaseSpace();
237 }
virtual double phaseSpace() const =0

◆ RealVal()

virtual double DalitzPdfBaseFastInteg::RealVal ( IDalitzEvent evt)
inlinevirtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 153 of file DalitzPdfBaseFastInteg.h.

153 {return getVal(evt);}
virtual double getVal(IDalitzEvent &evt)

◆ redoIntegrator()

double DalitzPdfBaseFastInteg::redoIntegrator ( )
inline

Definition at line 186 of file DalitzPdfBaseFastInteg.h.

186  {
187  _norm = -1;
188  getNorm();
189  return _norm;
190  }

◆ saveEachAmpsHistograms()

void DalitzPdfBaseFastInteg::saveEachAmpsHistograms ( const std::string &  prefix) const

Definition at line 342 of file DalitzPdfBaseFastInteg.cpp.

342  {
344  return;
345 }
void saveEachAmpsHistograms(const std::string &prefix) const
FastAmplitudeIntegrator _faint

◆ saveIntegrator()

bool DalitzPdfBaseFastInteg::saveIntegrator ( const std::string &  fname) const

Definition at line 20 of file DalitzPdfBaseFastInteg.cpp.

20  {
21  return _faint.save(fname);
22 }
bool save(const std::string &fname) const
FastAmplitudeIntegrator _faint

◆ saveInterferenceHistograms()

void DalitzPdfBaseFastInteg::saveInterferenceHistograms ( const std::string &  prefix) const

Definition at line 358 of file DalitzPdfBaseFastInteg.cpp.

358  {
360  return;
361 }
FastAmplitudeIntegrator _faint
void saveInterferenceHistograms(const std::string &prefix) const

◆ setEventGenerator()

void DalitzPdfBaseFastInteg::setEventGenerator ( MINT::IEventGenerator< IDalitzEvent > *  g)
inline

Definition at line 116 of file DalitzPdfBaseFastInteg.h.

116 {_generator=g;}
MINT::IEventGenerator< IDalitzEvent > * _generator
static const double g

◆ setIntegrationPrecision()

void DalitzPdfBaseFastInteg::setIntegrationPrecision ( double  prec)

Definition at line 110 of file DalitzPdfBaseFastInteg.cpp.

110  {
111  _precision = prec;
112 #ifdef CHECK_INTEGRATOR
113  _mcint.setPrecision(_precision);
114 #endif
116 }
FastAmplitudeIntegrator _faint

◆ setIntegratorFileName()

void DalitzPdfBaseFastInteg::setIntegratorFileName ( const std::string &  commaSeparatedList)

Definition at line 375 of file DalitzPdfBaseFastInteg.cpp.

375  {
376  _commaSepList_of_SavedIntegrators=commaSeparatedList;
377 }
std::string _commaSepList_of_SavedIntegrators

◆ setup()

void DalitzPdfBaseFastInteg::setup ( )
protected

Definition at line 215 of file DalitzPdfBaseFastInteg.cpp.

215  {
216  makeAmps(); // it's important to do this at construction time, otherwise the MinuitParameterSet will be empty.
217 }

◆ sumOfFitFractions()

double DalitzPdfBaseFastInteg::sumOfFitFractions ( )
inline

Definition at line 192 of file DalitzPdfBaseFastInteg.h.

192  {
193  if(!_faint.initialised())getNorm();
194  return _faint.sumOfFitFractions();
195  }
FastAmplitudeIntegrator _faint

◆ sumOfSqrtFitFractions()

double DalitzPdfBaseFastInteg::sumOfSqrtFitFractions ( )
inline

Definition at line 207 of file DalitzPdfBaseFastInteg.h.

207  {
208  if(!_faint.initialised())getNorm();
209  return _faint.sumOfSqrtFitFractions();
210  }
FastAmplitudeIntegrator _faint

◆ un_normalised_noPs()

virtual double DalitzPdfBaseFastInteg::un_normalised_noPs ( IDalitzEvent evt)
protectedpure virtual

Implemented in AmpsPdf, and DalitzPdfSaveInteg.

◆ useAnalyticGradient()

bool DalitzPdfBaseFastInteg::useAnalyticGradient ( )
inlinevirtual

Reimplemented from MINT::IPdf< IDalitzEvent >.

Definition at line 151 of file DalitzPdfBaseFastInteg.h.

151 {return getAmps()->useAnalyticGradient();}
IFastAmplitudeIntegrable * getAmps()

Member Data Documentation

◆ _amps

IFastAmplitudeIntegrable* DalitzPdfBaseFastInteg::_amps
protected

Definition at line 65 of file DalitzPdfBaseFastInteg.h.

◆ _commaSepList_of_SavedIntegrators

std::string DalitzPdfBaseFastInteg::_commaSepList_of_SavedIntegrators
protected

Definition at line 73 of file DalitzPdfBaseFastInteg.h.

◆ _countedAmps

MINT::counted_ptr<IFastAmplitudeIntegrable> DalitzPdfBaseFastInteg::_countedAmps
protected

Definition at line 66 of file DalitzPdfBaseFastInteg.h.

◆ _defaultGenerator

MINT::counted_ptr<MINT::IEventGenerator<IDalitzEvent> > DalitzPdfBaseFastInteg::_defaultGenerator
protected

Definition at line 71 of file DalitzPdfBaseFastInteg.h.

◆ _faint

FastAmplitudeIntegrator DalitzPdfBaseFastInteg::_faint
protected

Definition at line 64 of file DalitzPdfBaseFastInteg.h.

◆ _generator

MINT::IEventGenerator<IDalitzEvent>* DalitzPdfBaseFastInteg::_generator
protected

Definition at line 69 of file DalitzPdfBaseFastInteg.h.

◆ _gradNorm

std::vector<double> DalitzPdfBaseFastInteg::_gradNorm
protected

Definition at line 75 of file DalitzPdfBaseFastInteg.h.

◆ _integrating

bool DalitzPdfBaseFastInteg::_integrating
protected

Definition at line 70 of file DalitzPdfBaseFastInteg.h.

◆ _mps

MINT::MinuitParameterSet* DalitzPdfBaseFastInteg::_mps
protected

Definition at line 57 of file DalitzPdfBaseFastInteg.h.

◆ _norm

double DalitzPdfBaseFastInteg::_norm
protected

Definition at line 59 of file DalitzPdfBaseFastInteg.h.

◆ _pat

DalitzEventPattern DalitzPdfBaseFastInteg::_pat
protected

Definition at line 58 of file DalitzPdfBaseFastInteg.h.

◆ _precision

double DalitzPdfBaseFastInteg::_precision
protected

Definition at line 60 of file DalitzPdfBaseFastInteg.h.

◆ _redoGradNorm

bool DalitzPdfBaseFastInteg::_redoGradNorm
protected

Definition at line 76 of file DalitzPdfBaseFastInteg.h.

◆ _val

double DalitzPdfBaseFastInteg::_val
protected

Definition at line 74 of file DalitzPdfBaseFastInteg.h.


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