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

#include <LayerArrayCreator.h>

Inheritance diagram for Trk::LayerArrayCreator:
Collaboration diagram for Trk::LayerArrayCreator:

Public Member Functions

 LayerArrayCreator (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
virtual ~LayerArrayCreator ()
 Destructor. More...
 
LayerArraycylinderLayerArray (const std::vector< CylinderLayer * > &layers, double rmin, double rmax, BinningType btype=arbitrary) const
 LayerArrayCreator interface method - for Barrel-like layers. More...
 
LayerArraydiscLayerArray (const std::vector< DiscLayer * > &layers, double zmin, double zmax, BinningType btype=arbitrary) const
 LayerArrayCreator interface method - for Endcap-like layers. More...
 
LayerArrayplaneLayerArray (const std::vector< PlaneLayer * > &layers, double min, double max, BinningType btype=arbitrary, Trk::BinningValue bv=Trk::binX) const
 LayerArrayCreator interface method - for Planar-like layers. 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 (ILayerArrayCreator, 1, 0)
 Creates the InterfaceID and interfaceID() method. More...
 
virtual void validationAction () const
 Validation Action: Can be implemented optionally, outside access to internal validation steps. 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

Trk::LayercheckAndReplaceEmptyLayer (Trk::Layer *lay) 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

int m_emptyLayerMode
 0 - do nothing, 1 - replace with navigation layer, 2 - delete 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

The LayerArrayCreator is a simple Tool that helps to construct LayerArrays from std::vector of Trk::CylinderLayer, Trk::DiscLayer, Trk::PlaneLayer.

It fills the gaps automatically with Trk::NavigationLayer to be processed easily in the Navigation of the Extrapolation process.

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

Definition at line 51 of file LayerArrayCreator.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

◆ LayerArrayCreator()

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

Constructor.

Definition at line 28 of file LayerArrayCreator.cxx.

29 : AthAlgTool(t,n,p),
31 {
32  declareInterface<ILayerArrayCreator>(this);
33 
34  declareProperty("EmptyLayerMode", m_emptyLayerMode);
35 }

◆ ~LayerArrayCreator()

Trk::LayerArrayCreator::~LayerArrayCreator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ checkAndReplaceEmptyLayer()

Trk::Layer * Trk::LayerArrayCreator::checkAndReplaceEmptyLayer ( Trk::Layer lay) const
private

Definition at line 679 of file LayerArrayCreator.cxx.

679  {
680  // empty layers will be replaced by navigation layers
681  if (m_emptyLayerMode){
682  if (lay->layerMaterialProperties() || lay->surfaceArray()) return lay;
683  ATH_MSG_VERBOSE(" replacing dummyMaterial layer with " << ( m_emptyLayerMode > 1 ? " nothing" :" NavigationLayer." ) );
684  Trk::NavigationLayer* nLayer = m_emptyLayerMode > 1 ? nullptr : new Trk::NavigationLayer(lay->surfaceRepresentation().clone(), 1.);
685  delete lay;
686  return nLayer;
687  }
688  // don't replace - just give back what you had
689  return lay;
690 }

◆ cylinderLayerArray()

Trk::LayerArray * Trk::LayerArrayCreator::cylinderLayerArray ( const std::vector< CylinderLayer * > &  layers,
double  rmin,
double  rmax,
Trk::BinningType  btype = arbitrary 
) const
virtual

LayerArrayCreator interface method - for Barrel-like layers.

Implements Trk::ILayerArrayCreator.

Definition at line 42 of file LayerArrayCreator.cxx.

44 {
45  ATH_MSG_VERBOSE( " build LayerArray with " << cylLayersInput.size() << " cylindrical material layers." );
46  ATH_MSG_VERBOSE( " rmin/rmax provided : " << rmin << " / " << rmax );
47 
48  //copy so that you can sort
49  std::vector<Trk::CylinderLayer*> cylLayers(cylLayersInput);
50  // sort the vector
52  std::sort(cylLayers.begin(), cylLayers.end(), rSorter);
53 
54  // needed for all cases
55  Trk::Layer* cylinderLayer = nullptr;
57  Trk::BinUtility* binUtility = nullptr;
58  std::vector< std::pair<Trk::SharedObject<Trk::Layer>, Amg::Vector3D> > layerOrderVector;
59 
60  switch (btype) {
61 
62  // equidistant binning - no navigation layers built
63  case Trk::equidistant :
64  {
65  // count the layers
66  unsigned int layers = cylLayers.size();
67  // loop over layers and put them in
68  for (auto& layIter : cylLayers ) {
69  // get the R
70  const Trk::CylinderSurface& layerSurface = layIter->surfaceRepresentation();
71  double currentR = layerSurface.bounds().r();
72  ATH_MSG_VERBOSE( "equidistant : registering cylindrical MaterialLayer at radius : " << currentR );
73  layerOrderVector.emplace_back(Trk::SharedObject<Layer>(layIter),
74  Amg::Vector3D(currentR, 0.,0.));
75  }
76  // create the binUtility
77  binUtility = new Trk::BinUtility(layers,rmin,rmax,Trk::open, Trk::binR);
78  ATH_MSG_VERBOSE( "equidistant : created a BinUtility as " << *binUtility );
79 
80  // create the BinnedArray; BinnedArray now owns the binUtility pointer
81  cylinderLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
82  } break;
83 
84  // bi-equidistant binning - take care the layers have to be binned equidistant + same thickness
85  case Trk::biequidistant :
86  {
87 
88  // count the layers
89  unsigned int layers = cylLayers.size();
90  // take a reference thinkness
91  double layerThickness = cylLayers[0]->thickness();
92  // the radialstep
93  double radialStep = (rmax-rmin)/(layers-1);
94  // the next step
95  Trk::NavigationLayer* navLayer = nullptr;
96  double navigationR = 0.;
97  double navLayerHalflengthZ = 0.;
98  const Amg::Transform3D* layerTransform = nullptr;
99 
100  // loop over layers
101  for (auto& layIter : cylLayers ) {
102  // get the dimensions
103  const Trk::CylinderSurface& layerSurface = layIter->surfaceRepresentation();
104  layerTransform = layerSurface.transform().isApprox(Amg::Transform3D::Identity()) ? nullptr : &layerSurface.transform();
105 
106  double currentR = layerSurface.bounds().r();
107  navigationR = currentR - 0.5*radialStep;
108 
109  navLayerHalflengthZ = layerSurface.bounds().halflengthZ();
110  ATH_MSG_VERBOSE( "bi-equidistant : creating cylindrical NavigationLayer at radius : " << navigationR );
111  Trk::CylinderSurface* navLayerSurface = layerTransform ?
112  new Trk::CylinderSurface(Amg::Transform3D(*layerTransform), navigationR, navLayerHalflengthZ) :
113  new Trk::CylinderSurface(navigationR, navLayerHalflengthZ);
114  // the navigation layer
115  navLayer = new Trk::NavigationLayer(navLayerSurface);
116  // push the navigation layer in
117  layerOrderVector.emplace_back(Trk::SharedObject<Trk::Layer>(navLayer),
118  Amg::Vector3D(navigationR, 0., 0.));
119  ATH_MSG_VERBOSE( "bi-equidistant : registering cylindrical MaterialLayer at radius : " << currentR );
120  // push the original layer in
121  layerOrderVector.emplace_back(Trk::SharedObject<Trk::Layer>(layIter),
122  Amg::Vector3D(currentR, 0., 0.));
123  }
124 
125  // special treatment for the last one
126  ATH_MSG_VERBOSE( "bi-equidistant : creating cylindrical NavigationLayer at radius : " << navigationR+radialStep);
127  Trk::CylinderSurface* navLayerSurfacFinal = layerTransform ?
128  new Trk::CylinderSurface(Amg::Transform3D(*layerTransform), navigationR+radialStep, navLayerHalflengthZ) :
129  new Trk::CylinderSurface(navigationR+radialStep, navLayerHalflengthZ);
130  // the navigation layer
131  navLayer = new Trk::NavigationLayer(navLayerSurfacFinal);
132  // push the navigation layer in
133  layerOrderVector.emplace_back(Trk::SharedObject<Trk::Layer>(navLayer),
134  Amg::Vector3D(navigationR+radialStep, 0., 0.));
135 
136  ATH_MSG_VERBOSE( layerOrderVector.size() << " cylindrical Layers (material + navigation) built. " );
137 
138  // create the binUtility
139  double rMinBoundary = rmin-radialStep+0.5*layerThickness;
140  double rMaxBoundary = rmax+radialStep+0.5*layerThickness;
141  binUtility = new Trk::BinUtility(layers, layerThickness, rMinBoundary, rMaxBoundary, Trk::open, Trk::binR);
142  ATH_MSG_VERBOSE( "bi-equidistant : created a BinUtility as " << *binUtility );
143 
144  // create the BinnedArray; BinnedArray now owns the binUtility pointer
145  cylinderLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
146 
147  } break;
148 
149  // arbitrary binning
150  case Trk::arbitrary :
151  {
152  std::vector<float> boundaries;
153  // maz z extension
154  double halfLengthZ = 0;
155  const Amg::Transform3D* layerTransform = nullptr;
156 
157  // initial step
158  boundaries.push_back(rmin);
159 
160  // loop over the provided layers and put Navigation layers in between
161  for (auto& layIter : cylLayers) {
162  // get the cylinder surface
163  const Trk::CylinderSurface& layerSurface = layIter->surfaceRepresentation();
164  layerTransform = layerSurface.transform().isApprox(Amg::Transform3D::Identity()) ? nullptr : &layerSurface.transform();
165  // and get the halflength
166  double currentHalfLengthZ = layerSurface.bounds().halflengthZ();
167  takeBigger(halfLengthZ, currentHalfLengthZ);
168  double layerRadius = layerSurface.bounds().r();
169  double layerThickness = layIter->thickness();
170  // navigation layer : previous bin
171  double navLayerRadius = 0.5*( (layerRadius-0.5*layerThickness) + boundaries[boundaries.size()-1] );
172  Trk::CylinderSurface* navLayerSurface = layerTransform ?
173  new Trk::CylinderSurface(Amg::Transform3D(*layerTransform), navLayerRadius, halfLengthZ) :
174  new Trk::CylinderSurface(navLayerRadius, halfLengthZ);
175  // material layer : current bin
176  cylinderLayer = checkAndReplaceEmptyLayer(layIter);
177  if (cylinderLayer){
178  ATH_MSG_VERBOSE( "arbitrary : creating cylindrical NavigationLayer at radius : " << navLayerRadius );
179  layerOrderVector.emplace_back(
181  Amg::Vector3D(navLayerRadius, 0., 0.));
182  ATH_MSG_VERBOSE( "arbitrary : registering cylindrical MaterialLayer at radius :" << layerRadius );
183  layerOrderVector.emplace_back(
184  Trk::SharedObject<Trk::Layer>(cylinderLayer),
185  Amg::Vector3D(layerRadius, 0.,0.));
186  boundaries.push_back(layerRadius-0.5*layerThickness);
187  boundaries.push_back(layerRadius+0.5*layerThickness);
188  } else {
189  ATH_MSG_VERBOSE( "arbitrary : empty layer configuration cancelled this building of navigation layer.");
190  delete navLayerSurface;
191  }
192  }
193  // close up the array with last bin
194  double navLayerRadiusFinal = 0.5*(rmax+boundaries[boundaries.size()-1]);
195  Trk::CylinderSurface* navLayerSurfaceFinal = layerTransform ?
196  new Trk::CylinderSurface(Amg::Transform3D(*layerTransform), navLayerRadiusFinal, halfLengthZ) :
197  new Trk::CylinderSurface(navLayerRadiusFinal, halfLengthZ);
198  boundaries.push_back(rmax);
199  ATH_MSG_VERBOSE( "arbitrary : creating cylindrical NavigationLayer at radius : " << navLayerRadiusFinal );
200  layerOrderVector.emplace_back(
201  Trk::SharedObject<Trk::Layer>(new Trk::NavigationLayer(navLayerSurfaceFinal)),
202  Amg::Vector3D(navLayerRadiusFinal, 0., 0.));
203 
204  ATH_MSG_VERBOSE( layerOrderVector.size() << " cylindrical Layers (material + navigation) built. " );
205  // create the BinUtility
206  binUtility = new Trk::BinUtility(boundaries, Trk::open, Trk::binR);
207  ATH_MSG_VERBOSE( "arbitrary : created a BinUtility as " << *binUtility );
208 
209  // create the BinnedArray; BinnedArray now owns the binUtility pointer
210  cylinderLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
211 
212  } break;
213 
214  // default return 0
215  default : { return nullptr; }
216  }
217 
218  return cylinderLayerArray;
219 }

◆ 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::ILayerArrayCreator::DeclareInterfaceID ( ILayerArrayCreator  ,
,
 
)
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; }

