ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::Ded Class Reference

#include <Ded.h>

Inheritance diagram for MuonGM::Ded:
Collaboration diagram for MuonGM::Ded:

Public Member Functions

 Ded (const MYSQL &mysql, Component *s)
PVLink build (StoredMaterialManager &matManager, const MYSQL &mysql)
PVLink build (StoredMaterialManager &matManager, const MYSQL &mysql, int cutoutson, const std::vector< Cutout * > &)
virtual void print () const override
void setLogVolName (const std::string &str)

Public Attributes

double width {0.}
double length {0.}
double thickness {0.}
double longWidth {0.}
std::string name {}
std::string logVolName {}

Private Attributes

DedComponentm_component {nullptr}

Detailed Description

Definition at line 18 of file Ded.h.

Constructor & Destructor Documentation

◆ Ded()

MuonGM::Ded::Ded ( const MYSQL & mysql,
Component * s )

Definition at line 25 of file Ded.cxx.

25 : DetectorElement(ss->name) {
26 double tol = 1.e-4;
27 DedComponent *s = static_cast<DedComponent *>(ss);
28 width = s->dx1;
29 longWidth = s->dx2;
30 thickness = s->GetThickness(mysql) - tol;
31 length = s->dy - tol;
32 m_component = s;
33 }
static Double_t ss
double thickness
Definition Ded.h:23
double longWidth
Definition Ded.h:24
DedComponent * m_component
Definition Ded.h:34
double length
Definition Ded.h:22
double width
Definition Ded.h:21
DetectorElement(const std::string &n)
StandardComponent DedComponent

Member Function Documentation

◆ build() [1/2]

PVLink MuonGM::Ded::build ( StoredMaterialManager & matManager,
const MYSQL & mysql )

Definition at line 35 of file Ded.cxx.

36 {
37 std::vector<Cutout *> vcutdef;
38 int cutoutson = 0;
39 return build(matManager, mysql, cutoutson, vcutdef);
40 }
PVLink build(StoredMaterialManager &matManager, const MYSQL &mysql)
Definition Ded.cxx:35

◆ build() [2/2]

PVLink MuonGM::Ded::build ( StoredMaterialManager & matManager,
const MYSQL & mysql,
int cutoutson,
const std::vector< Cutout * > & vcutdef )

Definition at line 42 of file Ded.cxx.

43 {
44 const DED *r = dynamic_cast<const DED*>(mysql.GetTechnology(name));
45
46 double tckaluminum = r->AlThickness;
47 double honthickness = r->HoneyCombThickness;
48 const GeoShape *sded = new GeoTrd(thickness / 2, thickness / 2, width / 2, longWidth / 2, length / 2);
49 const GeoShape *shon = new GeoTrd(honthickness / 2, honthickness / 2, width / 2. - tckaluminum, longWidth / 2. - tckaluminum, length / 2. - tckaluminum);
50
51 const GeoMaterial *mded = matManager.getMaterial("std::Aluminium");
52 GeoLogVol *lded = new GeoLogVol("DedModuleSkin", sded, mded);
53 PVLink pded = new GeoPhysVol(lded);
54
55 // Place honeycomb inside aluminum to make aluminum skin
56 const GeoMaterial *mhon = matManager.getMaterial("muo::RpcPapHonC");
57 GeoLogVol *lhon = new GeoLogVol("DedModulehoneycomb", shon, mhon);
58 PVLink phon = new GeoPhysVol(lhon);
59 if (!skip_ded)
60 pded->add(phon);
61
62 // Apply cutouts
63 if (cutoutson && !vcutdef.empty()) {
64 GeoIntrusivePtr<GeoPhysVol> tempPhys{};
65 Cutout *cut = nullptr;
66 GeoShape *cutoutShape = nullptr;
67 GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()};
68 for (unsigned i = 0; i < vcutdef.size(); i++) {
69 cut = vcutdef[i];
70 cutoutShape = new GeoTrd(thickness / 2. + 1., thickness / 2. + 1., cut->widthXs / 2., cut->widthXl / 2., cut->lengthY / 2.);
71 cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length / 2 + cut->dy + cut->lengthY / 2.);
72
73 GeoIntrusivePtr<GeoVPhysVol> toCut{pded};
74 GeoCutVolAction cutAction(*cutoutShape, cutTrans);
75 toCut->apply(&cutAction);
76 tempPhys = cutAction.getPV();
77 pded = tempPhys;
78 }
79 }
80
81 return pded;
82 }
#define skip_ded
Definition Ded.cxx:21
Technology * GetTechnology(const std::string &name)
Definition MYSQL.cxx:105
virtual const GeoMaterial * getMaterial(const std::string &name)=0
int r
Definition globals.cxx:22
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.

◆ print()

void MuonGM::Ded::print ( ) const
overridevirtual

Implements MuonGM::DetectorElement.

Definition at line 84 of file Ded.cxx.

84 {
85 MsgStream log(Athena::getMessageSvc(), "MuonGM::Ded");
86 log << MSG::INFO << "Ded " << name.c_str() << " :" << endmsg;
87 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setLogVolName()

void MuonGM::DetectorElement::setLogVolName ( const std::string & str)
inlineinherited

Member Data Documentation

◆ length

double MuonGM::Ded::length {0.}

Definition at line 22 of file Ded.h.

22{0.};

◆ logVolName

std::string MuonGM::DetectorElement::logVolName {}
inherited

Definition at line 18 of file DetectorElement.h.

18{};

◆ longWidth

double MuonGM::Ded::longWidth {0.}

Definition at line 24 of file Ded.h.

24{0.}; // for trapezoidal layers

◆ m_component

DedComponent* MuonGM::Ded::m_component {nullptr}
private

Definition at line 34 of file Ded.h.

34{nullptr};

◆ name

std::string MuonGM::DetectorElement::name {}
inherited

Definition at line 17 of file DetectorElement.h.

17{};

◆ thickness

double MuonGM::Ded::thickness {0.}

Definition at line 23 of file Ded.h.

23{0.};

◆ width

double MuonGM::Ded::width {0.}

Definition at line 21 of file Ded.h.

21{0.};

The documentation for this class was generated from the following files: