9#ifndef TRKDETDESCRALGS_MATERIALMAPPING_H
10#define TRKDETDESCRALGS_MATERIALMAPPING_H
14#include "GaudiKernel/ServiceHandle.h"
15#include "GaudiKernel/ToolHandle.h"
35#ifdef TRKDETDESCR_MEMUSAGE
41#define ucharbin 0.00392157
43#define uchar2uint(uchar) static_cast<unsigned int>(uchar)
44#define uint2uchar(unint) static_cast<unsigned char>(unint)
46#define uchar2dfrac(uchar) double(uchar * ucharbin)
47#define dfrac2uchar(dfrac) lrint(dfrac* UCHAR_MAX)
56class SurfaceMaterialRecord;
57class LayerMaterialMap;
59class MaterialProperties;
60class BinnedLayerMaterial;
61class CompressedLayerMaterial;
83 StatusCode
execute(
const EventContext& ctx);
112 this,
"CheckForEmptyHits",
true,
113 "use extrapoaltion engine to check for empty hits"};
115 this,
"ExtrapolationEngine",
"",
"Extrapolation Engine"};
118 this,
"MappingVolumeName",
"Atlas"};
123 this,
"InputMaterialStepCollection",
"MaterialStepRecords"};
130 this,
"UseActualLayerThicknesss",
false,
131 "use the actual layer thickness"};
135 this,
"LayerMaterialRecordAnalyser",
"",
136 "Layer material analyser for the layer material record"};
138 this,
"LayerMaterialAnalysers", {},
139 "Layer material analysers per creator (if wanted)"};
141 this,
"LayerMaterialCreators", {},
"Layer material creators"};
146 this,
"MaterialMapper",
"",
"IMaterialMapper algTool" };
148 "map the composition of the material"};
152 this,
"InputElementTable",
"ElementTable",
"input event table"};
155 std::map<const Layer*, LayerMaterialRecord>
157 std::map<const Layer*, bool>
170 const EventContext& ctx)
const
173 if (!handle.isValid()) {
178 return handle.cptr();
183 "TrackingGeometryReadKey",
185 "Key of the TrackingGeometry conditions data."
188#ifdef TRKDETDESCR_MEMUSAGE
193inline const Trk::TrackingGeometry&
198 if (!tracking_geometry) {
199 ATH_MSG_FATAL(
"Did not get valid TrackingGeometry. Aborting.");
200 throw GaudiException(
"MaterialMapping",
201 "Problem with TrackingGeometry loading.",
202 StatusCode::FAILURE);
204 return *tracking_geometry;
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Property holding a SG store/key/clid from which a ReadHandle is made.
This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;.
Base Class for a Detector Layer in the Tracking realm.
A simple algorithm that throws random points through detector and associates them with the given/foun...
std::map< const Layer *, LayerMaterialRecord > m_layerRecords
this is the general record for the search
double m_accumulatedMaterialXX0
the accumulated material information
std::map< const Layer *, bool > m_layersRecordedPerEvent
these are the layers hit per event - for empty hit scaling
ToolHandle< IMaterialMapper > m_materialMapper
void throwFailedToGetTrackingGeometry() const
std::string m_outputLayerMaterialSetName
void registerVolume(const Trk::TrackingVolume &tvol, int lvl)
Output information with Level.
Gaudi::Property< double > m_etaCutOff
general steering
SG::ReadHandleKey< Trk::ElementTable > m_inputEventElementTable
StatusCode finalize()
standard Athena-Algorithm method
ToolHandleArray< ILayerMaterialAnalyser > m_layerMaterialAnalysers
Trk::ElementTable * m_elementTable
the accumulated element table
void insertLayerMaterialRecord(const Trk::Layer &lay)
const Trk::TrackingVolume * m_mappingVolume
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
StatusCode initialize()
standard Athena-Algorithm method
Gaudi::Property< int > m_etaSide
needed for debugging: -1 negative | 0 all | 1 positive
SG::ReadHandleKey< MaterialStepCollection > m_inputMaterialStepCollection
output / input steering
const TrackingGeometry & trackingGeometry() const
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const
StatusCode handleTrackingGeometry()
Retrieve the TrackingGeometry and its informations.
Gaudi::Property< bool > m_checkForEmptyHits
void assignLayerMaterialProperties(Trk::TrackingVolume &tvol, Trk::LayerMaterialMap *propSet)
create the LayerMaterialRecord */
Gaudi::Property< int > m_associationType
ToolHandleArray< ILayerMaterialCreator > m_layerMaterialCreators
StatusCode execute(const EventContext &ctx)
standard Athena-Algorithm method
bool associateHit(const Trk::Layer &tvol, const Amg::Vector3D &pos, const Amg::Vector3D &layerHitPosition, double stepl, const Trk::Material &mat)
Associate the Step to the Layer.
ToolHandle< ILayerMaterialAnalyser > m_layerMaterialRecordAnalyser
ToolHandle< IExtrapolationEngine > m_extrapolationEngine
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Gaudi::Property< std::string > m_mappingVolumeName
Gaudi::Property< bool > m_mapComposition
Gaudi::Property< bool > m_mapMaterial
Mapper and Inspector.
Gaudi::Property< double > m_useLayerThickness
A common object to be contained by.
A small helper class looking at /proc/<PID>status.
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.