◆ discLayerArray()

Trk::LayerArray * Trk::LayerArrayCreator::discLayerArray ( const std::vector< DiscLayer * > &  layers,
double  zmin,
double  zmax,
Trk::BinningType  btype = arbitrary 
) const
virtual

LayerArrayCreator interface method - for Endcap-like layers.

Implements Trk::ILayerArrayCreator.

Definition at line 222 of file LayerArrayCreator.cxx.

226 {
227 
228  ATH_MSG_VERBOSE( " build LayerArray with " << discLayersInput.size() << " disc-like material layers." );
229  ATH_MSG_VERBOSE( " zmin/zmax provided : " << zmin << " / " << zmax );
230 
231  // needed for all cases
232  Trk::LayerArray* discLayerArray = nullptr;
233  Trk::BinUtility* binUtility = nullptr;
234  std::vector<std::pair<Trk::SharedObject<Trk::Layer>, Amg::Vector3D>> layerOrderVector;
235 
236  //copy so that you can sort
237  std::vector<Trk::DiscLayer*> discLayers(discLayersInput);
238  // sort the vector
239  Trk::DiscLayerSorterZ zSorter;
240  std::sort(discLayers.begin(), discLayers.end(), zSorter);
241  // the layer to be pushed back
242  Trk::Layer* discLayer = nullptr;
243 
244  switch (btype) {
245 
246  // equidistant binning
247  case Trk::equidistant :
248  {
249  // count the layers
250  size_t layers = discLayers.size();
251  // loop over layers and put them in
252  for (Trk::DiscLayer* layIter : discLayers ) {
253  discLayer = checkAndReplaceEmptyLayer(layIter);
254  // get the Z
255  const Trk::Surface& layerSurface = discLayer->surfaceRepresentation();
256  ATH_MSG_VERBOSE( "equidistant : registering disc-like MaterialLayer at z-Position : " << layerSurface.center().z() );
257  layerOrderVector.emplace_back(Trk::SharedObject<Layer>(discLayer),
258  layerSurface.center());
259  }
260  // create the binUitlity
262  ATH_MSG_VERBOSE( "equidistant : created a BinUtility as " << *binUtility );
263 
264  // create the BinnedArray; BinnedArray now owns the binUtility pointer
265  discLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
266 
267  } break;
268 
269  // bi-equidistant binning
270  case Trk::biequidistant :
271  {
272  // count the layers
273  unsigned int layers = discLayers.size();
274  // take a reference layer thickness
275  double layerThickness = discLayers[0]->thickness();
276  ATH_MSG_VERBOSE( "bi-equidistant : zmin / zmax re-evaluated as = " << zmin << " / " << zmax );
277  // the radialstep
278  double zStep = (zmax-zmin)/(layers-1);
279  double minR = 0.;
280  double maxR = 0.;
281 
282  Amg::Transform3D navLayerTransform;
283  Trk::DiscSurface* navLayerSurface = nullptr;
284  double navigationZ = 0.;
285  // loop over layers
286  for (auto& layIter : discLayers) {
287  // get the dimensions
288  const Trk::DiscSurface& layerSurface = layIter->surfaceRepresentation();
289  double currentZ = layerSurface.center().z();
290  // create the navigation Z from current Z
291  navigationZ = currentZ - 0.5*(zStep);
292  navLayerTransform = Amg::Transform3D(Amg::Translation3D(0.,0.,navigationZ));
293  navLayerSurface = new Trk::DiscSurface(navLayerTransform, minR, maxR);
294  // push that layer back
295  ATH_MSG_VERBOSE( "bi-equidistant : creating disc-like NavigationLayer at z-Position : " << navigationZ );
296  layerOrderVector.emplace_back(
298  navLayerSurface->center());
299  // and get dimensions
300  const Trk::DiscBounds* dbounds = dynamic_cast<const Trk::DiscBounds*>(&(layerSurface.bounds()));
301  if (dbounds) {
302  minR = dbounds->rMin();
303  maxR = dbounds->rMax();
304  } else { // protection
305  minR = 0.;
306  maxR = 100000.;
307  }
308  // get the material layer first
309  ATH_MSG_VERBOSE( "bi-equidistant : registering disc-like MaterialLayer at z-Position : " << currentZ );
310  layerOrderVector.emplace_back(Trk::SharedObject<Trk::Layer>(layIter),
311  layerSurface.center());
312  }
313  // special treatment for last bin
314  ATH_MSG_VERBOSE( "bi-equidistant : creating disc-like NavigationLayer at z-Position : " << navigationZ + zStep );
315  navLayerTransform = Amg::Transform3D(Amg::Translation3D(0.,0.,navigationZ+zStep));
316  navLayerSurface = new Trk::DiscSurface(navLayerTransform, minR, maxR);
317  layerOrderVector.emplace_back(
319  navLayerSurface->center());
320  // verbose output
321  ATH_MSG_VERBOSE( layerOrderVector.size() << " disc Layers (material + navigation) built. " );
322 
323  // create the binUtility
324  double zminBoundary = zmin-zStep+0.5*layerThickness;
325  double zmaxBoundary = zmax+zStep+0.5*layerThickness;
326  binUtility = new Trk::BinUtility(layers, layerThickness, zminBoundary, zmaxBoundary, Trk::open, Trk::binZ);
327  ATH_MSG_VERBOSE( "bi-equidistant : created a BinUtility as " << *binUtility );
328 
329  // create the BinnedArray; BinnedArray now owns the binUtility pointer
330  discLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
331 
332  } break;
333 
334  // arbitrary binning
335  case Trk::arbitrary :
336  {
337  std::vector<float> boundaries;
338 
339  // max disc dimension
340  double minR = 10e10;
341  double maxR = 0.;
342 
343  // initial boundary
344  boundaries.push_back(zmin);
345 
346  // loop over the provided layers and put NavigationLayers in between
347  for (auto& layIter : discLayers ) {
348  // get the cylinder surface
349  const Trk::DiscSurface& layerSurface = layIter->surfaceRepresentation();
350  // and get dimensions
351  const Trk::DiscBounds* dbounds = dynamic_cast<const Trk::DiscBounds*>(&(layerSurface.bounds()));
352  if (dbounds) {
353  double layInnerR = dbounds->rMin();
354  double layOuterR = dbounds->rMax();
355  minR = (layInnerR < minR) ? layInnerR : minR;
356  maxR = (layOuterR > maxR) ? layOuterR : maxR;
357  } else { // protection
358  minR = 0.;
359  maxR = 100000.;
360  }
361  // the radius & position
362  double layerPositionZ = layerSurface.center().z();
363  double layerThickness = layIter->thickness();
364  // navigation Layer
365  double navLayerPositionZ = 0.5*((layerPositionZ-0.5*layerThickness)+boundaries[boundaries.size()-1]);
366  // now fill the layer post slot after navigation layer has been determined
367  // the transform for this
368  Amg::Transform3D navLayerTransform = Amg::Transform3D(Amg::Translation3D(0.,0.,navLayerPositionZ));
369  Trk::DiscSurface* navLayerSurface = new Trk::DiscSurface(navLayerTransform, minR, maxR);
370 
371  // the material layer
372  discLayer = checkAndReplaceEmptyLayer(layIter);
373  if (discLayer) {
374  ATH_MSG_VERBOSE( "arbitrary : creating disc-like NavigationLayer at z-Position : " << navLayerPositionZ );
375  layerOrderVector.emplace_back(
377  Amg::Vector3D(0., 0., navLayerPositionZ));
378  ATH_MSG_VERBOSE( "arbitrary : registering disc-like MaterialLayer at z-Position : " << layerPositionZ );
379  layerOrderVector.emplace_back(
381  Amg::Vector3D(0.,0., layerPositionZ));
382  boundaries.push_back(layerPositionZ-0.5*layerThickness);
383  boundaries.push_back(layerPositionZ+0.5*layerThickness);
384  } else {
385  ATH_MSG_VERBOSE( "arbitrary : empty layer configuration cancelled this building of navigation layer.");
386  delete navLayerSurface;
387  }
388  }
389  // final material layer
390  double navLayerPositionZFinal = 0.5*(zmax+boundaries[boundaries.size()-1]);
391  Amg::Transform3D navLayerTransformFinal = Amg::Transform3D(
392  Amg::Translation3D(0., 0., navLayerPositionZFinal));
393  Trk::DiscSurface* navLayerSurfaceFinal =
394  new Trk::DiscSurface(navLayerTransformFinal, minR, maxR);
395  ATH_MSG_VERBOSE( "arbitrary : creating disc-like NavigationLayer at z-Position : " << navLayerPositionZFinal );
396  layerOrderVector.emplace_back(
397  Trk::SharedObject<Trk::Layer>(new Trk::NavigationLayer(navLayerSurfaceFinal)),
398  Amg::Vector3D(0., 0., navLayerPositionZFinal));
399  ATH_MSG_VERBOSE( layerOrderVector.size() << " disc Layers (material + navigation) built. " );
400  // register the last bounday
401  boundaries.push_back(zmax);
402  // create the BinUtility
403  binUtility = new Trk::BinUtility(boundaries, Trk::open, Trk::binZ);
404  ATH_MSG_VERBOSE( "arbitrary : created a BinUtility as " << *binUtility );
405 
406  // create the BinnedArray; BinnedArray now owns the binUtility pointer
407  // cppcheck-suppress memleak
408  discLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
409 
410  } break;
411 
412  // default return 0
413  default : { return nullptr; }
414  }
415 
416  return discLayerArray;
417 }

