CMS 3D CMS Logo

ConfigurableAnnealing.cc
Go to the documentation of this file.
5 #include <string>
6 
7 using namespace std;
8 
10  string type = m.getParameter<string>("annealing");
11  // edm::LogWarning("ConfigurableAnnealing") << "below one code ist still here.";
12  if (type == "below") {
13  edm::LogError("ConfigurableAnnealing") << "below one annealing employed!";
14  vector<float> sched;
15  double final = m.getParameter<double>("Tfinal");
16  sched.push_back(256.);
17  sched.push_back(64.);
18  sched.push_back(16.);
19  sched.push_back(4.);
20  sched.push_back(1.);
21  sched.push_back(final);
22  theImpl = new DeterministicAnnealing(sched, m.getParameter<double>("sigmacut"));
23  } else if (type == "geom") {
25  m.getParameter<double>("sigmacut"), m.getParameter<double>("Tini"), m.getParameter<double>("ratio"));
26  } else {
27  edm::LogError("ConfigurableAnnealing") << "annealing type " << type << " is not known.";
28  exit(-1);
29  }
30 }
31 
33 
35 
37 
39 
41 
42 double ConfigurableAnnealing::weight(double chi2) const { return theImpl->weight(chi2); }
43 
45 
46 inline double ConfigurableAnnealing::phi(double chi2) const { return theImpl->phi(chi2); }
47 
48 double ConfigurableAnnealing::cutoff() const { return theImpl->cutoff(); }
49 
51 
53 
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
double initialTemp() const override
virtual double initialTemp() const =0
#define nullptr
double cutoff() const override
virtual double weight(double chi2) const =0
virtual bool isAnnealed() const =0
virtual double phi(double chi2) const =0
virtual double cutoff() const =0
virtual double currentTemp() const =0
double weight(double chi2) const override
virtual void debug() const =0
bool isAnnealed() const override
double currentTemp() const override
ConfigurableAnnealing(const edm::ParameterSet &)
AnnealingSchedule * theImpl
virtual void anneal()=0
virtual void resetAnnealing()=0
ConfigurableAnnealing * clone() const override
double phi(double chi2) const override
void debug() const override
def exit(msg="")