Main Page
Namespaces
Classes
Package Documentation
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
)
noexcept
(
false
) {
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
alignCSCRings.s
s
Definition:
alignCSCRings.py:91
pftools::DetectorElement::myType
DetectorElementType myType
Definition:
DetectorElement.h:78
pftools::DetectorElement::getCalibCore
virtual double getCalibCore() const
Definition:
DetectorElement.cc:23
noexcept
#define noexcept
pftools::DetectorElement
Represents an energy-measuring region of our detector.
Definition:
DetectorElement.h:35
PVValHelper::eta
Definition:
PVValidationHelpers.h:49
pftools::DetectorElement::getType
DetectorElementType getType() const
Definition:
DetectorElement.h:40
pftools::DetectorElement::setCalibCore
virtual void setCalibCore(double calib) noexcept(false)
Definition:
DetectorElement.cc:11
calib
MVATrainerComputer * calib
Definition:
MVATrainer.cc:64
calib
Definition:
CalibElectron.h:14
DetectorElement.h
pftools::DetElNames
const char *const DetElNames[]
Definition:
DetectorElementType.h:23
pftools
General option file parser.
Definition:
Calibratable.h:15
PFToolsException.h
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.11