4 #include <Math/Transform3D.h>
5 #include <Math/EulerAngles.h>
30 const std::vector<DetId>&
59 uint32_t
index ( ~0 ) ;
78 return ( closest > 0.9e9 ||
79 (uint32_t)(~0) == index ?
DetId(0) :
87 const double dR2 ( dR*dR ) ;
88 const double eta ( r.
eta() ) ;
89 const double phi ( r.
phi() ) ;
102 if( fabs(
eta - eta0 ) <
dR )
106 if( delp >
M_PI ) delp = 2*
M_PI - delp ;
110 if( dist2 < dR2 ) dss.insert(
m_validIds[i] ) ;
148 const ParVec& pv ( *ivv ) ;
151 dVec.push_back( *iv ) ;
165 tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z() ) ;
168 const CLHEP::Hep3Vector
tt ( tr.getTranslation() ) ;
169 tVec.push_back(
tt.x() ) ;
170 tVec.push_back(
tt.y() ) ;
171 tVec.push_back(
tt.z() ) ;
174 const CLHEP::HepRotation
rr ( tr.getRotation() ) ;
175 const ROOT::Math::Transform3D rtr (
rr.xx(),
rr.xy(),
rr.xz(),
tt.x(),
177 rr.zx(),
rr.zy(),
rr.zz(),
tt.z() ) ;
179 rtr.GetRotation( ea ) ;
180 tVec.push_back( ea.Phi() ) ;
181 tVec.push_back( ea.Theta() ) ;
182 tVec.push_back( ea.Psi() ) ;
187 unsigned int ishape ( 9999 ) ;
188 for(
unsigned int ivv ( 0 ) ; ivv !=
parVecVec().size() ; ++ivv )
194 ok = ok && ( fabs( par[
k] - pv[
k] ) < 1.e-6 ) ;
202 assert( 9999 != ishape ) ;
205 if( iVec.size() < nn ) iVec.push_back( ishape ) ;
217 m_deltaPhi =
new std::vector<CCGFloat> ( kSize ) ;
218 for( uint32_t
i ( 0 ) ;
i != kSize ; ++
i )
250 if(
M_PI < dPhi1 ) dPhi1 = fabs( dPhi1 - 2.*
M_PI ) ;
251 if(
M_PI < dPhi2 ) dPhi2 = fabs( dPhi2 - 2.*
M_PI ) ;
252 (*m_deltaPhi)[
i] = dPhi1>dPhi2 ? dPhi1 : dPhi2 ;
267 m_deltaEta =
new std::vector<CCGFloat> ( kSize ) ;
268 for( uint32_t
i ( 0 ) ;
i != kSize ; ++
i )
300 (*m_deltaEta)[
i] = dEta1>dEta2 ? dEta1 : dEta2 ;
CaloCellGeometry::CornersMgr * m_cmgr
std::set< DetId > DetIdSet
std::vector< CCGFloat > DimVec
virtual unsigned int numberOfParametersPerShape() const
CCGFloat deltaPhi(const DetId &detId) const
Geom::Phi< T > phi() const
MgrType::size_type size_type
Global3DPoint GlobalPoint
std::vector< CCGFloat > * m_deltaEta
std::vector< unsigned int > IVec
std::vector< CCGFloat > TrVec
const_iterator begin() const
HepGeom::Transform3D Tr3D
uint32_t sizeForDenseIndexing() const
std::vector< Pt3D > Pt3DVec
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CCGFloat deltaEta(const DetId &detId) const
CaloCellGeometry::CCGFloat CCGFloat
EZMgrFL< GlobalPoint > CornersMgr
void allocatePar(ParVec::size_type n, unsigned int m)
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const CCGFloat * param() const
virtual bool present(const DetId &id) const
is this detid present in the geometry?
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
virtual unsigned int numberOfShapes() const
virtual void getTransform(Tr3D &tr, Pt3DVec *lptr) const
--------— only needed by specific utility; overloaded when needed -—
std::vector< DetId > m_validIds
CaloCellGeometry::CCGFloat CCGFloat
double deltaR2(double eta1, double phi1, double eta2, double phi2)
uint32_t denseIndex() const
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const =0
CaloSubdetectorGeometry()
virtual DetId getClosestCell(const GlobalPoint &r) const
CaloCellGeometry::Pt3D Pt3D
void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector) const
AlgebraicVector EulerAngles
std::vector< CCGFloat > * m_deltaPhi
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::ParMgr ParMgr
CaloCellGeometry::Tr3D Tr3D
MgrType::const_iterator const_iterator
virtual ~CaloSubdetectorGeometry()
The base class DOES assume that it owns the CaloCellGeometry objects.
const_iterator end() const
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
virtual unsigned int numberOfTransformParms() const
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell's volume.