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);
85 et_(0),eta_(0),phi_(0),charge_(0),nrClus_(0){}
104 float dRZ()
const{
return dRZ_;}
105 float dPhi()
const{
return dPhi_;}
107 float et()
const{
return et_;}
108 float eta()
const{
return eta_;}
109 float phi()
const{
return phi_;}
136 float iDRZPos,
float iDRZNeg,
137 float iDPhiPos,
float iDPhiNeg):
138 detId(iDetId),dRZPos(iDRZPos),dRZNeg(iDRZNeg),
139 dPhiPos(iDPhiPos),dPhiNeg(iDPhiNeg){}
145 const std::vector<SCHitMatch>& posCharge,
146 const std::vector<SCHitMatch>& negCharge,
151 float dRZPos(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dRZPos);}
152 float dRZNeg(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dRZNeg);}
153 float dPhiPos(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dPhiPos);}
154 float dPhiNeg(
size_t hitNr)
const{
return getVal(hitNr,&MatchInfo::dPhiNeg);}
155 DetId detId(
size_t hitNr)
const{
return hitNr<matchInfo_.size() ? matchInfo_[hitNr].detId :
DetId(0);}
157 const std::vector<MatchInfo>&
matches()
const{
return matchInfo_;}
174 virtual bool operator()(
const SCHitMatch& scHitMatch)
const=0;
180 bool operator()(
const SCHitMatch& scHitMatch)
const override;
182 float getDRZCutValue(
const float scEt,
const float scEta)
const;
194 bool operator()(
const SCHitMatch& scHitMatch)
const override;
196 size_t getBinNr(
float eta)
const;
198 return highEt +
std::min(0.
f,et-highEtThres)*lowEtGrad;
215 std::vector<TrajSeedMatcher::SeedWithInfo>
254 bool passesMatchSel(
const SCHitMatch& hit,
const size_t hitNr)
const;
259 const float energy,
const int charge);
261 int getNrValidLayersAlongTraj(
const DetId& hitId,
267 size_t getNrHitsRequired(
const int nrValidLayers)
const;
const GlobalPoint & hitPos() 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::vector< double > dRZLowEtGrad_
std::vector< double > dPhiLowEtGrad_
std::unordered_map< int, TrajectoryStateOnSurface > trajStateFromVtxPosChargeCache_
const TrackingRecHit * hit() const
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_
const double dRZMaxLowEtThres_
const std::vector< double > dRZMaxLowEt_
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
void setMeasTkEvtHandle(edm::Handle< MeasurementTrackerEvent > handle)
edm::ESHandle< NavigationSchool > navSchool_
std::vector< double > etaBins_
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< MatchInfo > matchInfo_
std::vector< std::unique_ptr< MatchingCuts > > matchingCuts_
void setExtra(float et, float eta, float phi, int charge, int nrClus)
float dPhiPos(size_t hitNr) const
std::string navSchoolLabel_
const TrajectorySeed & seed() const
const std::vector< double > dRZMaxLowEtEtaBins_
edm::Handle< MeasurementTrackerEvent > measTkEvt_
std::size_t operator()(const std::pair< int, GlobalPoint > &g) const
et
define resolution functions of each parameter
const TrackingRecHit * hit_
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
float getCutValue(float et, float highEt, float highEtThres, float lowEtGrad) const
const std::vector< unsigned int > minNrHits_