2 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitCaloNavigatorWithTime_h 3 #define RecoParticleFlow_PFClusterProducer_PFRecHitCaloNavigatorWithTime_h 25 template <
typename D,
typename T,
bool ownsTopo = true>
41 std::unique_ptr<reco::PFRecHitCollection>&
hits,
115 std::unique_ptr<reco::PFRecHitCollection>&
hits,
119 double sigma2 = 10000.0;
126 return a.detId() <
b.rawId();
129 if (found_hit != hits->end() &&
130 ((found_hit->detId() ==
id.rawId()) ||
132 sigma2 = _timeResolutionCalc->timeResolution2(hit.
energy()) +
133 _timeResolutionCalc->timeResolution2(found_hit->energy());
134 const double deltaTime = hit.
time() - found_hit->time();
135 if (deltaTime * deltaTime < sigmaCut2_ * sigma2) {
136 hit.
addNeighbour(eta, phi, 0, found_hit - hits->begin());
T getParameter(std::string const &) const
~PFRecHitCaloNavigatorWithTime() override
float time() const
timing for cleaned hits
unsigned detId() const
rechit detId
void addNeighbour(short x, short y, short z, unsigned int)
void associateNeighbour(const DetId &id, reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd, short eta, short phi)
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
std::unique_ptr< CaloRecHitResolutionProvider > _timeResolutionCalc
float energy() const
rechit energy
std::unique_ptr< const T > topology_
ParameterSet const & getParameterSet(std::string const &) const
double S(const TLorentzVector &, const TLorentzVector &)
void associateNeighbours(reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd) override
PFRecHitCaloNavigatorWithTime(const edm::ParameterSet &iConfig)
Power< A, B >::type pow(const A &a, const B &b)