ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PixelDetectorFactoryDC2 Class Reference

#include <PixelDetectorFactoryDC2.h>

Inheritance diagram for PixelDetectorFactoryDC2:
Collaboration diagram for PixelDetectorFactoryDC2:

Public Member Functions

 PixelDetectorFactoryDC2 (PixelGeoModelAthenaComps *athenaComps, const PixelSwitches &switches)
 
 ~PixelDetectorFactoryDC2 ()
 
virtual void create (GeoPhysVol *world)
 
virtual const InDetDD::PixelDetectorManagergetDetectorManager () const
 
StoreGateSvcdetStore ()
 
const StoreGateSvcdetStore () const
 
const IGeoDbTagSvcgeoDbTagSvc () const
 
IRDBAccessSvcrdbAccessSvc ()
 
const IGeometryDBSvcgeomDB () const
 
MsgStream & msg (MSG::Level lvl) const
 
bool msgLvl (MSG::Level lvl)
 
InDetDD::AthenaCompsgetAthenaComps ()
 

Private Member Functions

const PixelDetectorFactoryDC2operator= (const PixelDetectorFactoryDC2 &right)
 
 PixelDetectorFactoryDC2 (const PixelDetectorFactoryDC2 &right)
 

Private Attributes

InDetDD::PixelDetectorManagerm_detectorManager
 
PixelGeoDC2::PixelGeometryManagerm_geometryManager
 
InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Definition at line 21 of file PixelDetectorFactoryDC2.h.

Constructor & Destructor Documentation

◆ PixelDetectorFactoryDC2() [1/2]

PixelDetectorFactoryDC2::PixelDetectorFactoryDC2 ( PixelGeoModelAthenaComps athenaComps,
const PixelSwitches switches 
)

Definition at line 33 of file PixelDetectorFactoryDC2.cxx.

35  : InDetDD::DetectorFactoryBase(athenaComps),
36  m_detectorManager(nullptr)
37 {
38  // Create the detector manager
40 
41  // Create the geometry manager.
43 
44  // Pass the switches
50 
51  // Create SiCommonItems ans store it in geometry manager.
52  // These are items that are shared by all elements
53  std::unique_ptr<SiCommonItems> commonItems{std::make_unique<SiCommonItems>(athenaComps->getIdHelper())};
54  m_geometryManager->setCommonItems(commonItems.get());
55 
56  m_detectorManager->setCommonItems(std::move(commonItems));
57 
58  bool initialLayoutIdDict = (m_detectorManager->tag() == "initial_layout");
59  if (m_geometryManager->InitialLayout() != initialLayoutIdDict ) {
60  if(msgLvl(MSG::WARNING))
61  msg(MSG::WARNING) << "IdDict tag is \"" << m_detectorManager->tag()
62  << "\" which is inconsistent with the layout choosen!"
63  << endmsg;
64  }
65 
66 
67  //
68  // Set Version information
69  //
70  std::string versionTag = m_geometryManager->versionTag();
71  std::string versionName = "DC2";
72  std::string layout = "Final";
73  std::string description = "DC2 Geometry";
74  int versionMajorNumber = 2;
75  int versionMinorNumber = 2;
76  int versionPatchNumber = 0;
77 
79  description += ", G3 Compatible Digits";
80  versionMinorNumber = 1;
81  }
82 
84  layout = "Initial";
85  }
86 
87  // We determine if we are running DC1 geoemtry via
88  // Barrel version number in NOVA
90  versionName = "DC1";
91  description = "DC1 Geometry (300um B-Layer pixels)";
92  versionMajorNumber = 1;
93  versionMinorNumber = 2;
95  description += ", G3 Compatible Digits";
96  versionMinorNumber = 1;
97  }
98  }
99 
100  InDetDD::Version version(versionTag,
101  versionName,
102  layout,
103  description,
104  versionMajorNumber,
105  versionMinorNumber,
106  versionPatchNumber);
108 
109 }

◆ ~PixelDetectorFactoryDC2()

PixelDetectorFactoryDC2::~PixelDetectorFactoryDC2 ( )

Definition at line 112 of file PixelDetectorFactoryDC2.cxx.

113 {
114 
115 }

◆ PixelDetectorFactoryDC2() [2/2]

PixelDetectorFactoryDC2::PixelDetectorFactoryDC2 ( const PixelDetectorFactoryDC2 right)
private

