ATLAS Offline Software
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 
8 #include "GeoModelKernel/Units.h"
9 
10 #include <iostream>
11 #include <vector>
12 
15  : XMLHandler(s, c)
16 {
17 }
18 
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;
40 
41  new AGDDPositioner(c.GetPositionerStore(),
42  c.GetVolumeStore(),
43  volume,GeoTrf::Translation3D(cvec)*crot);
44 }
AGDDController.h
AGDDPositioner.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
posRPhiZHandler::posRPhiZHandler
posRPhiZHandler(const std::string &, AGDDController &c)
Definition: posRPhiZHandler.cxx:13
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
x
#define x
AGDDPositioner
Definition: AGDDPositioner.h:18
AGDDController
Definition: AGDDController.h:30
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:100
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
posRPhiZHandler.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
XMLHandler
Definition: XMLHandler.h:15
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
y
#define y
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
posRPhiZHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition: posRPhiZHandler.cxx:19
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
python.compressB64.c
def c
Definition: compressB64.py:93
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106