CMS 3D CMS Logo

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>

List of all members.

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) throw (PFToolsException&)
virtual ~DetectorElement ()

Private Member Functions

 DetectorElement (const DetectorElement &de)
virtual double getCalibCore (double eta, double phi) const
virtual double getCalibCore () const
virtual void setCalibCore (double calib) throw (PFToolsException&)

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.

                                                                       :
        myType(type), myCalib(calib) {

}
DetectorElement::~DetectorElement ( ) [virtual]

Definition at line 34 of file DetectorElement.cc.

                                  {
}
pftools::DetectorElement::DetectorElement ( const DetectorElement de) [private]

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<<().

                                {
                return getCalibCore();
        }
double pftools::DetectorElement::getCalib ( double  eta,
double  phi 
) const [inline]

Definition at line 58 of file DetectorElement.h.

References getCalibCore().

                                                      {
                return getCalibCore(eta, phi);
        }
double DetectorElement::getCalibCore ( ) const [private, virtual]

Definition at line 23 of file DetectorElement.cc.

References myCalib, myType, and pftools::OFFSET.

Referenced by getCalib().

                                           {
        if(myType == OFFSET && myCalib == 1) {
                return 1.0;
        }
        return myCalib;
}
double DetectorElement::getCalibCore ( double  eta,
double  phi 
) const [private, virtual]

Definition at line 30 of file DetectorElement.cc.

References getCalib().

                                                                 {
        return getCalib();
}
DetectorElementType pftools::DetectorElement::getType ( void  ) const [inline]

Definition at line 40 of file DetectorElement.h.

References myType.

Referenced by pftools::operator<<().

                                                   {
                return myType;
        }
void pftools::DetectorElement::setCalib ( double  calib) throw (PFToolsException&) [inline]

Definition at line 65 of file DetectorElement.h.

References calib, and setCalibCore().

void DetectorElement::setCalibCore ( double  calib) throw (PFToolsException&) [private, virtual]

Definition at line 11 of file DetectorElement.cc.

References calib.

Referenced by setCalib().

                                                                       {
        //I'll tolerate very small negative numbers (artefacts of the minimisation algo
        //but otherwise this shouldn't be allowed.
//      if(calib > -0.01) {
                myCalib = calib;
//      }
//      else {
//              MinimiserException me("Setting calibration <= 0!");
//              throw me;
//      }
}

Friends And Related Function Documentation

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

Member Data Documentation

Definition at line 79 of file DetectorElement.h.

Referenced by getCalibCore().

Definition at line 78 of file DetectorElement.h.

Referenced by getCalibCore(), and getType().