Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
InDet::TRT_LayerBuilderImpl Class Reference

#include <TRT_LayerBuilderImpl.h>

Inheritance diagram for InDet::TRT_LayerBuilderImpl:
Collaboration diagram for InDet::TRT_LayerBuilderImpl:

Public Member Functions

virtual ~TRT_LayerBuilderImpl ()=default
 Destructor. 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
 

Protected Member Functions

 TRT_LayerBuilderImpl (const std::string &, const std::string &, const IInterface *)
 AlgTool style constructor. More...
 
std::unique_ptr< const std::vector< Trk::CylinderLayer * > > cylindricalLayersImpl (const InDetDD::TRT_DetElementContainer *trtContainer) const
 
std::unique_ptr< const std::vector< Trk::DiscLayer * > > discLayersImpl (const InDetDD::TRT_DetElementContainer *trtContainer) const
 
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...
 

Protected Attributes

double m_layerStrawRadius {2.0*Gaudi::Units::mm}
 straw radius More...
 
DoubleProperty m_layerThickness {this, "LayerThickness", 0.1*Gaudi::Units::mm}
 modelled layer thickness More...
 
BooleanProperty m_modelGeometry {this, "ModelLayersOnly", true}
 Build the geometry with model layers. More...
 
UnsignedIntegerProperty m_modelBarrelLayers {this, "ModelBarrelLayers", 7}
 model barrel layers with material More...
 
UnsignedIntegerProperty m_modelEndcapLayers {this, "ModelEndcapLayers", 14}
 model endcap layers with material More...
 
UnsignedIntegerProperty m_barrelLayerBinsZ {this, "BarrelLayerBinsZ", 25}
 Bins for the Barrel material - in z. More...
 
UnsignedIntegerProperty m_barrelLayerBinsPhi {this, "BarrelLayerBinsPhi", 1}
 Bins for the Barrel material - in phi. More...
 
UnsignedIntegerProperty m_endcapLayerBinsR {this, "EndcapLayerBinsR", 25}
 Bins for the Endcap material - in r. More...
 
UnsignedIntegerProperty m_endcapLayerBinsPhi {this, "EndcapLayerBinsPhi", 1}
 Bins for the Endcap material - in phi. More...
 
BooleanProperty m_endcapConly {this, "EndcapConly", false}
 Only build the endcapC. More...
 
BooleanProperty m_registerStraws {this, "RegisterStraws", false}
 register the straws More...
 
IntegerProperty m_barrelSectorAtPiBoundary {this, "BarrelSectorAtPi", 16}
 this is the barrel Sector where +pi/-pi is within More...
 
StringProperty m_identification {this, "Identification", "TRT"}
 string identification More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

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
 

Friends

class TRT_VolumeBuilder
 Declare the TRT_VolumeBuilder as friend. More...
 

Detailed Description

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

Definition at line 50 of file TRT_LayerBuilderImpl.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

◆ ~TRT_LayerBuilderImpl()

virtual InDet::TRT_LayerBuilderImpl::~TRT_LayerBuilderImpl ( )
virtualdefault

Destructor.

◆ TRT_LayerBuilderImpl()

InDet::TRT_LayerBuilderImpl::TRT_LayerBuilderImpl ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)
protected

AlgTool style constructor.

Definition at line 59 of file TRT_LayerBuilderImpl.cxx.

59  :
60  AthAlgTool(t,n,p)
61 {
62 }

Member Function Documentation

◆ cylindricalLayersImpl()

std::unique_ptr< const std::vector< Trk::CylinderLayer * > > InDet::TRT_LayerBuilderImpl::cylindricalLayersImpl ( const InDetDD::TRT_DetElementContainer trtContainer) const
protected

Definition at line 66 of file TRT_LayerBuilderImpl.cxx.

