Main Page
Namespaces
Classes
Package Documentation
RecoParticleFlow
PFClusterTools
interface
Calibrator.h
Go to the documentation of this file.
1
#ifndef CALIBRATOR_HH_
2
#define CALIBRATOR_HH_
3
4
#include "
RecoParticleFlow/PFClusterTools/interface/DetectorElement.h
"
5
#include "
RecoParticleFlow/PFClusterTools/interface/ParticleDeposit.h
"
6
#include "
RecoParticleFlow/PFClusterTools/interface/PFToolsException.h
"
7
8
#include <map>
9
#include <vector>
10
#include <boost/shared_ptr.hpp>
11
12
namespace
pftools
{
13
21
class
Calibrator
{
22
public
:
23
24
Calibrator
();
25
virtual
~Calibrator
();
26
27
void
addDetectorElement
(
DetectorElementPtr
const
de);
28
29
void
addParticleDeposit
(
ParticleDepositPtr
pd);
30
31
/*
32
* Returns the calibration coefficient for each detector element, using data
33
* from all particle depositions stored within.
34
*/
35
std::map<DetectorElementPtr, double>
getCalibrationCoefficients
()
noexcept
(
false
) {
36
return
getCalibrationCoefficientsCore
();
37
}
38
39
/*
40
* Here we use the virtual constructor idea to allow for plug-and-play Calibrators
41
* See http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.8
42
*/
43
virtual
Calibrator
*
clone
()
const
= 0;
44
virtual
Calibrator
*
create
()
const
= 0;
45
46
int
hasParticles
()
const
{
47
return
myParticleDeposits
.size();
48
}
49
50
std::vector<ParticleDepositPtr>
getParticles
() {
51
return
myParticleDeposits
;
52
}
53
54
55
56
protected
:
57
virtual
std::map<DetectorElementPtr, double>
58
getCalibrationCoefficientsCore
()
noexcept
(
false
);
59
60
std::vector<DetectorElementPtr>
myDetectorElements
;
61
std::vector<ParticleDepositPtr>
myParticleDeposits
;
62
};
63
64
typedef
boost::shared_ptr<Calibrator>
CalibratorPtr
;
65
66
}
67
68
#endif
/*CALIBRATOR_HH_*/
pftools::Calibrator::myParticleDeposits
std::vector< ParticleDepositPtr > myParticleDeposits
Definition:
Calibrator.h:61
funct::false
false
Definition:
Factorize.h:34
pftools::Calibrator::getParticles
std::vector< ParticleDepositPtr > getParticles()
Definition:
Calibrator.h:50
noexcept
#define noexcept
pftools::ParticleDepositPtr
boost::shared_ptr< ParticleDeposit > ParticleDepositPtr
Definition:
ParticleDeposit.h:101
DetectorElement.h
ParticleDeposit.h
pftools::Calibrator::create
virtual Calibrator * create() const =0
pftools::Calibrator::hasParticles
int hasParticles() const
Definition:
Calibrator.h:46
pftools::Calibrator::Calibrator
Calibrator()
Definition:
Calibrator.cc:6
pftools::Calibrator::addParticleDeposit
void addParticleDeposit(ParticleDepositPtr pd)
Definition:
Calibrator.cc:17
pftools::CalibratorPtr
boost::shared_ptr< Calibrator > CalibratorPtr
Definition:
Calibrator.h:64
pftools::DetectorElementPtr
boost::shared_ptr< DetectorElement > DetectorElementPtr
Definition:
DetectorElement.h:83
pftools::Calibrator
Abstract base class for Particle Flow calibration algorithms.
Definition:
Calibrator.h:21
pftools
General option file parser.
Definition:
Calibratable.h:15
pftools::Calibrator::myDetectorElements
std::vector< DetectorElementPtr > myDetectorElements
Definition:
Calibrator.h:60
PFToolsException.h
pftools::Calibrator::getCalibrationCoefficientsCore
virtual std::map< DetectorElementPtr, double > getCalibrationCoefficientsCore() noexcept(false)
Definition:
Calibrator.cc:21
pftools::Calibrator::clone
virtual Calibrator * clone() const =0
pftools::Calibrator::~Calibrator
virtual ~Calibrator()
Definition:
Calibrator.cc:10
pftools::Calibrator::getCalibrationCoefficients
std::map< DetectorElementPtr, double > getCalibrationCoefficients() noexcept(false)
Definition:
Calibrator.h:35
pftools::Calibrator::addDetectorElement
void addDetectorElement(DetectorElementPtr const de)
Definition:
Calibrator.cc:13
Generated for CMSSW Reference Manual by
1.8.11