|
|
#include <HcalGeomParameters.h>
this class extracts some geometry constants from CompactView to be used by Reco Geometry/Topology
- Date
- 2015/06/25 00:06:50
- Author
- Sunanda Banerjee, Fermilab sunan.nosp@m.da.b.nosp@m.anerj.nosp@m.ee@c.nosp@m.ern.c.nosp@m.h
Definition at line 26 of file HcalGeomParameters.h.
◆ HcalGeomParameters()
HcalGeomParameters::HcalGeomParameters |
( |
| ) |
|
|
default |
◆ clear()
Definition at line 462 of file HcalGeomParameters.cc.
478 for (
int i = 0;
i < 4; ++
i)
483 rb_.emplace_back(0.0);
484 ze_.emplace_back(0.0);
485 thkb_.emplace_back(-1.0);
486 thke_.emplace_back(-1.0);
References HcalParameters::dx1HE, HcalParameters::dx2HE, HcalParameters::dxHB, HcalParameters::dyHB, HcalParameters::dyHE, mps_fire::i, HcalParameters::layHB, HcalParameters::layHE, HcalParameters::rhoxHB, HcalParameters::rhoxHE, HcalParameters::zxHB, and HcalParameters::zxHE.
◆ find()
unsigned int HcalGeomParameters::find |
( |
int |
element, |
|
|
std::vector< int > & |
array |
|
) |
| const |
|
private |
◆ getConstDzHF()
double HcalGeomParameters::getConstDzHF |
( |
| ) |
const |
|
inline |
◆ getConstRHO()
void HcalGeomParameters::getConstRHO |
( |
std::vector< double > & |
rHO | ) |
const |
◆ getEta()
double HcalGeomParameters::getEta |
( |
double |
r, |
|
|
double |
z |
|
) |
| const |
|
private |
◆ getModHalfHBHE()
std::vector< int > HcalGeomParameters::getModHalfHBHE |
( |
const int |
type | ) |
const |
◆ loadfinal()
Definition at line 494 of file HcalGeomParameters.cc.
495 int ibmx = 0, iemx = 0;
498 rb_[
i] /= static_cast<double>(
ib_[
i]);
502 ze_[
i] /= static_cast<double>(
ie_[
i]);
512 for (
int i = 4;
i >= 0;
i--) {
529 for (
unsigned int k = 0;
k < php.
layHB.size(); ++
k)
532 for (
unsigned int k = 0;
k < php.
layHE.size(); ++
k)
535 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: Maximum Layer for HB " << ibmx <<
" for HE " << iemx
540 php.
rHB.resize(ibmx);
541 php.
drHB.resize(ibmx);
542 for (
int i = 0;
i < ibmx;
i++) {
546 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: php.rHB[" <<
i <<
"] = " << php.
rHB[
i] <<
" php.drHB[" <<
i
547 <<
"] = " << php.
drHB[
i];
552 php.
zHE.resize(iemx);
553 php.
dzHE.resize(iemx);
554 for (
int i = 0;
i < iemx;
i++) {
558 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: php.zHE[" <<
i <<
"] = " << php.
zHE[
i] <<
" php.dzHE[" <<
i
559 <<
"] = " << php.
dzHE[
i];
567 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters::loadGeometry: " <<
nzHB_ <<
" barrel half-sectors";
578 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters::loadGeometry: " <<
nzHE_ <<
" endcap half-sectors";
588 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++)
591 if (ibmx > 17 && php.
zHO.size() > 4) {
602 for (
unsigned int i = 0;
i < php.
zHO.size(); ++
i)
References HcalParameters::drHB, HcalParameters::dx1HE, HcalParameters::dx2HE, HcalParameters::dxHB, HcalParameters::dyHB, HcalParameters::dyHE, HcalParameters::dzHE, mps_fire::i, dqmdumpme::k, GetRecoTauVFromDQM_MC_cff::kk, HcalParameters::layHB, HcalParameters::layHE, HcalParameters::rHB, HcalParameters::rhoxHB, HcalParameters::rhoxHE, HcalParameters::zHE, HcalParameters::zHO, HcalParameters::zxHB, and HcalParameters::zxHE.
◆ loadGeometry() [1/2]
Definition at line 239 of file HcalGeomParameters.cc.
244 while (fv.firstChild()) {
245 auto t = fv.translation();
246 std::vector<double> paras = fv.parameters();
247 std::vector<int>
copy = fv.copyNos();
248 int idet = 0, lay = -1;
249 int nsiz = static_cast<int>(
copy.size());
253 idet =
copy[1] / 1000;
256 for (
unsigned int n = 0;
n <
copy.size(); ++
n)
258 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Layer " << lay <<
" parameters: " << paras.size();
259 for (
unsigned int n = 0;
n < paras.size(); ++
n)
262 double dx = 0,
dy = 0,
dz = 0, dx1 = 0, dx2 = 0;
268 }
else if (fv.isATrapezoid()) {
274 alp = 0.5 * (paras[6] + paras[10]);
275 }
else if (fv.isATubeSeg()) {
284 <<
" Layer " << lay <<
" R " <<
t.Rho();
289 if (
thkb_[lay] <= 0) {
297 for (
double k :
rxb_) {
307 php.
dyHB.emplace_back(2. *
dy);
308 php.
dxHB.emplace_back(2. *
dz);
309 php.
layHB.emplace_back(lay);
317 if (it1 ==
izb_.size())
318 izb_.emplace_back(iz);
320 if (it2 ==
phib_.size())
321 phib_.emplace_back(fi);
324 int ifi = -1, ich = -1;
333 if (ifi == 1 && ich == 4) {
340 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++) {
345 php.
zHO.resize(php.
zHO.size() + 2);
346 for (
unsigned int kz = php.
zHO.size() - 1; kz >
kk + 1; kz = kz - 2) {
347 php.
zHO[kz] = php.
zHO[kz - 2];
348 php.
zHO[kz - 1] = php.
zHO[kz - 3];
357 php.
zHO.emplace_back(z1);
358 php.
zHO.emplace_back(
z2);
361 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Lay " << lay <<
" fi " << ifi <<
" " << ich <<
" z "
366 }
else if (idet == 4) {
370 <<
" Layer " << lay <<
" Z " <<
t.z();
382 for (
double k : php.
zxHE) {
394 php.
dx1HE.emplace_back(-dx1);
395 php.
dx2HE.emplace_back(-dx2);
396 php.
layHE.emplace_back(lay);
403 if (it1 ==
ize_.size())
404 ize_.emplace_back(iz);
406 if (it2 ==
phie_.size())
407 phie_.emplace_back(fi);
409 }
else if (idet == 5) {
417 for (
unsigned j = 0;
j < paras.size();
j++)
420 if (fv.isA<dd4hep::Polycone>()) {
421 int nz = (
int)(paras.size()) - 3;
424 }
else if (fv.isATubeSeg() || fv.isAConeSeg()) {
431 edm::LogVerbatim(
"HCalGeom") <<
"Unknown Detector " << idet <<
" for " << fv.name() <<
" Shape "
References funct::abs(), clear(), filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), funct::cos(), cms::DDSolidShapeMap, PVValHelper::dx, HcalParameters::dx1HE, HcalParameters::dx2HE, HcalParameters::dxHB, PVValHelper::dy, HcalParameters::dyHB, HcalParameters::dyHE, PVValHelper::dz, ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::firstChild(), newFWLiteAna::found, photonIsolationHIProducer_cfi::hf, createfilelist::int, cms::DDFilteredView::isA(), cms::DDFilteredView::isABox(), cms::DDFilteredView::isAConeSeg(), cms::DDFilteredView::isATrapezoid(), cms::DDFilteredView::isATubeSeg(), dqmiolumiharvest::j, dqmdumpme::k, k_ScaleFromDD4HepToG4, GetRecoTauVFromDQM_MC_cff::kk, HcalParameters::layHB, HcalParameters::layHE, min(), dqmiodumpmetadata::n, cms::dd::name(), cms::DDFilteredView::name(), cms::DDFilteredView::parameters(), HcalParameters::rhoxHB, HcalParameters::rhoxHE, cms::DDFilteredView::shape(), OrderedSet::t, tan10deg, createJobs::tmp, cms::DDFilteredView::translation(), testProducerWithPsetDescEmpty_cfi::z2, HcalParameters::zHO, HcalParameters::zxHB, and HcalParameters::zxHE.
◆ loadGeometry() [2/2]
Definition at line 39 of file HcalGeomParameters.cc.
49 int idet = 0, lay = -1;
50 int nsiz = static_cast<int>(
copy.size());
52 lay =
copy[nsiz - 1] / 10;
54 idet =
copy[nsiz - 2] / 1000;
58 double dx = 0,
dy = 0,
dz = 0, dx1 = 0, dx2 = 0;
61 const DDBox& box = static_cast<DDBox>(sol);
66 const DDTrap& trp = static_cast<DDTrap>(sol);
74 const DDTubs& tub = static_cast<DDTubs>(sol);
88 if (
thkb_[lay] <= 0) {
96 for (
double k :
rxb_) {
106 php.
dyHB.emplace_back(2. *
dy);
107 php.
dxHB.emplace_back(2. *
dz);
108 php.
layHB.emplace_back(lay);
113 int iz =
copy[nsiz - 5];
114 int fi =
copy[nsiz - 4];
116 if (it1 ==
izb_.size())
117 izb_.emplace_back(iz);
119 if (it2 ==
phib_.size())
120 phib_.emplace_back(fi);
123 int ifi = -1, ich = -1;
125 ifi =
copy[nsiz - 3];
127 ich =
copy[nsiz - 4];
132 if (ifi == 1 && ich == 4) {
139 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++) {
144 php.
zHO.resize(php.
zHO.size() + 2);
145 for (
unsigned int kz = php.
zHO.size() - 1; kz >
kk + 1; kz = kz - 2) {
146 php.
zHO[kz] = php.
zHO[kz - 2];
147 php.
zHO[kz - 1] = php.
zHO[kz - 3];
156 php.
zHO.emplace_back(z1);
157 php.
zHO.emplace_back(
z2);
160 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Lay " << lay <<
" fi " << ifi <<
" " << ich <<
" z "
165 }
else if (idet == 4) {
181 for (
double k : php.
zxHE) {
193 php.
dx1HE.emplace_back(-dx1);
194 php.
dx2HE.emplace_back(-dx2);
195 php.
layHE.emplace_back(lay);
199 int iz =
copy[nsiz - 7];
200 int fi =
copy[nsiz - 5];
202 if (it1 ==
ize_.size())
203 ize_.emplace_back(iz);
205 if (it2 ==
phie_.size())
206 phie_.emplace_back(fi);
208 }
else if (idet == 5) {
211 const std::vector<double>& paras = sol.
parameters();
214 << paras.size() <<
" Parameters";
215 for (
unsigned j = 0;
j < paras.size();
j++)
219 int nz = (
int)(paras.size()) - 3;
230 <<
" R " <<
t.Rho() <<
" Z " <<
t.z();
References funct::abs(), DDTrap::alpha1(), DDTrap::alpha2(), clear(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), funct::cos(), ddbox, ddcons, ddpolycone_rrz, ddtrap, ddtubs, PVValHelper::dx, HcalParameters::dx1HE, HcalParameters::dx2HE, HcalParameters::dxHB, PVValHelper::dy, HcalParameters::dyHB, HcalParameters::dyHE, PVValHelper::dz, spr::find(), newFWLiteAna::found, DDBox::halfX(), DDBox::halfY(), DDTrap::halfZ(), DDBox::halfZ(), photonIsolationHIProducer_cfi::hf, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, k_ScaleFromDDDToG4, GetRecoTauVFromDQM_MC_cff::kk, HcalParameters::layHB, HcalParameters::layHE, DDFilteredView::logicalPart(), min(), DDBase< N, C >::name(), DDFilteredView::next(), DDSolid::parameters(), HcalParameters::rhoxHB, HcalParameters::rhoxHE, DDTubs::rIn(), DDTubs::rOut(), DDSolid::shape(), DDLogicalPart::solid(), OrderedSet::t, tan10deg, createJobs::tmp, DDFilteredView::translation(), DDTrap::x1(), DDTrap::x2(), DDTrap::x3(), DDTrap::x4(), DDTrap::y1(), DDTrap::y2(), testProducerWithPsetDescEmpty_cfi::z2, DDTubs::zhalf(), HcalParameters::zHO, HcalParameters::zxHB, and HcalParameters::zxHE.
◆ dlShort_
double HcalGeomParameters::dlShort_ |
|
private |
◆ dzVcal_
double HcalGeomParameters::dzVcal_ |
|
private |
◆ etaHO_
double HcalGeomParameters::etaHO_[4] |
|
private |
◆ ib_
std::vector<int> HcalGeomParameters::ib_ |
|
private |
◆ ie_
std::vector<int> HcalGeomParameters::ie_ |
|
private |
◆ izb_
std::vector<int> HcalGeomParameters::izb_ |
|
private |
◆ ize_
std::vector<int> HcalGeomParameters::ize_ |
|
private |
◆ k_ScaleFromDD4Hep
constexpr double HcalGeomParameters::k_ScaleFromDD4Hep = 1.0 |
|
staticconstexpr |
◆ k_ScaleFromDD4HepToG4
constexpr double HcalGeomParameters::k_ScaleFromDD4HepToG4 = 10.0 |
|
staticconstexpr |
◆ k_ScaleFromDDD
constexpr double HcalGeomParameters::k_ScaleFromDDD = 0.1 |
|
staticconstexpr |
◆ k_ScaleFromDDDToG4
constexpr double HcalGeomParameters::k_ScaleFromDDDToG4 = 1.0 |
|
staticconstexpr |
◆ k_ScaleToDD4Hep
constexpr double HcalGeomParameters::k_ScaleToDD4Hep = 1.0 |
|
staticconstexpr |
◆ k_ScaleToDD4HepFromG4
constexpr double HcalGeomParameters::k_ScaleToDD4HepFromG4 = 0.1 |
|
staticconstexpr |
◆ k_ScaleToDDD
constexpr double HcalGeomParameters::k_ScaleToDDD = 10.0 |
|
staticconstexpr |
◆ k_ScaleToDDDFromG4
constexpr double HcalGeomParameters::k_ScaleToDDDFromG4 = 1.0 |
|
staticconstexpr |
◆ kHELayer1_
const int HcalGeomParameters::kHELayer1_ = 21 |
|
staticprivate |
◆ kHELayer2_
const int HcalGeomParameters::kHELayer2_ = 71 |
|
staticprivate |
◆ maxLayer_
const int HcalGeomParameters::maxLayer_ = 20 |
|
staticprivate |
◆ nmodHB_
int HcalGeomParameters::nmodHB_ |
|
private |
◆ nmodHE_
int HcalGeomParameters::nmodHE_ |
|
private |
◆ nzHB_
int HcalGeomParameters::nzHB_ |
|
private |
◆ nzHE_
int HcalGeomParameters::nzHE_ |
|
private |
◆ phib_
std::vector<int> HcalGeomParameters::phib_ |
|
private |
◆ phie_
std::vector<int> HcalGeomParameters::phie_ |
|
private |
◆ rb_
std::vector<double> HcalGeomParameters::rb_ |
|
private |
◆ rmaxHE_
std::vector<double> HcalGeomParameters::rmaxHE_ |
|
private |
◆ rminHE_
std::vector<double> HcalGeomParameters::rminHE_ |
|
private |
◆ rminHO_
double HcalGeomParameters::rminHO_ |
|
private |
◆ rxb_
std::vector<double> HcalGeomParameters::rxb_ |
|
private |
◆ thkb_
std::vector<double> HcalGeomParameters::thkb_ |
|
private |
◆ thke_
std::vector<double> HcalGeomParameters::thke_ |
|
private |
◆ ze_
std::vector<double> HcalGeomParameters::ze_ |
|
private |
◆ zVcal_
double HcalGeomParameters::zVcal_ |
|
private |
double getEta(double r, double z) const
double halfZ(void) const
half of the z-Axis
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
std::vector< double > thkb_
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
nav_type copyNumbers() const
return the stack of copy numbers
std::vector< double > zxHB
static const int kHELayer2_
std::vector< double > zHO
std::vector< double > rminHE_
std::vector< double > thke_
DDSolidShape shape(void) const
The type of the solid.
Cos< T >::type cos(const T &t)
std::vector< double > dx1HE
std::vector< double > rhoxHE
unsigned find(int element, std::vector< int > &array) const
std::string name(Mapping a, V value)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
double y1(void) const
Half-length along y of the face at -pDz.
std::vector< double > dxHB
bool next()
set current node to the next node in the filtered tree
std::vector< double > dx2HE
std::vector< double > rb_
static const double tan10deg
std::vector< double > dzHE
static const int maxLayer_
std::vector< double > rHB
static const int kHELayer1_
Interface to a Trapezoid.
std::vector< double > rxb_
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 19 > DDSolidShapeMap
static constexpr double k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDD4HepToG4
std::vector< double > zxHE
void loadfinal(HcalParameters &php)
Tan< T >::type tan(const T &t)
std::vector< double > zHE
std::vector< double > ze_
std::vector< double > dyHE
void clear(HcalParameters &php)
std::vector< double > dyHB
double y2(void) const
Half-length along y of the face at +pDz.
const DDTranslation & translation() const
The absolute translation of the current node.
std::vector< double > drHB
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
A DDSolid represents the shape of a part.
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
Abs< T >::type abs(const T &t)
double alpha2(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of t...
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
std::vector< double > rhoxHB
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
std::vector< double > rmaxHE_