ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Trk::LayerMaterialAnalyser Class Reference

#include <LayerMaterialAnalyser.h>

Inheritance diagram for Trk::LayerMaterialAnalyser:
Collaboration diagram for Trk::LayerMaterialAnalyser:

Public Member Functions

 LayerMaterialAnalyser (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
 ~LayerMaterialAnalyser ()
 Destructor. More...
 
StatusCode initialize ()
 AlgTool initialize method. More...
 
StatusCode finalize ()
 AlgTool finalize method. More...
 
StatusCode analyseLayerMaterial (const Layer &lay) const
 process the layer - after material creation and loading More...
 
StatusCode analyseLayerMaterial (const Layer &lay, const LayerMaterialProperties &lmp) const
 process the layer material proerties - after material creation and before loading More...
 
StatusCode analyseLayerMaterial (const Layer &lay, const MaterialPropertiesMatrix &lmr) const
 process the layer material record - before material creation More...
 
StatusCode analyseLayerMaterial (const Layer &lay, const LayerMaterialRecord &lmr) const
 process the layer material record - before material creation 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 (ILayerMaterialAnalyser, 1, 0)
 Creates the InterfaceID and interfaceID() method. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode analyse (const Layer &lay, const MaterialPropertiesMatrix &lmr, const std::vector< std::vector< unsigned int > > *bCounter=0) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_layerMaterialName
 
TTree * m_validationTree
 The validation tree. More...
 
std::string m_validationTreeName
 validation tree name - to be accessed by this from root More...
 
std::string m_validationTreeDescription
 validation tree description - second argument in TTree More...
 
std::string m_validationTreeFolder
 stream/folder to for the TTree to be written out More...
 
int m_layerIndex
 the layer index given by the TrackingGeometry More...
 
int m_layerType
 the type of the layer 1 - cylinder, 2 - disk More...
 
std::vector< float > * m_layerTranslation
 center of the transform More...
 
std::vector< float > * m_layerRotation
 orientation of the layer
More...
 
float m_layerDimension0
 dimension 0 : cylinder r, disk r_min More...
 
float m_layerDimension1
 dimension 1 : cylinder z, disk r_max More...
 
int m_layerBins
 total number of bins - loc0 * loc 1 More...
 
int m_layerBins0
 total number of bins - loc 0 More...
 
int m_layerBins1
 total number of bins - loc 0 More...
 
std::vector< int > * m_bin0
 bin 0 More...
 
std::vector< int > * m_bin1
 bin 1 More...
 
std::vector< float > * m_thickness
 gathered thickness from material mapping/material properties More...
 
std::vector< float > * m_X0
 gathered X0 from material mapping/material properties More...
 
std::vector< float > * m_L0
 gathered L0 from material mapping/material properties More...
 
std::vector< float > * m_A
 gathered A from material mapping/material properties More...
 
std::vector< float > * m_Z
 gathered Z from material mapping/material properties More...
 
std::vector< float > * m_Rho
 gathered rho from material mapping/material properties More...
 
std::vector< int > * m_elements
 gathered number of elements from material mapping/material properties More...
 
std::vector< int > * m_binCounter
 how often was this bin hit / used More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

LayerMaterialProperties creator for CompoundLayerMaterial

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 38 of file LayerMaterialAnalyser.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LayerMaterialAnalyser()

Trk::LayerMaterialAnalyser::LayerMaterialAnalyser ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Constructor.

Definition at line 33 of file LayerMaterialAnalyser.cxx.

34 : AthAlgTool(t,n,p),
35  m_layerMaterialName("UnspecifiedLayerMaterialMap"),
36  m_validationTree(nullptr),
37  m_validationTreeName("LayerMaterialAnalyser"),
38  m_validationTreeDescription("LayerMaterialAnalyser information"),
39  m_validationTreeFolder("/val/LayerMaterialAnalyser"),
40  m_layerIndex(0),
41  m_layerType(0),
42  m_layerTranslation(nullptr),
43  m_layerRotation(nullptr),
44  m_layerDimension0(0.),
45  m_layerDimension1(0.),
46  m_layerBins(0),
47  m_layerBins0(0),
48  m_layerBins1(0),
49  m_bin0(nullptr),
50  m_bin1(nullptr),
51  m_thickness(nullptr),
52  m_X0(nullptr),
53  m_L0(nullptr),
54  m_A(nullptr),
55  m_Z(nullptr),
56  m_Rho(nullptr),
57  m_elements(nullptr),
58  m_binCounter(nullptr)
59 {
60  declareInterface<Trk::ILayerMaterialAnalyser>(this);
61  // give the map a name
62  declareProperty("LayerMaterialName", m_layerMaterialName);
63  declareProperty("ValidationTreeName", m_validationTreeName);
64  declareProperty("ValidationTreeDescription", m_validationTreeDescription);
65  declareProperty("ValidationTreeFolder", m_validationTreeFolder);
66 }

◆ ~LayerMaterialAnalyser()

Trk::LayerMaterialAnalyser::~LayerMaterialAnalyser ( )
default

Destructor.

Member Function Documentation

◆ analyse()

StatusCode Trk::LayerMaterialAnalyser::analyse ( const Layer lay,
const MaterialPropertiesMatrix lmr,
const std::vector< std::vector< unsigned int > > *  bCounter = 0 
) const
private

Definition at line 201 of file LayerMaterialAnalyser.cxx.

204 {
205 
206  // general layer information
207  m_layerIndex = layer.layerIndex().value();
208  const Trk::Surface& lSurface = layer.surfaceRepresentation();
209  m_layerTranslation->at(0) = lSurface.center().x();
210  m_layerTranslation->at(1) = lSurface.center().y();
211  m_layerTranslation->at(2) = lSurface.center().z();
212 
213  AmgMatrix(3,3) rMatrix = lSurface.transform().rotation();
214  m_layerRotation->at(0) = rMatrix(0,0);
215  m_layerRotation->at(1) = rMatrix(1,0);
216  m_layerRotation->at(2) = rMatrix(2,0);
217  m_layerRotation->at(3) = rMatrix(0,1);
218  m_layerRotation->at(4) = rMatrix(1,1);
219  m_layerRotation->at(5) = rMatrix(2,1);
220  m_layerRotation->at(6) = rMatrix(0,2);
221  m_layerRotation->at(7) = rMatrix(1,2);
222  m_layerRotation->at(8) = rMatrix(2,2);
223 
224  // cylinder bounds
225  if ( lSurface.type() == Trk::SurfaceType::Cylinder ){
226  m_layerType = 1;
227  // cylinder bounds
228  const Trk::CylinderBounds* cb = dynamic_cast<const Trk::CylinderBounds*>(&(lSurface.bounds()));
229  if (cb){
230  m_layerDimension0 = cb->r();
232  }
233  } else if ( lSurface.type() == Trk::SurfaceType::Disc ) {
234  m_layerType = 2;
235  // disc bounds
236  const Trk::DiscBounds* db = dynamic_cast<const Trk::DiscBounds*>(&(lSurface.bounds()));
237  if (db){
238  m_layerDimension0 = db->rMin();
239  m_layerDimension1 = db->rMax();
240  }
241  }
242 
243  // now get the material matrix and record all single bins;
244  m_layerBins0 = 0;
245  m_layerBins1 = 0;
246  m_layerBins = 0;
247  int bin1 = 0;
248  for (const auto & outerIter : mpMatrix){
249  int bin0 = 0;
250  for (const auto & innerIter : outerIter ){
251  m_bin0->at(m_layerBins) = bin0;
252  m_bin1->at(m_layerBins) = bin1;
253  // get the material
254  const Trk::MaterialProperties* mProperties = innerIter;
255  if (mProperties){
256  m_thickness->at(m_layerBins) = mProperties->thickness();
257  m_X0->at(m_layerBins) = mProperties->x0();
258  m_L0->at(m_layerBins) = mProperties->l0();
259  m_A->at(m_layerBins) = mProperties->averageA();
260  m_Z->at(m_layerBins) = mProperties->averageZ();
261  m_Rho->at(m_layerBins) = mProperties->averageRho();
262  m_elements->at(m_layerBins) = mProperties->material().composition ? mProperties->material().composition->size() : 0;
263  } else {
264  m_thickness->at(m_layerBins) = 0.;
265  m_X0->at(m_layerBins) = 0.;
266  m_L0->at(m_layerBins) = 0.;
267  m_A->at(m_layerBins) = 0.;
268  m_Z->at(m_layerBins) = 0.;
269  m_Rho->at(m_layerBins) = 0.;
270  m_elements->at(m_layerBins) = 0.;
271  }
272  // set the bin Counter
273  m_binCounter->at(m_layerBins) = bCounter ? (*bCounter)[bin1][bin0] : 1;
274  //
275  ++bin0;
276  if (!bin1) ++m_layerBins0;
277  ++m_layerBins;
278  }
279  ++bin1;
280  ++m_layerBins1;
281  }
282  m_validationTree->Fill();
283 
284  // return 0 - since this is only an analyser
285  return StatusCode::SUCCESS;
286 }

◆ analyseLayerMaterial() [1/4]

StatusCode Trk::LayerMaterialAnalyser::analyseLayerMaterial ( const Layer lay) const
virtual

process the layer - after material creation and loading

Implements Trk::ILayerMaterialAnalyser.

Definition at line 152 of file LayerMaterialAnalyser.cxx.

153 {
154 
155  // get the LayerMaterial
156  const Trk::LayerMaterialProperties* lMaterial = layer.layerMaterialProperties();
157  if (!lMaterial) return StatusCode::SUCCESS;
158 
159  return analyseLayerMaterial(layer, *lMaterial);
160 }

◆ analyseLayerMaterial() [2/4]

StatusCode Trk::LayerMaterialAnalyser::analyseLayerMaterial ( const Layer lay,
const LayerMaterialProperties lmp 
) const
virtual

process the layer material proerties - after material creation and before loading

Implements Trk::ILayerMaterialAnalyser.

Definition at line 163 of file LayerMaterialAnalyser.cxx.

164 {
165 
166  // binned material can directly call the filling method
167  const Trk::BinnedLayerMaterial* blMaterial = dynamic_cast<const Trk::BinnedLayerMaterial*>(&lMaterial);
168  if (blMaterial) {
169  ATH_MSG_DEBUG( "Recieved BinnedLayerMaterial - analyzing it." );
170  return analyseLayerMaterial(layer, blMaterial->fullMaterial());
171  }
172 
173  // we need to create a MaterialProperties matrix for this
174  const Trk::BinUtility* bUtility = lMaterial.binUtility();
175  size_t mBins0 = bUtility ? bUtility->max(0)+1 : 1;
176  size_t mBins1 = bUtility ? bUtility->max(1)+1 : 1;
177 
178  Trk::MaterialPropertiesMatrix mpMatrix(mBins1, std::vector< const Trk::MaterialProperties*>(mBins0, nullptr));
179  for (size_t ibin1 = 0; ibin1 < mBins1; ++ ibin1){
180  for (size_t ibin0 = 0; ibin0 < mBins0; ++ibin0)
181  mpMatrix[ibin1][ibin0] = lMaterial.material(ibin0, ibin1);
182  }
183  // now send it to the analyser
184  return analyse(layer, mpMatrix);
185 }

◆ analyseLayerMaterial() [3/4]

StatusCode Trk::LayerMaterialAnalyser::analyseLayerMaterial ( const Layer lay,
const LayerMaterialRecord lmr 
) const
virtual

process the layer material record - before material creation

Implements Trk::ILayerMaterialAnalyser.

Definition at line 195 of file LayerMaterialAnalyser.cxx.

196 {
197  ATH_MSG_DEBUG( "Recieved LayerMaterialRecord - analyzing it." );
198  return analyse(layer, lmRecord.associatedLayerMaterial(), (const std::vector< std::vector< unsigned int > >*)&lmRecord.binCounts());
199 }

◆ analyseLayerMaterial() [4/4]

StatusCode Trk::LayerMaterialAnalyser::analyseLayerMaterial ( const Layer lay,
const MaterialPropertiesMatrix lmr 
) const
virtual

process the layer material record - before material creation

Implements Trk::ILayerMaterialAnalyser.

Definition at line 188 of file LayerMaterialAnalyser.cxx.

189 {
190  ATH_MSG_DEBUG( "Recieved MaterialPropertyMatrix - analyzing it." );
191  return analyse(layer, mpMatrix);
192 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

Trk::ILayerMaterialAnalyser::DeclareInterfaceID ( ILayerMaterialAnalyser  ,
,
 
)
inherited

Creates the InterfaceID and interfaceID() method.

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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::LayerMaterialAnalyser::finalize ( )

AlgTool finalize method.

Definition at line 133 of file LayerMaterialAnalyser.cxx.

134 {
135  delete m_layerTranslation ;
136  delete m_layerRotation ;
137  delete m_bin0 ;
138  delete m_bin1 ;
139  delete m_thickness ;
140  delete m_X0 ;
141  delete m_L0 ;
142  delete m_A ;
143  delete m_Z ;
144  delete m_Rho ;
145  delete m_elements ;
146  delete m_binCounter ;
147  return StatusCode::SUCCESS;
148 }

◆ initialize()

StatusCode Trk::LayerMaterialAnalyser::initialize ( )

AlgTool initialize method.

Definition at line 74 of file LayerMaterialAnalyser.cxx.

75 {
76 
77  m_layerTranslation = new std::vector<float>(3, 0.);
78  m_layerRotation = new std::vector<float>(9, 0.);
79  m_bin0 = new std::vector<int>(LAYERMAXBINS, 0);
80  m_bin1 = new std::vector<int>(LAYERMAXBINS, 0);
81  m_thickness = new std::vector<float>(LAYERMAXBINS, 0.);
82  m_X0 = new std::vector<float>(LAYERMAXBINS, 0.);
83  m_L0 = new std::vector<float>(LAYERMAXBINS, 0.);
84  m_A = new std::vector<float>(LAYERMAXBINS, 0.);
85  m_Z = new std::vector<float>(LAYERMAXBINS, 0.);
86  m_Rho = new std::vector<float>(LAYERMAXBINS, 0.);
87  m_elements = new std::vector<int>(LAYERMAXBINS, 0);
88  m_binCounter = new std::vector<int>(LAYERMAXBINS, 0);
89 
90  // now register the Tree
91 
92  // ------------- validation section ------------------------------------------
94 
95  // position coordinates of the update
96  m_validationTree->Branch("LayerIndex", &m_layerIndex );
97  m_validationTree->Branch("LayerType", &m_layerType );
98  m_validationTree->Branch("LayerTranslation", &m_layerTranslation );
99  m_validationTree->Branch("LayerRotation", &m_layerRotation );
100  m_validationTree->Branch("LayerDimension0", &m_layerDimension0 );
101  m_validationTree->Branch("LayerDimension1", &m_layerDimension1 );
102  m_validationTree->Branch("LayerBins", &m_layerBins );
103  m_validationTree->Branch("LayerBins0", &m_layerBins0 );
104  m_validationTree->Branch("LayerBins1", &m_layerBins1 );
105  m_validationTree->Branch("LayerBin0", &m_bin0 );
106  m_validationTree->Branch("LayerBin1", &m_bin1 );
107  m_validationTree->Branch("LayerBinCounter", &m_binCounter );
108  m_validationTree->Branch("LayerThickness", &m_thickness );
109  m_validationTree->Branch("LayerX0", &m_X0 );
110  m_validationTree->Branch("LayerL0", &m_L0 );
111  m_validationTree->Branch("LayerA", &m_A );
112  m_validationTree->Branch("LayerZ", &m_Z );
113  m_validationTree->Branch("LayerRo", &m_Rho );
114  m_validationTree->Branch("LayerElements", &m_elements );
115 
116  // now register the Tree
117  SmartIF<ITHistSvc> tHistSvc{service("THistSvc")};
118  if (!tHistSvc) {
119  ATH_MSG_ERROR("initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
120  delete m_validationTree; m_validationTree = nullptr;
121  return StatusCode::SUCCESS;
122  }
123  if ((tHistSvc->regTree(m_validationTreeFolder.c_str(), m_validationTree)).isFailure()) {
124  ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !" );
125  delete m_validationTree; m_validationTree = nullptr;
126  return StatusCode::SUCCESS;
127  }
128 
129  return StatusCode::SUCCESS;
130 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_A

std::vector<float>* Trk::LayerMaterialAnalyser::m_A
private

gathered A from material mapping/material properties

Definition at line 93 of file LayerMaterialAnalyser.h.

◆ m_bin0

std::vector<int>* Trk::LayerMaterialAnalyser::m_bin0
private

bin 0

Definition at line 88 of file LayerMaterialAnalyser.h.

◆ m_bin1

std::vector<int>* Trk::LayerMaterialAnalyser::m_bin1
private

bin 1

Definition at line 89 of file LayerMaterialAnalyser.h.

◆ m_binCounter

std::vector<int>* Trk::LayerMaterialAnalyser::m_binCounter
private

how often was this bin hit / used

Definition at line 97 of file LayerMaterialAnalyser.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elements

std::vector<int>* Trk::LayerMaterialAnalyser::m_elements
private

gathered number of elements from material mapping/material properties

Definition at line 96 of file LayerMaterialAnalyser.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_L0

std::vector<float>* Trk::LayerMaterialAnalyser::m_L0
private

gathered L0 from material mapping/material properties

Definition at line 92 of file LayerMaterialAnalyser.h.

◆ m_layerBins

int Trk::LayerMaterialAnalyser::m_layerBins
mutableprivate

total number of bins - loc0 * loc 1

Definition at line 85 of file LayerMaterialAnalyser.h.

◆ m_layerBins0

int Trk::LayerMaterialAnalyser::m_layerBins0
mutableprivate

total number of bins - loc 0

Definition at line 86 of file LayerMaterialAnalyser.h.

◆ m_layerBins1

int Trk::LayerMaterialAnalyser::m_layerBins1
mutableprivate

total number of bins - loc 0

Definition at line 87 of file LayerMaterialAnalyser.h.

◆ m_layerDimension0

float Trk::LayerMaterialAnalyser::m_layerDimension0
mutableprivate

dimension 0 : cylinder r, disk r_min

Definition at line 83 of file LayerMaterialAnalyser.h.

◆ m_layerDimension1

float Trk::LayerMaterialAnalyser::m_layerDimension1
mutableprivate

dimension 1 : cylinder z, disk r_max

Definition at line 84 of file LayerMaterialAnalyser.h.

◆ m_layerIndex

int Trk::LayerMaterialAnalyser::m_layerIndex
mutableprivate

the layer index given by the TrackingGeometry

Definition at line 79 of file LayerMaterialAnalyser.h.

◆ m_layerMaterialName

std::string Trk::LayerMaterialAnalyser::m_layerMaterialName
private

Definition at line 72 of file LayerMaterialAnalyser.h.

◆ m_layerRotation

std::vector<float>* Trk::LayerMaterialAnalyser::m_layerRotation
private

orientation of the layer

Definition at line 82 of file LayerMaterialAnalyser.h.

◆ m_layerTranslation

std::vector<float>* Trk::LayerMaterialAnalyser::m_layerTranslation
private

center of the transform

Definition at line 81 of file LayerMaterialAnalyser.h.

◆ m_layerType

int Trk::LayerMaterialAnalyser::m_layerType
mutableprivate

the type of the layer 1 - cylinder, 2 - disk

Definition at line 80 of file LayerMaterialAnalyser.h.

◆ m_Rho

std::vector<float>* Trk::LayerMaterialAnalyser::m_Rho
private

gathered rho from material mapping/material properties

Definition at line 95 of file LayerMaterialAnalyser.h.

◆ m_thickness

std::vector<float>* Trk::LayerMaterialAnalyser::m_thickness
private

gathered thickness from material mapping/material properties

Definition at line 90 of file LayerMaterialAnalyser.h.

◆ m_validationTree

TTree* Trk::LayerMaterialAnalyser::m_validationTree
private

The validation tree.

Definition at line 74 of file LayerMaterialAnalyser.h.

◆ m_validationTreeDescription

std::string Trk::LayerMaterialAnalyser::m_validationTreeDescription
private

validation tree description - second argument in TTree

Definition at line 76 of file LayerMaterialAnalyser.h.

◆ m_validationTreeFolder

std::string Trk::LayerMaterialAnalyser::m_validationTreeFolder
private

stream/folder to for the TTree to be written out

Definition at line 77 of file LayerMaterialAnalyser.h.

◆ m_validationTreeName

std::string Trk::LayerMaterialAnalyser::m_validationTreeName
private

validation tree name - to be accessed by this from root

Definition at line 75 of file LayerMaterialAnalyser.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_X0

std::vector<float>* Trk::LayerMaterialAnalyser::m_X0
private

gathered X0 from material mapping/material properties

Definition at line 91 of file LayerMaterialAnalyser.h.

◆ m_Z

std::vector<float>* Trk::LayerMaterialAnalyser::m_Z
private

gathered Z from material mapping/material properties

Definition at line 94 of file LayerMaterialAnalyser.h.


The documentation for this class was generated from the following files:
Trk::LayerMaterialAnalyser::m_Rho
std::vector< float > * m_Rho
gathered rho from material mapping/material properties
Definition: LayerMaterialAnalyser.h:95
LAYERMAXBINS
#define LAYERMAXBINS
Definition: LayerMaterialAnalyser.h:20
Trk::AmgMatrix
AmgMatrix(3, 3) NeutralParticleParameterCalculator
Definition: NeutralParticleParameterCalculator.cxx:233
Trk::LayerMaterialAnalyser::m_layerBins1
int m_layerBins1
total number of bins - loc 0
Definition: LayerMaterialAnalyser.h:87
Trk::MaterialProperties::averageA
float averageA() const
Return the average A of the material [gram/mole].
Trk::LayerMaterialAnalyser::m_validationTreeName
std::string m_validationTreeName
validation tree name - to be accessed by this from root
Definition: LayerMaterialAnalyser.h:75
Trk::LayerMaterialAnalyser::m_layerBins
int m_layerBins
total number of bins - loc0 * loc 1
Definition: LayerMaterialAnalyser.h:85
Trk::LayerMaterialAnalyser::m_layerMaterialName
std::string m_layerMaterialName
Definition: LayerMaterialAnalyser.h:72
Trk::LayerMaterialAnalyser::m_L0
std::vector< float > * m_L0
gathered L0 from material mapping/material properties
Definition: LayerMaterialAnalyser.h:92
Trk::BinUtility::max
size_t max(size_t ba=0) const
First bin maximal value.
Definition: BinUtility.h:215
Trk::LayerMaterialAnalyser::m_validationTreeDescription
std::string m_validationTreeDescription
validation tree description - second argument in TTree
Definition: LayerMaterialAnalyser.h:76
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::LayerMaterialAnalyser::m_layerDimension0
float m_layerDimension0
dimension 0 : cylinder r, disk r_min
Definition: LayerMaterialAnalyser.h:83
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
Trk::LayerMaterialAnalyser::analyseLayerMaterial
StatusCode analyseLayerMaterial(const Layer &lay) const
process the layer - after material creation and loading
Definition: LayerMaterialAnalyser.cxx:152
Trk::LayerMaterialAnalyser::m_layerBins0
int m_layerBins0
total number of bins - loc 0
Definition: LayerMaterialAnalyser.h:86
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::MaterialProperties::averageRho
float averageRho() const
Return the average density of the material.
Trk::SurfaceType
SurfaceType
Definition: SurfaceTypes.h:17
Trk::MaterialProperties::x0
float x0() const
Return the radiation length.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::LayerMaterialAnalyser::m_bin0
std::vector< int > * m_bin0
bin 0
Definition: LayerMaterialAnalyser.h:88
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk::MaterialProperties::material
const Material & material() const
Return the stored Material.
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
Trk::MaterialProperties::thickness
float thickness() const
Return the thickness in mm.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::LayerMaterialAnalyser::m_X0
std::vector< float > * m_X0
gathered X0 from material mapping/material properties
Definition: LayerMaterialAnalyser.h:91
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
Trk::CylinderBounds
Definition: CylinderBounds.h:46
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
Trk::LayerMaterialAnalyser::m_layerIndex
int m_layerIndex
the layer index given by the TrackingGeometry
Definition: LayerMaterialAnalyser.h:79
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::LayerMaterialAnalyser::m_validationTreeFolder
std::string m_validationTreeFolder
stream/folder to for the TTree to be written out
Definition: LayerMaterialAnalyser.h:77
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::BinnedLayerMaterial
Definition: BinnedLayerMaterial.h:33
Trk::LayerMaterialAnalyser::m_thickness
std::vector< float > * m_thickness
gathered thickness from material mapping/material properties
Definition: LayerMaterialAnalyser.h:90
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Trk::BinUtility
Definition: BinUtility.h:39
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::BinnedLayerMaterial::fullMaterial
const MaterialPropertiesMatrix & fullMaterial() const
Return method for full material description of the Layer - for all bins.
Definition: BinnedLayerMaterial.h:124
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::LayerMaterialAnalyser::m_Z
std::vector< float > * m_Z
gathered Z from material mapping/material properties
Definition: LayerMaterialAnalyser.h:94
Trk::LayerMaterialAnalyser::m_A
std::vector< float > * m_A
gathered A from material mapping/material properties
Definition: LayerMaterialAnalyser.h:93
Trk::LayerMaterialAnalyser::m_layerDimension1
float m_layerDimension1
dimension 1 : cylinder z, disk r_max
Definition: LayerMaterialAnalyser.h:84
Trk::LayerMaterialAnalyser::m_layerTranslation
std::vector< float > * m_layerTranslation
center of the transform
Definition: LayerMaterialAnalyser.h:81
Trk::MaterialPropertiesMatrix
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix
Definition: ILayerMaterialAnalyser.h:23
Trk::MaterialProperties
Definition: MaterialProperties.h:40
a
TList * a
Definition: liststreamerinfos.cxx:10
dqt_zlumi_pandas.bin1
bin1
Definition: dqt_zlumi_pandas.py:336
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::MaterialProperties::averageZ
float averageZ() const
Returns the average Z of the material.
Trk::SurfaceType::Disc
@ Disc
Trk::LayerMaterialAnalyser::m_bin1
std::vector< int > * m_bin1
bin 1
Definition: LayerMaterialAnalyser.h:89
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::Material::composition
MaterialComposition * composition
Definition: Material.h:126
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Trk::LayerMaterialAnalyser::analyse
StatusCode analyse(const Layer &lay, const MaterialPropertiesMatrix &lmr, const std::vector< std::vector< unsigned int > > *bCounter=0) const
Definition: LayerMaterialAnalyser.cxx:201
Trk::LayerMaterialAnalyser::m_layerRotation
std::vector< float > * m_layerRotation
orientation of the layer
Definition: LayerMaterialAnalyser.h:82
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::LayerMaterialAnalyser::m_validationTree
TTree * m_validationTree
The validation tree.
Definition: LayerMaterialAnalyser.h:74
Trk::MaterialProperties::l0
float l0() const
Return the nuclear interaction length.
Trk::LayerMaterialAnalyser::m_binCounter
std::vector< int > * m_binCounter
how often was this bin hit / used
Definition: LayerMaterialAnalyser.h:97
Trk::LayerMaterialAnalyser::m_layerType
int m_layerType
the type of the layer 1 - cylinder, 2 - disk
Definition: LayerMaterialAnalyser.h:80
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::Surface::type
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
fitman.k
k
Definition: fitman.py:528
Trk::DiscBounds
Definition: DiscBounds.h:44
Trk::CylinderBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Trk::CylinderBounds::r
virtual double r() const override final
This method returns the radius.
Trk::LayerMaterialAnalyser::m_elements
std::vector< int > * m_elements
gathered number of elements from material mapping/material properties
Definition: LayerMaterialAnalyser.h:96