ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
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)
 
GeoVPhysVol * build (StoredMaterialManager &matManager, const MYSQL &mysql)
 
GeoVPhysVol * 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;
28  width = s->dx1;
29  longWidth = s->dx2;
30  thickness = s->GetThickness(mysql) - tol;
31  length = s->dy - tol;
32  m_component = s;
33  }

Member Function Documentation

◆ build() [1/2]

GeoVPhysVol * 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  }

◆ build() [2/2]

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

Definition at line 42 of file Ded.cxx.

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

◆ print()

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

Implements MuonGM::DetectorElement.

Definition at line 86 of file Ded.cxx.

86  {
87  MsgStream log(Athena::getMessageSvc(), "MuonGM::Ded");
88  log << MSG::INFO << "Ded " << name.c_str() << " :" << endmsg;
89  }

◆ setLogVolName()

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

Definition at line 22 of file DetectorElement.h.

22 { logVolName = str; }

Member Data Documentation

◆ length

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

Definition at line 22 of file Ded.h.

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

Definition at line 24 of file Ded.h.

◆ m_component

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

Definition at line 36 of file Ded.h.

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ thickness

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

Definition at line 23 of file Ded.h.

◆ width

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

Definition at line 21 of file Ded.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
MuonGM::DetectorElement::name
std::string name
Definition: DetectorElement.h:17
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MuonGM::DedComponent
StandardComponent DedComponent
Definition: DedComponent.h:10
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
skip_ded
#define skip_ded
Definition: Ded.cxx:21
MuonGM::Ded::longWidth
double longWidth
Definition: Ded.h:24
MuonGM::Ded::thickness
double thickness
Definition: Ded.h:23
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGM::Ded::m_component
DedComponent * m_component
Definition: Ded.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
MuonGM::Ded::build
GeoVPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql)
Definition: Ded.cxx:35
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
MuonGM::Ded::width
double width
Definition: Ded.h:21
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition: DetectorElement.h:18
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20
MuonGM::Ded::length
double length
Definition: Ded.h:22