CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DetectorElement.cc
Go to the documentation of this file.
3 #include <ostream>
4 using namespace pftools;
5 //A comment
7  myType(type), myCalib(calib) {
8 
9 }
10 
12  //I'll tolerate very small negative numbers (artefacts of the minimisation algo
13  //but otherwise this shouldn't be allowed.
14 // if(calib > -0.01) {
15  myCalib = calib;
16 // }
17 // else {
18 // MinimiserException me("Setting calibration <= 0!");
19 // throw me;
20 // }
21 }
22 
24  if(myType == OFFSET && myCalib == 1) {
25  return 1.0;
26  }
27  return myCalib;
28 }
29 
30 double DetectorElement::getCalibCore(double eta, double phi) const {
31  return getCalib();
32 }
33 
35 }
36 
37 
38 std::ostream& pftools::operator<<(std::ostream& s, const DetectorElement& de) {
39  s << "DetectorElement: " << pftools::DetElNames[de.getType()] << ", \tcalib: " << de.getCalib();
40 
41  return s;
42 }
43 
type
Definition: HCALResponse.h:22
DetectorElementType myType
virtual double getCalibCore() const
Represents an energy-measuring region of our detector.
DetectorElementType getType() const
T eta() const
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
virtual void setCalibCore(double calib)
const char *const DetElNames[]
General purpose exception class for use by classes in the pftools namespace.
std::ostream & operator<<(std::ostream &s, const Calibratable &calib_)
Definition: Calibratable.cc:6
string s
Definition: asciidump.py:422
DetectorElement(DetectorElementType type, double calib=1.0)
double getCalib() const
Enumerates possible DetectorElement objects.
Definition: DDAxes.h:10