|
ATLAS Offline Software
|
#include <CompoundLayerMaterialCreator.h>
|
| CompoundLayerMaterialCreator (const std::string &, const std::string &, const IInterface *) |
| Constructor. More...
|
|
| ~CompoundLayerMaterialCreator () |
| Destructor. More...
|
|
LayerMaterialProperties * | createLayerMaterial (const LayerMaterialRecord &lmr) const |
| process the material properties More...
|
|
LayerMaterialProperties * | convertLayerMaterial (const LayerMaterialProperties &lmr) const |
| create layer material properties from layer material properties - simply clones 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 (ILayerMaterialCreator, 1, 0) |
|
const std::string & | layerMaterialName () const |
| the name of the created material map More...
|
|
◆ StoreGateSvc_t
◆ CompoundLayerMaterialCreator()
Trk::CompoundLayerMaterialCreator::CompoundLayerMaterialCreator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~CompoundLayerMaterialCreator()
Trk::CompoundLayerMaterialCreator::~CompoundLayerMaterialCreator |
( |
| ) |
|
|
default |
◆ convertLayerMaterial()
create layer material properties from layer material properties - simply clones
Implements Trk::ILayerMaterialCreator.
Definition at line 55 of file CompoundLayerMaterialCreator.cxx.
66 size_t nBins0 = bUtility->
max(0)+1;
67 size_t nBins1 = bUtility->
max(1)+1;
70 materialMatrix.reserve(nBins1);
72 for (
size_t ibin1 = 0; ibin1 < nBins1; ++ibin1) {
75 materialVector.reserve(nBins0);
77 for (
size_t ibin0 = 0; ibin0 < nBins0; ++ibin0) {
80 materialVector.push_back(mProperties);
83 materialMatrix.push_back(materialVector);
87 ATH_MSG_VERBOSE(
"Converting the MaterialPropertiesMatrix into a CompressedLayerMaterial.");
92 ATH_MSG_DEBUG(
"No BinUtility provided - return a simple clone.");
93 bLayerMaterial = lmProperties.
clone();
96 return bLayerMaterial;
◆ createCompoundLayerMaterial()
private method that can be called by both create/convertLayerMaterial
Definition at line 99 of file CompoundLayerMaterialCreator.cxx.
104 double tMin = 10e10, xMin = 10e10, lMin = 10e10, aMin = 10e10, zMin = 10e10, rMin = 10e10;
105 double tMax = 0., xMax = 0., lMax = 0., aMax = 0., zMax = 0., rMax = 0.;
108 for (
const auto & mo : materialMatrix)
109 for (
const auto & mi : mo) {
122 ATH_MSG_DEBUG(
"Preparing the store: min/max values for t, x0, l0, a, z, rho estimated." );
136 tStore.
valueStep = fabs(tMin-tMax)<10
e-8 ? 0. : (tMax-tMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
137 xStore.
valueStep = (xMax-xMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
138 lStore.
valueStep = (lMax-lMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
139 aStore.
valueStep = (aMax-aMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
140 zStore.
valueStep = (zMax-zMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
141 rStore.
valueStep = (rMax-rMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
154 ATH_MSG_VERBOSE(
"Thickness has been estimated to be constant - matrix is not prepared.");
161 ATH_MSG_VERBOSE(
"Material stores prepared, now preparing composition matrix." );
164 std::vector< std::vector< Trk::MaterialComposition > > compositionMatrix( lBinUtility.max(1)+1, std::vector< Trk::MaterialComposition >( lBinUtility.max(0)+1,
Trk::MaterialComposition()) );
170 for (
const auto & mo : materialMatrix){
172 for (
const auto & mi : mo) {
◆ createLayerMaterial()
◆ 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()
◆ 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
◆ 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.
◆ layerMaterialName()
const std::string& Trk::ILayerMaterialCreator::layerMaterialName |
( |
| ) |
const |
|
inlineinherited |
◆ 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.
◆ 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_fullCompoundCalculation
bool Trk::CompoundLayerMaterialCreator::m_fullCompoundCalculation |
|
private |
◆ m_layerMaterialDirectory
std::string Trk::ILayerMaterialCreator::m_layerMaterialDirectory |
|
protectedinherited |
◆ m_layerMaterialFullName
◆ m_layerMaterialName
std::string Trk::ILayerMaterialCreator::m_layerMaterialName |
|
protectedinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const T * ptr() const
Return a pointer to the cached value.
float averageA() const
Return the average A of the material [gram/mole].
size_t max(size_t ba=0) const
First bin maximal value.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool isValid() const
Test to see if the value is valid.
#define minMaxValue(currentMin, currentMax, test)
std::string m_layerMaterialDirectory
LayerMaterialProperties * createCompoundLayerMaterial(const MaterialPropertiesMatrix &lmm, const BinUtility &lmbu) const
private method that can be called by both create/convertLayerMaterial
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
float averageRho() const
Return the average density of the material.
float x0() const
Return the radiation length.
#define ATH_MSG_VERBOSE(x)
const Material & material() const
Return the stored Material.
CxxUtils::CachedValue< std::string > m_layerMaterialFullName
std::string m_layerMaterialName
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< const MaterialProperties * > MaterialPropertiesVector
Useful typedefs.
float thickness() const
Return the thickness in mm.
ValueMatrix valueBinMatrix
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void set(const T &val) const
Set the value, assuming it is currently invalid.
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix
std::vector< ValueVector > ValueMatrix
bool m_fullCompoundCalculation
#define ATH_MSG_WARNING(x)
float averageZ() const
Returns the average Z of the material.
virtual LayerMaterialProperties * clone() const =0
Pseudo-Constructor clone()
MaterialComposition * composition
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< unsigned char > ValueVector
float l0() const
Return the nuclear interaction length.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>