Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoParticleFlow
PFClusterTools
interface
DetectorElement.h
Go to the documentation of this file.
1
#ifndef DETECTORELEMENT_HH_
2
#define DETECTORELEMENT_HH_
3
4
#include <vector>
5
#include <boost/shared_ptr.hpp>
6
/*
7
* This is a dirty macro that allows you to make vectors of DetectorElements within CINT
8
*/
9
//#ifdef __MAKECINT__
10
//#pragma link C++ class std::vector<minimiser::DetectorElement>
11
//#endif
12
//
13
//#ifdef __MAKECINT__
14
//#pragma link C++ class std::vector<minimiser::DetectorElement*>
15
//#endif
16
17
#include "
RecoParticleFlow/PFClusterTools/interface/DetectorElementType.h
"
18
#include "
RecoParticleFlow/PFClusterTools/interface/PFToolsException.h
"
19
20
#include "TH2F.h"
21
#include "TH1F.h"
22
#include <iosfwd>
23
24
namespace
pftools {
25
35
class
DetectorElement
{
36
public
:
37
38
DetectorElement
(
DetectorElementType
type
,
double
calib
= 1.0);
39
40
inline
DetectorElementType
getType
()
const
{
41
return
myType
;
42
}
43
;
44
45
virtual
~DetectorElement
();
46
47
/*
48
* Returns a global detector element calibration.
49
*/
50
double
getCalib
()
const
{
51
return
getCalibCore
();
52
}
53
54
/*
55
* Returns the calibration for this detector element as a function
56
* of eta and phi.
57
*/
58
double
getCalib
(
double
eta
,
double
phi)
const
{
59
return
getCalibCore
(eta, phi);
60
}
61
62
/*
63
* Set the calibration of this detector element. Must be > 0.
64
*/
65
void
setCalib
(
double
calib
)
noexcept
(
false
) {
66
setCalibCore
(
calib
);
67
}
68
69
friend
std::ostream&
operator<<
(std::ostream&
s
,
const
DetectorElement
& de);
70
71
72
private
:
73
virtual
double
getCalibCore
()
const
;
74
virtual
double
getCalibCore
(
double
eta
,
double
phi)
const
;
75
virtual
void
setCalibCore
(
double
calib
)
noexcept
(
false
);
76
77
DetectorElement
(
const
DetectorElement
& de);
78
DetectorElementType
myType
;
79
double
myCalib
;
80
81
};
82
83
typedef
boost::shared_ptr<DetectorElement>
DetectorElementPtr
;
84
85
std::ostream&
operator<<
(std::ostream&
s
,
const
DetectorElement
& de);
86
87
}
88
89
#endif
/*DETECTORELEMENT_HH_*/
pftools::DetectorElement::setCalib
void setCalib(double calib) noexcept(false)
Definition:
DetectorElement.h:65
type
type
Definition:
HCALResponse.h:21
pftools::DetectorElement::operator<<
friend std::ostream & operator<<(std::ostream &s, const DetectorElement &de)
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
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
pftools::DetectorElementPtr
boost::shared_ptr< DetectorElement > DetectorElementPtr
Definition:
DetectorElement.h:83
eta
Definition:
HIMultiTrackSelector.h:42
DetectorElementType.h
PFToolsException.h
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
pftools::DetectorElement::~DetectorElement
virtual ~DetectorElement()
Definition:
DetectorElement.cc:34
pftools::DetectorElement::getCalib
double getCalib(double eta, double phi) const
Definition:
DetectorElement.h:58
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::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