Member Function Documentation

◆ create()

void PixelDetectorFactoryDC2::create ( GeoPhysVol *  world)
virtual

Definition at line 120 of file PixelDetectorFactoryDC2.cxx.

121 {
122  if(msgLvl(MSG::INFO)) {
123  msg(MSG::INFO) << "Building Pixel Detector" << endmsg;
124  msg(MSG::INFO) << " " << m_detectorManager->getVersion().fullDescription() << endmsg;
125 
126  // Printout the parameters that are different in DC1 and DC2.
127  msg(MSG::INFO) << " B-Layer basic eta pitch: " << m_geometryManager->DesignPitchZ(true)/Gaudi::Units::micrometer << "um" << endmsg;
128  }
131  if(msgLvl(MSG::INFO))
132  msg(MSG::INFO) << " B-Layer sensor thickness: " << m_geometryManager->PixelBoardThickness()/Gaudi::Units::micrometer << "um" << endmsg;
133 
134  //
135  // Create the Pixel Envelope...
137  GeoVPhysVol* pephys = pe.Build() ;
138  GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
139 
140  //
141  // Add this to the world
142  //
143  GeoNameTag *tag = new GeoNameTag("Pixel");
144  world->add(tag);
145  world->add(transform);
146  world->add(pephys);
147 
148  // Store alignable transform
149  Identifier id = m_geometryManager->getIdHelper()->wafer_id(0,0,0,0);
151 
152  //
153  // Add this to the list of top level physical volumes:
154  //
155  m_detectorManager->addTreeTop(pephys);
156 
157 
158  // Initialize the neighbours
160 
161  // Set maximum rows/columns in numerology
162  for (int iDesign = 0; iDesign < m_detectorManager->numDesigns(); iDesign++) {
165  }
166 
167  // Register the callbacks and keys and the level corresponding to the key.
168  if (m_geometryManager->Alignable()) {
169  m_detectorManager->addFolder("/Indet/Align");
170  m_detectorManager->addChannel("/Indet/Align/ID", 2, InDetDD::global);
171  m_detectorManager->addChannel("/Indet/Align/PIX", 1, InDetDD::global);
172  m_detectorManager->addChannel("/Indet/Align/PIXB1", 0, InDetDD::local);
173  m_detectorManager->addChannel("/Indet/Align/PIXB2", 0, InDetDD::local);
174  m_detectorManager->addChannel("/Indet/Align/PIXB3", 0, InDetDD::local);
175  m_detectorManager->addChannel("/Indet/Align/PIXEA1", 0, InDetDD::local);
176  m_detectorManager->addChannel("/Indet/Align/PIXEA2", 0, InDetDD::local);
177  m_detectorManager->addChannel("/Indet/Align/PIXEA3", 0, InDetDD::local);
178  m_detectorManager->addChannel("/Indet/Align/PIXEC1", 0, InDetDD::local);
179  m_detectorManager->addChannel("/Indet/Align/PIXEC2", 0, InDetDD::local);
180  m_detectorManager->addChannel("/Indet/Align/PIXEC3", 0, InDetDD::local);
181  }
182 }

◆ detStore() [1/2]

StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( )
inlineinherited

Definition at line 27 of file InDetDetectorFactoryBase.h.

27 {return m_athenaComps->detStore();}

◆ detStore() [2/2]

const StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( ) const
inlineinherited

Definition at line 28 of file InDetDetectorFactoryBase.h.

28 {return std::as_const(*m_athenaComps).detStore();}

◆ geoDbTagSvc()

const IGeoDbTagSvc* InDetDD::DetectorFactoryBase::geoDbTagSvc ( ) const
inlineinherited

Definition at line 30 of file InDetDetectorFactoryBase.h.

30 {return std::as_const(*m_athenaComps).geoDbTagSvc();}

◆ geomDB()

const IGeometryDBSvc* InDetDD::DetectorFactoryBase::geomDB ( ) const
inlineinherited

Definition at line 34 of file InDetDetectorFactoryBase.h.

34 {return m_athenaComps->geomDB();}

◆ getAthenaComps()

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::getAthenaComps ( )
inlineinherited

Definition at line 42 of file InDetDetectorFactoryBase.h.

42 {return m_athenaComps;}

