RecoParticleFlow
PFClusterProducer
interface
PFRecHitNavigatorBase.h
Go to the documentation of this file.
1
#ifndef RecoParticleFlow_PFClusterProducer_PFRecHitNavigatorBase_h
2
#define RecoParticleFlow_PFClusterProducer_PFRecHitNavigatorBase_h
3
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/Framework/interface/Event.h
"
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
#include "
FWCore/Framework/interface/ESHandle.h
"
9
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
10
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
11
#include "
DataFormats/ParticleFlowReco/interface/PFRecHit.h
"
12
#include "
DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h
"
13
14
#include "
DataFormats/ParticleFlowReco/interface/PFRecHit.h
"
15
#include "
DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h
"
16
17
#include "
Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h
"
18
#include "
Geometry/CaloGeometry/interface/CaloGeometry.h
"
19
#include "
Geometry/CaloGeometry/interface/CaloCellGeometry.h
"
20
#include "
Geometry/CaloGeometry/interface/TruncatedPyramid.h
"
21
#include "
Geometry/Records/interface/CaloGeometryRecord.h
"
22
23
#include <unordered_map>
24
25
class
PFRecHitNavigatorBase
{
26
public
:
27
typedef
std::unordered_map<unsigned, unsigned>
DetIdToHitIdx
;
28
29
PFRecHitNavigatorBase
() =
default
;
30
PFRecHitNavigatorBase
(
const
edm::ParameterSet
& iConfig,
edm::ConsumesCollector
&
cc
) {}
31
32
virtual
~PFRecHitNavigatorBase
() =
default
;
33
34
virtual
void
init
(
const
edm::EventSetup
&) = 0;
35
virtual
void
associateNeighbours
(
reco::PFRecHit
&,
36
std::unique_ptr<reco::PFRecHitCollection>&,
37
edm::RefProd<reco::PFRecHitCollection>
&) = 0;
38
39
protected
:
40
void
associateNeighbour
(
const
DetId
&
id
,
41
reco::PFRecHit
&
hit
,
42
std::unique_ptr<reco::PFRecHitCollection>&
hits
,
43
edm::RefProd<reco::PFRecHitCollection>
& refProd,
44
short
eta
,
45
short
phi
,
46
short
depth
) {
47
auto
found_hit =
std::lower_bound
(
48
hits
->begin(),
hits
->end(),
id
, [](
const
reco::PFRecHit
&
a
,
const
DetId
&
id
) {
return
a
.detId() <
id
; });
49
if
(found_hit !=
hits
->end() && found_hit->detId() ==
id
.rawId()) {
50
hit
.addNeighbour(
eta
,
phi
,
depth
, found_hit -
hits
->begin());
51
}
52
}
53
};
54
55
#include "
FWCore/PluginManager/interface/PluginFactory.h
"
56
typedef
edmplugin::PluginFactory
<
PFRecHitNavigatorBase
*(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&)>
57
PFRecHitNavigationFactory
;
58
59
#endif
edm::RefProd
Definition:
EDProductfwd.h:25
PluginFactory.h
PFRecHitFwd.h
MessageLogger.h
PFRecHitNavigatorBase::associateNeighbour
void associateNeighbour(const DetId &id, reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd, short eta, short phi, short depth)
Definition:
PFRecHitNavigatorBase.h:40
hfClusterShapes_cfi.hits
hits
Definition:
hfClusterShapes_cfi.py:5
ESHandle.h
PFRecHitNavigatorBase::~PFRecHitNavigatorBase
virtual ~PFRecHitNavigatorBase()=default
PFRecHitNavigatorBase::init
virtual void init(const edm::EventSetup &)=0
PFRecHit.h
PFRecHitNavigatorBase::associateNeighbours
virtual void associateNeighbours(reco::PFRecHit &, std::unique_ptr< reco::PFRecHitCollection > &, edm::RefProd< reco::PFRecHitCollection > &)=0
PFRecHitNavigatorBase::DetIdToHitIdx
std::unordered_map< unsigned, unsigned > DetIdToHitIdx
Definition:
PFRecHitNavigatorBase.h:27
DetId
Definition:
DetId.h:17
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
TruncatedPyramid.h
LEDCalibrationChannels.depth
depth
Definition:
LEDCalibrationChannels.py:65
CaloGeometryRecord.h
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition:
pfDeepBoostedJetPreprocessParams_cfi.py:15
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition:
ParameterSet.h:47
a
double a
Definition:
hdecay.h:119
Event.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
PFRecHitNavigatorBase
Definition:
PFRecHitNavigatorBase.h:25
edm::EventSetup
Definition:
EventSetup.h:58
cc
DDAxes::phi
CaloCellGeometry.h
Frameworkfwd.h
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
PFRecHitNavigatorBase::PFRecHitNavigatorBase
PFRecHitNavigatorBase()=default
CaloGeometry.h
EventSetup.h
reco::PFRecHit
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition:
PFRecHit.h:31
ConsumesCollector.h
ParameterSet.h
PFRecHitNavigatorBase::PFRecHitNavigatorBase
PFRecHitNavigatorBase(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
Definition:
PFRecHitNavigatorBase.h:30
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
Generated for CMSSW Reference Manual by
1.8.16