|
|
Go to the documentation of this file.
11 typedef HepGeom::Plane3D<CCGFloat>
Pl3D;
19 m_cellVec(k_NumberOfCellsForCorners) {
49 const int jx(esid.six() - 1);
50 const int jy(esid.siy() - 1);
51 const int jz(esid.zside() + 1);
52 const int pl(esid.plane() - 1);
53 const bool second(1 == pl);
54 const bool top(19 < jy);
55 const bool negz(0 == jz);
56 const int lrl(19 > jx ? 0 : 1);
57 const int lrr(21 > jx ? 0 : 1);
59 return (
second ? jx / 20 + 3 * jz :
60 (negz && !top ? lrl + 2 :
61 (negz && top ? lrr + 2 :
62 (!negz && !top ? lrr + 4 : lrl + 4))));
66 return ESDetId(1, 10 + 20 * (iLoc % 2), 10, 2 > iLoc || 5 < iLoc ? 2 : 1, 2 * (iLoc / 4) - 1);
74 unsigned int n1minus(0);
75 unsigned int n2minus(0);
76 unsigned int n1plus(0);
77 unsigned int n2plus(0);
84 for (
unsigned int i(0);
i != esDetIds.size(); ++
i) {
87 if (
nullptr != cell) {
89 if (1 == esid.
plane()) {
90 if (0 > esid.
zside()) {
98 if (2 == esid.
plane()) {
99 if (0 > esid.
zside()) {
109 assert(0 != n1minus && 0 != n2minus && 0 != n1plus && 0 != n2plus);
110 z1minus /= (1. * n1minus);
111 z2minus /= (1. * n2minus);
112 z1plus /= (1. * n1plus);
113 z2plus /= (1. * n2plus);
114 assert(0 != z1minus && 0 != z2minus && 0 != z1plus && 0 != z2plus);
119 assert(0 > z1minus && 0 > z2minus && 0 < z1plus && 0 < z2plus);
135 if (0 ==
z || 1 > plane || 2 < plane)
138 const unsigned int iz((0 >
z ? 0 : 2) + plane - 1);
144 const CCGFloat x0(1 == plane ? xe : ye);
145 const CCGFloat y0(1 == plane ? ye : xe);
150 const int col(1 +
int((x0 + 20. * xWid) / xWid));
156 const int jz(0 > ze ? -1 : 1);
160 for (
int ix(-1); ix != 2; ++ix)
162 for (
int iy(-1); iy != 2; ++iy) {
164 const int jx(1 == plane ?
col + ix : row + iy);
165 const int jy(1 == plane ? row + iy :
col + ix);
167 const ESDetId esId(jstrip, jx, jy, plane, jz);
169 if (
nullptr != cell) {
171 const CCGFloat dist2((
p.x() - xe) * (
p.x() - xe) + (
p.y() - ye) * (
p.y() - ye));
172 if (dist2 < closest &&
present(esId)) {
192 const DetId& detId) {
193 const unsigned int cellIndex(
ESDetId(detId).denseIndex());
std::vector< Pt3D > Pt3DVec
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
static const int ISTRIP_MIN
~EcalPreshowerGeometry() override
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
DetId getClosestCell(const GlobalPoint &r) const override
void setzPlanes(CCGFloat z1minus, CCGFloat z2minus, CCGFloat z1plus, CCGFloat z2plus)
CaloCellGeometry::Pt3DVec Pt3DVec
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
U second(std::pair< T, U > const &p)
const CCGFloat m_xIntraLadGap
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
const CCGFloat m_xInterLadGap
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
HepGeom::Point3D< CCGFloat > Pt3D
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)
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Plane3D< CCGFloat > Pl3D
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
static const int ISTRIP_MAX
const CCGFloat * param() const
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
void addValidID(const DetId &id)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
CaloCellGeometry::CornersMgr * cornersMgr()
static bool validDetId(int istrip, int ixs, int iys, int iplane, int iz)
check if a valid index combination
void initializeParms() override
bool present(const DetId &id) const override
is this detid present in the geometry?
static unsigned int alignmentTransformIndexLocal(const DetId &id)
A base class to handle the shape of preshower strips.
*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
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)