#include <DetIdAssociator.h>
Classes | |
struct | MapRange |
Public Types | |
typedef std::vector< GlobalPoint >::const_iterator | const_iterator |
enum | PropagationTarget { Barrel, ForwardEndcap, BackwardEndcap } |
Public Member Functions | |
virtual void | buildMap () |
make the look-up map More... | |
DetIdAssociator (const int nPhi, const int nEta, const double etaBinSize) | |
double | etaBinSize () const |
look-up map bin size in eta dimension More... | |
virtual std::vector< DetId > | getCrossedDetIds (const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory) const |
virtual std::vector< DetId > | getCrossedDetIds (const std::set< DetId > &, const std::vector< SteppingHelixStateInfo > &trajectory, const double toleranceInSigmas=-1) const |
virtual std::set< DetId > | getDetIdsCloseToAPoint (const GlobalPoint &, const int iN=0) const |
virtual std::set< DetId > | getDetIdsCloseToAPoint (const GlobalPoint &direction, const unsigned int iNEtaPlus, const unsigned int iNEtaMinus, const unsigned int iNPhiPlus, const unsigned int iNPhiMinus) const |
virtual std::set< DetId > | getDetIdsCloseToAPoint (const GlobalPoint &direction, const MapRange &mapRange) const |
virtual std::set< DetId > | getDetIdsCloseToAPoint (const GlobalPoint &point, const double d=0) const |
virtual std::set< DetId > | getDetIdsCloseToAPoint (const GlobalPoint &point, const double dThetaPlus, const double dThetaMinus, const double dPhiPlus, const double dPhiMinus) const |
virtual std::set< DetId > | getDetIdsInACone (const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory, const double dR) const |
virtual const GeomDet * | getGeomDet (const DetId &) const =0 |
virtual int | iEta (const GlobalPoint &) const |
look-up map eta index More... | |
virtual int | iPhi (const GlobalPoint &) const |
look-up map phi index More... | |
virtual const char * | name () const =0 |
int | nEtaBins () const |
number of bins of the look-up map in eta dimension More... | |
int | nPhiBins () const |
number of bins of the look-up map in phi dimension More... | |
virtual bool | selectAllInACone (const double dR) const |
helper to see if getDetIdsInACone is useful More... | |
const FiducialVolume & | volume () const |
get active detector volume More... | |
virtual | ~DetIdAssociator () |
Protected Member Functions | |
virtual void | check_setup () const |
virtual bool | crossedElement (const GlobalPoint &, const GlobalPoint &, const DetId &, const double toleranceInSigmas=-1, const SteppingHelixStateInfo *=nullptr) const |
virtual void | dumpMapContent (int, int) const |
virtual void | dumpMapContent (int, int, int, int) const |
void | fillSet (std::set< DetId > &set, unsigned int iEta, unsigned int iPhi) const |
virtual std::pair< const_iterator, const_iterator > | getDetIdPoints (const DetId &, std::vector< GlobalPoint > &) const =0 |
virtual const unsigned int | getNumberOfSubdetectors () const |
virtual GlobalPoint | getPosition (const DetId &) const =0 |
virtual void | getValidDetIds (unsigned int subDetectorIndex, std::vector< DetId > &) const =0 |
unsigned int | index (unsigned int iEta, unsigned int iPhi) const |
virtual bool | insideElement (const GlobalPoint &, const DetId &) const =0 |
virtual bool | nearElement (const GlobalPoint &point, const DetId &id, const double distance) const |
Protected Attributes | |
std::vector< DetId > | container_ |
const double | etaBinSize_ |
std::vector< std::pair< unsigned int, unsigned int > > | lookupMap_ |
double | maxEta_ |
double | minTheta_ |
const int | nEta_ |
const int | nPhi_ |
bool | theMapIsValid_ |
FiducialVolume | volume_ |
\
Description: Abstract base class for 3D point -> std::set<DetId>
Implementation: A look up map of active detector elements in eta-phi space is built to speed up access to the detector element geometry as well as associated hits. The map is uniformly binned in eta and phi dimensions, which can be viewed as a histogram with every bin containing DetId of elements crossed in a given eta-phi window. It is very likely that a single DetId can be found in a few bins if it's geometrical size is bigger than eta-phi bin size.
The map is implemented as a double array. The first one has fixed size and points to the range of array elements in the second one.
Definition at line 45 of file DetIdAssociator.h.
typedef std::vector<GlobalPoint>::const_iterator DetIdAssociator::const_iterator |
Definition at line 54 of file DetIdAssociator.h.
Enumerator | |
---|---|
Barrel | |
ForwardEndcap | |
BackwardEndcap |
Definition at line 47 of file DetIdAssociator.h.
DetIdAssociator::DetIdAssociator | ( | const int | nPhi, |
const int | nEta, | ||
const double | etaBinSize | ||
) |
Definition at line 24 of file DetIdAssociator.cc.
References etaBinSize_, Exception, JetChargeProducer_cfi::exp, maxEta_, minTheta_, nEta_, and nPhi_.
|
inlinevirtual |
Definition at line 57 of file DetIdAssociator.h.
|
virtual |
make the look-up map
Definition at line 138 of file DetIdAssociator.cc.
References funct::abs(), FiducialVolume::addActivePoint(), cms::cuda::assert(), newFWLiteAna::bin, check_setup(), container_, FiducialVolume::determinInnerDimensions(), TrackValidation_cff::e5, etaBinSize_, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, Exception, getDetIdPoints(), getNumberOfSubdetectors(), getPosition(), getValidDetIds(), hcalRecHitTable_cff::ieta, iEta(), index(), DetIdInfo::info(), hcalRecHitTable_cff::iphi, iPhi(), edm::isNotFinite(), LogTrace, lookupMap_, FiducialVolume::maxR(), FiducialVolume::maxZ(), FiducialVolume::minR(), FiducialVolume::minZ(), eostools::move(), name(), nEta_, nPhi_, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, hiPixelPairStep_cff::points, theMapIsValid_, trackerHitRTTI::vector, and volume_.
|
protectedvirtual |
Reimplemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Definition at line 371 of file DetIdAssociator.cc.
References etaBinSize_, Exception, nEta_, and nPhi_.
Referenced by buildMap(), CaloDetIdAssociator::check_setup(), MuonDetIdAssociator::check_setup(), getCrossedDetIds(), getDetIdsCloseToAPoint(), and getDetIdsInACone().
|
inlineprotectedvirtual |
Reimplemented in CaloDetIdAssociator.
Definition at line 130 of file DetIdAssociator.h.
Referenced by getCrossedDetIds().
|
protectedvirtual |
Definition at line 327 of file DetIdAssociator.cc.
References fillSet(), getDetIdPoints(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, LogTrace, nPhi_, point, and hiPixelPairStep_cff::points.
Referenced by dumpMapContent().
|
protectedvirtual |
Definition at line 346 of file DetIdAssociator.cc.
References dumpMapContent(), mps_fire::i, and dqmiolumiharvest::j.
|
inline |
look-up map bin size in eta dimension
Definition at line 108 of file DetIdAssociator.h.
References etaBinSize_.
|
protected |
Definition at line 381 of file DetIdAssociator.cc.
References container_, mps_fire::i, iEta(), index(), edm::eventsetup::heterocontainer::insert(), iPhi(), lookupMap_, and findQualityFiles::size.
Referenced by dumpMapContent(), and getDetIdsCloseToAPoint().
|
virtual |
Definition at line 290 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), mps_fire::i, and convertSQLitetoXML_cfg::output.
|
virtual |
Definition at line 308 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), mps_fire::i, convertSQLitetoXML_cfg::output, position, and tolerance.
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by buildMap(), and dumpMapContent().
|
virtual |
Preselect DetIds close to a point on the inner surface of the detector. "iN" is a number of the adjacent bins of the map to retrieve
Definition at line 36 of file DetIdAssociator.cc.
References dqmiodumpmetadata::n.
Referenced by getDetIdsCloseToAPoint().
|
virtual |
Definition at line 43 of file DetIdAssociator.cc.
References check_setup(), PV3DBase< T, PVType, FrameType >::eta(), Exception, fillSet(), mps_fire::i, hcalRecHitTable_cff::ieta, iEta(), hcalRecHitTable_cff::iphi, iPhi(), dqmiolumiharvest::j, LogTrace, nEta_, nPhi_, PV3DBase< T, PVType, FrameType >::phi(), and theMapIsValid_.
|
virtual |
Definition at line 358 of file DetIdAssociator.cc.
References DetIdAssociator::MapRange::dPhiMinus, DetIdAssociator::MapRange::dPhiPlus, DetIdAssociator::MapRange::dThetaMinus, DetIdAssociator::MapRange::dThetaPlus, and getDetIdsCloseToAPoint().
|
virtual |
Preselect DetIds close to a point on the inner surface of the detector. "d" defines the allowed range in theta-phi space:
Definition at line 96 of file DetIdAssociator.cc.
References ztail::d, getDetIdsCloseToAPoint(), and point.
|
virtual |
Definition at line 100 of file DetIdAssociator.cc.
References funct::abs(), etaBinSize_, getDetIdsCloseToAPoint(), dqm-mbProfile::log, LogTrace, M_PI, razorScouting_cff::maxEta, CombinatorialSeedGeneratorForBeamHalo_cfi::maxTheta, EgHLTOffEleSelection_cfi::minEta, minTheta_, dqmiodumpmetadata::n, nPhi_, point, and funct::tan().
|
virtual |
Find DetIds that satisfy given requirements
Definition at line 273 of file DetIdAssociator.cc.
References check_setup(), HGC3DClusterGenMatchSelector_cfi::dR, nearElement(), and selectAllInACone().
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by MuonResidualsFromTrack::MuonResidualsFromTrack().
|
inlineprotectedvirtual |
Reimplemented in HcalDetIdAssociator, and EcalDetIdAssociator.
Definition at line 125 of file DetIdAssociator.h.
Referenced by buildMap().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by buildMap(), and nearElement().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, CaloDetIdAssociator, HcalDetIdAssociator, EcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by buildMap().
|
virtual |
look-up map eta index
Definition at line 132 of file DetIdAssociator.cc.
References etaBinSize_, createfilelist::int, nEta_, and point.
Referenced by buildMap(), fillSet(), getDetIdsCloseToAPoint(), and index().
|
inlineprotected |
Definition at line 139 of file DetIdAssociator.h.
References iEta(), iPhi(), and nPhi_.
Referenced by buildMap(), and fillSet().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
|
virtual |
look-up map phi index
Definition at line 134 of file DetIdAssociator.cc.
References createfilelist::int, M_PI, nPhi_, and point.
Referenced by buildMap(), fillSet(), getDetIdsCloseToAPoint(), and index().
|
pure virtual |
Implemented in MuonDetIdAssociator, CaloDetIdAssociator, HcalDetIdAssociator, EcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by config.CFG::__str__(), buildMap(), and validation.Sample::digest().
|
protectedvirtual |
Definition at line 363 of file DetIdAssociator.cc.
References SiPixelRawToDigiRegional_cfi::deltaPhi, HLT_2024v14_cff::distance, PV3DBase< T, PVType, FrameType >::eta(), getPosition(), M_PI, PV3DBase< T, PVType, FrameType >::phi(), and point.
Referenced by getDetIdsInACone().
|
inline |
number of bins of the look-up map in eta dimension
Definition at line 106 of file DetIdAssociator.h.
References nEta_.
|
inline |
number of bins of the look-up map in phi dimension
Definition at line 104 of file DetIdAssociator.h.
References nPhi_.
|
inlinevirtual |
helper to see if getDetIdsInACone is useful
Definition at line 82 of file DetIdAssociator.h.
References HGC3DClusterGenMatchSelector_cfi::dR, M_PI, and maxEta_.
Referenced by getDetIdsInACone().
const FiducialVolume & DetIdAssociator::volume | ( | void | ) | const |
get active detector volume
Definition at line 352 of file DetIdAssociator.cc.
References Exception, theMapIsValid_, and volume_.
|
protected |
Definition at line 149 of file DetIdAssociator.h.
Referenced by buildMap(), and fillSet().
|
protected |
Definition at line 151 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), etaBinSize(), getDetIdsCloseToAPoint(), and iEta().
|
protected |
Definition at line 148 of file DetIdAssociator.h.
Referenced by buildMap(), and fillSet().
|
protected |
Definition at line 152 of file DetIdAssociator.h.
Referenced by DetIdAssociator(), and selectAllInACone().
|
protected |
Definition at line 153 of file DetIdAssociator.h.
Referenced by DetIdAssociator(), and getDetIdsCloseToAPoint().
|
protected |
Definition at line 144 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), getDetIdsCloseToAPoint(), iEta(), and nEtaBins().
|
protected |
Definition at line 143 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), dumpMapContent(), getDetIdsCloseToAPoint(), index(), iPhi(), and nPhiBins().
|
protected |
Definition at line 150 of file DetIdAssociator.h.
Referenced by buildMap(), getDetIdsCloseToAPoint(), and volume().
|
protected |
Definition at line 158 of file DetIdAssociator.h.
Referenced by buildMap(), and volume().