46 using namespace DD4hep;
47 using namespace DD4hep::Geometry;
57 sensitive.
setType(
"escape_counter");
60 vector<double> rmin,rmax,z;
65 rmin.push_back(dim.
rmin());
66 rmax.push_back(dim.
rmax());
67 z.push_back(dim.
z()/2);
70 throw runtime_error(
"ZylinderShell["+name+
"]> Not enough Z planes. minimum is 2!");
73 Volume volume(name, cone, mat);
76 pv = assembly.placeVolume(volume);
82 sdet.setPlacement(pv);
Handle class to hold the information of a sensitive detector.
Handle class holding a placed volume (also called physical volume)
virtual Volume pickMotherVolume(const DetElement &sd) const =0
Access mother volume by detector element.
double rmax() const
Access min/max parameters: rmax.
double rmin() const
Access min/max parameters: rmin.
Handle class describing a material.
Implementation class extending the ROOT assembly volumes (TGeoVolumeAsembly)
Class to support the access to collections of XmlNodes (or XmlElements)
XML Handle class extending the XML handle Dimension.
SensitiveDetector & setType(const std::string &typ)
Set detector type (structure, tracker, calorimeter, etc.).
Handle class holding a placed volume (also called physical volume)
std::string visStr() const
Access vis attribute as STL string. If not present empty return empty string.
std::string materialStr() const
Access material attribute as STL string. If not present empty return empty string.
const Volume & setVisAttributes(const VisAttr &obj) const
Set Visualization attributes to the volume.
double z() const
Access parameters: z.
int id() const
Access parameters: id.
#define DECLARE_DETELEMENT(name, func)
XML Handle class extending the XML handle Dimension.
static Ref_t create_detector(LCDD &lcdd, xml_h e, SensitiveDetector sensitive)
int id() const
Access parameters: id.
Handle class describing a detector element.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Class describing a Polycone shape.
PlacedVolume & addPhysVolID(const std::string &name, int value)
Add identifier.
The main interface to the DD4hep detector description package.
Class to easily access the properties of single XmlElements.
virtual Material material(const std::string &name) const =0
Retrieve a matrial by it's name from the detector description.
const Volume & setSensitiveDetector(const SensitiveDetector &obj) const
Assign the sensitive detector structure.
std::string nameStr() const
Access "name" attribute as STL string.
PlacedVolume placeVolume(const Volume &vol) const
Place daughter volume. The position and rotation are the identity.