◆ 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

◆ 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.

◆ planeLayerArray()

Trk::LayerArray * Trk::LayerArrayCreator::planeLayerArray ( const std::vector< PlaneLayer * > &  layers,
double  min,
double  max,
Trk::BinningType  btype = arbitrary,
Trk::BinningValue  bv = Trk::binX 
) const
virtual

LayerArrayCreator interface method - for Planar-like layers.

Implements Trk::ILayerArrayCreator.

Definition at line 420 of file LayerArrayCreator.cxx.

422 {
423  ATH_MSG_VERBOSE( " build LayerArray with " << planeLayersInput.size() << " plane-like material layers." );
424 
425  // needed for all cases
426  Trk::LayerArray* planeLayerArray = nullptr;
427  Trk::BinUtility* binUtility = nullptr;
428  std::vector< std::pair< Trk::SharedObject<Trk::Layer>, Amg::Vector3D> > layerOrderVector;
429  Amg::Vector3D layerCenter(0.,0.,0.);
430 
431  //copy so that you can sort
432  std::vector<Trk::PlaneLayer*> planeLayers(planeLayersInput);
433 
434  auto sortBegin = planeLayers.begin();
435  auto sortEnd = planeLayers.end();
436  switch (bv) {
437  case Trk::binX : { std::sort(sortBegin, sortEnd, Trk::PlaneLayerSorterX()); } break;
438  case Trk::binY : { std::sort(sortBegin, sortEnd, Trk::PlaneLayerSorterY()); } break;
439  case Trk::binZ : { std::sort(sortBegin, sortEnd, Trk::PlaneLayerSorterZ()); } break;
440  default : {
441  ATH_MSG_WARNING("Plane Layers can only be sorted in x/y/z. Returning 0.");
442  return nullptr;
443  }
444  }
445 
446  // the iterator
447  auto layIter = planeLayers.begin();
448 
449  switch (btype) {
450 
451  // equidistant binning
452  case Trk::equidistant :
453  {
454  // count the layers
455  unsigned int layers = planeLayers.size();
456  // loop over layers and put them in
457  for ( ; layIter != planeLayers.end(); ++layIter) {
458  // get the X
459  const Trk::PlaneSurface& layerSurface = (*layIter)->surfaceRepresentation();
460  ATH_MSG_VERBOSE( "equidistant : registering plane-like MaterialLayer at position : " << layerSurface.center() );
461 
462  layerOrderVector.emplace_back(
463  Trk::SharedObject<Layer>(*layIter),
464  layerSurface.center());
465  }
466  // create the binUitlity
467  binUtility = new Trk::BinUtility(layers,posmin,posmax, Trk::open, bv);
468  // create the BinnedArray
469  planeLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
470 
471  } break;
472 
473  // bi-equidistant binning
474  case Trk::biequidistant :
475  {
476  // count the layers
477  unsigned int layers = planeLayers.size();
478  // the x-step
479  double posStep = (posmax-posmin)/(layers+1);
480 
481  double currentPos = posmin + posStep;
482  double lastPos = posmin;
483 
484  double minHalfX = 0.;
485  double maxHalfX = 0.;
486  double halfY = 0.;
487 
488  double layerThickness = 0.;
489 
490  // loop over layers
491  for ( ; layIter != planeLayers.end() ; ++layIter) {
492 
493  // get the dimensions
494  const Trk::PlaneSurface& layerSurface = (*layIter)->surfaceRepresentation();
495  // get dimensions
496  const Trk::RectangleBounds* recbounds = dynamic_cast<const Trk::RectangleBounds*>(&(layerSurface.bounds()));
497  // try rectangular hypothesis
498  if (recbounds) {
499  maxHalfX = recbounds->halflengthX();
500  halfY = recbounds->halflengthY();
501  } else {
502  // try trapezoidal hypothesis
503  const Trk::TrapezoidBounds* trapbounds = dynamic_cast<const Trk::TrapezoidBounds*>(&(layerSurface.bounds()));
504  if (trapbounds) {
505  minHalfX = trapbounds->minHalflengthX();
506  maxHalfX = trapbounds->maxHalflengthX();
507  halfY = trapbounds->halflengthY();
508  } else {
509  // protection
510  minHalfX = 0.;
511  maxHalfX = 10e10;
512  halfY = 10e10;
513  }
514  }
515 
516  layerThickness = ((*layIter)->thickness() > layerThickness ) ? (*layIter)->thickness() : layerThickness;
517 
518  // the navigation Layer
519  double navigationPos = 0.5*(currentPos+lastPos);
520  double navigationX = (bv == Trk::binX) ? navigationPos : 0.;
521  double navigationY = (bv == Trk::binY) ? navigationPos : 0.;
522  double navigationZ = (bv == Trk::binZ) ? navigationPos : 0.;
523  Amg::Translation3D(navigationX,navigationY,navigationZ);
524 
525  Trk::PlaneSurface* navLayerSurface = nullptr;
526  Amg::Transform3D navLayerTransform(Amg::Translation3D(navigationX,0.,0.));
527 
528  if (std::abs(minHalfX)<10e-5) {
529  navLayerSurface = new Trk::PlaneSurface(navLayerTransform,
530  maxHalfX,
531  halfY);
532  } else {
533  navLayerSurface = new Trk::PlaneSurface(navLayerTransform,
534  minHalfX,
535  maxHalfX,
536  halfY);
537  }
538 
539  ATH_MSG_VERBOSE( "bi-equidistant : creating plane-like NavigationLayer at position : " << navigationX );
540 
541  layerOrderVector.emplace_back(
543  Amg::Vector3D(navigationX, 0.,0.));
544  // restore
545  lastPos = currentPos;
546  // the material Layer
547 
548  ATH_MSG_VERBOSE( "bi-equidistant : registering plane-like MaterialLayer at position : " << currentPos );
549  layerOrderVector.emplace_back(
551  layerSurface.center());
552 
553  // increase the Step
554  currentPos += posStep;
555  }
556 
557  // the final navigation layer
558  double navigationPosFinal = 0.5*(currentPos+lastPos);
559  double navigationXFinal = (bv == Trk::binX) ? navigationPosFinal : 0.;
560  double navigationYFinal = (bv == Trk::binY) ? navigationPosFinal : 0.;
561  double navigationZFinal = (bv == Trk::binZ) ? navigationPosFinal : 0.;
562 
563  Amg::Transform3D navLayerTransform(Amg::Translation3D(navigationXFinal,navigationYFinal,navigationZFinal));
564 
565  Trk::PlaneSurface* navLayerSurface = (std::abs(minHalfX)<10e-5) ?
566  new Trk::PlaneSurface(navLayerTransform, maxHalfX,halfY) :
567  new Trk::PlaneSurface(navLayerTransform, minHalfX, maxHalfX, halfY);
568 
569  ATH_MSG_VERBOSE( "bi-equidistant : creating plane-like NavigationLayer at position : " << navLayerSurface->center() );
570 
571  layerOrderVector.emplace_back(
573  navLayerSurface->center() );
574 
575  // create the binUtility
576  binUtility = new Trk::BinUtility(layers, layerThickness, posmin, posmax, Trk::open, bv);
577 
578  // create the BinnedArray
579  planeLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
580 
581  } break;
582 
583  // arbitrary binning
584  case Trk::arbitrary :
585  {
586 
587  std::vector<float> boundaries;
588  boundaries.push_back(posmin);
589  // max plane dimension
590  double minHalfX = 0.;
591  double maxHalfX = 0.;
592  double halfY = 0.;
593 
594  // loop over the layers and register navigation layers in between
595  for ( ; layIter != planeLayers.end(); ++layIter) {
596 
597  // get the cylinder surface
598  const Trk::PlaneSurface& layerSurface = (*layIter)->surfaceRepresentation();
599  // get dimensions
600  const Trk::RectangleBounds* recbounds = dynamic_cast<const Trk::RectangleBounds*>(&(layerSurface.bounds()));
601  // try rectangular hypothesis
602  if (recbounds) {
603  maxHalfX = recbounds->halflengthX();
604  halfY = recbounds->halflengthY();
605  } else {
606  // try trapezoidal hypothesis
607  const Trk::TrapezoidBounds* trapbounds = dynamic_cast<const Trk::TrapezoidBounds*>(&(layerSurface.bounds()));
608  if (trapbounds) {
609  minHalfX = trapbounds->minHalflengthX();
610  maxHalfX = trapbounds->maxHalflengthX();
611  halfY = trapbounds->halflengthY();
612  } else {
613  // protection
614  minHalfX = 0.;
615  maxHalfX = 10e10;
616  halfY = 10e10;
617  }
618  }
619  // the x position
620  // and get dimensions
621  layerCenter = layerSurface.center();
622  double layerPosition = layerCenter[bv];
623  // get the thickness
624  double layerThickness = (*layIter)->thickness();
625  // register
626  boundaries.push_back(layerPosition-0.5*layerThickness);
627  double navLayerPositionX = (bv == Trk::binX) ? 0.5*(layerPosition+boundaries[boundaries.size()-1]) : layerCenter.x();
628  double navLayerPositionY = (bv == Trk::binY) ? 0.5*(layerPosition+boundaries[boundaries.size()-1]) : layerCenter.y();
629  double navLayerPositionZ = (bv == Trk::binZ) ? 0.5*(layerPosition+boundaries[boundaries.size()-1]) : layerCenter.z();
630  Amg::Translation3D navLayerPosition(navLayerPositionX,navLayerPositionY,navLayerPositionZ);
631  Amg::Transform3D navLayerTransform(navLayerPosition);
632  // create the navigation plane layer
633  Trk::PlaneSurface* navLayerSurface = (std::abs(minHalfX)<10e-5) ?
634  new Trk::PlaneSurface( navLayerTransform, maxHalfX, halfY ) :
635  new Trk::PlaneSurface( navLayerTransform, minHalfX, maxHalfX, halfY );
636  ATH_MSG_VERBOSE( "arbitrary : creating plane-like NavigationLayer at position : " << navLayerPositionX );
637  layerOrderVector.emplace_back(
639  Amg::Vector3D(navLayerPositionX, navLayerPositionY, navLayerPositionZ));
640  // register the material layer
641  boundaries.push_back(layerPosition+0.5*layerThickness);
642  // material layer
643  layerOrderVector.emplace_back(
645  layerSurface.center());
646 
647  }
648  // last NavigationLayer
649  double navLayerPositionXFinal = (bv == Trk::binX) ? 0.5*(posmax+boundaries[boundaries.size()-1]) : layerCenter.x();
650  double navLayerPositionYFinal = (bv == Trk::binY) ? 0.5*(posmax+boundaries[boundaries.size()-1]) : layerCenter.y();
651  double navLayerPositionZFinal = (bv == Trk::binZ) ? 0.5*(posmax+boundaries[boundaries.size()-1]) : layerCenter.z();
652  Amg::Translation3D navLayerPositionFinal(navLayerPositionXFinal,navLayerPositionYFinal,navLayerPositionZFinal);
653  Amg::Transform3D navLayerTransformFinal(navLayerPositionFinal);
654  // create the navigation plane layer
655  Trk::PlaneSurface* navLayerSurfaceFinal = (std::abs(minHalfX)<10e-5) ?
656  new Trk::PlaneSurface( navLayerTransformFinal, maxHalfX, halfY ) :
657  new Trk::PlaneSurface( navLayerTransformFinal, minHalfX, maxHalfX, halfY );
658  ATH_MSG_VERBOSE( "arbitrary : creating plane-like NavigationLayer at position : " << 0.5*(posmax+boundaries[boundaries.size()-1]) );
659  layerOrderVector.emplace_back(
660  Trk::SharedObject<Trk::Layer>(new Trk::NavigationLayer(navLayerSurfaceFinal)),
661  Amg::Vector3D(navLayerPositionXFinal, navLayerPositionYFinal, navLayerPositionZFinal));
662 
663  ATH_MSG_VERBOSE( layerOrderVector.size() << " plane Layers (material + navigation) built. " );
664 
665  // create the BinUtility
666  binUtility = new Trk::BinUtility(boundaries, Trk::open, bv);
667  // and the BinnedArray
668  planeLayerArray = new Trk::BinnedArray1D<Trk::Layer>(layerOrderVector, binUtility);
669 
670  } break;
671  // default return 0
672  default : { return nullptr; }
673  }
674 
675  return planeLayerArray;
676  //cppcheck-suppress memleak
677 }

