1 #ifndef RecoEgamma_EgammaElectronAlgos_TrajSeedMatcher_h 2 #define RecoEgamma_EgammaElectronAlgos_TrajSeedMatcher_h 41 #include <unordered_map> 60 struct hash<
std::pair<int,GlobalPoint> > {
61 std::size_t
operator()(
const std::pair<int,GlobalPoint>&
g)
const {
62 auto h1 = std::hash<unsigned long long>()((
unsigned long long)g.first);
63 unsigned long long k; memcpy(&k, &g.second,
sizeof(k));
64 auto h2 = std::hash<unsigned long long>()(k);
65 return h1 ^ (h2 << 1);
69 struct equal_to<
std::pair<int,GlobalPoint> > :
public std::binary_function<std::pair<int,GlobalPoint>,std::pair<int,GlobalPoint>,bool> {
71 const std::pair<int,GlobalPoint>&
b)
const {
72 return (a.first == b.first) & (a.second == b.second);
93 float dRZ()
const{
return dRZ_;}
94 float dPhi()
const{
return dPhi_;}
112 float iDRZPos,
float iDRZNeg,
113 float iDPhiPos,
float iDPhiNeg):
114 detId(iDetId),dRZPos(iDRZPos),dRZNeg(iDRZNeg),
115 dPhiPos(iDPhiPos),dPhiNeg(iDPhiNeg){}
121 const std::vector<HitInfo>& posCharge,
122 const std::vector<HitInfo>& negCharge,
127 float dRZPos(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dRZPos);}
128 float dRZNeg(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dRZNeg);}
129 float dPhiPos(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dPhiPos);}
130 float dPhiNeg(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dPhiNeg);}
131 DetId detId(
size_t hitNr)
const{
return hitNr<matchInfo_.size() ? matchInfo_[hitNr].detId :
DetId(0);}
133 const std::vector<MatchInfo>&
matches()
const{
return matchInfo_;}
149 bool operator()(
const HitInfo&
hit,
const float scEt,
const float scEta)
const;
151 float getDRZCutValue(
const float scEt,
const float scEta)
const;
168 std::vector<TrajSeedMatcher::SeedWithInfo>
201 bool passesMatchSel(
const HitInfo& hit,
const size_t hitNr,
const float scEt,
const float scEta)
const;
202 int getNrValidLayersAlongTraj(
const HitInfo& hit1,
const HitInfo& hit2,
205 const float energy,
const int charge);
207 int getNrValidLayersAlongTraj(
const DetId& hitId,
213 size_t getNrHitsRequired(
const int nrValidLayers)
const;
std::unordered_map< std::pair< int, GlobalPoint >, TrajectoryStateOnSurface > trajStateFromPointNegChargeCache_
std::unordered_map< int, TrajectoryStateOnSurface > trajStateFromVtxNegChargeCache_
size_t nrMatchedHits() const
DetId detId(size_t hitNr) const
std::unordered_map< int, TrajectoryStateOnSurface > trajStateFromVtxPosChargeCache_
edm::ESHandle< DetLayerGeometry > detLayerGeom_
float dRZPos(size_t hitNr) const
std::unique_ptr< PropagatorWithMaterial > forwardPropagator_
const std::vector< MatchInfo > & matches() const
const std::vector< int > minNrHitsValidLayerBins_
bool operator()(const std::pair< int, GlobalPoint > &a, const std::pair< int, GlobalPoint > &b) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
const double dRZMaxLowEtThres_
void setMeasTkEvtHandle(edm::Handle< MeasurementTrackerEvent > handle)
edm::ESHandle< NavigationSchool > navSchool_
unsigned long long cacheIDMagField_
float getVal(size_t hitNr, float MatchInfo::*val) const
std::unordered_map< std::pair< int, GlobalPoint >, TrajectoryStateOnSurface > trajStateFromPointPosChargeCache_
std::vector< TrajectorySeed > TrajectorySeedCollection
edm::ESHandle< MagneticField > magField_
MatchInfo(const DetId &iDetId, float iDRZPos, float iDRZNeg, float iDPhiPos, float iDPhiNeg)
std::vector< MatchingCuts > matchingCuts_
std::vector< MatchInfo > matchInfo_
float dPhiPos(size_t hitNr) const
const std::vector< double > dRZMaxLowEtEtaBins_
const GlobalPoint & pos() const
std::string navSchoolLabel_
const TrajectorySeed & seed() const
const TrackingRecHit * hit_
edm::Handle< MeasurementTrackerEvent > measTkEvt_
std::size_t operator()(const std::pair< int, GlobalPoint > &g) const
const TrackingRecHit * hit() const
const std::vector< double > dRZMaxLowEt_
int nrValidLayers() const
std::string detLayerGeomLabel_
float dRZNeg(size_t hitNr) const
std::unique_ptr< PropagatorWithMaterial > backwardPropagator_
const TrajectorySeed & seed_
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
EventID const & max(EventID const &lh, EventID const &rh)
float dPhiNeg(size_t hitNr) const
const std::vector< unsigned int > minNrHits_