CMS 3D CMS Logo

pftools::DetectorElement Class Reference

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

#include <RecoParticleFlow/PFClusterTools/interface/DetectorElement.h>

List of all members.

Public Member Functions

 DetectorElement (DetectorElementType type, double calib=1.0)
double getCalib (double eta, double phi) const
double getCalib () 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 34 of file DetectorElement.h.


Constructor & Destructor Documentation

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

Definition at line 6 of file DetectorElement.cc.

00006                                                                        :
00007         myType(type), myCalib(calib) {
00008 
00009 }

DetectorElement::~DetectorElement (  )  [virtual]

Definition at line 34 of file DetectorElement.cc.

00034                                   {
00035 }

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


Member Function Documentation

double pftools::DetectorElement::getCalib ( double  eta,
double  phi 
) const [inline]

Definition at line 57 of file DetectorElement.h.

References getCalibCore().

00057                                                       {
00058                 return getCalibCore(eta, phi);
00059         }

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

Definition at line 49 of file DetectorElement.h.

References getCalibCore().

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

00049                                 {
00050                 return getCalibCore();
00051         }

double DetectorElement::getCalibCore ( double  eta,
double  phi 
) const [private, virtual]

Definition at line 30 of file DetectorElement.cc.

References getCalib().

00030                                                                  {
00031         return getCalib();
00032 }

double DetectorElement::getCalibCore (  )  const [private, virtual]

Definition at line 23 of file DetectorElement.cc.

References myCalib, myType, and pftools::OFFSET.

Referenced by getCalib().

00023                                            {
00024         if(myType == OFFSET && myCalib == 1) {
00025                 return 1.0;
00026         }
00027         return myCalib;
00028 }

DetectorElementType pftools::DetectorElement::getType (  )  const [inline]

Definition at line 39 of file DetectorElement.h.

References myType.

Referenced by pftools::operator<<().

00039                                                    {
00040                 return myType;
00041         }

void pftools::DetectorElement::setCalib ( double  calib  )  throw (PFToolsException&) [inline]

Definition at line 64 of file DetectorElement.h.

References calib, and setCalibCore().

00064                                                              {
00065                 setCalibCore(calib);
00066         }

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

Definition at line 11 of file DetectorElement.cc.

References calib, and myCalib.

Referenced by setCalib().

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


Friends And Related Function Documentation

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

Definition at line 38 of file DetectorElement.cc.

00038                                                                         {
00039         s << "DetectorElement: " << pftools::DetElNames[de.getType()] << ", \tcalib: " << de.getCalib();
00040 
00041         return s;
00042 }


Member Data Documentation

double pftools::DetectorElement::myCalib [private]

Definition at line 80 of file DetectorElement.h.

Referenced by getCalibCore(), and setCalibCore().

DetectorElementType pftools::DetectorElement::myType [private]

Definition at line 79 of file DetectorElement.h.

Referenced by getCalibCore(), and getType().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:50:05 2009 for CMSSW by  doxygen 1.5.4