#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, create_public_lumi_plots::exp, maxEta_, minTheta_, nEta_, and nPhi_.
|
inlinevirtual |
Definition at line 58 of file DetIdAssociator.h.
|
virtual |
make the look-up map
Definition at line 142 of file DetIdAssociator.cc.
References funct::abs(), FiducialVolume::addActivePoint(), assert(), newFWLiteAna::bin, check_setup(), container_, FiducialVolume::determinInnerDimensions(), etaBinSize_, HLT_FULL_cff::etaMax, HLT_FULL_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_, relval_parameters_module::step, theMapIsValid_, and volume_.
|
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(), and getDetIdsInACone().
|
inlineprotectedvirtual |
Reimplemented in CaloDetIdAssociator.
Definition at line 138 of file DetIdAssociator.h.
Referenced by getCrossedDetIds().
|
protectedvirtual |
Definition at line 324 of file DetIdAssociator.cc.
References fillSet(), getDetIdPoints(), LogTrace, nPhi_, and point.
Referenced by dumpMapContent().
|
protectedvirtual |
Definition at line 346 of file DetIdAssociator.cc.
References dumpMapContent(), i, and j.
|
inline |
look-up map bin size in eta dimension
Definition at line 113 of file DetIdAssociator.h.
References etaBinSize_.
|
protected |
Definition at line 385 of file DetIdAssociator.cc.
References container_, i, index(), lookupMap_, and findQualityFiles::size.
Referenced by dumpMapContent(), and getDetIdsCloseToAPoint().
|
virtual |
Definition at line 284 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), i, and convertSQLitetoXML_cfg::output.
|
virtual |
Definition at line 303 of file DetIdAssociator.cc.
References check_setup(), crossedElement(), i, convertSQLitetoXML_cfg::output, and position.
|
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 35 of file DetIdAssociator.cc.
References gen::n.
Referenced by getDetIdsCloseToAPoint().
|
virtual |
Definition at line 43 of file DetIdAssociator.cc.
References check_setup(), PV3DBase< T, PVType, FrameType >::eta(), Exception, fillSet(), i, iEta(), iPhi(), j, 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(), dqm-mbProfile::log, LogTrace, M_PI, maxEta, benchmark_cfg::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().
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
|
inlineprotectedvirtual |
Reimplemented in EcalDetIdAssociator, and HcalDetIdAssociator.
Definition at line 133 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, EcalDetIdAssociator, HcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by buildMap().
|
virtual |
look-up map eta index
Definition at line 131 of file DetIdAssociator.cc.
References PV3DBase< T, PVType, FrameType >::eta(), etaBinSize_, and nEta_.
Referenced by buildMap(), and getDetIdsCloseToAPoint().
|
inlineprotected |
Definition at line 147 of file DetIdAssociator.h.
Referenced by BeautifulSoup.PageElement::_invert(), buildMap(), and fillSet().
|
protectedpure virtual |
Implemented in MuonDetIdAssociator, and CaloDetIdAssociator.
|
virtual |
look-up map phi index
Definition at line 136 of file DetIdAssociator.cc.
References M_PI, nPhi_, and PV3DBase< T, PVType, FrameType >::phi().
Referenced by buildMap(), getDetIdsCloseToAPoint(), and index().
|
pure virtual |
Implemented in MuonDetIdAssociator, CaloDetIdAssociator, EcalDetIdAssociator, HcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.
Referenced by cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), config.CFG::__str__(), buildMap(), and validation.Sample::digest().
|
protectedvirtual |
Definition at line 367 of file DetIdAssociator.cc.
References SiPixelRawToDigiRegional_cfi::deltaPhi, PV3DBase< T, PVType, FrameType >::eta(), getPosition(), M_PI, and PV3DBase< T, PVType, FrameType >::phi().
Referenced by 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.
Referenced by getDetIdsInACone().
|
inlinevirtual |
|
pure virtual |
Implemented in CaloDetIdAssociator, and MuonDetIdAssociator.
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().
|
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().