DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dd4hep::DetElementCreator Class Reference

DD4hep DetElement creator for the CMS geometry. More...

Inheritance diagram for dd4hep::DetElementCreator:
dd4hep::PlacedVolumeProcessor

Classes

struct  Count
 
struct  Data
 

Public Member Functions

 DetElementCreator (Detector &desc, const std::string &detector, const std::string &sd_type, const std::string &sd_match, const std::string &sd_veto, const std::string &sd_mat, int sd_lvl, PrintLevel p)
 Initializing constructor. More...
 
virtual ~DetElementCreator () noexcept(false)
 Default destructor. More...
 
virtual int operator() (PlacedVolume pv, int level)
 Callback to output PlacedVolume information of an single Placement. More...
 
virtual int process (PlacedVolume pv, int level, bool recursive)
 Callback to output PlacedVolume information of an entire Placement. More...
 
- Public Member Functions inherited from dd4hep::PlacedVolumeProcessor
 PlacedVolumeProcessor ()=default
 Initializing constructor. More...
 
 PlacedVolumeProcessor (PlacedVolumeProcessor &&copy)=default
 R-value copy from a temporary (Since processor is reference) More...
 
 PlacedVolumeProcessor (const PlacedVolumeProcessor &copy)=default
 Default copy constructor. More...
 
virtual ~PlacedVolumeProcessor () noexcept(false)
 Default destructor. More...
 
PlacedVolumeProcessoroperator= (const PlacedVolumeProcessor &copy)=default
 Default assignment. More...
 

Private Types

typedef std::vector< DataVolumeStack
 
typedef std::map< std::string, DetElementDetectors
 
typedef std::map< DetElement, CountCounters
 
typedef std::map< std::pair< DetElement, int >, std::pair< int, int > > LeafCount
 
typedef std::map< PlacedVolume, std::pair< int, int > > AllPlacements
 

Private Member Functions

DetElement addSubdetector (const std::string &nam, PlacedVolume pv, bool volid)
 Add new subdetector to the detector description. More...
 
DetElement createElement (const char *debug_tag, PlacedVolume pv, int id)
 Create a new detector element. More...
 
void createTopLevelDetectors (PlacedVolume pv)
 Create the top level detectors. More...
 
std::string detElementName (PlacedVolume pv) const
 Generate the name of the DetElement object from the placed volume. More...
 

Private Attributes

Detectordescription
 
Material sensitive_material
 
Counters counters
 
LeafCount leafCount
 
VolumeStack stack
 
Detectors subdetectors
 
DetElement current_detector
 
std::string detector
 
std::string sensitive_material_name
 
std::string sensitive_type
 
std::string detector_volume_match
 
std::string detector_volume_veto
 
size_t detector_volume_level = 0
 
int max_volume_level = 9999
 
PrintLevel printLevel = INFO
 
SensitiveDetector current_sensitive
 
AllPlacements all_placements
 

Detailed Description

DD4hep DetElement creator for the CMS geometry.

Definition at line 33 of file DetElementCreator.cpp.

Member Typedef Documentation

◆ AllPlacements

typedef std::map<PlacedVolume, std::pair<int,int> > dd4hep::DetElementCreator::AllPlacements
private

Definition at line 61 of file DetElementCreator.cpp.

◆ Counters

Definition at line 59 of file DetElementCreator.cpp.

◆ Detectors

typedef std::map<std::string,DetElement> dd4hep::DetElementCreator::Detectors
private

Definition at line 58 of file DetElementCreator.cpp.

◆ LeafCount

typedef std::map<std::pair<DetElement,int>, std::pair<int,int> > dd4hep::DetElementCreator::LeafCount
private

Definition at line 60 of file DetElementCreator.cpp.

◆ VolumeStack

typedef std::vector<Data> dd4hep::DetElementCreator::VolumeStack
private

Definition at line 57 of file DetElementCreator.cpp.

Constructor & Destructor Documentation

◆ DetElementCreator()

DetElementCreator::DetElementCreator ( Detector desc,
const std::string &  detector,
const std::string &  sd_type,
const std::string &  sd_match,
const std::string &  sd_veto,
const std::string &  sd_mat,
int  sd_lvl,
PrintLevel  p 
)

Initializing constructor.

Definition at line 121 of file DetElementCreator.cpp.

◆ ~DetElementCreator()

