ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
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 = (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 {
47  upWidth = num / (excent - maxwLength);
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  }

◆ ~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  }

◆ 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  }

◆ 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  }

◆ setLogVolName()

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

Definition at line 22 of file DetectorElement.h.

22 { logVolName = str; }

Member Data Documentation

◆ excent

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

Definition at line 30 of file Csc.h.

◆ index

int MuonGM::Csc::index {0}

Definition at line 35 of file Csc.h.

◆ layer

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

Definition at line 37 of file Csc.h.

◆ length

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

Definition at line 27 of file Csc.h.

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

Definition at line 29 of file Csc.h.

◆ m_component

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

Definition at line 52 of file Csc.h.

◆ maxwLength

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

Definition at line 32 of file Csc.h.

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ physicalLength

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

Definition at line 31 of file Csc.h.

◆ thickness

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

Definition at line 28 of file Csc.h.

◆ upWidth

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

Definition at line 33 of file Csc.h.

◆ width

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

Definition at line 26 of file Csc.h.


The documentation for this class was generated from the following files:
MuonGM::DetectorElement::name
std::string name
Definition: DetectorElement.h:17
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
index
Definition: index.py:1
skip_csc
#define skip_csc
Definition: Csc.cxx:29
MuonGM::Csc::length
double length
Definition: Csc.h:27
MuonGM::Csc::layer
std::unique_ptr< CscMultiLayer > layer
Definition: Csc.h:37
MuonGM::Csc::maxwLength
double maxwLength
Definition: Csc.h:32
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::Csc::physicalLength
double physicalLength
Definition: Csc.h:31
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
MuonGM::Csc::width
double width
Definition: Csc.h:26
MuonGM::Csc::m_component
CscComponent * m_component
Definition: Csc.h:52
MuonGM::Csc::build
GeoFullPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
Definition: Csc.cxx:63
MuonGM::Csc::longWidth
double longWidth
Definition: Csc.h:29
MuonGM::Csc::excent
double excent
Definition: Csc.h:30
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MuonGM::Csc::upWidth
double upWidth
Definition: Csc.h:33
MuonGM::Csc::thickness
double thickness
Definition: Csc.h:28
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition: DetectorElement.h:18
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20