CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
CaloDetIdAssociator Class Reference

#include <CaloDetIdAssociator.h>

Inheritance diagram for CaloDetIdAssociator:
DetIdAssociator EcalDetIdAssociator HcalDetIdAssociator HODetIdAssociator PreshowerDetIdAssociator

Public Member Functions

 CaloDetIdAssociator ()
 
 CaloDetIdAssociator (const int nPhi, const int nEta, const double etaBinSize)
 
 CaloDetIdAssociator (const edm::ParameterSet &pSet)
 
virtual const GeomDetgetGeomDet (const DetId &id) const override
 
virtual const char * name () const override
 
virtual void setGeometry (const CaloGeometry *ptr)
 
virtual void setGeometry (const DetIdAssociatorRecord &iRecord) override
 
- Public Member Functions inherited from DetIdAssociator
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< DetIdgetCrossedDetIds (const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory) const
 
virtual std::vector< DetIdgetCrossedDetIds (const std::set< DetId > &, const std::vector< SteppingHelixStateInfo > &trajectory, const double toleranceInSigmas=-1) const
 
virtual std::set< DetIdgetDetIdsCloseToAPoint (const GlobalPoint &, const int iN=0) const
 
virtual std::set< DetIdgetDetIdsCloseToAPoint (const GlobalPoint &direction, const unsigned int iNEtaPlus, const unsigned int iNEtaMinus, const unsigned int iNPhiPlus, const unsigned int iNPhiMinus) const
 
virtual std::set< DetIdgetDetIdsCloseToAPoint (const GlobalPoint &direction, const MapRange &mapRange) const
 
virtual std::set< DetIdgetDetIdsCloseToAPoint (const GlobalPoint &point, const double d=0) const
 
virtual std::set< DetIdgetDetIdsCloseToAPoint (const GlobalPoint &point, const double dThetaPlus, const double dThetaMinus, const double dPhiPlus, const double dPhiMinus) const
 
virtual std::set< DetIdgetDetIdsInACone (const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory, const double dR) const
 
virtual int iEta (const GlobalPoint &) const
 look-up map eta index More...
 
virtual int iPhi (const GlobalPoint &) const
 look-up map phi index More...
 
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 &)
 
const FiducialVolumevolume () const
 get active detector volume More...
 
virtual ~DetIdAssociator ()
 

Protected Member Functions

virtual void check_setup () const override
 
virtual bool crossedElement (const GlobalPoint &, const GlobalPoint &, const DetId &id, const double tolerance=-1, const SteppingHelixStateInfo *=0) const override
 
virtual std::pair
< const_iterator,
const_iterator
getDetIdPoints (const DetId &id, std::vector< GlobalPoint > &points) const override
 
virtual GlobalPoint getPosition (const DetId &id) const override
 
virtual void getValidDetIds (unsigned int subDetectorIndex, std::vector< DetId > &) const override
 
virtual bool insideElement (const GlobalPoint &point, const DetId &id) const override
 
- Protected Member Functions inherited from DetIdAssociator
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 const unsigned int getNumberOfSubdetectors () const
 
unsigned int index (unsigned int iEta, unsigned int iPhi) const
 
virtual bool nearElement (const GlobalPoint &point, const DetId &id, const double distance) const
 

Protected Attributes

std::vector< GlobalPointdummy_
 
const CaloGeometrygeometry_
 
- Protected Attributes inherited from DetIdAssociator
std::vector< DetIdcontainer_
 
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_
 

Additional Inherited Members

- Public Types inherited from DetIdAssociator
typedef std::vector
< GlobalPoint >
::const_iterator 
const_iterator
 
enum  PropagationTarget { Barrel, ForwardEndcap, BackwardEndcap }
 

Detailed Description

Definition at line 32 of file CaloDetIdAssociator.h.

Constructor & Destructor Documentation

CaloDetIdAssociator::CaloDetIdAssociator ( )
inline

Definition at line 34 of file CaloDetIdAssociator.h.