DetElementCreator::~DetElementCreator ( )
virtualnoexcept

Default destructor.

Create ID Descriptors and readout configurations

Definition at line 143 of file DetElementCreator.cpp.

Member Function Documentation

◆ addSubdetector()

DetElement DetElementCreator::addSubdetector ( const std::string &  nam,
PlacedVolume  pv,
bool  volid 
)
private

Add new subdetector to the detector description.

Definition at line 281 of file DetElementCreator.cpp.

◆ createElement()

DetElement DetElementCreator::createElement ( const char *  debug_tag,
PlacedVolume  pv,
int  id 
)
private

Create a new detector element.

Definition at line 263 of file DetElementCreator.cpp.

◆ createTopLevelDetectors()

void DetElementCreator::createTopLevelDetectors ( PlacedVolume  pv)
private

Create the top level detectors.

Definition at line 275 of file DetElementCreator.cpp.

◆ detElementName()

string DetElementCreator::detElementName ( PlacedVolume  pv) const
private

Generate the name of the DetElement object from the placed volume.

Definition at line 251 of file DetElementCreator.cpp.

◆ operator()()

int DetElementCreator::operator() ( PlacedVolume  pv,
int  level 
)
virtual

Callback to output PlacedVolume information of an single Placement.

Implements dd4hep::PlacedVolumeProcessor.

Definition at line 297 of file DetElementCreator.cpp.

◆ process()

int DetElementCreator::process ( PlacedVolume  pv,
int  level,
bool  recursive 
)
virtual

Callback to output PlacedVolume information of an entire Placement.

Complete structures if the stack size is > 3!

If this volume is sensitve, we must attach a sensitive detector handle

Now the cleanup kicks in....

Reimplemented from dd4hep::PlacedVolumeProcessor.

Definition at line 317 of file DetElementCreator.cpp.

Member Data Documentation

◆ all_placements

AllPlacements dd4hep::DetElementCreator::all_placements
private

Definition at line 78 of file DetElementCreator.cpp.

◆ counters

Counters dd4hep::DetElementCreator::counters
private

Definition at line 64 of file DetElementCreator.cpp.

◆ current_detector

DetElement dd4hep::DetElementCreator::current_detector
private

Definition at line 68 of file DetElementCreator.cpp.

◆ current_sensitive

SensitiveDetector dd4hep::DetElementCreator::current_sensitive
private

Definition at line 77 of file DetElementCreator.cpp.

◆ description

Detector& dd4hep::DetElementCreator::description
private

Definition at line 62 of file DetElementCreator.cpp.

◆ detector

std::string dd4hep::DetElementCreator::detector
private

Definition at line 69 of file DetElementCreator.cpp.

◆ detector_volume_level

size_t dd4hep::DetElementCreator::detector_volume_level = 0
private

Definition at line 74 of file DetElementCreator.cpp.

◆ detector_volume_match

std::string dd4hep::DetElementCreator::detector_volume_match
private

Definition at line 72 of file DetElementCreator.cpp.

◆ detector_volume_veto

std::string dd4hep::DetElementCreator::detector_volume_veto
private

Definition at line 73 of file DetElementCreator.cpp.

◆ leafCount

LeafCount dd4hep::DetElementCreator::leafCount
private

Definition at line 65 of file DetElementCreator.cpp.

◆ max_volume_level

int dd4hep::DetElementCreator::max_volume_level = 9999
private

Definition at line 75 of file DetElementCreator.cpp.

◆ printLevel

PrintLevel dd4hep::DetElementCreator::printLevel = INFO
private

Definition at line 76 of file DetElementCreator.cpp.

◆ sensitive_material

Material dd4hep::DetElementCreator::sensitive_material
private

Definition at line 63 of file DetElementCreator.cpp.

◆ sensitive_material_name

std::string dd4hep::DetElementCreator::sensitive_material_name
private

Definition at line 70 of file DetElementCreator.cpp.

◆ sensitive_type

std::string dd4hep::DetElementCreator::sensitive_type
private

Definition at line 71 of file DetElementCreator.cpp.

◆ stack

VolumeStack dd4hep::DetElementCreator::stack
private

Definition at line 66 of file DetElementCreator.cpp.

◆ subdetectors

Detectors dd4hep::DetElementCreator::subdetectors
private

Definition at line 67 of file DetElementCreator.cpp.


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