Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/SystemOfUnits.h"
25 m_amdbOrigine_along_length (0),
26 m_amdbOrigine_along_thickness (0),
35 m_amdbOrigine_along_length (0),
36 m_amdbOrigine_along_thickness (0),
46 p.zindex <<
" " <<
p.phiindex <<
" " <<
p.zindex * 100 +
p.phiindex <<
51 int key =
p.zindex * 100 +
p.phiindex;
56 int key = iz * 100 + iphi;
58 lastAlignPosInRange = ppp.second;
64 int key = iz * 100 + iphi;
71 int key = iz * 100 + iphi;
91 p.zindex <<
" " <<
p.phiindex <<
" " <<
p.zindex * 100 +
p.phiindex);
100 int key = iz * 100 + iphi;
121 thick = thick >
t->GetThickness(mysql) +
t->posz ? thick :
t->GetThickness(mysql) +
t->posz;
132 thick = thick >
s->GetThickness(mysql) +
s->posz ? thick :
s->GetThickness(mysql) +
s->posz;
133 if (
i == 0 ||
s->posz < zstart)
136 ATH_MSG_VERBOSE(
"Station " <<
m_name <<
" calculating Thinkness = " << thick <<
" and zstart = " << zstart);
139 if (std::abs(zstart) > 0.001) {
140 thick = thick - zstart;
143 " because zstart = " << zstart <<
164 double outerrad = 0.;
169 if (tg->
posy < innerrad) {
173 if (tg->
posy + tg->
dy > outerrad) {
174 outerrad = tg->
posy + tg->
dy;
178 len = outerrad - innerrad;
180 double ystart = 999999.;
185 ATH_MSG_ERROR(
"Dynamic cast to StandardComponent failed at line "<<__LINE__);
189 sc->name <<
" posy " <<
sc->posy <<
" dy " <<
sc->dy <<
" len " << len <<
190 " ystart " << ystart);
191 if ((
sc->dy +
sc->posy) > len)
192 len =
sc->dy +
sc->posy;
193 if (
i == 0 ||
sc->posy < ystart)
198 if (std::abs(ystart) > 0.001) {
202 ATH_MSG_VERBOSE(
"Station " <<
m_name <<
" redefining len = " << len <<
" because ystart = " << ystart);
216 ATH_MSG_ERROR(
"Dynamic cast to StandardComponent failed at line "<<__LINE__);
219 if (
i == 0 ||
sc->posy < ystart)
228 double maxdxmin = std::numeric_limits<double>::lowest();
237 if (typetgc ==
"01" || typetgc ==
"06" || typetgc ==
"12" || typetgc ==
"18" || typetgc ==
"19" || typetgc ==
"20" || typetgc ==
"21") {
257 ATH_MSG_ERROR(
"Dynamic cast to StandardComponent failed at line "<<__LINE__);
264 if (maxdxmin < dxmin && (
n.substr(0, 2) !=
"LB" ||
m_name[0] ==
'B'))
269 if (
m_name.substr(0, 1) ==
"T")
278 double maxdxmax = std::numeric_limits<double>::lowest();
291 if (typetgc ==
"01" || typetgc ==
"06" || typetgc ==
"12" || typetgc ==
"18" || typetgc ==
"19" || typetgc ==
"20" || typetgc ==
"21") {
304 ATH_MSG_ERROR(
"Dynamic cast to StandardComponent failed at line "<<__LINE__);
311 if (maxdxmax < dxmax)
316 if (
m_name.compare(0, 1,
"T") == 0)
327 os <<
"Station m_name: " <<
s.m_name <<
" " <<
s.m_components.size() << std::endl;
328 for (
unsigned int i = 0;
i <
s.m_components.size();
i++)
329 os <<
"\t" <<
s.m_components[
i].get() << std::endl;
332 for (
k =
s.begin();
k !=
s.end(); ++
k)
333 os <<
"\t\t" << (*k).second << std::endl;
336 for (ak =
s.abegin(); ak !=
s.aend(); ++ak)
337 os <<
"\t\t" << (*ak).second << std::endl;
339 os <<
"--------------------------------------------------" << std::endl;
346 ATH_MSG_ERROR(
"Dynamic cast to MDT failed at line "<<__LINE__);
349 double mdthalfpitch = 0.5 * (mdtobj->pitch);
355 if (
c->name.compare(0, 3,
"MDT") != 0)
359 ATH_MSG_ERROR(
"Cannot find MDT definition for component " <<
c->name);
362 mdthalfpitch = 0.5 * (mdtobj->
pitch);
374 if (amdbVersion > 0 && amdbVersion < 7 &&
m_name[0] !=
'B') {
375 ATH_MSG_DEBUG(
"For AMDB version " << amdbVersion <<
" a left-handed chamber coordinate system was used "
376 <<
" for endcap side A so be very careful.");
388 GeoTrf::Translate3D AMDBorgTranslation(0, 0, 0);
389 if ((
m_name[0] ==
'B' ||
p.isBarrelLike) &&
p.zindex < 0 && (!
p.isMirrored) &&
hasMdts()) {
393 ATH_MSG_VERBOSE(
" GetThickness / getAmdbO_thick / GetLength() / getAmdbO_length " <<
404 ATH_MSG_VERBOSE(
" GetThickness / getAmdbO_thick / GetLength() / getAmdbO_length " <<
449 if ((
p.isBarrelLike) || (
m_name[0] ==
'B')) {
456 if ((
p.isBarrelLike) || (
m_name[0] ==
'B' &&
p.zindex < 0 &&
hasMdts())) {
458 vec.z() =
p.z + halfpitch;
471 ATH_MSG_VERBOSE(
" gamma is not changing sign - original " <<
p.gamma <<
" new one " <<
p.gamma <<
472 " alpha / beta " <<
p.alpha <<
" " <<
p.beta);
480 if (
m_name[0] ==
'B' ||
p.isBarrelLike) {
497 }
else if (
p.z < 0) {
505 return GeoTrf::Translate3D(
vec.x(),
vec.y(),
vec.z()) * nominalTransf * abgRot;
521 if (
ap.tras != 0 ||
ap.trat != 0 ||
ap.traz != 0 ||
ap.rots != 0 ||
ap.rott != 0 ||
ap.rotz != 0) {
523 <<
ap.tras <<
" " <<
ap.traz <<
" " <<
ap.trat <<
" " <<
ap.rots <<
" "
524 <<
ap.rotz <<
" " <<
ap.rott <<
" isBarrel=" <<
ap.isBarrel
528 GeoTrf::RotateX3D rott(
ap.rott);
529 GeoTrf::RotateZ3D rotz(
ap.rotz);
530 GeoTrf::RotateY3D rots(
ap.rots);
531 GeoTrf::Transform3D trans = GeoTrf::TranslateY3D(
ap.tras) * GeoTrf::TranslateZ3D(
ap.traz) * GeoTrf::TranslateX3D(
ap.trat);
537 << delta(0, 0) <<
" " << delta(0, 1) <<
" " << delta(0, 2) <<
" " << delta(0, 3) <<
" " <<
endmsg
538 << delta(1, 0) <<
" " << delta(1, 1) <<
" " << delta(1, 2) <<
" " << delta(1, 3) <<
" " <<
endmsg
539 << delta(2, 0) <<
" " << delta(2, 1) <<
" " << delta(2, 2) <<
" " << delta(2, 3) <<
" " <<
endmsg;
std::ostream & operator<<(std::ostream &os, const AlignPos &p)
Ensure that the Athena extensions are properly loaded.
GeoTrf::Transform3D tsz_to_global_frame(const MYSQL &mysql, const Position &p) const
std::vector< std::unique_ptr< Component > > m_components
int getNovaReadVersion() const
AlignPosIterator getFirstAlignPosInRange(int iz, int iphi, AlignPosIterator &lastAlignPosInRange) const
singleton-like access to IMessageSvc via open function and helper
double GetExtraBottomThickness() const
GeoTrf::Transform3D getNominalTransform(const MYSQL &mysql, const Position &p) const
GeoTrf::Transform3D getAlignedTransform(const MYSQL &mysql, const AlignPos &ap, const Position &p) const
std::atomic< double > m_amdbOrigine_along_length
double getAmdbOrigine_along_thickness(const MYSQL &mysql) const
GeoTrf::Transform3D global_to_tsz_frame(const MYSQL &mysql, const Position &p) const
std::vector< std::unique_ptr< Cutout > > m_cutouts
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
void SetPosition(Position p)
GeoTrf::Transform3D getDeltaTransform(const MYSQL &mysql, const AlignPos &ap, const Position &p) const
PositionIterator begin() const
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
std::map< int, Position, std::less< int > >::const_iterator PositionIterator
PositionIterator FindPosition(int iz, int iphi) const
Eigen::Affine3d Transform3D
AlignPosIterator aend() const
double getAmdbOrigine_along_length() const
std::multimap< int, AlignPos, std::less< int > >::const_iterator AlignPosIterator
Class to provide easy MsgStream access and capabilities.
double GetExtraTopThickness() const
void SetCutout(Cutout *c)
GeoTrf::Transform3D tsz_to_native_frame(const MYSQL &mysql, const Position &p) const
MsgStream & msg() const
The standard message stream.
AlignPosIterator FindAlignPos(int iz, int iphi) const
void SetComponent(Component *c)
void SetAlignPos(const AlignPos &p)
Eigen::Matrix< double, 3, 1 > Vector3D
int GetNrOfCutouts() const
GeoTrf::Transform3D getDeltaTransform_tszFrame(const MYSQL &mysql, const AlignPos &ap) const
int GetNrOfComponents() const
#define ATH_MSG_WARNING(x)
const Technology * GetATechnology(const std::string &name) const
void StoreStation(Station *s)
AlignPosMap m_alignpositions
Cutout * GetCutout(int i) const
double GetThickness(const MYSQL &mysql) const
GeoTrf::Transform3D native_to_tsz_frame(const MYSQL &mysql, const Position &p) const
std::atomic< double > m_amdbOrigine_along_thickness
AlignPosIterator abegin() const
PositionIterator end() const
Component * GetComponent(int i) const
const std::string & GetName() const
double mdtHalfPitch(const MYSQL &mysql) const
int CountAlignPos(int iz, int iphi) const