|
|
Go to the documentation of this file.
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());
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()
Log< level::Info, true > LogVerbatim
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)