CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TotemT2Tile Class Reference

#include <TotemT2Tile.h>

Public Member Functions

const GlobalPointcentre () const
 
 TotemT2Tile ()
 
 TotemT2Tile (const DetGeomDesc *)
 
 ~TotemT2Tile ()
 

Private Attributes

GlobalPoint centre_
 

Detailed Description

Definition at line 15 of file TotemT2Tile.h.

Constructor & Destructor Documentation

◆ TotemT2Tile() [1/2]

TotemT2Tile::TotemT2Tile ( )

Definition at line 13 of file TotemT2Tile.cc.

13 {}

◆ TotemT2Tile() [2/2]

TotemT2Tile::TotemT2Tile ( const DetGeomDesc dgd)
explicit

Definition at line 15 of file TotemT2Tile.cc.

References angle(), centre_, ALCARECOEcalPhiSym_cff::float, DetGeomDesc::params(), DetGeomDesc::parentZPosition(), DetGeomDesc::rotation(), DetGeomDesc::translation(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

15  {
16  centre_ = GlobalPoint{(float)dgd->translation().x(),
17  (float)dgd->translation().y(),
18  (float)dgd->parentZPosition()}; // retrieve the plane position for z coordinate
19  double angle = 0.;
20  { // get azimutal component of tile rotation
22  dgd->rotation().GetRotationMatrix(mat);
23  angle = acos(mat[0][0]);
24  }
25  TGeoCombiTrans place(centre_.x(), centre_.y(), centre_.z(), new TGeoRotation("tile_rot", angle, 0., 0.));
26  TGeoManager mgr;
27  auto* box = mgr.MakeBox("top", nullptr, 0., 0., 0.);
28  mgr.SetTopVolume(box);
29  auto* vol = mgr.MakeTrd1("tile", nullptr, dgd->params()[4], dgd->params()[8], dgd->params()[3], dgd->params()[0]);
30  box->AddNode(vol, 1, &place);
31 }
const Translation & translation() const
Definition: DetGeomDesc.h:80
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
float parentZPosition() const
Definition: DetGeomDesc.h:106
GlobalPoint centre_
Definition: TotemT2Tile.h:24
const RotationMatrix & rotation() const
Definition: DetGeomDesc.h:81
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
const std::vector< double > & params() const
Definition: DetGeomDesc.h:88

◆ ~TotemT2Tile()

TotemT2Tile::~TotemT2Tile ( )

Definition at line 33 of file TotemT2Tile.cc.

33 {}

Member Function Documentation

◆ centre()

const GlobalPoint& TotemT2Tile::centre ( ) const
inline

Definition at line 21 of file TotemT2Tile.h.

References centre_.

21 { return centre_; }
GlobalPoint centre_
Definition: TotemT2Tile.h:24

Member Data Documentation

◆ centre_

GlobalPoint TotemT2Tile::centre_
private

Definition at line 24 of file TotemT2Tile.h.

Referenced by centre(), and TotemT2Tile().