34 :DetIdAssociator(72, 70 ,0.087),geometry_(0){};
const CaloGeometry * geometry_
DetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
CaloDetIdAssociator::CaloDetIdAssociator ( const int  nPhi,
const int  nEta,
const double  etaBinSize 
)
inline

Definition at line 35 of file CaloDetIdAssociator.h.

double etaBinSize() const
look-up map bin size in eta dimension
const CaloGeometry * geometry_
DetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
CaloDetIdAssociator::CaloDetIdAssociator ( const edm::ParameterSet pSet)
inline

Definition at line 38 of file CaloDetIdAssociator.h.

39  :DetIdAssociator(pSet.getParameter<int>("nPhi"),pSet.getParameter<int>("nEta"),pSet.getParameter<double>("etaBinSize")),geometry_(0){};
T getParameter(std::string const &) const
const CaloGeometry * geometry_
DetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)

Member Function Documentation

void CaloDetIdAssociator::check_setup ( ) const
overrideprotectedvirtual

Reimplemented from DetIdAssociator.

Definition at line 194 of file CaloDetIdAssociator.cc.

bool CaloDetIdAssociator::crossedElement ( const GlobalPoint point1,
const GlobalPoint point2,
const DetId id,
const double  tolerance = -1,
const SteppingHelixStateInfo initialState = 0 
) const
overrideprotectedvirtual

Reimplemented from DetIdAssociator.

Definition at line 3 of file CaloDetIdAssociator.cc.

std::pair< DetIdAssociator::const_iterator, DetIdAssociator::const_iterator > CaloDetIdAssociator::getDetIdPoints ( const DetId id,
std::vector< GlobalPoint > &  points 
) const
overrideprotectedvirtual

Implements DetIdAssociator.

Definition at line 211 of file CaloDetIdAssociator.cc.

virtual const GeomDet* CaloDetIdAssociator::getGeomDet ( const DetId id) const
inlineoverridevirtual

Implements DetIdAssociator.

Definition at line 45 of file CaloDetIdAssociator.h.

45 { return 0; };
GlobalPoint CaloDetIdAssociator::getPosition ( const DetId id) const
overrideprotectedvirtual

Implements DetIdAssociator.

Definition at line 200 of file CaloDetIdAssociator.cc.

void CaloDetIdAssociator::getValidDetIds ( unsigned int  subDetectorIndex,
std::vector< DetId > &  detIds 
) const
overrideprotectedvirtual
virtual bool CaloDetIdAssociator::insideElement ( const GlobalPoint point,
const DetId id 
) const
inlineoverrideprotectedvirtual

Implements DetIdAssociator.

Definition at line 58 of file CaloDetIdAssociator.h.

References geometry_, CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), and CaloCellGeometry::inside().

58  {
59  return geometry_->getSubdetectorGeometry(id)->getGeometry(id)->inside(point);
60  };
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const CaloGeometry * geometry_
bool inside(const GlobalPoint &point) const
Returns true if the specified point is inside this cell.
virtual const char* CaloDetIdAssociator::name ( void  ) const
inlineoverridevirtual

Implements DetIdAssociator.

Reimplemented in EcalDetIdAssociator, HcalDetIdAssociator, HODetIdAssociator, and PreshowerDetIdAssociator.

Definition at line 47 of file CaloDetIdAssociator.h.

47 { return "CaloTowers"; }
virtual void CaloDetIdAssociator::setGeometry ( const CaloGeometry ptr)
inlinevirtual

Definition at line 41 of file CaloDetIdAssociator.h.

References geometry_.

41 { geometry_ = ptr; };
const CaloGeometry * geometry_
void CaloDetIdAssociator::setGeometry ( const DetIdAssociatorRecord iRecord)
overridevirtual

Implements DetIdAssociator.

Definition at line 187 of file CaloDetIdAssociator.cc.

Member Data Documentation

std::vector<GlobalPoint> CaloDetIdAssociator::dummy_
protected

Definition at line 68 of file CaloDetIdAssociator.h.

const CaloGeometry* CaloDetIdAssociator::geometry_
protected