66  {
67  ATH_MSG_DEBUG( "Building cylindrical layers for the TRT " );
68  PtrVectorWrapper<Trk::CylinderLayer> barrelLayers;
69 
70  // get Numerology and Id HElper
71  const InDetDD::TRT_Numerology* trtNums = trtContainer->getTRTNumerology();
72 
73  // get the TRT ID Helper
74  const TRT_ID* trtIdHelper = nullptr;
75  if (detStore()->retrieve(trtIdHelper, "TRT_ID").isFailure()) {
76  ATH_MSG_ERROR("Could not get TRT ID helper");
77  return nullptr;
78  }
79 
80  int nBarrelRings = trtNums->getNBarrelRings();
81  int nBarrelPhiSectors = trtNums->getNBarrelPhi();
82  double layerPhiStep = 2*M_PI/nBarrelPhiSectors;
83 
84  int nTotalBarrelLayers = 0;
85 
86  // get the overall dimensions
87  double rMin = 10e10;
88  double rMax = 0.;
89 
90  double layerZmax = 0.;
91  double layerZmin = 10e10;
92 
93  // pre-loop for overall layer numbers & some ordering ---------------------------------------
94  for (int ring=0; ring < nBarrelRings; ring++) {
95  // the number of barrel layers
96  int nBarrelLayers = trtNums->getNBarrelLayers(ring);
97  nTotalBarrelLayers += nBarrelLayers;
98  // loop over layers
99  for (int layer=0; layer < nBarrelLayers; layer++){
100  for (int phisec=0; phisec <nBarrelPhiSectors; ++phisec)
101  {
102  for (int iposneg=0; iposneg<2; ++iposneg){
103  // get the element
104  const InDetDD::TRT_BarrelElement* trtbar = trtContainer->getBarrelDetElement(iposneg, ring, phisec, layer); // TODO share this line
105 
106  // get overall dimensions only one time
107  const Trk::PlaneSurface* elementSurface = dynamic_cast<const Trk::PlaneSurface*>(&(trtbar->surface()));
108  if (!elementSurface) {
109  ATH_MSG_WARNING( "elementSurface: dynamic_cast to Trk::PlaneSurface failed - skipping ... ring/layer/phisec/iposneg = " << ring << "/" << layer << "/" << phisec << "/" << iposneg );
110  continue;
111  }
112  const Trk::RectangleBounds* elementBounds = dynamic_cast<const Trk::RectangleBounds*>(&(trtbar->bounds()));
113  if (!elementBounds) {
114  ATH_MSG_WARNING( "elementBounds: dynamic_cast to Trk::RectangleBounds failed - skipping ... ring/layer/phisec/iposneg = " << ring << "/" << layer << "/" << phisec << "/" << iposneg );
115  continue;
116  }
117  double elementZcenter = (elementSurface->center()).z();
118  double elementZmin = std::abs(elementZcenter - elementBounds->halflengthY());
119  double elementZmax = std::abs(elementZcenter + elementBounds->halflengthY());
120  // take what you need
121  takeSmaller(layerZmin, elementZmin); takeBigger(layerZmax, elementZmax);
122  // get the radial dimensions
123  double currentR = trtbar->center().perp();
124  takeSmallerBigger(rMin,rMax,currentR);
125  }
126  }
127  }
128  }
129 
130  if (nTotalBarrelLayers==0) {
131  ATH_MSG_WARNING( "nTotalBarrelLayers = 0 ... aborting and returning 0 !" );
132  return nullptr;
133  }
134 
135  // calculate delta(R) steps and delta(R)
136  double rDiff = std::abs(rMax-rMin);
137  double rStep = rDiff/(m_modelBarrelLayers+1);
138  double layerHalflength = layerZmax;
139 
140  // prepare the material
141  if ( std::abs(rDiff) <= 0.1 ) {
142  return nullptr;
143  }
144 
145  // fix the positions where the layers are - these are used for the model geometry and the complex geometry ---------------
146  std::vector<double> layerRadii;
147  layerRadii.reserve(m_modelBarrelLayers);
148  for (unsigned int ilay = 1; ilay <= m_modelBarrelLayers; ++ilay)
149  layerRadii.push_back(rMin+ilay*rStep-0.5*m_layerThickness);
150  // these are the layer iterators
151  auto layerRadiusIter = layerRadii.begin();
152  auto layerRadiusIterEnd = layerRadii.end();
153 
154  // (A) model geometry section
156 
157  ATH_MSG_VERBOSE( " -> " << layerRadii.size() << " cylindrical barrel layers between " << rMin << " and " << rMax << " ( at step "<< rStep << " )");
158 
159  // create the layers
160  for ( ; layerRadiusIter != layerRadiusIterEnd; ++layerRadiusIter ) {
161  // ----- prepare the BinnedLayerMaterial -----------------------------------------------------
162  Trk::BinnedLayerMaterial* layerMaterial = nullptr;
163  // -- material with 1D binning
164  Trk::BinUtility layerBinUtility1DZ(m_barrelLayerBinsZ,-layerHalflength, layerHalflength, Trk::open, Trk::binZ);
165  if (m_barrelLayerBinsPhi==1){
166  // no binning in phi
167  layerMaterial =new Trk::BinnedLayerMaterial(layerBinUtility1DZ);
168  } else { // -- material with 2D binning : Rphi*Z optimized for cylinder layer
169  Trk::BinUtility layerBinUtility2DRPhiZ(m_barrelLayerBinsPhi,
170  -(*layerRadiusIter)*M_PI,
171  (*layerRadiusIter)*M_PI,
172  Trk::closed,
173  Trk::binRPhi);
174  layerBinUtility2DRPhiZ += layerBinUtility1DZ;
175  layerMaterial =new Trk::BinnedLayerMaterial(layerBinUtility2DRPhiZ);
176  }
177  // Barrel layers are centered around (0,0,0) by definition
178  barrelLayers->push_back(new Trk::CylinderLayer(new Trk::CylinderBounds(*layerRadiusIter,layerHalflength),
179  *layerMaterial,
181  ATH_MSG_VERBOSE( " --> Creating a layer at radius : " << *layerRadiusIter );
182  delete layerMaterial;
183  }
184  } else {
185 
186  // (B) complex geometry section
187  float nMaterialLayerStep = 1.*nTotalBarrelLayers/m_modelBarrelLayers;
188  // complex geo should build same # of mat. layers as model geo; counter to check this:
189  unsigned int cMaterialLayerCount = 0;
190  // inclusive layer counter over all rings, used to determine mat. layer position
191  unsigned int cLayer=0;
192 
193  // loop over rings
194  ATH_MSG_VERBOSE("TRT Barrel has " << nBarrelRings << " rings.");
195 
196  for (int ring=0; ring < nBarrelRings; ring++){
197 
198  int nBarrelLayers = trtNums->getNBarrelLayers(ring);
199  ATH_MSG_VERBOSE("-> Ring " << ring << " has " << nBarrelLayers << " barrel layers.");
200  // loop over layers
201  for (int layer=0; layer < nBarrelLayers; layer++){
202 
203  // ----------------------------------------------------------------------------------
204  ATH_MSG_VERBOSE("--> Layer " << layer << " is being built with " << nBarrelPhiSectors << " secors in phi.");
205 
206  // increase inclusive layer counter for next material layer
207  ++cLayer;
208 
209  // set layer dimensions radius
210  double layerRadius = 0.;
211  double layerRadiusMin = 10e10;
212  double layerRadiusMax = 0.;
213  double layerPhiMin = 10.;
214  double layerPhiMax = -10;
215 
216  // per phi sector we make a 2D binnin in phi-z
217  std::vector< std::pair<Trk::BinnedArray<Trk::Surface>*, Amg::Vector3D > > layerSectorArrays;
218  Amg::Vector3D layerSectorPosition(0.,0.,0.);
219 
220  // the sector approaching surfaces
221  std::vector< std::pair< std::shared_ptr<const Trk::ApproachSurfaces>, Amg::Vector3D > > layerApproachSurfaces;
222 
223  // layer sector arrays
224  for (int phisec=0; phisec < nBarrelPhiSectors; phisec++){
225  // ----------------------------------------------------------------------------------
226  ATH_MSG_VERBOSE("---> Sector " << phisec << " gahtering the details.");
227  // -------------- a phi sector (expands in +/- z) -----------------------------------
228 
229  // order the straws onto layers
230  std::vector< Trk::SurfaceOrderPosition > strawsPerPhiSecLayer;
231  // get the min an max phi, the min and max z
232  double phiMin = 10.;
233  double phiMax = -10.;
234  // sector stuff
235  int sectorStraws = 0;
236  // positive and negative sector
237  for (int posneg=0; posneg<2; ++posneg){
238  // sort the elements
239  const InDetDD::TRT_BarrelElement* currentElement = trtContainer->getBarrelDetElement(posneg, ring, phisec, layer); // TODO share this line
240  // get overall dimensions only one time
241  const Trk::PlaneSurface* elementSurface = dynamic_cast<const Trk::PlaneSurface*>(&(currentElement->surface()));
242  if (!elementSurface) {
243  ATH_MSG_WARNING( "elementSurface: dynamic_cast to Trk::PlaneSurface failed - skipping ... ring/layer/phisec/posneg = " << ring << "/" << layer << "/" << phisec << "/" << posneg );
244  continue;
245  }
246 
247  // create teh approach surfaces --------------------------------------------------------------------------------------------------
248  // getTransformFromRotTransl(Amg::RotationMatrix3D rot, Amg::Vector3D transl_vec )
250  const Amg::Transform3D& elementTransform = elementSurface->transform();
251  const Amg::Vector3D& elementCenter = elementSurface->center();
252  const Amg::Vector3D& elementNormal = elementSurface->normal();
253  Amg::RotationMatrix3D elementRotation = elementTransform.rotation();
254  // outer / inner
255  Amg::Vector3D outerCenter(elementCenter+(0.5*m_layerThickness+m_layerStrawRadius)*elementNormal);
256  Amg::Vector3D innerCenter(elementCenter-(0.5*m_layerThickness+m_layerStrawRadius)*elementNormal);
257 
258  // assign the layer sector position for the straw array ordering
259  layerSectorPosition = elementSurface->center();
260 
261  // now register the two surfaces
262  aSurfaces->push_back(new Trk::PlaneSurface(Amg::Transform3D(Amg::getTransformFromRotTransl(elementRotation, innerCenter))));
263  aSurfaces->push_back(new Trk::PlaneSurface(Amg::Transform3D(Amg::getTransformFromRotTransl(elementRotation, outerCenter))));
264 
265  // now register it to for building the array
266  layerApproachSurfaces.emplace_back( std::shared_ptr<const Trk::ApproachSurfaces>(aSurfaces),elementCenter);
267  // screen output
268  ATH_MSG_VERBOSE("---> Sector " << phisec << " - posneg - " << posneg << " - with central phi = " << elementSurface->center().phi() );
269  // sector phi centers
270  takeSmallerBigger(layerPhiMin,layerPhiMax,elementSurface->center().phi());
271 
272  // loop over straws, fill them and find the phi boundaries
273  for (unsigned int istraw=0; istraw<currentElement->nStraws(); ++istraw)
274  {
275  Identifier strawId = trtIdHelper->straw_id(currentElement->identify(), istraw);
276  const Trk::Surface* currentStraw = &(currentElement->surface(strawId));
277  // get the phi values
278  double currentPhi = currentStraw->center().phi();
279  if (phisec == m_barrelSectorAtPiBoundary && currentPhi < 0.){
280  currentPhi = M_PI + currentPhi;
281  currentPhi += M_PI;
282  }
283  // the layer radius
284  takeSmallerBigger(layerRadiusMin,layerRadiusMax,currentStraw->center().perp());
285  takeSmallerBigger(phiMin, phiMax, currentPhi);
286  // make the ordering position
287  Amg::Vector3D strawOrderPos(currentStraw->center());
288  /*
289  * The above line was using the nodel (not delete option for the old shared object
290  * now that SharedObject is a shared_ptr typedef do the same with empty deleter
291  */
292  // Something like
293  // std::shared_ptr<Trk::Surface> =
294  // std::make_shared<Trk::Surface>(.....)) could be fine
295  //
296  // As things are now
297  // 1) Notice that basically we couple the DetElement owned
298  // surface to the Tracking Geometry passing a no-op deleter
299  // (no delete happens) to the shared_ptr(SharedObject is
300  // typedef of shared_ptr)
301  // 2) The const_cast here make the
302  // code non MT safe. For now we handle this by being careful
303  // on lifetimes and non-re-entrant TG construction.
304  std::shared_ptr<Trk::Surface> sharedSurface(const_cast<Trk::Surface*>(currentStraw),
305  Trk::do_not_delete<Trk::Surface>);
306  strawsPerPhiSecLayer.emplace_back(sharedSurface, strawOrderPos);
307  // and record
308  ++sectorStraws;
309  } // loop over straws done
310  } // loop over posneg done
311  // show the phiMin/phiMax to the screen
312  // prepare the
313  // fix to CID 24918
314  if (!sectorStraws) {
315  return nullptr;
316  }
317  double deltaPhi = (phiMax-phiMin);
318  double phiStep = deltaPhi/(0.5*sectorStraws-1);
319  ATH_MSG_VERBOSE("---> Sector " << phisec << " - with " << 0.5*sectorStraws << " straws - straw phiMin/phiMax (step) = " << phiMin << " / " << phiMax << " (" << phiStep << ")");
320  // phi min / phi max
321  phiMin -= 0.5*phiStep;
322  phiMax += 0.5*phiStep;
323  // correct for the +pi/-pi module
324  // now create the BinUtility
325  auto layerStrawPhiZUtility = Trk::BinUtility(sectorStraws/2,phiMin,phiMax,Trk::open, Trk::binPhi);
326  layerStrawPhiZUtility += Trk::BinUtility(2,-layerZmax, layerZmax, Trk::open, Trk::binZ);
327  // create the 2D BinnedArray
328  Trk::BinnedArray2D<Trk::Surface>* layerStrawPhiSector = new Trk::BinnedArray2D<Trk::Surface>(strawsPerPhiSecLayer,layerStrawPhiZUtility);
329  ATH_MSG_VERBOSE("---> Sector " << phisec << " - BinnedArray for straws prepared for " << strawsPerPhiSecLayer.size() << " straws.");
330  // fill the array
331  layerSectorArrays.emplace_back(layerStrawPhiSector, layerSectorPosition);
332  // ---------------- enf of phi sector ----------------------------------------------------
333  } // loop over PhiSectors done
334 
335  // build the mean of the layer Radius
336  layerRadius = 0.5*(layerRadiusMin+layerRadiusMax)+0.5*m_layerStrawRadius;
337 
338  bool assignMaterial = false;
339  if (cLayer==(unsigned)int((cMaterialLayerCount+1)*nMaterialLayerStep)) {
340  assignMaterial = true;
341  ++cMaterialLayerCount;
342  ATH_MSG_VERBOSE( "--> Creating a material+straw layer at radius : " << layerRadius );
343  } else
344  ATH_MSG_VERBOSE( "--> Creating a straw layer at radius : " << layerRadius );
345 
346  // now order the plane layers to sit on cylindrical layers
347  Trk::CylinderBounds* barrelLayerBounds = new Trk::CylinderBounds(layerRadius, layerHalflength);
348 
349  // ---- correct phi -------------------------------------------------------------------
350  ATH_MSG_VERBOSE(" prepare approach description with " << nBarrelPhiSectors << " barrel sectors.");
351  ATH_MSG_VERBOSE(" min phi / max phi detected : " << layerPhiMin << " / " << layerPhiMax );
352  double layerPhiMinCorrected = layerPhiMin-0.5*layerPhiStep;
353  double layerPhiMaxCorrected = layerPhiMax+0.5*layerPhiStep;
354  // catch if the minPhi falls below M_PI
355  if (layerPhiMinCorrected < -M_PI){
356  layerPhiMinCorrected += layerPhiStep;
357  layerPhiMaxCorrected += layerPhiStep;
358  }
359  ATH_MSG_VERBOSE(" min phi / max phi corrected : " << layerPhiMinCorrected << " / " << layerPhiMaxCorrected );
360 
361  // the sector surfaces
362  auto layerSectorBinUtility = Trk::BinUtility(nBarrelPhiSectors,layerPhiMinCorrected,layerPhiMaxCorrected,Trk::closed,Trk::binPhi);
363  auto strawArray = std::make_unique<Trk::BinnedArrayArray<Trk::Surface>>(layerSectorArrays, layerSectorBinUtility );
364 
365  ATH_MSG_VERBOSE("--> Layer " << layer << " has been built with " << strawArray->arrayObjects().size() << " straws.");
366 
367  // ApproachDescriptor
368  // build a BinUtility for the ApproachDescritptor
369  auto aDescriptorBinUtility = Trk::BinUtility(nBarrelPhiSectors,layerPhiMinCorrected,layerPhiMaxCorrected,Trk::closed,Trk::binPhi);
370  aDescriptorBinUtility += Trk::BinUtility(2,-layerHalflength,layerHalflength,Trk::open, Trk::binZ);
371 
372  auto aDescriptorBinnedArray = std::make_unique<Trk::BinnedArray2D<const Trk::ApproachSurfaces>> (layerApproachSurfaces, aDescriptorBinUtility);
373 
374  // build an approach surface
375  auto approachSurface = std::make_unique<Trk::CylinderSurface> (barrelLayerBounds->clone());
376  Trk::ApproachDescriptor* aDescritpor =
377  new Trk::ApproachDescriptor(std::move(aDescriptorBinnedArray),
378  std::move( approachSurface));
379 
380  // do not give every layer material properties
381  if (assignMaterial) {
382  // ----- prepare the BinnedLayerMaterial -----------------------------------------------------
383  Trk::BinnedLayerMaterial* layerMaterial = nullptr;
384  // -- material with 1D binning
385  Trk::BinUtility layerBinUtilityZ(m_barrelLayerBinsZ, -layerHalflength, layerHalflength, Trk::open, Trk::binZ );
386  if (m_barrelLayerBinsPhi==1){
387  layerMaterial =new Trk::BinnedLayerMaterial(layerBinUtilityZ);
388  } else { // -- material with 2D binning: RPhiZ binning
389  Trk::BinUtility layerBinUtilityRPhiZ(m_barrelLayerBinsPhi,
390  -layerRadius*M_PI, layerRadius*M_PI,
391  Trk::closed,
392  Trk::binRPhi);
393  layerBinUtilityRPhiZ += layerBinUtilityZ;
394  layerMaterial =new Trk::BinnedLayerMaterial(layerBinUtilityRPhiZ);
395  }
396 
397  barrelLayers->push_back(new Trk::CylinderLayer(barrelLayerBounds,
398  std::move(strawArray),
399  *layerMaterial,
401  std::make_unique<InDet::TRT_OverlapDescriptor>(trtIdHelper),
402  aDescritpor));
403  delete layerMaterial;
404 
405  } else
406  barrelLayers->push_back(new Trk::CylinderLayer(barrelLayerBounds,
407  std::move(strawArray),
409  std::make_unique<InDet::TRT_OverlapDescriptor>(trtIdHelper),
410  aDescritpor));
411  } // loop over layers
412  } // loop over rings
413 
414  ATH_MSG_VERBOSE(" Built number of TRT barrel material layers: " << cMaterialLayerCount);
415  // In Complex geo # of material layers should match the expected # of layers,
416  // else a mis-match in layer and material map index occurs.
417  // This mis-match will results layers getting incorrect material properties.
418  if (cMaterialLayerCount!=m_modelBarrelLayers) {
419  ATH_MSG_WARNING(" Complex geo built incorrect # of TRT barrel material layers: "
420  << cMaterialLayerCount << " / " << m_modelBarrelLayers);
421  }
422  }// complex geometry
423 
424  // return what you have
425  return std::unique_ptr<const std::vector<Trk::CylinderLayer*> > (barrelLayers.release());
426 }

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

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

◆ discLayersImpl()

std::unique_ptr< const std::vector< Trk::DiscLayer * > > InDet::TRT_LayerBuilderImpl::discLayersImpl ( const InDetDD::TRT_DetElementContainer trtContainer) const
protected

Definition at line 430 of file TRT_LayerBuilderImpl.cxx.

431 {
432  ATH_MSG_DEBUG( "Building disc-like layers for the TRT " );
433 
434  const InDetDD::TRT_Numerology* trtNums = trtContainer->getTRTNumerology();
435  // get the TRT ID Helper
436  const TRT_ID* trtIdHelper = nullptr;
437  if (detStore()->retrieve(trtIdHelper, "TRT_ID").isFailure()) {
438  ATH_MSG_ERROR("Could not get TRT ID helper");
439  return nullptr;
440  }
441  unsigned int nEndcapWheels = trtNums->getNEndcapWheels();
442  unsigned int nEndcapPhiSectors = trtNums->getNEndcapPhi();
443 
444  // total layer numbers
445  int numTotalLayers = 0;
446 
447  // zMin / zMax
448  double zMin = 10e10;
449  double zMax = 0.;
450 
451  const Trk::DiscBounds* sectorDiscBounds = nullptr;
452 
453  // preloop for overall numbers
454  for (unsigned int iwheel=0; iwheel<nEndcapWheels; ++iwheel)
455  {
456  unsigned int nEndcapLayers = trtNums->getNEndcapLayers(iwheel);
457  numTotalLayers += nEndcapLayers;
458  for (unsigned int ilayer = 0; ilayer<nEndcapLayers; ++ilayer){
459  const InDetDD::TRT_EndcapElement* sectorDiscElement = trtContainer->getEndcapDetElement(0, iwheel, ilayer, 0); // TODO share this line
460 
461  // get a reference element for dimensions
462  if (!sectorDiscBounds){
463  sectorDiscBounds = dynamic_cast<const Trk::DiscBounds*>(&(sectorDiscElement->bounds()));
464  }
465 
466  double currentZ = std::abs(sectorDiscElement->center().z());
467  takeSmallerBigger(zMin,zMax,currentZ);
468  }
469  }
470  if (numTotalLayers==0) {
471  ATH_MSG_WARNING( "numTotalLayers = 0 ... aborting and returning 0 !" );
472  return nullptr;
473  }
474 
475  if (!sectorDiscBounds) {
476  ATH_MSG_WARNING( "fullDiscBounds do not exist ... aborting and returning 0 !" );
477  return nullptr;
478  }
479  auto fullDiscBounds = std::make_unique<Trk::DiscBounds>(sectorDiscBounds->rMin(), sectorDiscBounds->rMax());
480 
481  PtrVectorWrapper<Trk::DiscLayer> endcapLayers;
482 
483  // the BinUtility for the material
484  std::unique_ptr<Trk::BinnedLayerMaterial> layerMaterial;
485  // -- material with 1D binning
486  Trk::BinUtility layerBinUtilityR(m_endcapLayerBinsR,
487  fullDiscBounds->rMin(),
488  fullDiscBounds->rMax(),
489  Trk::open,
490  Trk::binR);
491  if (m_barrelLayerBinsPhi==1)
492  layerMaterial = std::make_unique<Trk::BinnedLayerMaterial>(layerBinUtilityR);
493  else { // -- material with 2D binning
494  Trk::BinUtility layerBinUtilityPhi(m_barrelLayerBinsPhi,
495  -M_PI, M_PI,
496  Trk::closed,
497  Trk::binPhi);
498  // make it rPhi now
499  layerBinUtilityR += layerBinUtilityPhi;
500  layerMaterial = std::make_unique<Trk::BinnedLayerMaterial>(layerBinUtilityR);
501  }
502 
503  // global geometry statistics
504  double zDiff = std::abs(zMax-zMin);
505  double zStep = zDiff/(m_modelEndcapLayers+1);
506 
507  // loop for surface ordering
508  int maxendcaps=2;
509  if (m_endcapConly) maxendcaps=1;
510 
511  for (int iposneg=0; iposneg<maxendcaps; ++iposneg){
512 
513  // fill the positions of the disc layers
514  std::vector<double> zPositions;
515  zPositions.reserve(m_modelEndcapLayers);
516 
517  double stepdir = iposneg ? 1. : -1.;
518  double zStart = stepdir*zMin;
519 
520  ATH_MSG_VERBOSE( " -> Creating " << m_modelEndcapLayers << " disc-layers on each side between "
521  << zMin << " and " << zMax << " ( at step "<< zStep << " )");
522 
523  // take a different modelling for the layers - use these layers for the model geometry and the real geometry
524  for (unsigned int izpos = 1; izpos <= m_modelEndcapLayers; ++izpos){
525  zPositions.push_back(zStart + stepdir * double(izpos) * zStep - 0.5 * m_layerThickness);
526  }
527 
528  std::vector<double>::const_iterator zPosIter = zPositions.begin();
529  std::vector<double>::const_iterator zPosIterEnd = zPositions.end();
530 
531  // (a) simplified geometry
532  if (m_modelGeometry){
533  // build the layers actually
534  for ( ; zPosIter != zPosIterEnd; ++zPosIter){
535  ATH_MSG_VERBOSE( " --> Creating a layer at z pos : " << (*zPosIter) );
536  Amg::Transform3D zPosTrans =
537  Amg::Transform3D(Amg::Translation3D(0., 0., (*zPosIter)));
538  endcapLayers->push_back(new Trk::DiscLayer(zPosTrans,
539  fullDiscBounds->clone(),
540  *layerMaterial,
542  }
543 
544  } else {
545  // (b) complex geometry
546  float nMaterialLayerStep = 1.*numTotalLayers/m_modelEndcapLayers;
547  // inclusive layer counter over all wheels
548  unsigned int cLayer = 0;
549  // complex geo should build same # of mat. layers as model geo; counter to check this:
550  unsigned int cMaterialLayerCount = 0;
551 
552  // complex geometry - needs a little bit of joggling
553  for (unsigned int iwheel=0; iwheel<nEndcapWheels; ++iwheel)
554  {
555  // do the loop per side
556  unsigned int nEndcapLayers = trtNums->getNEndcapLayers(iwheel);
557  for (unsigned int ilayer = 0; ilayer < nEndcapLayers; ++ilayer){
558 
559  // increase inclusive layer counter for next material layer
560  ++cLayer;
561 
562  // count the straws;
563  int numberOfStraws = 0;
564 
565  // check if dynamic cast worked
566  if (fullDiscBounds){
567  // get a reference element for dimensions
568  const InDetDD::TRT_EndcapElement* sectorDiscElement = trtContainer->getEndcapDetElement(iposneg, iwheel, ilayer, 0); // TODO share this line
569 
570  // take the position, but not the rotation (the rotation has to be standard)
571  Amg::Vector3D fullDiscPosition(sectorDiscElement->surface().transform().translation());
572  double discZ = fullDiscPosition.z();
573 
574  // check if we need to build a straw layer or not
575  bool assignMaterial = false;
576  if (cLayer == (unsigned)int((cMaterialLayerCount+1)*nMaterialLayerStep)) {
577  assignMaterial = true;
578  ++cMaterialLayerCount;
579  ATH_MSG_VERBOSE( "--> Creating a material+straw layer at z-pos : " << discZ );
580  } else {
581  ATH_MSG_VERBOSE( "--> Creating a straw layer at z-pos : " << discZ );
582  }
583 
584  // order the straws onto layers
585  std::vector< Trk::SurfaceOrderPosition > strawPerEndcapLayer;
586 
587  // the layer thickness - for approaching surfaces
588  double zMin = 10e10;
589  double zMax = -10e10;
590 
591  for (unsigned int iphisec=0; iphisec<nEndcapPhiSectors; ++iphisec){
592  ATH_MSG_VERBOSE("Building sector " << iphisec << " of endcap wheel " << iwheel );
593  const InDetDD::TRT_EndcapElement* currentElement = trtContainer->getEndcapDetElement(iposneg, iwheel, ilayer, iphisec); // TODO share this line
594  unsigned int nstraws = currentElement->nStraws();
595  for (unsigned int istraw=0; istraw<nstraws; istraw++){
596  Identifier strawId = trtIdHelper->straw_id(currentElement->identify(), istraw);
597  const Trk::Surface* currentStraw = &(currentElement->surface(strawId));
598  Amg::Vector3D strawOrderPos(currentStraw->center());
599  // get the z position
600  double zPos = currentStraw->center().z();
601  takeSmaller(zMin,zPos);
602  takeBigger(zMax,zPos);
603  // Something like
604  // std::shared_ptr<Trk::Surface> =
605  // std::make_shared<Trk::Surface>(currentElement)) could be fine
606  //
607  // As things are now
608  // 1) Notice that basically we couple the DetElement owned
609  // surface to the Tracking Geometry passing a no-op deleter
610  // (no delete happens) to the shared_ptr(SharedObject is
611  // typedef of shared_ptr)
612  // 2) The const_cast here make the
613  // code non MT safe. For now we handle this by being careful
614  // on lifetimes and non-re-entrant TG construction.
615  std::shared_ptr<Trk::Surface> sharedSurface(const_cast<Trk::Surface*>(currentStraw),
616  [](Trk::Surface*) {});
617  strawPerEndcapLayer.emplace_back(sharedSurface, strawOrderPos);
618  ++numberOfStraws;
619  }
620  }
621  // fix to CID 11326
622  if (!numberOfStraws){
623  return nullptr;
624  }
625  auto currentBinUtility = Trk::BinUtility(numberOfStraws, -M_PI, M_PI, Trk::closed, Trk::binPhi);
626  auto strawArray = std::make_unique<Trk::BinnedArray1D<Trk::Surface>>(strawPerEndcapLayer, currentBinUtility);
627  Trk::DiscLayer* currentLayer = nullptr;
628 
629  // redefine the discZ
630  discZ = 0.5*(zMin+zMax);
631  Amg::Transform3D fullDiscTransform = Amg::Transform3D(Amg::Translation3D(0.,0.,discZ));
632 
633  ATH_MSG_VERBOSE("TRT Disc being build at z Position " << discZ << " ( from " << zMin << " / " << zMax << " )");
634 
635  // create the approach offset
636  auto aSurfaces = std::make_unique<Trk::ApproachSurfaces>();
637  // get the position of the approach surfaces
638  const Amg::Vector3D aspPosition(0.,0.,zMin-m_layerStrawRadius);
639  const Amg::Vector3D asnPosition(0.,0.,zMax+m_layerStrawRadius);
640 
641  // create new surfaces
642  Amg::Transform3D asnTransform = Amg::Transform3D(Amg::Translation3D(asnPosition));
643  Amg::Transform3D aspTransform = Amg::Transform3D(Amg::Translation3D(aspPosition));
644  // order in an optimised way for collision direction
645  if (discZ > 0.){
646  aSurfaces->push_back( new Trk::DiscSurface(asnTransform, fullDiscBounds->clone()) );
647  aSurfaces->push_back( new Trk::DiscSurface(aspTransform, fullDiscBounds->clone()) );
648  } else {
649  aSurfaces->push_back( new Trk::DiscSurface(aspTransform, fullDiscBounds->clone()) );
650  aSurfaces->push_back( new Trk::DiscSurface(asnTransform, fullDiscBounds->clone()) );
651  }
652  // approach descriptor
653  Trk::ApproachDescriptor* aDescriptor = new Trk::ApproachDescriptor(std::move(aSurfaces),false);
654 
655  // do not give every layer material properties
656  if (assignMaterial)
657  currentLayer = new Trk::DiscLayer(fullDiscTransform,
658  fullDiscBounds->clone(),
659  std::move(strawArray),
660  *layerMaterial,
662  std::make_unique<InDet::TRT_OverlapDescriptor>(trtIdHelper),
663  aDescriptor);
664  else if (!m_modelGeometry)
665  currentLayer = new Trk::DiscLayer(fullDiscTransform,
666  fullDiscBounds->clone(),
667  std::move(strawArray),
669  std::make_unique<InDet::TRT_OverlapDescriptor>(trtIdHelper),
670  aDescriptor);
671 
672  if (currentLayer) endcapLayers->push_back(currentLayer);
673  } // end of sectorDiscBounds if
674  } // end of layer loop
675  } // end of wheel loop
676 
677  ATH_MSG_VERBOSE(" Built # of TRT material layers: " << cMaterialLayerCount << "in ispos: " << iposneg << "ring");
678  // # of material layers should match the expected # of layers,
679  // else a mis-match in layer and material map index occurs.
680  // This mis-match will results layers getting incorrect material properties.
681  if (cMaterialLayerCount != m_modelEndcapLayers) {
682  ATH_MSG_WARNING(" Built incorrect # of TRT material layers: "
683  << cMaterialLayerCount << " / " << m_modelEndcapLayers << "in ispos" << iposneg << "ring" );
684  }
685 
686  } // model/real geometry
687  } // end of posneg loop
688 
689  return std::unique_ptr<const std::vector<Trk::DiscLayer*> > (endcapLayers.release());
690 }

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

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

Friends And Related Function Documentation

◆ TRT_VolumeBuilder

friend class TRT_VolumeBuilder
friend

Declare the TRT_VolumeBuilder as friend.

Definition at line 54 of file TRT_LayerBuilderImpl.h.

Member Data Documentation

◆ m_barrelLayerBinsPhi

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_barrelLayerBinsPhi {this, "BarrelLayerBinsPhi", 1}
protected

Bins for the Barrel material - in phi.

Definition at line 78 of file TRT_LayerBuilderImpl.h.

◆ m_barrelLayerBinsZ

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_barrelLayerBinsZ {this, "BarrelLayerBinsZ", 25}
protected

Bins for the Barrel material - in z.

Definition at line 77 of file TRT_LayerBuilderImpl.h.

◆ m_barrelSectorAtPiBoundary

IntegerProperty InDet::TRT_LayerBuilderImpl::m_barrelSectorAtPiBoundary {this, "BarrelSectorAtPi", 16}
protected

this is the barrel Sector where +pi/-pi is within

Definition at line 84 of file TRT_LayerBuilderImpl.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_endcapConly

BooleanProperty InDet::TRT_LayerBuilderImpl::m_endcapConly {this, "EndcapConly", false}
protected

Only build the endcapC.

Definition at line 81 of file TRT_LayerBuilderImpl.h.

◆ m_endcapLayerBinsPhi

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_endcapLayerBinsPhi {this, "EndcapLayerBinsPhi", 1}
protected

Bins for the Endcap material - in phi.

Definition at line 80 of file TRT_LayerBuilderImpl.h.

◆ m_endcapLayerBinsR

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_endcapLayerBinsR {this, "EndcapLayerBinsR", 25}
protected

Bins for the Endcap material - in r.

Definition at line 79 of file TRT_LayerBuilderImpl.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_identification

StringProperty InDet::TRT_LayerBuilderImpl::m_identification {this, "Identification", "TRT"}
protected

string identification

Definition at line 86 of file TRT_LayerBuilderImpl.h.

◆ m_layerStrawRadius

double InDet::TRT_LayerBuilderImpl::m_layerStrawRadius {2.0*Gaudi::Units::mm}
protected

straw radius

Definition at line 71 of file TRT_LayerBuilderImpl.h.

◆ m_layerThickness

DoubleProperty InDet::TRT_LayerBuilderImpl::m_layerThickness {this, "LayerThickness", 0.1*Gaudi::Units::mm}
protected

modelled layer thickness

Definition at line 72 of file TRT_LayerBuilderImpl.h.

◆ m_modelBarrelLayers

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_modelBarrelLayers {this, "ModelBarrelLayers", 7}
protected

model barrel layers with material

Definition at line 74 of file TRT_LayerBuilderImpl.h.

◆ m_modelEndcapLayers

UnsignedIntegerProperty InDet::TRT_LayerBuilderImpl::m_modelEndcapLayers {this, "ModelEndcapLayers", 14}
protected

model endcap layers with material

Definition at line 75 of file TRT_LayerBuilderImpl.h.

◆ m_modelGeometry

BooleanProperty InDet::TRT_LayerBuilderImpl::m_modelGeometry {this, "ModelLayersOnly", true}
protected

Build the geometry with model layers.

Definition at line 73 of file TRT_LayerBuilderImpl.h.

◆ m_registerStraws

BooleanProperty InDet::TRT_LayerBuilderImpl::m_registerStraws {this, "RegisterStraws", false}
protected

register the straws

Definition at line 83 of file TRT_LayerBuilderImpl.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
Trk::RectangleBounds
Definition: RectangleBounds.h:38
InDet::TRT_LayerBuilderImpl::m_layerStrawRadius
double m_layerStrawRadius
straw radius
Definition: TRT_LayerBuilderImpl.h:71
InDet::TRT_LayerBuilderImpl::m_endcapLayerBinsR
UnsignedIntegerProperty m_endcapLayerBinsR
Bins for the Endcap material - in r.
Definition: TRT_LayerBuilderImpl.h:79
InDetDD::TRT_BarrelElement
Definition: TRT_BarrelElement.h:43
InDet::TRT_LayerBuilderImpl::m_barrelSectorAtPiBoundary
IntegerProperty m_barrelSectorAtPiBoundary
this is the barrel Sector where +pi/-pi is within
Definition: TRT_LayerBuilderImpl.h:84
InDet::TRT_LayerBuilderImpl::m_barrelLayerBinsPhi
UnsignedIntegerProperty m_barrelLayerBinsPhi
Bins for the Barrel material - in phi.
Definition: TRT_LayerBuilderImpl.h:78
Trk::binZ
@ binZ
Definition: BinningType.h:49
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
takeSmallerBigger
#define takeSmallerBigger(cSmallest, cBiggest, test)
Definition: RobustTrackingGeometryBuilderImpl.h:45
InDetDD::TRT_BaseElement::nStraws
unsigned int nStraws() const
Number of straws in the element.
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDetDD::TRT_EndcapElement
Definition: TRT_EndcapElement.h:43
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::closed
@ closed
Definition: BinningType.h:41
InDet::TRT_LayerBuilderImpl::m_layerThickness
DoubleProperty m_layerThickness
modelled layer thickness
Definition: TRT_LayerBuilderImpl.h:72
Trk::DiscSurface
Definition: DiscSurface.h:54
Trk::ApproachDescriptor
Definition: ApproachDescriptor.h:25
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::TRT_LayerBuilderImpl::m_modelBarrelLayers
UnsignedIntegerProperty m_modelBarrelLayers
model barrel layers with material
Definition: TRT_LayerBuilderImpl.h:74
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::ApproachSurfaces
Definition: IApproachDescriptor.h:25
Trk::DiscBounds::rMax
double rMax() const
This method returns outer radius.
InDet::TRT_LayerBuilderImpl::m_modelEndcapLayers
UnsignedIntegerProperty m_modelEndcapLayers
model endcap layers with material
Definition: TRT_LayerBuilderImpl.h:75
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
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
Amg::getTransformFromRotTransl
Amg::Transform3D getTransformFromRotTransl(Amg::RotationMatrix3D rot, Amg::Vector3D transl_vec)
Definition: GeoPrimitivesHelpers.h:172
InDet::TRT_LayerBuilderImpl::m_modelGeometry
BooleanProperty m_modelGeometry
Build the geometry with model layers.
Definition: TRT_LayerBuilderImpl.h:73
InDetDD::TRT_Numerology::getNEndcapWheels
unsigned int getNEndcapWheels() const
Trk::DiscBounds::rMin
double rMin() const
This method returns inner radius.
InDetDD::TRT_Numerology
Definition: TRT_Numerology.h:22
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
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::CylinderBounds
Definition: CylinderBounds.h:46
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::Surface::normal
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
InDetDD::TRT_Numerology::getNBarrelPhi
unsigned int getNBarrelPhi() const
InDetDD::TRT_BaseElement::identify
virtual Identifier identify() const override final
identifier of this detector element:
InDetDD::TRT_Numerology::getNBarrelLayers
unsigned int getNBarrelLayers(unsigned int iMod) const
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::BinnedLayerMaterial
Definition: BinnedLayerMaterial.h:33
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
InDet::TRT_LayerBuilderImpl::m_endcapConly
BooleanProperty m_endcapConly
Only build the endcapC.
Definition: TRT_LayerBuilderImpl.h:81
Trk::BinnedArray2D
Definition: BinnedArray2D.h:37
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::CylinderLayer
Definition: CylinderLayer.h:43
InDetDD::TRT_DetElementContainer::getBarrelDetElement
const TRT_BarrelElement * getBarrelDetElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Definition: TRT_DetElementContainer.cxx:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::RectangleBounds::halflengthY
double halflengthY() const
for consitant naming
InDet::TRT_LayerBuilderImpl::m_registerStraws
BooleanProperty m_registerStraws
register the straws
Definition: TRT_LayerBuilderImpl.h:83
takeSmaller
#define takeSmaller(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:43
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::TRT_BaseElement::bounds
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
Trk::open
@ open
Definition: BinningType.h:40
Trk::binR
@ binR
Definition: BinningType.h:50
TRT_ID
Definition: TRT_ID.h:84
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::binRPhi
@ binRPhi
Definition: BinningType.h:52
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDetDD::TRT_BaseElement::center
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
InDetDD::TRT_DetElementContainer::getTRTNumerology
const TRT_Numerology * getTRTNumerology() const
Definition: TRT_DetElementContainer.cxx:34
Trk::CylinderBounds::clone
virtual CylinderBounds * clone() const override
Virtual constructor.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
InDetDD::TRT_Numerology::getNEndcapPhi
unsigned int getNEndcapPhi() const
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
InDetDD::TRT_Numerology::getNEndcapLayers
unsigned int getNEndcapLayers(unsigned int iWheel) const
InDetDD::TRT_Numerology::getNBarrelRings
unsigned int getNBarrelRings() const
InDet::TRT_LayerBuilderImpl::m_barrelLayerBinsZ
UnsignedIntegerProperty m_barrelLayerBinsZ
Bins for the Barrel material - in z.
Definition: TRT_LayerBuilderImpl.h:77
InDetDD::TRT_DetElementContainer::getEndcapDetElement
const TRT_EndcapElement * getEndcapDetElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Definition: TRT_DetElementContainer.cxx:62
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
InDetDD::TRT_BaseElement::surface
virtual const Trk::Surface & surface() const override final
Element Surface: access to the Surface (straw layer)
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
Trk::DiscBounds
Definition: DiscBounds.h:44
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:581
Trk::binPhi
@ binPhi
Definition: BinningType.h:51
Identifier
Definition: IdentifierFieldParser.cxx:14