ATLAS Offline Software
mposWedgeHandler.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;
23  std::string volume=getAttributeAsString(c, t, "volume",res);
24  int iWedge=getAttributeAsInt(c, t, "wedge_number",8);
25  std::vector<double> iSectors=getAttributeAsVector(c, t, "sectors",res);
26 
27  double dWedge=360./iWedge;
28 
29  double radius=0;
30  for (int i=0;i<iWedge;i++)
31  {
32  double Wedge=dWedge*i;
33  if ((int)iSectors[i]==0) continue;
34  GeoTrf::Transform3D crot = GeoTrf::RotateZ3D(Wedge*GeoModelKernelUnits::degree);
37  double zpos=0;
39 
40  new AGDDPositioner(c.GetPositionerStore(),
41  c.GetVolumeStore(),
42  volume,GeoTrf::Translation3D(cvec)*crot);
43  }
44 }
AGDDController.h
AGDDPositioner.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
mposWedgeHandler.h
x
#define x
AGDDPositioner
Definition: AGDDPositioner.h:18
AGDDController
Definition: AGDDController.h:30
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
mposWedgeHandler::mposWedgeHandler
mposWedgeHandler(const std::string &, AGDDController &c)
Definition: mposWedgeHandler.cxx:13
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
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
XMLHandler::getAttributeAsInt
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:89
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
mposWedgeHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition: mposWedgeHandler.cxx:19
python.compressB64.c
def c
Definition: compressB64.py:93
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106