RecoLocalCalo
HcalRecAlgos
interface
AbsPlan1RechitCombiner.h
Go to the documentation of this file.
1
#ifndef RecoLocalCalo_HcalRecAlgos_AbsPlan1RechitCombiner_h_
2
#define RecoLocalCalo_HcalRecAlgos_AbsPlan1RechitCombiner_h_
3
4
#include <utility>
5
6
#include "
DataFormats/HcalRecHit/interface/HcalRecHitCollections.h
"
7
8
class
HcalTopology
;
9
10
class
AbsPlan1RechitCombiner
{
11
public
:
12
inline
virtual
~AbsPlan1RechitCombiner
() {}
13
14
// The topology should be set before the first call
15
// to "add" and whenever it changes
16
virtual
void
setTopo
(
const
HcalTopology
* topo) = 0;
17
18
// The "clear" function is called once per event,
19
// at the beginning of the rechit processing
20
virtual
void
clear
() = 0;
21
22
// This method should be called to add a rechit to process.
23
// It will be assumed that the rechit reference will remain
24
// valid at the time "combine" method is called.
25
virtual
void
add
(
const
HBHERecHit
& rh) = 0;
26
27
// This method should be called once per event,
28
// after all rechits have been added
29
virtual
void
combine
(
HBHERecHitCollection
* collectionToFill) = 0;
30
31
protected
:
32
// The first element of the pair is the value to average
33
// and the second is the weight (energy). Non-positive weights
34
// will be ignored.
35
typedef
std::pair<float, float>
FPair
;
36
37
static
float
energyWeightedAverage
(
const
FPair
*
data
,
unsigned
len,
float
valueToReturnOnFailure);
38
};
39
40
#endif // RecoLocalCalo_HcalRecAlgos_AbsPlan1RechitCombiner_h_
AbsPlan1RechitCombiner
Definition:
AbsPlan1RechitCombiner.h:10
HBHERecHit
Definition:
HBHERecHit.h:13
HcalTopology
Definition:
HcalTopology.h:26
edm::SortedCollection
Definition:
SortedCollection.h:49
AbsPlan1RechitCombiner::combine
virtual void combine(HBHERecHitCollection *collectionToFill)=0
AbsPlan1RechitCombiner::FPair
std::pair< float, float > FPair
Definition:
AbsPlan1RechitCombiner.h:35
AbsPlan1RechitCombiner::setTopo
virtual void setTopo(const HcalTopology *topo)=0
AbsPlan1RechitCombiner::energyWeightedAverage
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
Definition:
AbsPlan1RechitCombiner.cc:3
AbsPlan1RechitCombiner::~AbsPlan1RechitCombiner
virtual ~AbsPlan1RechitCombiner()
Definition:
AbsPlan1RechitCombiner.h:12
AbsPlan1RechitCombiner::clear
virtual void clear()=0
AbsPlan1RechitCombiner::add
virtual void add(const HBHERecHit &rh)=0
HcalRecHitCollections.h
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
Generated for CMSSW Reference Manual by
1.8.16