test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoParticleFlow
PFClusterTools
src
DetectorElement.cc
Go to the documentation of this file.
1
#include "
RecoParticleFlow/PFClusterTools/interface/DetectorElement.h
"
2
#include "
RecoParticleFlow/PFClusterTools/interface/PFToolsException.h
"
3
#include <ostream>
4
using namespace
pftools;
5
//A comment
6
DetectorElement::DetectorElement
(
DetectorElementType
type
,
double
calib
) :
7
myType(type), myCalib(calib) {
8
9
}
10
11
void
DetectorElement::setCalibCore
(
double
calib
)
throw
(
PFToolsException
&){
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
23
double
DetectorElement::getCalibCore
()
const
{
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
34
DetectorElement::~DetectorElement
() {
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
type
Definition:
HCALResponse.h:21
pftools::DetectorElement::myType
DetectorElementType myType
Definition:
DetectorElement.h:78
pftools::DetectorElement::getCalibCore
virtual double getCalibCore() const
Definition:
DetectorElement.cc:23
pftools::DetectorElement
Represents an energy-measuring region of our detector.
Definition:
DetectorElement.h:35
pftools::DetectorElement::getType
DetectorElementType getType() const
Definition:
DetectorElement.h:40
calib
MVATrainerComputer * calib
Definition:
MVATrainer.cc:64
pftools::DetectorElement::setCalibCore
virtual void setCalibCore(double calib)
Definition:
DetectorElement.cc:11
DetectorElement.h
pftools::DetElNames
const char *const DetElNames[]
Definition:
DetectorElementType.h:23
eta
Definition:
HIMultiTrackSelector.h:42
pftools::PFToolsException
General purpose exception class for use by classes in the pftools namespace.
Definition:
PFToolsException.h:14
PFToolsException.h
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
pftools::DetectorElement::~DetectorElement
virtual ~DetectorElement()
Definition:
DetectorElement.cc:34
pftools::DetectorElement::myCalib
double myCalib
Definition:
DetectorElement.h:79
pftools::operator<<
std::ostream & operator<<(std::ostream &s, const Calibratable &calib_)
Definition:
Calibratable.cc:6
pftools::OFFSET
Definition:
DetectorElementType.h:20
pftools::DetectorElement::DetectorElement
DetectorElement(DetectorElementType type, double calib=1.0)
Definition:
DetectorElement.cc:6
pftools::DetectorElement::getCalib
double getCalib() const
Definition:
DetectorElement.h:50
DetectorElementType
Enumerates possible DetectorElement objects.
Generated for CMSSW Reference Manual by
1.8.5