◆ getDetectorManager()

const PixelDetectorManager * PixelDetectorFactoryDC2::getDetectorManager ( ) const
virtual

Definition at line 184 of file PixelDetectorFactoryDC2.cxx.

185 {
186  return m_detectorManager;
187 }

◆ msg()

MsgStream& InDetDD::DetectorFactoryBase::msg ( MSG::Level  lvl) const
inlineinherited

Definition at line 37 of file InDetDetectorFactoryBase.h.

37 { return m_athenaComps->msg(lvl); }

◆ msgLvl()

bool InDetDD::DetectorFactoryBase::msgLvl ( MSG::Level  lvl)
inlineinherited

Definition at line 40 of file InDetDetectorFactoryBase.h.

40 { return m_athenaComps->msgLvl(lvl); }

◆ operator=()

const PixelDetectorFactoryDC2& PixelDetectorFactoryDC2::operator= ( const PixelDetectorFactoryDC2 right)
private

◆ rdbAccessSvc()

IRDBAccessSvc* InDetDD::DetectorFactoryBase::rdbAccessSvc ( )
inlineinherited

Definition at line 32 of file InDetDetectorFactoryBase.h.

32 {return m_athenaComps->rdbAccessSvc();}

Member Data Documentation

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::m_athenaComps
privateinherited

Definition at line 46 of file InDetDetectorFactoryBase.h.

◆ m_detectorManager

InDetDD::PixelDetectorManager* PixelDetectorFactoryDC2::m_detectorManager
private

Definition at line 45 of file PixelDetectorFactoryDC2.h.

◆ m_geometryManager

PixelGeoDC2::PixelGeometryManager* PixelDetectorFactoryDC2::m_geometryManager
private

Definition at line 46 of file PixelDetectorFactoryDC2.h.


