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 
7 
8 template <PFLayer::Layer D1, typename barrel, PFLayer::Layer D2, typename endcap>
10 public:
11  PFRecHitDualNavigator() = default;
12 
14  barrelNav_ = new barrel(iConfig.getParameter<edm::ParameterSet>("barrel"), cc);
15  endcapNav_ = new endcap(iConfig.getParameter<edm::ParameterSet>("endcap"), cc);
16  }
17 
18  void init(const edm::EventSetup& iSetup) override {
19  barrelNav_->init(iSetup);
20  endcapNav_->init(iSetup);
21  }
22 
24  std::unique_ptr<reco::PFRecHitCollection>& hits,
25  edm::RefProd<reco::PFRecHitCollection>& refProd) override {
26  if (hit.layer() == D1)
27  barrelNav_->associateNeighbours(hit, hits, refProd);
28  else if (hit.layer() == D2)
29  endcapNav_->associateNeighbours(hit, hits, refProd);
30  }
31 
32 protected:
35 };
36 
37 #endif
Divides< B, C > D2
Definition: Factorize.h:137
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFRecHitDualNavigator()=default
PFRecHitDualNavigator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
void associateNeighbours(reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd) override
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
void init(const edm::EventSetup &iSetup) override
Divides< A, C > D1
Definition: Factorize.h:136