CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFRecHitNavigatorBase.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitNavigatorBase_h
2 #define RecoParticleFlow_PFClusterProducer_PFRecHitNavigatorBase_h
3 
14 
17 
23 
24 
26  public:
29 
31 
32  virtual void beginEvent(const edm::EventSetup&)=0;
33  virtual void associateNeighbours(reco::PFRecHit&,std::auto_ptr<reco::PFRecHitCollection>&,edm::RefProd<reco::PFRecHitCollection>&)=0;
34 
35 
36  protected:
37 
38  void associateNeighbour(const DetId& id, reco::PFRecHit& hit,std::auto_ptr<reco::PFRecHitCollection>& hits,edm::RefProd<reco::PFRecHitCollection>& refProd,short eta, short phi,short depth) {
39  const reco::PFRecHit temp(id,PFLayer::NONE,0.0,math::XYZPoint(0,0,0),math::XYZVector(0,0,0),std::vector<math::XYZPoint>());
40  auto found_hit = std::lower_bound(hits->begin(),hits->end(),
41  temp,
42  [](const reco::PFRecHit& a,
43  const reco::PFRecHit& b){
44  return a.detId() < b.detId();
45  });
46  if( found_hit != hits->end() && found_hit->detId() == id.rawId() ) {
47  hit.addNeighbour(eta,phi,depth,reco::PFRecHitRef(refProd,std::distance(hits->begin(),found_hit)));
48  }
49  }
50 
51 
52 };
53 
54 
55 
58 
59 #endif
virtual void associateNeighbours(reco::PFRecHit &, std::auto_ptr< reco::PFRecHitCollection > &, edm::RefProd< reco::PFRecHitCollection > &)=0
void addNeighbour(short x, short y, short z, const PFRecHitRef &)
Definition: PFRecHit.cc:129
T eta() const
edmplugin::PluginFactory< PFRecHitNavigatorBase *(const edm::ParameterSet &)> PFRecHitNavigationFactory
void associateNeighbour(const DetId &id, reco::PFRecHit &hit, std::auto_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd, short eta, short phi, short depth)
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:35
Definition: DetId.h:18
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
PFRecHitNavigatorBase(const edm::ParameterSet &iConfig)
virtual void beginEvent(const edm::EventSetup &)=0
Definition: DDAxes.h:10