CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
pftools::DetectorElement Class Reference

Represents an energy-measuring region of our detector. More...

#include <DetectorElement.h>

Public Member Functions

 DetectorElement (DetectorElementType type, double calib=1.0)
 
double getCalib () const
 
double getCalib (double eta, double phi) const
 
DetectorElementType getType () const
 
void setCalib (double calib) noexcept(false)
 
virtual ~DetectorElement ()
 

Private Member Functions

 DetectorElement (const DetectorElement &de)=delete
 
virtual double getCalibCore () const
 
virtual double getCalibCore (double eta, double phi) const
 
virtual void setCalibCore (double calib) noexcept(false)
 

Private Attributes

double myCalib
 
DetectorElementType myType
 

Friends

std::ostream & operator<< (std::ostream &s, const DetectorElement &de)
 

Detailed Description

Represents an energy-measuring region of our detector.

The Calibrator class will make a calibration constant for each DetectorElement passed to it.

Author
Jamie Ballin
Date
April 2008

Definition at line 35 of file DetectorElement.h.

Constructor & Destructor Documentation

DetectorElement::DetectorElement ( DetectorElementType  type,
double  calib = 1.0 
)

Definition at line 6 of file DetectorElement.cc.

Referenced by setCalib().

6  :
7  myType(type), myCalib(calib) {
8 
9 }
DetectorElementType myType
DetectorElement::~DetectorElement ( )
virtual

Definition at line 34 of file DetectorElement.cc.

Referenced by getType().

34  {
35 }
pftools::DetectorElement::DetectorElement ( const DetectorElement de)
privatedelete

Member Function Documentation

double pftools::DetectorElement::getCalib ( ) const
inline

Definition at line 50 of file DetectorElement.h.

References getCalibCore().

Referenced by getCalibCore(), and pftools::operator<<().

50  {
51  return getCalibCore();
52  }
virtual double getCalibCore() const
double pftools::DetectorElement::getCalib ( double  eta,
double  phi 
) const
inline

Definition at line 58 of file DetectorElement.h.

References getCalibCore().

58  {
59  return getCalibCore(eta, phi);
60  }
virtual double getCalibCore() const
double DetectorElement::getCalibCore ( ) const
privatevirtual

Definition at line 23 of file DetectorElement.cc.

References myCalib, myType, and pftools::OFFSET.

Referenced by getCalib(), and setCalib().

23  {
24  if(myType == OFFSET && myCalib == 1) {
25  return 1.0;
26  }
27  return myCalib;
28 }
DetectorElementType myType
double DetectorElement::getCalibCore ( double  eta,
double  phi 
) const
privatevirtual

Definition at line 30 of file DetectorElement.cc.

References getCalib().

30  {
31  return getCalib();
32 }
double getCalib() const
DetectorElementType pftools::DetectorElement::getType ( void  ) const
inline

Definition at line 40 of file DetectorElement.h.

References myType, and ~DetectorElement().

Referenced by pftools::operator<<().

40  {
41  return myType;
42  }
DetectorElementType myType
void pftools::DetectorElement::setCalib ( double  calib)
inlinenoexcept

Definition at line 65 of file DetectorElement.h.

References DetectorElement(), PVValHelper::eta, getCalibCore(), noexcept, operator<<, alignCSCRings::s, and setCalibCore().

65  {
67  }
virtual void setCalibCore(double calib) noexcept(false)
void DetectorElement::setCalibCore ( double  calib)
privatevirtualnoexcept

Definition at line 11 of file DetectorElement.cc.

References calib, and myCalib.

Referenced by setCalib().

11  {
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 }
MVATrainerComputer * calib
Definition: MVATrainer.cc:64

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const DetectorElement de 
)
friend

Referenced by setCalib().

Member Data Documentation

double pftools::DetectorElement::myCalib
private

Definition at line 79 of file DetectorElement.h.

Referenced by getCalibCore(), and setCalibCore().

DetectorElementType pftools::DetectorElement::myType
private

Definition at line 78 of file DetectorElement.h.

Referenced by getCalibCore(), and getType().