gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
OPALDegenerateCharginoLimits.cpp
Go to the documentation of this file.
2 
3 namespace Gambit
4 {
5  namespace ColliderBit
6  {
7 
9  {
10  return P2(x,y);
11  }
12 
14  {
15  std::vector<P2> data;
16  str filename;
17 
18  if(limit == 0.66) filename = "0.66pb_dark_blue";
19  else if(limit == 1.00) filename = "1.00pb_light_blue";
20  else if(limit == 1.33) filename = "1.33pb_light_green";
21  else if(limit == 1.66) filename = "1.66pb_dark_green";
22  else if(limit == 2.00) filename = "2.00pb_yellow";
23  else if(limit == 2.33) filename = "2.33pb_orange";
24  else if(limit == 2.66) filename = "2.66pb_red";
25  else if(limit == 3.00) filename = "3.00pb_purple";
26  else if(limit == 3.33) filename = "3.33pb_pink";
27  else if(limit == 3.66) filename = "3.66pb_black";
28  else if(limit == 4.00) filename = "4.00pb_white";
29 
30  str path;
31  path = GAMBIT_DIR "/ColliderBit/data/OPALdata/" + filename;
32 
33  std::ifstream file(path);
34  while(file.good())
35  {
36  std::string line;
37  getline(file,line);
38  if(!file.good()) break;
39  std::stringstream iss(line);
40  std::pair<double,double> point;
41  iss >> point.first;
42  iss.ignore();
43  iss >> point.second;
44  data.push_back(convertPt(point.first, point.second));
45  }
46 
47  return data;
48 
49  }
50 
51  bool OPALDegenerateCharginoLimitAt208GeV::isWithinExclusionRegion(double x, double y, double) const
52  {
54  return (x <= 95. and x >= 45. and y <= 5. and y >= 0.320);
55  }
56 
58  {
60  std::vector<double> limitValues = {0.66, 1.00, 1.33, 1.66, 2.00, 2.33, 2.66, 3.00, 3.33, 3.66, 4.00};
61  _limitValuesSorted.push_back(0.66); // dark blue
62  _limitValuesSorted.push_back(1.00); // light blue
63  _limitValuesSorted.push_back(1.33); // light green
64  _limitValuesSorted.push_back(1.66); // dark green
65  _limitValuesSorted.push_back(2.00); // yellow
66  _limitValuesSorted.push_back(2.33); // orange
67  _limitValuesSorted.push_back(2.66); // red
68  _limitValuesSorted.push_back(3.00); // purple
69  _limitValuesSorted.push_back(3.33); // pink
70  _limitValuesSorted.push_back(3.66); // black
71  _limitValuesSorted.push_back(4.00); // white
72 
74  Corners corners;
75  ContoursPointer contoursPointer;
76 
78  std::vector<P2> data;
79 
81  for(unsigned int i = 0; i < limitValues.size(); i++)
82  {
83  data = dataFromLimit(limitValues[i]);
84  if(data.empty())
85  break;
86 
87  corners.clear();
88  for(auto p = data.begin(); p != data.end(); p++)
89  corners.push_back(*p);
90  contoursPointer = new Contours();
91  contoursPointer->resize(corners.size() - 1);
92  std::transform(corners.begin(), --corners.end(), ++corners.begin(),
93  contoursPointer->begin(), makeLine);
94  _limitContours.insert(LimitContourEntry(i, contoursPointer));
95  }
96 
97  }
98 
99 
100  }
101 }
greatScanData data
Definition: great.cpp:38
bool isWithinExclusionRegion(double x, double y, double) const
Check to see if the point is within the exclusion region.
LineSegment makeLine(const P2 &pt1, const P2 &pt2)
Factory function for lines.
std::pair< unsigned, Contours * > LimitContourEntry
A simple container for a point on an xy plane.
P2 convertPt(double, double) const
Convert a point from pixel units to axis units, creating a P2.
std::vector< P2 > dataFromLimit(double)
off the csv file containting the data
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
TODO: see if we can use this one:
Definition: Analysis.hpp:33