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] ) ;
123 CellSet cells; cells.reserve(ids.size());
124 for (
auto id : ids) cells.push_back(
getGeometry(
id));
158 const ParVec& pv ( *ivv ) ;
161 dVec.push_back( *iv ) ;
175 tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z() ) ;
178 const CLHEP::Hep3Vector
tt ( tr.getTranslation() ) ;
179 tVec.push_back(
tt.x() ) ;
180 tVec.push_back(
tt.y() ) ;
181 tVec.push_back(
tt.z() ) ;
184 const CLHEP::HepRotation
rr ( tr.getRotation() ) ;
185 const ROOT::Math::Transform3D rtr (
rr.xx(),
rr.xy(),
rr.xz(),
tt.x(),
187 rr.zx(),
rr.zy(),
rr.zz(),
tt.z() ) ;
189 rtr.GetRotation( ea ) ;
190 tVec.push_back( ea.Phi() ) ;
191 tVec.push_back( ea.Theta() ) ;
192 tVec.push_back( ea.Psi() ) ;
197 unsigned int ishape ( 9999 ) ;
198 for(
unsigned int ivv ( 0 ) ; ivv !=
parVecVec().size() ; ++ivv )
204 ok = ok && ( fabs( par[
k] - pv[
k] ) < 1.e-6 ) ;
212 assert( 9999 != ishape ) ;
215 if( iVec.size() < nn ) iVec.push_back( ishape ) ;
227 m_deltaPhi =
new std::vector<CCGFloat> ( kSize ) ;
228 for( uint32_t
i ( 0 ) ;
i != kSize ; ++
i )
260 if(
M_PI < dPhi1 ) dPhi1 = fabs( dPhi1 - 2.*
M_PI ) ;
261 if(
M_PI < dPhi2 ) dPhi2 = fabs( dPhi2 - 2.*
M_PI ) ;
262 (*m_deltaPhi)[
i] = dPhi1>dPhi2 ? dPhi1 : dPhi2 ;
276 m_deltaEta =
new std::vector<CCGFloat> ( kSize ) ;
277 for( uint32_t
i ( 0 ) ;
i != kSize ; ++
i )
309 (*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< CaloCellGeometry const * > CellSet
std::vector< CCGFloat > TrVec
const_iterator begin() const
HepGeom::Transform3D Tr3D
uint32_t sizeForDenseIndexing() const
std::vector< Pt3D > Pt3DVec
CCGFloat deltaEta(const DetId &detId) const
CaloCellGeometry::CCGFloat CCGFloat
EZMgrFL< GlobalPoint > CornersMgr
void allocatePar(ParVec::size_type n, unsigned int m)
virtual CellSet getCellSet(const GlobalPoint &r, double dR) const
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.
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) 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.
const CCGFloat * param() const
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
uint32_t denseIndex() const
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const =0
CaloSubdetectorGeometry()
virtual DetId getClosestCell(const GlobalPoint &r) const
CaloCellGeometry::Pt3D Pt3D
AlgebraicVector EulerAngles
std::vector< CCGFloat > * m_deltaPhi
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::ParMgr ParMgr
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
CaloCellGeometry::Tr3D Tr3D
virtual unsigned int indexFor(const DetId &id) const
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
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual unsigned int sizeForDenseIndex(const DetId &id) const
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell's volume.