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 
4 
7 
8 
9 
10 template <PFLayer::Layer D1, typename barrel,PFLayer::Layer D2, typename endcap>
12  public:
13  PFRecHitDualNavigator() = default;
14 
15 
16 
18  barrelNav_ = new barrel(iConfig.getParameter<edm::ParameterSet>("barrel"));
19  endcapNav_ = new endcap(iConfig.getParameter<edm::ParameterSet>("endcap"));
20  }
21 
22  void beginEvent(const edm::EventSetup& iSetup) override {
23  barrelNav_->beginEvent(iSetup);
24  endcapNav_->beginEvent(iSetup);
25 
26  }
27 
28  void associateNeighbours(reco::PFRecHit& hit,std::unique_ptr<reco::PFRecHitCollection>& hits,edm::RefProd<reco::PFRecHitCollection>& refProd) override {
29  if (hit.layer() == D1)
30  barrelNav_->associateNeighbours(hit,hits,refProd);
31  else if (hit.layer() == D2)
32  endcapNav_->associateNeighbours(hit,hits,refProd);
33  }
34 
35  protected:
38 
39 
40 };
41 
42 #endif
43 
44 
T getParameter(std::string const &) const
Divides< B, C > D2
Definition: Factorize.h:146
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:111
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:32
Divides< A, C > D1
Definition: Factorize.h:145
PFRecHitDualNavigator(const edm::ParameterSet &iConfig)
void beginEvent(const edm::EventSetup &iSetup) override