ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDHandlers
src
posRPhiZHandler.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AGDDHandlers/posRPhiZHandler.h
"
6
#include "
AGDDControl/AGDDController.h
"
7
#include "
AGDDKernel/AGDDPositioner.h
"
8
#include "GeoModelKernel/Units.h"
9
10
#include <iostream>
11
#include <vector>
12
13
posRPhiZHandler::posRPhiZHandler
(
const
std::string& s,
14
AGDDController
& c)
15
:
XMLHandler
(s, c)
16
{
17
}
18
19
void
posRPhiZHandler::ElementHandle
(
AGDDController
& c,
20
xercesc::DOMNode *t)
21
{
22
bool
res
=
false
;
23
std::string volume=
getAttributeAsString
(c, t,
"volume"
,
res
);
24
std::vector<double> vvv=
getAttributeAsVector
(c, t,
"R_Phi_Z"
,
res
);
25
double
radius=vvv[0];
26
double
phi
=vvv[1];
27
double
zpos=vvv[2];
28
GeoTrf::Transform3D crot = GeoTrf::Transform3D::Identity();
29
30
vvv=
getAttributeAsVector
(c, t,
"rot"
,
res
);
31
if
(
res
)
32
{
33
crot = crot*GeoTrf::RotateZ3D(vvv[2]*GeoModelKernelUnits::degree)*GeoTrf::RotateY3D(vvv[1]*GeoModelKernelUnits::degree)*GeoTrf::RotateX3D(vvv[0]*GeoModelKernelUnits::degree);
34
}
35
36
crot = GeoTrf::RotateZ3D(
phi
*GeoModelKernelUnits::degree)*crot;
37
double
x
=radius*std::cos(
phi
*GeoModelKernelUnits::degree);
38
double
y
=radius*std::sin(
phi
*GeoModelKernelUnits::degree);
39
GeoTrf::Vector3D cvec=GeoTrf::Vector3D(
x
,
y
,zpos);
40
41
new
AGDDPositioner
(c.GetPositionerStore(),
42
c.GetVolumeStore(),
43
volume,GeoTrf::Translation3D(cvec)*crot);
44
}
AGDDController.h
AGDDPositioner.h
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
y
#define y
x
#define x
AGDDController
Definition
AGDDController.h:30
AGDDPositioner
Definition
AGDDPositioner.h:18
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:100
XMLHandler::XMLHandler
XMLHandler(const std::string &n, AGDDController &c)
Definition
XMLHandler.cxx:15
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:69
posRPhiZHandler::posRPhiZHandler
posRPhiZHandler(const std::string &, AGDDController &c)
Definition
posRPhiZHandler.cxx:13
posRPhiZHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
posRPhiZHandler.cxx:19
posRPhiZHandler.h
Generated on
for ATLAS Offline Software by
1.17.0