The documentation for this class was generated from the following files:
InDetDD::DetectorFactoryBase
Definition: InDetDetectorFactoryBase.h:20
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
PixelGeoDC2::PixelGeometryManager::InitialLayout
virtual bool InitialLayout() const =0
InDetDD::PixelModuleDesign::columns
int columns() const
Number of cell columns per module:
Definition: PixelModuleDesign.h:322
PixelSwitches::dc1Geometry
bool dc1Geometry() const
Definition: PixelSwitches.cxx:34
InDetDD::SiDetectorManager::numDesigns
int numDesigns() const
Definition: SiDetectorManager.cxx:140
InDetDD::PixelModuleDesign::rows
int rows() const
Number of cell rows per module:
Definition: PixelModuleDesign.h:327
PixelGeoDC2::PixelGeometryManager::SetInitialLayout
virtual void SetInitialLayout(bool flag)=0
InDetDD::SiNumerology::setMaxNumEtaCells
void setMaxNumEtaCells(int cells)
Definition: SiNumerology.cxx:91
InDetDD::InDetDetectorManager::setVersion
void setVersion(const Version &version)
Definition: InDetDetectorManager.cxx:43
InDetDD::Version
Definition: Version.h:24
PixelGeoDC2::PixelGeometryManager::setCommonItems
virtual void setCommonItems(InDetDD::SiCommonItems *commonItems)=0
InDetDD::global
@ global
Definition: InDetDD_Defs.h:16
InDetDD::DetectorFactoryBase::msg
MsgStream & msg(MSG::Level lvl) const
Definition: InDetDetectorFactoryBase.h:37
LArG4AODNtuplePlotter.pe
pe
Definition: LArG4AODNtuplePlotter.py:116
InDetDD::SiDetectorManager::setCommonItems
void setCommonItems(std::unique_ptr< const SiCommonItems > &&commonItems)
Set SiCommonItems.
Definition: SiDetectorManager.cxx:151
PixelGeoDC2::PixelGeometryManager::SetCurrentLD
virtual void SetCurrentLD(int i)=0
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
PixelGeoDC2::GeoPixelEnvelope
Definition: PixelDetectorDC1DC2.h:188
PixelGeoDC2::PixelGeometryManager::versionTag
virtual std::string versionTag() const =0
PixelDetectorFactoryDC2::m_geometryManager
PixelGeoDC2::PixelGeometryManager * m_geometryManager
Definition: PixelDetectorFactoryDC2.h:46
PixelSwitches::initialLayout
bool initialLayout() const
Definition: PixelSwitches.cxx:30
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
InDetDD::DetectorFactoryBase::detStore
StoreGateSvc * detStore()
Definition: InDetDetectorFactoryBase.h:27
PixelSwitches::g3CompatibleDigits
bool g3CompatibleDigits() const
Definition: PixelSwitches.cxx:26
PixelDetectorFactoryDC2::m_detectorManager
InDetDD::PixelDetectorManager * m_detectorManager
Definition: PixelDetectorFactoryDC2.h:45
InDetDD::PixelDetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours.
Definition: PixelDetectorManager.cxx:129
PixelGeoModelAthenaComps::getIdHelper
const PixelID * getIdHelper() const
Definition: PixelGeoModelAthenaComps.cxx:59
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
PixelGeoDC2::PixelGeometryManager::getIdHelper
virtual const PixelID * getIdHelper()=0
InDetDD::InDetDetectorManager::addFolder
void addFolder(const std::string &key)
Definition: InDetDetectorManager.cxx:66
PixelGeoDC2::PixelGeometryManager::SetBarrel
virtual void SetBarrel()=0
InDetDD::SiNumerology::setMaxNumPhiCells
void setMaxNumPhiCells(int cells)
Definition: SiNumerology.cxx:86
PixelSwitches::alignable
bool alignable() const
Definition: PixelSwitches.cxx:38
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
InDetDD::InDetDetectorManager::getVersion
const Version & getVersion() const
Get version information.
Definition: InDetDetectorManager.cxx:33
PixelGeoDC2::PixelGeometryManager::SetServices
virtual void SetServices(bool isservice)=0
python.SystemOfUnits.micrometer
int micrometer
Definition: SystemOfUnits.py:71
PixelGeoDC2::PixelGeometryManager::SetDC1Geometry
virtual void SetDC1Geometry(bool flag)=0
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
PixelGeoDC2::PixelGeometryManager::SetG3CompatibleDigits
virtual void SetG3CompatibleDigits(bool flag)=0
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:262
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
InDetDD::DetectorFactoryBase::msgLvl
bool msgLvl(MSG::Level lvl)
Definition: InDetDetectorFactoryBase.h:40
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
InDetDD::SiDetectorManager::tag
const std::string & tag() const
Get tag used in dictionary.
Definition: SiDetectorManager.cxx:34
PixelGeoDC2::OraclePixGeoManager
Definition: PixelDetectorDC1DC2.h:611
get_generator_info.version
version
Definition: get_generator_info.py:33
PixelGeoDC2::PixelGeometryManager::PixelBoardThickness
virtual double PixelBoardThickness()=0
InDetDD::AthenaComps::geomDB
const IGeometryDBSvc * geomDB() const
Definition: InDetDDAthenaComps.h:63
InDetDD::Version::fullDescription
std::string fullDescription() const
Full Description For example, Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 2....
Definition: Version.cxx:90
InDetDD::DetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetDetectorFactoryBase.h:46
InDetDD::PixelDetectorManager::addTreeTop
void addTreeTop(PVConstLink vol)
Add a Tree top:
Definition: PixelDetectorManager.cxx:76
PixelGeoDC2::PixelGeometryManager::Alignable
virtual bool Alignable() const =0
PixelGeoDC2::PixelGeometryManager::SetAlignable
virtual void SetAlignable(bool flag)=0
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
PixelGeoDC2::PixelGeometryManager::DC1Geometry
virtual bool DC1Geometry() const =0
PixelSwitches::services
bool services() const
Definition: PixelSwitches.cxx:20
InDetDD::AthenaComps::detStore
const StoreGateSvc * detStore() const
Definition: InDetDDAthenaComps.h:53
InDetDD::InDetDetectorManager::addChannel
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.
Definition: InDetDetectorManager.cxx:56
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74
InDetDD::PixelDetectorManager::getPixelDesign
virtual const PixelModuleDesign * getPixelDesign(int i) const
Access to module design, Casts to PixelModuleDesign.
Definition: PixelDetectorManager.cxx:290
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
PixelGeoDC2::PixelGeometryManager::G3CompatibleDigits
virtual bool G3CompatibleDigits() const =0
PixelGeoDC2::PixelGeometryManager::DesignPitchZ
virtual double DesignPitchZ(bool isBLayer)=0