gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
BaseLimitContainer.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
20 
21 #pragma once
22 
23 #include <algorithm>
24 #include <cmath>
25 #include <cstdlib>
26 #include <fstream>
27 #include <iostream>
28 #include <limits>
29 #include <map>
30 #include <string>
31 #include <utility>
32 #include <vector>
33 
36 
37 namespace Gambit
38 {
39  namespace ColliderBit
40  {
41 
43  inline LineSegment makeLine(const P2& pt1, const P2& pt2) { return LineSegment(pt1, pt2); }
44 
47  {
48 
50 
51 
52  protected:
53  typedef std::vector<P2> Corners;
54  typedef std::vector<LineSegment> Contours;
55  typedef Contours* ContoursPointer;
56  typedef std::map<unsigned, Contours*> LimitContours;
57  typedef std::pair<unsigned, Contours*> LimitContourEntry;
58 
60  // The collection of all limit values, sorted from min limit to max limit
61  std::vector<double> _limitValuesSorted;
62 
63  // The collection of all limit contours
64  LimitContours _limitContours;
65 
66  // Some point external to all limit contours
68 
70 
72 
73 
74  public:
75 
77 
78  virtual ~BaseLimitContainer();
79 
81 
83 
84 
85  public:
86 
88  virtual P2 convertPt(double x, double y) const = 0;
89 
91  virtual bool isWithinExclusionRegion(double x, double y, double mZ) const = 0;
92 
94  virtual double specialLimit(double, double) const;
95 
97  double limitAverage(double x, double y, double mZ) const;
98 
100  void dumpPlotData(double xlow, double xhigh, double ylow, double yhigh,
101  double mZ, std::string filename, int ngrid=100) const;
102 
104  void dumpLightPlotData(std::string filename, int nperLine=20) const;
105 
107  };
108 
109  }
110 }
Base class for experimental limit curve interpolation.
virtual bool isWithinExclusionRegion(double x, double y, double mZ) const =0
Check to see if the point is within the exclusion region.
Types used internally, returned and/or read in by more than one backend, model or module...
LineSegment makeLine(const P2 &pt1, const P2 &pt2)
Factory function for lines.
double limitAverage(double x, double y, double mZ) const
Two-pi averaging interpolator to find limits between limit curves.
std::pair< unsigned, Contours * > LimitContourEntry
A simple container for a point on an xy plane.
void dumpPlotData(double xlow, double xhigh, double ylow, double yhigh, double mZ, std::string filename, int ngrid=100) const
Dump limit average data into a file for average debugging.
A simple container for a line segment on an xy plane.
void dumpLightPlotData(std::string filename, int nperLine=20) const
Dump input limit contour data into a file for limit debugging.
virtual P2 convertPt(double x, double y) const =0
Convert a point from pixel units to axis units, creating a P2.
virtual double specialLimit(double, double) const
Return the limit value outside of the exclusion region.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
std::map< unsigned, Contours * > LimitContours