ATLAS Offline Software
DetAnnealingMaker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRKVERTEXADAPTIVEFITTERUTILS_DETANNEALINGMAKER_H
6 #define TRKVERTEXADAPTIVEFITTERUTILS_DETANNEALINGMAKER_H
7 
10 
19 namespace Trk
20 {
21  class DetAnnealingMaker : public extends<AthAlgTool, IVertexAnnealingMaker>
22  {
23  public:
24 
25  virtual StatusCode initialize() override;
26  virtual StatusCode finalize() override;
27 
31  DetAnnealingMaker(const std::string& t, const std::string& n, const IInterface* p);
32 
36  virtual void reset(AnnealingState& state) const override;
37 
41  virtual void anneal(AnnealingState& state) const override;
42 
46  virtual double getWeight(const AnnealingState& state,
47  double chisq,
48  const std::vector<double>& allchisq) const override;
49 
53  virtual double getWeight(const AnnealingState& state,
54  double chisq) const override;
55 
59  virtual bool isEquilibrium(const AnnealingState& state) const override
60  {
61  return state >= m_SetOfTemperatures.size();
62  }
63 
67  virtual double actualTemp(const AnnealingState& state) const override
68  {
69  if (state >= m_SetOfTemperatures.size()) {
70  return m_SetOfTemperatures.back();
71  }
72  return m_SetOfTemperatures[state];
73  }
74 
75  private:
76 
80  std::vector<double> m_SetOfTemperatures;
81 
85  double m_cutoff;
86  };
87 }
88 #endif
Trk::DetAnnealingMaker::DetAnnealingMaker
DetAnnealingMaker(const std::string &t, const std::string &n, const IInterface *p)
Default constructor due to Athena interface.
Definition: DetAnnealingMaker.cxx:22
Trk::DetAnnealingMaker::isEquilibrium
virtual bool isEquilibrium(const AnnealingState &state) const override
Equilibrium is reached (last scheduled temperature)
Definition: DetAnnealingMaker.h:59
Trk::DetAnnealingMaker::finalize
virtual StatusCode finalize() override
Definition: DetAnnealingMaker.cxx:37
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::DetAnnealingMaker::m_SetOfTemperatures
std::vector< double > m_SetOfTemperatures
A vector of temperatures, you will start from SetOfTemperature[0] and Anneal towards SetOfTemperature...
Definition: DetAnnealingMaker.h:80
AthAlgTool.h
IVertexAnnealingMaker.h
Trk::DetAnnealingMaker
Definition: DetAnnealingMaker.h:22
Trk::DetAnnealingMaker::anneal
virtual void anneal(AnnealingState &state) const override
One more annealing step.
Definition: DetAnnealingMaker.cxx:49
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::DetAnnealingMaker::actualTemp
virtual double actualTemp(const AnnealingState &state) const override
Access to the actual temperature value.
Definition: DetAnnealingMaker.h:67
Trk::DetAnnealingMaker::reset
virtual void reset(AnnealingState &state) const override
Resets the annealing process to its beginning.
Definition: DetAnnealingMaker.cxx:43
Trk::DetAnnealingMaker::getWeight
virtual double getWeight(const AnnealingState &state, double chisq, const std::vector< double > &allchisq) const override
Weight access method.
Definition: DetAnnealingMaker.cxx:60
Trk::DetAnnealingMaker::initialize
virtual StatusCode initialize() override
Definition: DetAnnealingMaker.cxx:31
Trk::DetAnnealingMaker::m_cutoff
double m_cutoff
Weight will be insensitive to chi2 at order of magnitude of the cutoff...
Definition: DetAnnealingMaker.h:85