CMS 3D CMS Logo

PFRecHitDualNavigator.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitDualNavigator_h
2 #define RecoParticleFlow_PFClusterProducer_PFRecHitDualNavigator_h
3 
6 
7 template <PFLayer::Layer D1, typename barrel, PFLayer::Layer D2, typename endcap>
9 public:
10  PFRecHitDualNavigator() = default;
11 
13  barrelNav_ = new barrel(iConfig.getParameter<edm::ParameterSet>("barrel"));
14  endcapNav_ = new endcap(iConfig.getParameter<edm::ParameterSet>("endcap"));
15  }
16 
17  void beginEvent(const edm::EventSetup& iSetup) override {
18  barrelNav_->beginEvent(iSetup);
19  endcapNav_->beginEvent(iSetup);
20  }
21 
23  std::unique_ptr<reco::PFRecHitCollection>& hits,
24  edm::RefProd<reco::PFRecHitCollection>& refProd) override {
25  if (hit.layer() == D1)
26  barrelNav_->associateNeighbours(hit, hits, refProd);
27  else if (hit.layer() == D2)
28  endcapNav_->associateNeighbours(hit, hits, refProd);
29  }
30 
31 protected:
34 };
35 
36 #endif
T getParameter(std::string const &) const
Divides< B, C > D2
Definition: Factorize.h:137
PFRecHitDualNavigator()=default
void associateNeighbours(reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd) override
PFLayer::Layer layer() const
rechit layer
Definition: PFRecHit.h:92
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
Divides< A, C > D1
Definition: Factorize.h:136
PFRecHitDualNavigator(const edm::ParameterSet &iConfig)
void beginEvent(const edm::EventSetup &iSetup) override