ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDMuonStation Class Reference

#include <AGDDMuonStation.h>

Inheritance diagram for AGDDMuonStation:
Collaboration diagram for AGDDMuonStation:

Public Member Functions

 AGDDMuonStation (const std::string &s, AGDDVolumeStore &vs, AGDDSectionStore &ss)
void SetXYZ (const std::vector< double > &v)
void small_x (double x)
void large_x (double x)
void y (double yval)
void z (double zval)
double small_x () const
double large_x () const
double y () const
double z () const
virtual void CreateVolume (AGDDBuilder &builder) override
virtual void CreateSolid (const AGDDBuilder &builder) override
const std::string & GetName () const
void SetMaterial (const std::string &n)
void AddDaughter (AGDDPositioner *v)
AGDDPositionerGetDaughter (int i)
int NrOfDaughter () const
bool HasParent () const
void AddParent (AGDDVolume *v)
void * GetVolume ()
void * GetSolid ()
void SetSolid (void *p)
void SetVolume (void *p)
void SetColor (const std::string &c)
void IsSensitiveVolume (bool v)
bool IsSensitiveVolume () const
const std::string & GetColor () const
const std::string & GetMaterial () const

Protected Attributes

std::string m_name
std::string m_material
std::vector< AGDDPositioner * > m_theDaughters
std::vector< AGDDVolume * > m_theParents
std::string m_color
void * m_theSolid
void * m_theVolume
bool m_isSensitive
AGDDVolumeStorem_vs

Static Private Member Functions

static const GeoMaterial * GetMMMaterial (const std::string &)

Private Attributes

double m_small_x {0.}
double m_large_x {0.}
double m_y {0.}
double m_z {0.}

Detailed Description

Definition at line 17 of file AGDDMuonStation.h.

Constructor & Destructor Documentation

◆ AGDDMuonStation()

AGDDMuonStation::AGDDMuonStation ( const std::string & s,
AGDDVolumeStore & vs,
AGDDSectionStore & ss )
inline

Definition at line 19 of file AGDDMuonStation.h.

22 : AGDDVolume(s,vs,ss) {}
static Double_t ss
AGDDVolume(const std::string &s, AGDDVolumeStore &vs, AGDDSectionStore &ss, bool v=false)

Member Function Documentation

◆ AddDaughter()

void AGDDVolume::AddDaughter ( AGDDPositioner * v)
inherited

Definition at line 21 of file AGDDVolume.cxx.

22{
23 m_theDaughters.push_back(v);
24 m_vs.GetVolume(v->Volume())->AddParent(this);
25}
std::vector< AGDDPositioner * > m_theDaughters
Definition AGDDVolume.h:45
AGDDVolumeStore & m_vs
Definition AGDDVolume.h:55

◆ AddParent()

void AGDDVolume::AddParent ( AGDDVolume * v)
inlineinherited

Definition at line 31 of file AGDDVolume.h.

31{m_theParents.push_back(v);}
std::vector< AGDDVolume * > m_theParents
Definition AGDDVolume.h:46

◆ CreateSolid()

void AGDDMuonStation::CreateSolid ( const AGDDBuilder & builder)
overridevirtual

Reimplemented from AGDDVolume.

Definition at line 19 of file AGDDMuonStation.cxx.

20{
21 std::cout<<"this is AGDDMuonStation::CreateSolid()"<<std::endl;
22 void *p=GetSolid();
23 if (!p) {
24 std::cout<<" creating solid with dimensions "<<
25 m_small_x<<" "<<m_large_x<<" "<<m_y<<" "<<m_z<<std::endl;
26 GeoShape* solid=new GeoTrd(m_small_x/2.,m_large_x/2.,m_y/2.,m_y/2.,m_z/2.);
28 }
29}
static std::map< double, LArWheelSliceSolid * > solid
void SetSolid(void *p)
Definition AGDDVolume.h:34
void * GetSolid()
Definition AGDDVolume.h:33

◆ CreateVolume()

void AGDDMuonStation::CreateVolume ( AGDDBuilder & builder)
overridevirtual

Reimplemented from AGDDVolume.