◆ 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  }

◆ validationAction()

virtual void Trk::ILayerArrayCreator::validationAction ( ) const
inlinevirtualinherited

Validation Action: Can be implemented optionally, outside access to internal validation steps.

Definition at line 72 of file ILayerArrayCreator.h.

72 {}

Member Data Documentation

◆ 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_emptyLayerMode

int Trk::LayerArrayCreator::m_emptyLayerMode
private

0 - do nothing, 1 - replace with navigation layer, 2 - delete

Definition at line 80 of file LayerArrayCreator.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_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.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Trk::TrapezoidBounds::maxHalflengthX
double maxHalflengthX() const
This method returns the maximal halflength in X (first coordinate of local surface frame)
Trk::RectangleBounds
Definition: RectangleBounds.h:38
Trk::PlaneLayerSorterX
Definition: PlaneLayer.h:116
Trk::equidistant
@ equidistant
Definition: BinningType.h:32
Trk::binZ
@ binZ
Definition: BinningType.h:49
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
Trk::LayerArrayCreator::m_emptyLayerMode
int m_emptyLayerMode
0 - do nothing, 1 - replace with navigation layer, 2 - delete
Definition: LayerArrayCreator.h:80
Trk::LayerArrayCreator::planeLayerArray
LayerArray * planeLayerArray(const std::vector< PlaneLayer * > &layers, double min, double max, BinningType btype=arbitrary, Trk::BinningValue bv=Trk::binX) const
LayerArrayCreator interface method - for Planar-like layers.
Definition: LayerArrayCreator.cxx:420
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::TrapezoidBounds::halflengthY
double halflengthY() const
This method returns the halflength in Y (second coordinate of local surface frame)
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
Trk::NavigationLayer
Definition: NavigationLayer.h:39
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::biequidistant
@ biequidistant
Definition: BinningType.h:33
Trk::CylinderSurface::bounds
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
Trk::LayerArrayCreator::discLayerArray
LayerArray * discLayerArray(const std::vector< DiscLayer * > &layers, double zmin, double zmax, BinningType btype=arbitrary) const
LayerArrayCreator interface method - for Endcap-like layers.
Definition: LayerArrayCreator.cxx:222
Trk::DiscSurface
Definition: DiscSurface.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrapezoidBounds::minHalflengthX
double minHalflengthX() const
This method returns the minimal halflength in X (first coordinate of local surface frame)
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk::DiscBounds::rMax
double rMax() const
This method returns outer radius.
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
takeBigger
#define takeBigger(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:44
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Trk::Layer::surfaceArray
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
Trk::arbitrary
@ arbitrary
Definition: BinningType.h:34
Trk::binY
@ binY
Definition: BinningType.h:48
Trk::DiscBounds::rMin
double rMin() const
This method returns inner radius.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::Layer::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
Trk::RectangleBounds::halflengthX
double halflengthX() const
for consistant naming
beamspotman.n
n
Definition: beamspotman.py:731
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::DiscSurface::bounds
const SurfaceBounds & bounds() const override final
This method returns the bounds by reference.
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
Trk::DiscLayer
Definition: DiscLayer.h:45
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::binX
@ binX
Definition: BinningType.h:47
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::LayerArrayCreator::checkAndReplaceEmptyLayer
Trk::Layer * checkAndReplaceEmptyLayer(Trk::Layer *lay) const
Definition: LayerArrayCreator.cxx:679
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::PlaneLayerSorterZ
Definition: PlaneLayer.h:142
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::RectangleBounds::halflengthY
double halflengthY() const
for consitant naming
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::TrapezoidBounds
Definition: TrapezoidBounds.h:43
Trk::Surface::clone
virtual Surface * clone() const =0
Implicit constructor - uses the copy constructor.
Trk::open
@ open
Definition: BinningType.h:40
Trk::binR
@ binR
Definition: BinningType.h:50
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
h
Trk::CylinderLayerSorterR
Definition: CylinderLayer.h:175
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::PlaneSurface::bounds
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
Trk::Layer::layerMaterialProperties
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Trk::PlaneLayerSorterY
Definition: PlaneLayer.h:129
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::LayerArrayCreator::cylinderLayerArray
LayerArray * cylinderLayerArray(const std::vector< CylinderLayer * > &layers, double rmin, double rmax, BinningType btype=arbitrary) const
LayerArrayCreator interface method - for Barrel-like layers.
Definition: LayerArrayCreator.cxx:42
Trk::BinnedArray
Definition: BinnedArray.h:38
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
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::BinnedArray1D
Definition: BinnedArray1D.h:36
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::Layer
Definition: Layer.h:73
Trk::DiscLayerSorterZ
Definition: DiscLayer.h:152