|
|
#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 27 of file HcalGeomParameters.h.
◆ HcalGeomParameters()
HcalGeomParameters::HcalGeomParameters |
( |
| ) |
|
|
default |
◆ clear()
Definition at line 461 of file HcalGeomParameters.cc.
477 for (
int i = 0;
i < 4; ++
i)
482 rb_.emplace_back(0.0);
483 ze_.emplace_back(0.0);
484 thkb_.emplace_back(-1.0);
485 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 493 of file HcalGeomParameters.cc.
494 int ibmx = 0, iemx = 0;
497 rb_[
i] /= static_cast<double>(
ib_[
i]);
501 ze_[
i] /= static_cast<double>(
ie_[
i]);
511 for (
int i = 4;
i >= 0;
i--) {
528 for (
unsigned int k = 0;
k < php.
layHB.size(); ++
k)
531 for (
unsigned int k = 0;
k < php.
layHE.size(); ++
k)
534 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: Maximum Layer for HB " << ibmx <<
" for HE " << iemx
539 php.
rHB.resize(ibmx);
540 php.
drHB.resize(ibmx);
541 for (
int i = 0;
i < ibmx;
i++) {
545 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: php.rHB[" <<
i <<
"] = " << php.
rHB[
i] <<
" php.drHB[" <<
i
546 <<
"] = " << php.
drHB[
i];
551 php.
zHE.resize(iemx);
552 php.
dzHE.resize(iemx);
553 for (
int i = 0;
i < iemx;
i++) {
557 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters: php.zHE[" <<
i <<
"] = " << php.
zHE[
i] <<
" php.dzHE[" <<
i
558 <<
"] = " << php.
dzHE[
i];
566 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters::loadGeometry: " <<
nzHB_ <<
" barrel half-sectors";
577 edm::LogVerbatim(
"HCalGeom") <<
"HcalGeomParameters::loadGeometry: " <<
nzHE_ <<
" endcap half-sectors";
587 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++)
590 if (ibmx > 17 && php.
zHO.size() > 4) {
601 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 238 of file HcalGeomParameters.cc.
243 while (fv.firstChild()) {
244 auto t = fv.translation();
245 std::vector<double> paras = fv.parameters();
246 std::vector<int>
copy = fv.copyNos();
247 int idet = 0, lay = -1;
248 int nsiz = static_cast<int>(
copy.size());
252 idet =
copy[1] / 1000;
255 for (
unsigned int n = 0;
n <
copy.size(); ++
n)
257 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Layer " << lay <<
" parameters: " << paras.size();
258 for (
unsigned int n = 0;
n < paras.size(); ++
n)
261 double dx = 0,
dy = 0,
dz = 0, dx1 = 0, dx2 = 0;
263 if (dd4hep::isA<dd4hep::Box>(fv.solid())) {
267 }
else if (dd4hep::isA<dd4hep::Trap>(fv.solid())) {
273 alp = 0.5 * (paras[6] + paras[10]);
274 }
else if (dd4hep::isA<dd4hep::Tube>(fv.solid())) {
283 <<
" Layer " << lay <<
" R " <<
t.Rho();
288 if (
thkb_[lay] <= 0) {
296 for (
double k :
rxb_) {
306 php.
dyHB.emplace_back(2. *
dy);
307 php.
dxHB.emplace_back(2. *
dz);
308 php.
layHB.emplace_back(lay);
316 if (it1 ==
izb_.size())
317 izb_.emplace_back(iz);
319 if (it2 ==
phib_.size())
320 phib_.emplace_back(fi);
323 int ifi = -1, ich = -1;
332 if (ifi == 1 && ich == 4) {
339 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++) {
344 php.
zHO.resize(php.
zHO.size() + 2);
345 for (
unsigned int kz = php.
zHO.size() - 1; kz >
kk + 1; kz = kz - 2) {
346 php.
zHO[kz] = php.
zHO[kz - 2];
347 php.
zHO[kz - 1] = php.
zHO[kz - 3];
356 php.
zHO.emplace_back(z1);
357 php.
zHO.emplace_back(
z2);
360 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Lay " << lay <<
" fi " << ifi <<
" " << ich <<
" z "
365 }
else if (idet == 4) {
369 <<
" Layer " << lay <<
" Z " <<
t.z();
381 for (
double k : php.
zxHE) {
393 php.
dx1HE.emplace_back(-dx1);
394 php.
dx2HE.emplace_back(-dx2);
395 php.
layHE.emplace_back(lay);
402 if (it1 ==
ize_.size())
403 ize_.emplace_back(iz);
405 if (it2 ==
phie_.size())
406 phie_.emplace_back(fi);
408 }
else if (idet == 5) {
416 for (
unsigned j = 0;
j < paras.size();
j++)
419 if (dd4hep::isA<dd4hep::Polycone>(fv.solid())) {
420 int nz = (
int)(paras.size()) - 3;
423 }
else if (dd4hep::isA<dd4hep::Tube>(fv.solid()) || dd4hep::isA<dd4hep::ConeSegment>(fv.solid())) {
430 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, 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(), cms::DDFilteredView::solid(), submitPVValidationJobs::t, tan10deg, createJobs::tmp, cms::DDFilteredView::translation(), testProducerWithPsetDescEmpty_cfi::z2, HcalParameters::zHO, HcalParameters::zxHB, and HcalParameters::zxHE.
◆ loadGeometry() [2/2]
Definition at line 38 of file HcalGeomParameters.cc.
48 int idet = 0, lay = -1;
49 int nsiz = static_cast<int>(
copy.size());
51 lay =
copy[nsiz - 1] / 10;
53 idet =
copy[nsiz - 2] / 1000;
57 double dx = 0,
dy = 0,
dz = 0, dx1 = 0, dx2 = 0;
60 const DDBox& box = static_cast<DDBox>(sol);
65 const DDTrap& trp = static_cast<DDTrap>(sol);
73 const DDTubs& tub = static_cast<DDTubs>(sol);
87 if (
thkb_[lay] <= 0) {
95 for (
double k :
rxb_) {
105 php.
dyHB.emplace_back(2. *
dy);
106 php.
dxHB.emplace_back(2. *
dz);
107 php.
layHB.emplace_back(lay);
112 int iz =
copy[nsiz - 5];
113 int fi =
copy[nsiz - 4];
115 if (it1 ==
izb_.size())
116 izb_.emplace_back(iz);
118 if (it2 ==
phib_.size())
119 phib_.emplace_back(fi);
122 int ifi = -1, ich = -1;
124 ifi =
copy[nsiz - 3];
126 ich =
copy[nsiz - 4];
131 if (ifi == 1 && ich == 4) {
138 for (
unsigned int kk = 0;
kk < php.
zHO.size();
kk++) {
143 php.
zHO.resize(php.
zHO.size() + 2);
144 for (
unsigned int kz = php.
zHO.size() - 1; kz >
kk + 1; kz = kz - 2) {
145 php.
zHO[kz] = php.
zHO[kz - 2];
146 php.
zHO[kz - 1] = php.
zHO[kz - 3];
155 php.
zHO.emplace_back(z1);
156 php.
zHO.emplace_back(
z2);
159 edm::LogVerbatim(
"HCalGeom") <<
"Detector " << idet <<
" Lay " << lay <<
" fi " << ifi <<
" " << ich <<
" z "
164 }
else if (idet == 4) {
180 for (
double k : php.
zxHE) {
192 php.
dx1HE.emplace_back(-dx1);
193 php.
dx2HE.emplace_back(-dx2);
194 php.
layHE.emplace_back(lay);
198 int iz =
copy[nsiz - 7];
199 int fi =
copy[nsiz - 5];
201 if (it1 ==
ize_.size())
202 ize_.emplace_back(iz);
204 if (it2 ==
phie_.size())
205 phie_.emplace_back(fi);
207 }
else if (idet == 5) {
210 const std::vector<double>& paras = sol.
parameters();
213 << paras.size() <<
" Parameters";
214 for (
unsigned j = 0;
j < paras.size();
j++)
218 int nz = (
int)(paras.size()) - 3;
229 <<
" 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(), submitPVValidationJobs::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 / dd4hep::cm) |
|
staticconstexpr |
◆ k_ScaleFromDD4HepToG4
constexpr double HcalGeomParameters::k_ScaleFromDD4HepToG4 = (1.0 / dd4hep::mm) |
|
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 = dd4hep::cm |
|
staticconstexpr |
◆ k_ScaleToDD4HepFromG4
constexpr double HcalGeomParameters::k_ScaleToDD4HepFromG4 = dd4hep::mm |
|
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
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
unsigned find(int element, std::vector< int > &array) const
std::string name(Mapping a, V value)
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_
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.
Log< level::Info, true > LogVerbatim
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.
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 21 > DDSolidShapeMap
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_