1 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitCaloNavigatorWithTime_h
2 #define RecoParticleFlow_PFClusterProducer_PFRecHitCaloNavigatorWithTime_h
25 template <
typename D,
typename T,
bool ownsTopo=true>
35 if( iConfig.
exists(
"timeResolutionCalc") ) {
76 S = navigator.south();
80 SW = navigator.west();
93 SE = navigator.south();
103 W = navigator.west();
107 NW = navigator.north();
122 double sigma2=10000.0;
125 auto found_hit = std::lower_bound(hits->begin(),hits->end(),
129 return a.detId() <
b.detId();
131 if( found_hit != hits->end() && found_hit->detId() ==
id.rawId() ) {
136 const double hitEnergy = hit.
energy();
137 const double hitEnergy2 = hitEnergy*hitEnergy;
138 const double fhEnergy = found_hit->energy();
139 const double fhEnergy2 = fhEnergy*fhEnergy;
142 const double deltaTime = hit.
time()-found_hit->time();
std::unique_ptr< ECALRecHitResolutionProvider > _timeResolutionCalc
T getParameter(std::string const &) const
unsigned detId() const
rechit detId
void addNeighbour(short x, short y, short z, const PFRecHitRef &)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
virtual ~PFRecHitCaloNavigatorWithTime()
std::unique_ptr< const T > topology_
ParameterSet const & getParameterSet(std::string const &) const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
double energy() const
rechit energy
PFRecHitCaloNavigatorWithTime(const edm::ParameterSet &iConfig)
double time() const
timing for cleaned hits
Power< A, B >::type pow(const A &a, const B &b)
void associateNeighbours(reco::PFRecHit &hit, std::auto_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd)
void associateNeighbour(const DetId &id, reco::PFRecHit &hit, std::auto_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd, short eta, short phi)