#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... | |
virtual void | setConditions (const DetIdAssociatorRecord &) |
virtual void | setGeometry (const DetIdAssociatorRecord &)=0 |
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 *=0) 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 46 of file DetIdAssociator.h.
typedef std::vector<GlobalPoint>::const_iterator DetIdAssociator::const_iterator |
Definition at line 55 of file DetIdAssociator.h.
Enumerator | |
---|---|
Barrel | |
ForwardEndcap | |
BackwardEndcap |
Definition at line 48 of file DetIdAssociator.h.
DetIdAssociator::DetIdAssociator | ( | const int | nPhi, |
const int | nEta, | ||
const double | etaBinSize | ||
) |
Definition at line 25 of file DetIdAssociator.cc.
References etaBinSize_, Exception, JetChargeProducer_cfi::exp, maxEta_, minTheta_, nEta_, and nPhi_.
|
inlinevirtual |
Definition at line 58 of file DetIdAssociator.h.
References edmIntegrityCheck::d, DetIdAssociator::MapRange::dPhiMinus, DetIdAssociator::MapRange::dPhiPlus, DetIdAssociator::MapRange::dThetaMinus, DetIdAssociator::MapRange::dThetaPlus, getDetIdsCloseToAPoint(), and point.
|
virtual |
make the look-up map
Definition at line 142 of file DetIdAssociator.cc.
References funct::abs(), FiducialVolume::addActivePoint(), stringResolutionProvider_cfi::bin, check_setup(), container_, FiducialVolume::determinInnerDimensions(), etaBinSize_, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, Exception, getDetIdPoints(), getNumberOfSubdetectors(), getPosition(), getValidDetIds(), iEta(), index(), DetIdInfo::info(), 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_, and volume_.
Referenced by etaBinSize().
|
protectedvirtual |
Reimplemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Definition at line 377 of file DetIdAssociator.cc.
References etaBinSize_, Exception, nEta_, and nPhi_.
Referenced by buildMap(), CaloDetIdAssociator::check_setup(), MuonDetIdAssociator::check_setup(), getCrossedDetIds(), getDetIdsCloseToAPoint(), getDetIdsInACone(), and setConditions().
|
inlineprotectedvirtual |
Reimplemented in CaloDetIdAssociator.
Definition at line 138 of file DetIdAssociator.h.
References SoftLeptonByDistance_cfi::distance, and nearElement().
Referenced by getCrossedDetIds().
|
protectedvirtual |
Definition at line 324 of file DetIdAssociator.cc.
References begin, fillSet(), getDetIdPoints(), LogTrace, nPhi_, point, and hiPixelPairStep_cff::points.
Referenced by dumpMapContent(), and setConditions().
|
protectedvirtual |
Definition at line 346 of file DetIdAssociator.cc.
References dumpMapContent(), and mps_fire::i.
|
inline |
look-up map bin size in eta dimension
Definition at line 113 of file DetIdAssociator.h.
References buildMap(), etaBinSize_, getGeomDet(), setGeometry(), and volume().
|
protected |
Definition at line 385 of file DetIdAssociator.cc.
References container_, mps_fire::i, index(), edm::eventsetup::heterocontainer::insert(), lookupMap_, and findQualityFiles::size.
Referenced by dumpMapContent(), getDetIdsCloseToAPoint(), and index().
|
virtual |
Definition at line 284 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), mps_fire::i, photons_cff::ids, and convertSQLitetoXML_cfg::output.
Referenced by selectAllInACone().
|
virtual |
Definition at line 303 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), mps_fire::i, photons_cff::ids, convertSQLitetoXML_cfg::output, and position.
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by buildMap(), dumpMapContent(), and getNumberOfSubdetectors().
|
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 35 of file DetIdAssociator.cc.
References gen::n.
Referenced by getDetIdsCloseToAPoint(), and ~DetIdAssociator().
|
virtual |
Definition at line 43 of file DetIdAssociator.cc.
References check_setup(), PV3DBase< T, PVType, FrameType >::eta(), Exception, fillSet(), mps_fire::i, iEta(), iPhi(), LogTrace, nEta_, nPhi_, PV3DBase< T, PVType, FrameType >::phi(), and theMapIsValid_.
|
virtual |
Definition at line 359 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 94 of file DetIdAssociator.cc.
References getDetIdsCloseToAPoint().
|
virtual |
Definition at line 100 of file DetIdAssociator.cc.
References funct::abs(), PV3DBase< T, PVType, FrameType >::eta(), etaBinSize_, getDetIdsCloseToAPoint(), cmsBatch::log, LogTrace, M_PI, maxEta, CombinatorialSeedGeneratorForBeamHalo_cfi::maxTheta, trackingPOGFilters_cfi::minEta, minTheta_, gen::n, nPhi_, funct::tan(), and PV3DBase< T, PVType, FrameType >::theta().
|
virtual |
Find DetIds that satisfy given requirements
Definition at line 268 of file DetIdAssociator.cc.
References check_setup(), nearElement(), and selectAllInACone().
Referenced by selectAllInACone().
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by etaBinSize(), and MuonResidualsFromTrack::MuonResidualsFromTrack().
|
inlineprotectedvirtual |
Reimplemented in HcalDetIdAssociator, and EcalDetIdAssociator.
Definition at line 133 of file DetIdAssociator.h.
References getDetIdPoints(), getValidDetIds(), and insideElement().
Referenced by buildMap().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by buildMap(), nearElement(), and setConditions().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, CaloDetIdAssociator, HcalDetIdAssociator, EcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by buildMap(), and getNumberOfSubdetectors().
|
virtual |
look-up map eta index
Definition at line 131 of file DetIdAssociator.cc.
References PV3DBase< T, PVType, FrameType >::eta(), etaBinSize_, createfilelist::int, and nEta_.
Referenced by buildMap(), getDetIdsCloseToAPoint(), and selectAllInACone().
|
inlineprotected |
Definition at line 147 of file DetIdAssociator.h.
References fillSet(), iPhi(), and nPhi_.
Referenced by buildMap(), fillSet(), and BeautifulSoup.PageElement::insert().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by getNumberOfSubdetectors().
|
virtual |
look-up map phi index
Definition at line 136 of file DetIdAssociator.cc.
References createfilelist::int, M_PI, nPhi_, and PV3DBase< T, PVType, FrameType >::phi().
Referenced by buildMap(), getDetIdsCloseToAPoint(), index(), and selectAllInACone().
|
pure virtual |
Implemented in MuonDetIdAssociator, CaloDetIdAssociator, HcalDetIdAssociator, EcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by config.CFG::__str__(), buildMap(), validation.Sample::digest(), and setConditions().
|
protectedvirtual |
Definition at line 367 of file DetIdAssociator.cc.
References hiPixelPairStep_cff::deltaPhi, PV3DBase< T, PVType, FrameType >::eta(), getPosition(), M_PI, and PV3DBase< T, PVType, FrameType >::phi().
Referenced by crossedElement(), and getDetIdsInACone().
|
inline |
number of bins of the look-up map in eta dimension
Definition at line 111 of file DetIdAssociator.h.
References nEta_.
|
inline |
number of bins of the look-up map in phi dimension
Definition at line 109 of file DetIdAssociator.h.
References nPhi_.
|
inlinevirtual |
helper to see if getDetIdsInACone is useful
Definition at line 86 of file DetIdAssociator.h.
References PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, getCrossedDetIds(), getDetIdsInACone(), iEta(), iPhi(), M_PI, and maxEta_.
Referenced by getDetIdsInACone().
|
inlinevirtual |
Reimplemented in MuonDetIdAssociator.
Definition at line 122 of file DetIdAssociator.h.
References check_setup(), dumpMapContent(), getPosition(), and name().
|
pure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
Referenced by etaBinSize().
const FiducialVolume & DetIdAssociator::volume | ( | void | ) | const |
get active detector volume
Definition at line 353 of file DetIdAssociator.cc.
References Exception, theMapIsValid_, and volume_.
Referenced by BetaCalculatorECAL::calcEcalDeposit(), etaBinSize(), and TrackExtrapolator::produce().
|
protected |
Definition at line 159 of file DetIdAssociator.h.
Referenced by buildMap(), and fillSet().
|
protected |
Definition at line 161 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), etaBinSize(), getDetIdsCloseToAPoint(), and iEta().
|
protected |
Definition at line 158 of file DetIdAssociator.h.
Referenced by buildMap(), and fillSet().
|
protected |
Definition at line 162 of file DetIdAssociator.h.
Referenced by DetIdAssociator(), and selectAllInACone().
|
protected |
Definition at line 163 of file DetIdAssociator.h.
Referenced by DetIdAssociator(), and getDetIdsCloseToAPoint().
|
protected |
Definition at line 154 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), getDetIdsCloseToAPoint(), iEta(), and nEtaBins().
|
protected |
Definition at line 153 of file DetIdAssociator.h.
Referenced by buildMap(), check_setup(), DetIdAssociator(), dumpMapContent(), getDetIdsCloseToAPoint(), index(), iPhi(), and nPhiBins().
|
protected |
Definition at line 160 of file DetIdAssociator.h.
Referenced by buildMap(), getDetIdsCloseToAPoint(), and volume().
|
protected |
Definition at line 168 of file DetIdAssociator.h.
Referenced by buildMap(), and volume().