12 typedef HepGeom::Plane3D<CCGFloat>
Pl3D;
22 m_cellVec(k_NumberOfCellsForCorners) {
28 edm::LogVerbatim(
"EcalGeom") <<
"EcalPreshowerGeometry::Creating an instance";
55 const int jx(esid.six() - 1);
56 const int jy(esid.siy() - 1);
57 const int jz(esid.zside() + 1);
58 const int pl(esid.plane() - 1);
59 const bool second(1 == pl);
60 const bool top(19 < jy);
61 const bool negz(0 == jz);
62 const int lrl(19 > jx ? 0 : 1);
63 const int lrr(21 > jx ? 0 : 1);
65 return (
second ? jx / 20 + 3 * jz :
66 (negz && !top ? lrl + 2 :
67 (negz && top ? lrr + 2 :
68 (!negz && !top ? lrr + 4 : lrl + 4))));
72 return ESDetId(1, 10 + 20 * (iLoc % 2), 10, 2 > iLoc || 5 < iLoc ? 2 : 1, 2 * (iLoc / 4) - 1);
80 unsigned int n1minus(0);
81 unsigned int n2minus(0);
82 unsigned int n1plus(0);
83 unsigned int n2plus(0);
90 edm::LogVerbatim(
"EcalGeom") <<
"EcalPreshowerGeometry:: Get " << esDetIds.size() <<
" valid DetIds";
93 for (
unsigned int i(0);
i != esDetIds.size(); ++
i) {
96 if (
nullptr != cell) {
98 if (1 == esid.
plane()) {
99 if (0 > esid.
zside()) {
107 if (2 == esid.
plane()) {
108 if (0 > esid.
zside()) {
118 assert(0 != n1minus && 0 != n2minus && 0 != n1plus && 0 != n2plus);
119 z1minus /= (1. * n1minus);
120 z2minus /= (1. * n2minus);
121 z1plus /= (1. * n1plus);
122 z2plus /= (1. * n2plus);
123 assert(0 != z1minus && 0 != z2minus && 0 != z1plus && 0 != z2plus);
128 assert(0 > z1minus && 0 > z2minus && 0 < z1plus && 0 < z2plus);
144 if (0 ==
z || 1 > plane || 2 < plane)
147 const unsigned int iz((0 >
z ? 0 : 2) + plane - 1);
153 const CCGFloat x0(1 == plane ? xe : ye);
154 const CCGFloat y0(1 == plane ? ye : xe);
159 const int col(1 +
int((x0 + 20. * xWid) / xWid));
165 const int jz(0 > ze ? -1 : 1);
169 for (
int ix(-1); ix != 2; ++ix)
171 for (
int iy(-1); iy != 2; ++iy) {
173 const int jx(1 == plane ?
col + ix : row + iy);
174 const int jy(1 == plane ? row + iy :
col + ix);
176 const ESDetId esId(jstrip, jx, jy, plane, jz);
178 if (
nullptr != cell) {
180 const CCGFloat dist2((
p.x() - xe) * (
p.x() - xe) + (
p.y() - ye) * (
p.y() - ye));
181 if (dist2 < closest &&
present(esId)) {
201 const DetId& detId) {
202 const unsigned int cellIndex(
ESDetId(detId).denseIndex());
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
DetId getClosestCell(const GlobalPoint &r) const override
Log< level::Info, true > LogVerbatim
CaloCellGeometry::Pt3DVec Pt3DVec
const CCGFloat m_xIntraLadGap
CaloCellGeometry::Pt3D Pt3D
void initializeParms() override
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
CaloCellGeometry::Pt3D Pt3D
void setzPlanes(CCGFloat z1minus, CCGFloat z2minus, CCGFloat z1plus, CCGFloat z2plus)
CaloCellGeometry::CCGFloat CCGFloat
std::vector< Pt3D > Pt3DVec
static const int ISTRIP_MAX
CaloCellGeometry::CCGFloat CCGFloat
A base class to handle the shape of preshower strips.
U second(std::pair< T, U > const &p)
const CCGFloat m_xInterLadGap
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
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)
bool present(const DetId &id) const override
is this detid present in the geometry?
static unsigned int alignmentTransformIndexLocal(const DetId &id)
HepGeom::Plane3D< CCGFloat > Pl3D
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.
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
HepGeom::Point3D< CCGFloat > 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)
~EcalPreshowerGeometry() override
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
CaloCellGeometry::Pt3DVec Pt3DVec
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
static const int ISTRIP_MIN
const CCGFloat * param() const
*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