Definition at line 31 of file AGDDMuonStation.cxx.

32{
33 std::cout<<"this is AGDDMuonStation::CreateVolume()"<<std::endl;
34 static const GeoMaterial* const air = GetMMMaterial("std::Air");
35 if (!air) std::cout<<" Air not found!"<<std::endl;
36
37 CreateSolid (builder);
38
39 if (!GetVolume()) {
40 std::cout<<"trying to create logical volume"<<std::endl;
41 const GeoShape* shape=(GeoShape *)GetSolid();
42 if (!shape) std::cout<<" something wrong, shape is 0"<<std::endl;
43 GeoLogVol *a=new GeoLogVol(GetName(),shape,air);
44 GeoPhysVol *a_phys=new GeoPhysVol(a);
45 SetVolume(a_phys);
46 std::cout<<"done creating volume "<<std::endl;
47 }
48}
static Double_t a
virtual void CreateSolid(const AGDDBuilder &builder) override
static const GeoMaterial * GetMMMaterial(const std::string &)
const std::string & GetName() const
Definition AGDDVolume.h:23
void * GetVolume()
Definition AGDDVolume.h:32
void SetVolume(void *p)
Definition AGDDVolume.h:35

◆ GetColor()

const std::string & AGDDVolume::GetColor ( ) const
inlineinherited

Definition at line 39 of file AGDDVolume.h.

39{return m_color;}
std::string m_color
Definition AGDDVolume.h:48

◆ GetDaughter()

AGDDPositioner * AGDDVolume::GetDaughter ( int i)
inlineinherited

Definition at line 28 of file AGDDVolume.h.

28{return m_theDaughters[i];}

◆ GetMaterial()

const std::string & AGDDVolume::GetMaterial ( ) const
inlineinherited

Definition at line 40 of file AGDDVolume.h.

40{return m_material;}
std::string m_material
Definition AGDDVolume.h:44

◆ GetMMMaterial()

const GeoMaterial * AGDDMuonStation::GetMMMaterial ( const std::string & name)
staticprivate

Definition at line 50 of file AGDDMuonStation.cxx.

51{
52 SmartIF<StoreGateSvc> pDetStore{Gaudi::svcLocator()->service("DetectorStore")};
53 if(pDetStore.isValid()) {
54 StoredMaterialManager* theMaterialManager = nullptr;
55 if(pDetStore->retrieve(theMaterialManager, "MATERIALS").isSuccess()) {
56 return theMaterialManager->getMaterial(name);
57 }
58 }
59 return nullptr;
60}
virtual const GeoMaterial * getMaterial(const std::string &name)=0

◆ GetName()

const std::string & AGDDVolume::GetName ( ) const
inlineinherited

Definition at line 23 of file AGDDVolume.h.

23{return m_name;}
std::string m_name
Definition AGDDVolume.h:43

◆ GetSolid()

void * AGDDVolume::GetSolid ( )
inlineinherited

Definition at line 33 of file AGDDVolume.h.

33{return m_theSolid;}
void * m_theSolid
Definition AGDDVolume.h:50

◆ GetVolume()

void * AGDDVolume::GetVolume ( )
inlineinherited

Definition at line 32 of file AGDDVolume.h.

32{return m_theVolume;}
void * m_theVolume
Definition AGDDVolume.h:51

◆ HasParent()

bool AGDDVolume::HasParent ( ) const
inlineinherited

Definition at line 30 of file AGDDVolume.h.

30{return (m_theParents.size());}

◆ IsSensitiveVolume() [1/2]

bool AGDDVolume::IsSensitiveVolume ( ) const
inlineinherited

Definition at line 38 of file AGDDVolume.h.

38{return m_isSensitive;}
bool m_isSensitive
Definition AGDDVolume.h:53

◆ IsSensitiveVolume() [2/2]

void AGDDVolume::IsSensitiveVolume ( bool v)
inherited

Definition at line 27 of file AGDDVolume.cxx.

28{
30}

◆ large_x() [1/2]

double AGDDMuonStation::large_x ( ) const
inline

Definition at line 35 of file AGDDMuonStation.h.

35{return m_large_x;}

◆ large_x() [2/2]

