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

#include <Csc.h>

Inheritance diagram for MuonGM::Csc:
Collaboration diagram for MuonGM::Csc:

Public Member Functions

 Csc (const MYSQL &mysql, Component *s)
 ~Csc ()=default
GeoFullPhysVol * build (StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
GeoFullPhysVol * build (StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo, 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.}
double excent {0.}
double physicalLength {0.}
double maxwLength {0.}
double upWidth {0.}
int index {0}
std::unique_ptr< CscMultiLayerlayer {nullptr}
std::string name {}
std::string logVolName {}

Private Attributes

CscComponentm_component {nullptr}

Detailed Description

Definition at line 23 of file Csc.h.

Constructor & Destructor Documentation

◆ Csc()

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

Definition at line 33 of file Csc.cxx.

33 : DetectorElement(ss->name) {
34 CscComponent *s = static_cast<CscComponent *>(ss);
35 m_component = s;
36 width = s->dx1;
37 longWidth = s->dx2;
38 thickness = s->GetThickness(mysql);
39 maxwLength = s->maxwdy;
40 excent = s->excent;
41 physicalLength = s->dy;
43 double num = longWidth * (excent - physicalLength);
44 if (std::abs(num) < 1e-10) {
45 upWidth = 0;
46 } else {
48 }
49
50 layer = std::make_unique<CscMultiLayer>(mysql, s->name);
51 layer->width = width;
52 layer->longWidth = longWidth;
53 layer->upWidth = upWidth;
54 layer->excent = excent;
55 layer->length = length;
56 layer->physicalLength = physicalLength;
57 layer->maxwLength = maxwLength;
58
59 index = s->index;
60 }
static Double_t ss
double maxwLength
Definition Csc.h:32
double length
Definition Csc.h:27
double upWidth
Definition Csc.h:33
double excent
Definition Csc.h:30
int index
Definition Csc.h:35
double thickness
Definition Csc.h:28
double width
Definition Csc.h:26
double longWidth
Definition Csc.h:29
CscComponent * m_component
Definition Csc.h:52
double physicalLength
Definition Csc.h:31
std::unique_ptr< CscMultiLayer > layer
Definition Csc.h:37
DetectorElement(const std::string &n)

◆ ~Csc()

MuonGM::Csc::~Csc ( )
default

Member Function Documentation

◆ build() [1/2]

GeoFullPhysVol * MuonGM::Csc::build ( StoredMaterialManager & matManager,
const MYSQL & mysql,
int minimalgeo )

Definition at line 63 of file Csc.cxx.

65 {
66 std::vector<Cutout *> vcutdef;
67 int cutoutson = 0;
68 return build(matManager, mysql, minimalgeo, cutoutson, vcutdef);
69 }
GeoFullPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
Definition Csc.cxx:63

◆ build() [2/2]

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

Definition at line 71 of file Csc.cxx.

74 {
75 GeoFullPhysVol *pcsc = nullptr;
76 GeoLogVol *lcsc = nullptr;
77 const GeoMaterial *mcsc = matManager.getMaterial("std::Air");
78
79 if (excent == length) {
80 // CSC is a simple traezoid
81 const GeoShape *sCSS = new GeoTrd(thickness / 2., thickness / 2., width / 2., longWidth / 2., length / 2.);
82 lcsc = new GeoLogVol(logVolName, sCSS, mcsc);
83
84 } else {
85 // CSC is a union of two trapezoids
86 GeoTrd *downTrd = new GeoTrd(thickness / 2., thickness / 2., width / 2., longWidth / 2., maxwLength / 2.);
87 GeoTrd *upTrd = new GeoTrd(thickness / 2., thickness / 2., longWidth / 2., upWidth / 2., (physicalLength - maxwLength) / 2.);
88 const GeoShape *sCSL = &((downTrd->add((*upTrd) << GeoTrf::TranslateZ3D(physicalLength / 2.))) << GeoTrf::TranslateZ3D((maxwLength - physicalLength) / 2.));
89 lcsc = new GeoLogVol(logVolName, sCSL, mcsc);
90 }
91
92 pcsc = new GeoFullPhysVol(lcsc);
93 if (minimalgeo == 1)
94 return pcsc;
95
96 GeoVPhysVol *lay = layer->build(matManager, mysql, cutoutson, vcutdef);
97 if (!skip_csc)
98 pcsc->add(lay);
99
100 return pcsc;
101 }
#define skip_csc
Definition Csc.cxx:29
virtual const GeoMaterial * getMaterial(const std::string &name)=0

◆ print()

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

Implements MuonGM::DetectorElement.

Definition at line 103 of file Csc.cxx.

103 {
104 MsgStream log(Athena::getMessageSvc(), "MuonGM::Csc");
105 log << MSG::INFO << " Csc:: Csc " << name << " : " << endmsg;
106 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setLogVolName()

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

Member Data Documentation

◆ excent

double MuonGM::Csc::excent {0.}

Definition at line 30 of file Csc.h.

30{0.}; // for csc layers

◆ index

int MuonGM::Csc::index {0}

Definition at line 35 of file Csc.h.

35{0};

◆ layer

std::unique_ptr<CscMultiLayer> MuonGM::Csc::layer {nullptr}

Definition at line 37 of file Csc.h.

37{nullptr};

◆ length

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

Definition at line 27 of file Csc.h.

27{0.};

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

18{};

◆ longWidth

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

Definition at line 29 of file Csc.h.

29{0.}; // for trapezoidal layers

◆ m_component

CscComponent* MuonGM::Csc::m_component {nullptr}
private

Definition at line 52 of file Csc.h.

52{nullptr};

◆ maxwLength

double MuonGM::Csc::maxwLength {0.}

Definition at line 32 of file Csc.h.

32{0.};

◆ name

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

Definition at line 17 of file DetectorElement.h.

17{};

◆ physicalLength

double MuonGM::Csc::physicalLength {0.}

Definition at line 31 of file Csc.h.

31{0.};

◆ thickness

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

Definition at line 28 of file Csc.h.

28{0.};

◆ upWidth

double MuonGM::Csc::upWidth {0.}

Definition at line 33 of file Csc.h.

33{0.};

◆ width

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

Definition at line 26 of file Csc.h.

26{0.};

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