MINT2
IPdf.h
Go to the documentation of this file.
1 #ifndef IPDF_HH
2 #define IPDF_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:56 GMT
5 
8 #include <iostream>
9 #include <vector>
10 
11 namespace MINT{
12 
13 template<typename EVENT>
14 class IPdf : virtual public IReturnRealForEvent<EVENT>{
15  public:
16  virtual double getVal(EVENT & EVT)=0;
17  virtual double RealVal(EVENT & EVT)=0;
18 
19  virtual void beginFit()=0;
20  virtual void parametersChanged()=0;
21  virtual void endFit()=0;
22 
23  virtual void Gradient(EVENT & evt, std::vector<double>& grad, MINT::MinuitParameterSet* mps){
24  std::cout << "Gradient of pdf is not implemented. Please implement me or set useAnalyticGradient to 0 in your options file. I'll crash now. " << std::endl;
25  throw "crash";
26  (void)evt;
27  (void)grad;
28  (void)mps;
29  }
30  virtual bool useAnalyticGradient() {return false;}
31  // virtual IPdf<EVENT>* Clone() const=0;
32 
33 };
34 }// namespace MINT
35 #endif
36 //
virtual void parametersChanged()=0
virtual double getVal(EVENT &EVT)=0
virtual bool useAnalyticGradient()
Definition: IPdf.h:30
virtual void endFit()=0
virtual void Gradient(EVENT &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
Definition: IPdf.h:23
virtual void beginFit()=0
virtual double RealVal(EVENT &EVT)=0