DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
View on Detector to select detectors according to certain criteria. More...
#include <DetectorSelector.h>
Public Types | |
typedef std::vector< DetElement > | Result |
Result set definition. More... | |
Public Member Functions | |
DetectorSelector (Detector &_description) | |
Default constructor. More... | |
~DetectorSelector () | |
Default destructor. More... | |
const Result & | detectors (const std::string &type) |
Access a set of subdetectors according to the sensitive type. More... | |
Result | detectors (const std::string &type1, const std::string &type2, const std::string &type3="", const std::string &type4="", const std::string &type5="") |
Access a set of subdetectors according to several sensitive types. More... | |
Result | detectors (unsigned int includeFlag, unsigned int excludeFlag=0) const |
Public Attributes | |
Detector & | description |
Reference to main detector description object. More... | |
View on Detector to select detectors according to certain criteria.
Usage:
Detector& lcd = ....; DetectorSelector selector(description); DetectorSelector::Result r = selector.detectors("tracker");
or multiple types: r = selector.detectors("tracker", "calorimeter");
or selections using DetType flags, e.g: select all barrel trackers but not the Vertex detector r = selector.detectors( DetType::TRACKER | DetType::BARREL , DetType::VERTEX ) ;
Definition at line 41 of file DetectorSelector.h.
typedef std::vector<DetElement> dd4hep::DetectorSelector::Result |
Result set definition.
Definition at line 44 of file DetectorSelector.h.
|
inline |
Default constructor.
Definition at line 53 of file DetectorSelector.h.
|
inline |
Default destructor.
Definition at line 56 of file DetectorSelector.h.
const DetectorSelector::Result & DetectorSelector::detectors | ( | const std::string & | type | ) |
Access a set of subdetectors according to the sensitive type.
Please note:
Definition at line 21 of file DetectorSelector.cpp.
DetectorSelector::Result DetectorSelector::detectors | ( | const std::string & | type1, |
const std::string & | type2, | ||
const std::string & | type3 = "" , |
||
const std::string & | type4 = "" , |
||
const std::string & | type5 = "" |
||
) |
Access a set of subdetectors according to several sensitive types.
Definition at line 28 of file DetectorSelector.cpp.
DetectorSelector::Result DetectorSelector::detectors | ( | unsigned int | includeFlag, |
unsigned int | excludeFlag = 0 |
||
) | const |
return a vector with all detectors that have all the type properties in includeFlag set but none of the properties given in excludeFlag
Definition at line 51 of file DetectorSelector.cpp.
Detector& dd4hep::DetectorSelector::description |
Reference to main detector description object.
Definition at line 47 of file DetectorSelector.h.