11 typedef HepGeom::Plane3D<CCGFloat>
Pl3D ;
15 m_xInterLadGap ( 0.05 ) ,
16 m_xIntraLadGap ( 0.04 ) ,
19 m_cellVec ( k_NumberOfCellsForCorners )
37 assert( gid.
isES() ) ;
56 const int jx ( esid.six() - 1 ) ;
57 const int jy ( esid.siy() - 1 ) ;
58 const int jz ( esid.zside() + 1 ) ;
59 const int pl ( esid.plane() - 1 ) ;
60 const bool second ( 1 == pl ) ;
61 const bool top ( 19 < jy ) ;
62 const bool negz ( 0 == jz ) ;
63 const int lrl ( 19>jx ? 0 : 1 ) ;
64 const int lrr ( 21>jx ? 0 : 1 ) ;
66 return ( second ? jx/20 + 3*jz :
67 ( negz && !top ? lrl + 2 :
68 ( negz && top ? lrr + 2 :
69 ( !negz && !top ? lrr + 4 : lrl + 4 ) ) ) ) ;
75 return ESDetId( 1, 10 + 20*( iLoc%2 ), 10, 2>iLoc || 5<iLoc ? 2 : 1, 2*( iLoc/4 ) - 1 ) ;
88 unsigned int n1minus ( 0 ) ;
89 unsigned int n2minus ( 0 ) ;
90 unsigned int n1plus ( 0 ) ;
91 unsigned int n2plus ( 0 ) ;
98 for(
unsigned int i ( 0 ) ;
i != esDetIds.size() ; ++
i )
100 const ESDetId esid ( esDetIds[
i] ) ;
105 if( 1 == esid.
plane() )
107 if( 0 > esid.
zside() )
118 if( 2 == esid.
plane() )
120 if( 0 > esid.
zside() )
133 assert( 0 != n1minus &&
137 z1minus /= (1.*n1minus) ;
138 z2minus /= (1.*n2minus) ;
139 z1plus /= (1.*n1plus) ;
140 z2plus /= (1.*n2plus) ;
141 assert( 0 != z1minus &&
145 setzPlanes( z1minus, z2minus, z1plus, z2plus ) ;
155 assert( 0 > z1minus &&
184 2 < plane )
return DetId( 0 ) ;
186 const unsigned int iz ( ( 0>
z ? 0 : 2 ) + plane - 1 ) ;
192 const CCGFloat x0 ( 1 == plane ? xe : ye ) ;
193 const CCGFloat y0 ( 1 == plane ? ye : xe ) ;
198 const int col ( 1 +
int( ( x0 + 20.*xWid )/xWid ) ) ;
204 const int jz ( 0 > ze ? -1 : 1 ) ;
209 for(
int ix ( -1 ); ix != 2 ; ++ix )
211 for(
int iy ( -1 ); iy != 2 ; ++iy )
215 const int jx ( 1 == plane ? col + ix : row + iy ) ;
216 const int jy ( 1 == plane ? row + iy : col + ix ) ;
219 const ESDetId esId ( jstrip, jx, jy, plane, jz ) ;
224 const CCGFloat dist2 ( (
p.x()-xe)*(
p.x()-xe) + (
p.y()-ye)*(
p.y()-ye) ) ;
225 if( dist2 < closest &&
present( esId ) )
254 const unsigned int cellIndex (
ESDetId( detId ).denseIndex() ) ;
264 0 == cell->
param() ? 0 : cell ) ;
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Pt3DVec Pt3DVec
const CCGFloat m_xIntraLadGap
CaloCellGeometry::Pt3D Pt3D
void setzPlanes(CCGFloat z1minus, CCGFloat z2minus, CCGFloat z1plus, CCGFloat z2plus)
virtual DetId getClosestCell(const GlobalPoint &r) const
std::vector< Pt3D > Pt3DVec
static const int ISTRIP_MAX
CaloCellGeometry::CCGFloat CCGFloat
virtual void initializeParms()
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.
A base class to handle the shape of preshower strips.
U second(std::pair< T, U > const &p)
HepGeom::Plane3D< CCGFloat > Pl3D
virtual bool present(const DetId &id) const
is this detid present in the geometry?
const CCGFloat * param() const
const CCGFloat m_xInterLadGap
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::CCGFloat CCGFloat
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
static unsigned int alignmentTransformIndexLocal(const DetId &id)
virtual ~EcalPreshowerGeometry()
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
CaloCellGeometry::Pt3D Pt3D
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
static bool validDetId(int istrip, int ixs, int iys, int iplane, int iz)
check if a valid index combination
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
static const int ISTRIP_MIN
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point