|
ATLAS Offline Software
|
#include <LayerMaterialInspector.h>
|
| LayerMaterialInspector (const std::string &, const std::string &, const IInterface *) |
| Constructor. More...
|
|
virtual | ~LayerMaterialInspector () |
| Destructor. More...
|
|
StatusCode | initialize () |
| AlgTool initialize method. More...
|
|
StatusCode | finalize () |
| AlgTool finalize method. More...
|
|
virtual StatusCode | process (TrackingGeometry &tgeo) const |
| Processor Action to work on TrackingGeometry& tgeo. More...
|
|
virtual StatusCode | process (TrackingVolume &tvol, size_t level=0) const |
| Processor Action to work on TrackingVolumes - the level is for the hierachy tree. More...
|
|
virtual StatusCode | process (Layer &lay, size_t level=0) const |
| Processor Action to work on Layers. More...
|
|
virtual StatusCode | process (Surface &surf, size_t level=0) const |
| Processor Action to work on Surfaces. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (IGeometryProcessor, 1, 0) |
| Creates the InterfaceID and interfaceID() method. More...
|
|
This helper AlgTool can be called to record a dedicated tree that writes the LayerMaterialProperties into an ntuple.
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 35 of file LayerMaterialInspector.h.
◆ StoreGateSvc_t
◆ LayerMaterialInspector()
Trk::LayerMaterialInspector::LayerMaterialInspector |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~LayerMaterialInspector()
Trk::LayerMaterialInspector::~LayerMaterialInspector |
( |
| ) |
|
|
virtualdefault |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
Creates the InterfaceID and interfaceID() method.
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode Trk::RecursiveGeometryProcessor::finalize |
( |
| ) |
|
|
inherited |
◆ initialize()
StatusCode Trk::RecursiveGeometryProcessor::initialize |
( |
| ) |
|
|
inherited |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ process() [1/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::Layer & |
lay, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
Processor Action to work on Layers.
Implements Trk::IGeometryProcessor.
Definition at line 128 of file RecursiveGeometryProcessor.cxx.
130 std::stringstream displayBuffer;
131 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
136 ATH_MSG_FATAL(
"Failed to call processNode(const Layer&). Aborting.");
137 return StatusCode::FAILURE;
143 ATH_MSG_VERBOSE(displayBuffer.str() <<
" ---> has " << layerSurfaces.size() <<
" surfaces on the layer.");
145 auto laySurfIter = layerSurfaces.begin();
146 auto laySurfIterEnd = layerSurfaces.end();
148 for ( ; laySurfIter != laySurfIterEnd; ++laySurfIter) {
150 ATH_MSG_WARNING(
"Zero-pointer found in SurfaceArray - indicates problem !");
151 if ((*laySurfIter) &&
process(**laySurfIter,
level).isFailure()){
152 ATH_MSG_FATAL(
"Failed to call process(const Surface&) on confined layer surfaces. Aborting.");
153 return StatusCode::FAILURE;
158 return StatusCode::SUCCESS;
◆ process() [2/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::Surface & |
surf, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
◆ process() [3/4]
◆ process() [4/4]
StatusCode Trk::RecursiveGeometryProcessor::process |
( |
Trk::TrackingVolume & |
tvol, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
virtualinherited |
Processor Action to work on TrackingVolumes - the level is for the hierachy tree.
Implements Trk::IGeometryProcessor.
Definition at line 61 of file RecursiveGeometryProcessor.cxx.
63 std::stringstream displayBuffer;
64 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
70 ATH_MSG_FATAL(
"Failed to call processNode(const TrackingVolume&). Aborting.");
71 return StatusCode::FAILURE;
80 for (
const auto & layIter :
layers){
82 ATH_MSG_WARNING(
"Zero-pointer found in LayerArray - indicates problem !");
84 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on confined layers. Aborting.");
85 return StatusCode::FAILURE;
92 for (
auto & bSurface : bSurfaces){
93 if (bSurface->surfaceRepresentation().associatedLayer()){
97 *bSurface->surfaceRepresentation().associatedLayer()),
level)
99 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on boundary "
101 return StatusCode::FAILURE;
110 if (confinedVolumes) {
112 for (
const auto & volumesIter : volumes){
114 ATH_MSG_WARNING(
"Zero-pointer found in VolumeArray - indicates problem !");
115 if (volumesIter &&
process(*volumesIter, ++
level).isFailure() ){
116 ATH_MSG_FATAL(
"Failed to call process(const TrackingVolume&) on confined volumes. Aborting.");
117 return StatusCode::FAILURE;
123 return StatusCode::SUCCESS;
◆ processNode() [1/3]
StatusCode Trk::LayerMaterialInspector::processNode |
( |
const Layer & |
lay, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
Processor Action to work on Layers.
Reimplemented from Trk::RecursiveGeometryProcessor.
Definition at line 41 of file LayerMaterialInspector.cxx.
45 TString folderId = tvol ? tvol->
volumeName() : std::string(
"Unknown");
50 int lIndex = lay.layerIndex().value();
51 const Amg::Vector3D& lCenter = lay.surfaceRepresentation().center();
55 if (!lMaterial)
return StatusCode::SUCCESS;
64 float centerX = lCenter.x();
65 float centerY = lCenter.y();
66 float centerZ = lCenter.z();
89 bins0 = lBinUtility ? lBinUtility->
max(0)+1 : 1;
90 bins1 = lBinUtility ? lBinUtility->
max(1)+1 : 1;
95 TString hName = ( lType == 1 ) ?
"CylinderLayer_" :
"DiscLayer_";
99 TString
info =
"_Information";
101 TH2F* lMaterialHist = lType == 1 ?
102 new TH2F(hName+pXo, hName, bins0, -
M_PI*dim0,
M_PI*dim0, bins1, -dim1, dim1) :
105 TTree* lTreeInformation =
new TTree(hName+
info,hName);
106 lTreeInformation->Branch(
"LayerCenterX", ¢erX,
"cX/F");
107 lTreeInformation->Branch(
"LayerCenterY", ¢erY,
"cY/F");
108 lTreeInformation->Branch(
"LayerCenterZ", ¢erZ,
"cZ/F");
109 lTreeInformation->Branch(
"LayerIndex", &lIndex,
"idx/I");
111 lTreeInformation->Branch(
"Radius", &dim0,
"r/F");
112 lTreeInformation->Branch(
"HalflengthZ", &dim1,
"hz/F");
113 lTreeInformation->Branch(
"BinsRPhi", &bins0,
"bin0/I");
114 lTreeInformation->Branch(
"BinsHalfZ", &bins1,
"bin1/I");
115 }
else if (lType == 2){
116 lTreeInformation->Branch(
"InnerRadius", &dim0,
"rmin/F");
117 lTreeInformation->Branch(
"OuterRadius", &dim1,
"rmax/F");
118 lTreeInformation->Branch(
"BinsR", &bins0,
"bin0/I");
119 lTreeInformation->Branch(
"BinsPhi", &bins1,
"bin1/I");
123 TString regHistName =
folderName+
"/"+hName+
"/"+hName+pXo;
126 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
129 if ( (tHistSvc->regTree(std::string(regTreeName.Data()),lTreeInformation)).isFailure() ){
132 lTreeInformation->Fill();
134 if ( (tHistSvc->regHist(std::string(regHistName.Data()),lMaterialHist)).isFailure() ){
140 for (
int ib0 = 0; ib0 < bins0; ++ib0 )
141 for (
int ib1 = 0; ib1 < bins1; ++ib1 ){
145 lMaterialHist->SetBinContent(ib0+1,ib1+1,mps->
thicknessInX0());
149 return StatusCode::SUCCESS;
◆ processNode() [2/3]
StatusCode Trk::LayerMaterialInspector::processNode |
( |
const Surface & |
surf, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
◆ processNode() [3/3]
StatusCode Trk::LayerMaterialInspector::processNode |
( |
const TrackingVolume & |
tvol, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
privatevirtual |
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_treeFolder
std::string Trk::LayerMaterialInspector::m_treeFolder |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Dedicated action for the different processors.
size_t max(size_t ba=0) const
First bin maximal value.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
float thicknessInX0() const
Return the radiationlength fraction.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual StatusCode process(TrackingGeometry &tgeo) const
Processor Action to work on TrackingGeometry& tgeo.
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
#define ATH_MSG_VERBOSE(x)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
virtual void setOwner(IDataHandleHolder *o)=0
const LayerArray * confinedLayers() const
Return the subLayer array.
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
const TrackingVolume * highestTrackingVolume() const
return the world
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::span< T > BinnedArraySpan
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double halflengthZ() const
This method returns the halflengthZ.
virtual double r() const override final
This method returns the radius.
const LayerIndex & layerIndex() const
get the layerIndex