Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
)
throw
(
PFToolsException
&) {
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
)
throw
(
PFToolsException
&);
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_*/
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
pftools::DetectorElement
Represents an energy-measuring region of our detector.
Definition:
DetectorElement.h:35
eta
T eta() const
Definition:
Basic3DVectorLD.h:177
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
pftools::DetectorElementPtr
boost::shared_ptr< DetectorElement > DetectorElementPtr
Definition:
DetectorElement.h:83
pftools::PFToolsException
General purpose exception class for use by classes in the pftools namespace.
Definition:
PFToolsException.h:14
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::DetectorElement::setCalib
void setCalib(double calib)
Definition:
DetectorElement.h:65
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.
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5