CMS 3D CMS Logo

SurveyPxbImage.cc
Go to the documentation of this file.
2 
3 #include <stdexcept>
4 #include <utility>
5 #include <sstream>
6 #include <vector>
8 
9 void SurveyPxbImage::fill(std::istringstream &iss) {
10  id_t id1, id2;
11  value_t x0, y0;
12  value_t x1, y1;
13  value_t x2, y2;
14  value_t x3, y3;
15  value_t sx, sy;
16  bool rotflag;
17  if (!(iss >> id1 >> x0 >> y0 >> x1 >> y1 >> id2 >> x2 >> y2 >> x3 >> y3 >> sy >> sx >> rotflag).fail()) {
18  idPair_.first = id1;
19  idPair_.second = id2;
20  if (!rotflag) {
21  measurementVec_.push_back(coord_t(x0, -y0));
22  measurementVec_.push_back(coord_t(x1, -y1));
23  measurementVec_.push_back(coord_t(x2, -y2));
24  measurementVec_.push_back(coord_t(x3, -y3));
25  } else {
26  measurementVec_.push_back(coord_t(-x0, y0));
27  measurementVec_.push_back(coord_t(-x1, y1));
28  measurementVec_.push_back(coord_t(-x2, y2));
29  measurementVec_.push_back(coord_t(-x3, y3));
30  }
31  sigma_x_ = sx;
32  sigma_y_ = sy;
33  isRotated_ = rotflag;
34  isValidFlag_ = true;
35  } else
36  isValidFlag_ = false;
37 }
38 
40  if (m > 0 && m < 5)
41  return measurementVec_[m - 1];
42  else
43  throw std::out_of_range("Attempt to access an inexistent measurement");
44 }
SurveyPxbImage::sigma_x_
value_t sigma_x_
Gaussian errors.
Definition: SurveyPxbImage.h:81
SurveyPxbImage::coord_t
Point3DBase< value_t, LocalTag > coord_t
Definition: SurveyPxbImage.h:17
SurveyPxbImage::sigma_y_
value_t sigma_y_
Definition: SurveyPxbImage.h:81
count_t
Definition: ErrorPropogationTypes.h:7
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
globals_cff.id1
id1
Definition: globals_cff.py:32
SurveyPxbImage.h
SurveyPxbImage::measurementVec_
std::vector< coord_t > measurementVec_
Vector to hold four measurements.
Definition: SurveyPxbImage.h:74
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
SurveyPxbImage::id_t
unsigned int id_t
Definition: SurveyPxbImage.h:15
Point3DBase
Definition: Point3DBase.h:10
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
SurveyPxbImage::idPair_
idPair_t idPair_
Definition: SurveyPxbImage.h:91
fftjetcommon_cfi.sy
sy
Definition: fftjetcommon_cfi.py:203
SurveyPxbImage::getCoord
const coord_t getCoord(count_t m)
Definition: SurveyPxbImage.cc:39
SurveyPxbImage::fill
void fill(std::istringstream &iss)
Definition: SurveyPxbImage.cc:9
LocalPoint.h
SurveyPxbImage::value_t
double value_t
Definition: SurveyPxbImage.h:16
SurveyPxbImage::isRotated_
bool isRotated_
Flag if the image was rotated or not.
Definition: SurveyPxbImage.h:84
globals_cff.id2
id2
Definition: globals_cff.py:33
SurveyPxbImage::isValidFlag_
bool isValidFlag_
Validity Flag.
Definition: SurveyPxbImage.h:87
fftjetcommon_cfi.sx
sx
Definition: fftjetcommon_cfi.py:202