void AGDDMuonStation::large_x ( double x)
inline

Definition at line 31 of file AGDDMuonStation.h.

31{m_large_x=x;}
#define x

◆ NrOfDaughter()

int AGDDVolume::NrOfDaughter ( ) const
inlineinherited

Definition at line 29 of file AGDDVolume.h.

29{return m_theDaughters.size();}

◆ SetColor()

void AGDDVolume::SetColor ( const std::string & c)
inlineinherited

Definition at line 36 of file AGDDVolume.h.

◆ SetMaterial()

void AGDDVolume::SetMaterial ( const std::string & n)
inlineinherited

Definition at line 24 of file AGDDVolume.h.

◆ SetSolid()

void AGDDVolume::SetSolid ( void * p)
inlineinherited

Definition at line 34 of file AGDDVolume.h.

◆ SetVolume()

void AGDDVolume::SetVolume ( void * p)
inlineinherited

Definition at line 35 of file AGDDVolume.h.

◆ SetXYZ()

void AGDDMuonStation::SetXYZ ( const std::vector< double > & v)
inline

Definition at line 23 of file AGDDMuonStation.h.

24 {
25 m_small_x=v[0];
26 m_large_x=v[1];
27 m_y=v[2];
28 m_z=v[3];
29 }

◆ small_x() [1/2]

double AGDDMuonStation::small_x ( ) const
inline

Definition at line 34 of file AGDDMuonStation.h.

34{return m_small_x;}

◆ small_x() [2/2]

void AGDDMuonStation::small_x ( double x)
inline

Definition at line 30 of file AGDDMuonStation.h.

30{m_small_x=x;}

◆ y() [1/2]

double AGDDMuonStation::y ( ) const
inline

Definition at line 36 of file AGDDMuonStation.h.

36{return m_y;}

◆ y() [2/2]

void AGDDMuonStation::y ( double yval)
inline

◆ z() [1/2]

double AGDDMuonStation::z ( ) const
inline

Definition at line 37 of file AGDDMuonStation.h.

37{return m_z;}

◆ z() [2/2]

void AGDDMuonStation::z ( double zval)
inline

Definition at line 33 of file AGDDMuonStation.h.

33{m_z=zval;}

Member Data Documentation

◆ m_color

std::string AGDDVolume::m_color
protectedinherited

Definition at line 48 of file AGDDVolume.h.

◆ m_isSensitive

bool AGDDVolume::m_isSensitive
protectedinherited

Definition at line 53 of file AGDDVolume.h.

◆ m_large_x

double AGDDMuonStation::m_large_x {0.}
private

Definition at line 42 of file AGDDMuonStation.h.

42{0.};

◆ m_material

std::string AGDDVolume::m_material
protectedinherited

Definition at line 44 of file AGDDVolume.h.

◆ m_name

std::string AGDDVolume::m_name
protectedinherited

Definition at line 43 of file AGDDVolume.h.

◆ m_small_x

double AGDDMuonStation::m_small_x {0.}
private

Definition at line 41 of file AGDDMuonStation.h.

41{0.};

◆ m_theDaughters

std::vector<AGDDPositioner*> AGDDVolume::m_theDaughters
protectedinherited

Definition at line 45 of file AGDDVolume.h.

◆ m_theParents

std::vector<AGDDVolume*> AGDDVolume::m_theParents
protectedinherited

Definition at line 46 of file AGDDVolume.h.

◆ m_theSolid

void* AGDDVolume::m_theSolid
protectedinherited

Definition at line 50 of file AGDDVolume.h.

◆ m_theVolume

void* AGDDVolume::m_theVolume
protectedinherited

Definition at line 51 of file AGDDVolume.h.

◆ m_vs

AGDDVolumeStore& AGDDVolume::m_vs
protectedinherited

Definition at line 55 of file AGDDVolume.h.

◆ m_y

double AGDDMuonStation::m_y {0.}
private

Definition at line 43 of file AGDDMuonStation.h.

43{0.};

◆ m_z

double AGDDMuonStation::m_z {0.}
private

Definition at line 44 of file AGDDMuonStation.h.

44{0.};

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