CMS 3D CMS Logo

EcalPreshowerGeometryLoaderFromDDD.cc
Go to the documentation of this file.
4 
6 
7 template <>
9  const EcalPGL::ParmVec& pv,
10  const HepGeom::Transform3D& tr,
11  const DetId& id,
12  const double& scale);
13 template <>
15 template <>
17 
18 #include "Geometry/CaloEventSetup/interface/CaloGeometryLoader.icc"
19 
23 
24 template <>
26  const EcalPGL::ParmVec& pv,
27  const HepGeom::Transform3D& tr,
28  const DetId& id,
29  const double& scale) {
30  std::vector<CCGFloat> vv;
31  vv.reserve(pv.size() + 1);
32  for (unsigned int i(0); i != pv.size(); ++i) {
33  vv.emplace_back(scale * pv[i]);
34  }
35 
36  const Pt3D cor1(vv[0], vv[1], vv[2]);
37  const Pt3D cor2(-vv[0], vv[1], vv[2]);
38  const Pt3D cor3(vv[0], -vv[1], vv[2]);
39 
40  const CCGFloat z1(Pt3D(tr * cor1).z());
41  const CCGFloat z2(Pt3D(tr * cor2).z());
42  const CCGFloat z3(Pt3D(tr * cor3).z());
43 
44  const CCGFloat y1(Pt3D(tr * cor3).y());
45  const CCGFloat x1(Pt3D(tr * cor3).x());
46 
47  const CCGFloat zdif(0.00001 > fabs(z1 - z2) ? (y1 > 0 ? +1.0 : -1.0) * (z1 - z3)
48  : (x1 > 0 ? +1.0 : -1.0) * (z1 - z2));
49 
50  const CCGFloat tilt(asin(0.5 * zdif / (vv[1] > vv[0] ? vv[1] : vv[0])));
51 
52  vv.emplace_back(tilt);
53 
54  const CCGFloat* pP(CaloCellGeometry::getParmPtr(vv, geom->parMgr(), geom->parVecVec()));
55 
56  const Pt3D ctr(tr * Pt3D(0, 0, 0));
57 
58  const GlobalPoint refPoint(ctr.x(), ctr.y(), ctr.z());
59 
60  geom->newCell(refPoint, refPoint, refPoint, pP, id);
61 }
62 
63 template <>
64 void EcalPGL::fillNamedParams(const DDFilteredView& /*fv*/, EcalPreshowerGeometry* /*geom*/) {
65  // nothing yet for preshower
66 }
67 
68 template <>
70  // nothing yet for preshower
71 }
DDAxes::y
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: EcalPreshowerGeometryLoaderFromDDD.cc:22
mps_fire.i
i
Definition: mps_fire.py:428
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
DDAxes::x
cms::DDFilteredView
Definition: DDFilteredView.h:70
CaloGeometryLoader
Definition: CaloGeometryLoader.h:22
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
DetId
Definition: DetId.h:17
CaloGeometryLoader.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
DDFilteredView.h
EcalPreshowerGeometry
Definition: EcalPreshowerGeometry.h:15
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: EcalPreshowerGeometryLoaderFromDDD.cc:21
DDAxes::z
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
EcalPreshowerGeometry.h
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
dqmiodatasetharvest.ctr
ctr
Definition: dqmiodatasetharvest.py:191
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
CaloGeometryLoader::fillGeom
void fillGeom(T *geom, const ParmVec &pv, const HepGeom::Transform3D &tr, const DetId &id, const double &scale)
CaloGeometryLoader::ParmVec
std::vector< double > ParmVec
Definition: CaloGeometryLoader.h:24
CaloCellGeometry::getParmPtr
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
Definition: CaloCellGeometry.cc:117
CaloGeometryLoader::fillNamedParams
void fillNamedParams(const DDFilteredView &fv, T *geom)
EcalPGL
CaloGeometryLoader< EcalPreshowerGeometry > EcalPGL
Definition: EcalPreshowerGeometryLoaderFromDDD.cc:5
DDFilteredView
Definition: DDFilteredView.h:20