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

#include <ActsFatrasWriteHandler.h>

Inheritance diagram for ActsFatrasWriteHandler:
Collaboration diagram for ActsFatrasWriteHandler:

Public Member Functions

 ActsFatrasWriteHandler (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
 ~ActsFatrasWriteHandler ()
 Destructor. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode WriteHits (std::vector< SiHitCollection > &HitCollections, const EventContext &ctx) const
 
void createHits (const ISF::ISFParticle &isp, std::shared_ptr< const Acts::TrackingGeometry > trackingGeometry, const std::vector< ActsFatras::Hit > &hits, SiHitCollection &pixelSiHits, SiHitCollection &sctSiHits) const
 Loop over the hits and call the hit creator, provide the ActsFatras::Particle to create the hits. 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

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

const PixelIDm_pixIdHelper {}
 the Pixel ID helper More...
 
const SCT_IDm_sctIdHelper {}
 the SCT ID helper More...
 
std::array< StringProperty, 2 > m_HitCollectionNames {{{this,"PixelCollectionName","PixelHits_ActsFatras"},{this,"SCTCollectionName","SCT_Hits_ActsFatras"}}}
 
SG::WriteHandleKeyArray< SiHitCollectionm_HitCollectionKeys
 

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
 

Detailed Description

Write Handler for ISF and ActsFatras

Author
rui.w.nosp@m.ang@.nosp@m.cern..nosp@m.ch

Definition at line 45 of file ActsFatrasWriteHandler.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

◆ ActsFatrasWriteHandler()

ActsFatrasWriteHandler::ActsFatrasWriteHandler ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor.

Definition at line 19 of file ActsFatrasWriteHandler.cxx.

21  : AthAlgTool(type, name, parent){}

◆ ~ActsFatrasWriteHandler()

ActsFatrasWriteHandler::~ActsFatrasWriteHandler ( )

Destructor.

Definition at line 23 of file ActsFatrasWriteHandler.cxx.

23 {}

Member Function Documentation

◆ createHits()

void ActsFatrasWriteHandler::createHits ( const ISF::ISFParticle isp,
std::shared_ptr< const Acts::TrackingGeometry >  trackingGeometry,
const std::vector< ActsFatras::Hit > &  hits,
SiHitCollection pixelSiHits,
SiHitCollection sctSiHits 
) const

Loop over the hits and call the hit creator, provide the ActsFatras::Particle to create the hits.

<

Todo:
: fix edge effects

Definition at line 58 of file ActsFatrasWriteHandler.cxx.

62 {
63  ATH_MSG_VERBOSE(name() << " particle " << isp << " with " << hits.size() << " hits");
64  for (auto& hit:hits){
65  double energyDeposit = hit.depositedEnergy();
66  double time = hit.time();
67 
68  // get the ACTS geo identifier
69  auto hit_geoid = hit.geometryId();
70  // get the ACTS surface
71  try {
72  auto acts_surface = trackingGeometry->findSurface(hit_geoid);
73  const ActsDetectorElement* acts_de = dynamic_cast<const ActsDetectorElement*>(acts_surface->associatedDetectorElement());
74 
75  const Trk::Surface& hitSurface = acts_de->atlasSurface();
76  ATH_MSG_VERBOSE(name() << " Surface position global atlas: " << hitSurface.center());
77  // get the ATLAS identifier and hash identifier
78  Identifier hitId = hitSurface.associatedDetectorElementIdentifier();
79  ATH_MSG_VERBOSE(name() << " hit Id Acts|atlas: "<< hit_geoid <<"|" << hitId);
80  const Trk::TrkDetElementBase* detElementBase = hitSurface.associatedDetectorElement();
81  const InDetDD::SiDetectorElement* hitSiDetElement = dynamic_cast<const InDetDD::SiDetectorElement*>((detElementBase));
82  ATH_MSG_VERBOSE(name() << " hit position global Acts|atlas: " << hit.position() <<"|" << detElementBase->center());
83 
84  auto intersection = hitSurface.globalToLocal(hit.position());
85  ATH_MSG_VERBOSE(name() << " hit isOnSurface: "<<hitSurface.isOnSurface(hit.position()));
86  ATH_MSG_VERBOSE(name() << " intersection (atlas local) " << intersection.value().x() <<"," << intersection.value().y());
87  double interX = intersection.value().x();
88  double interY = intersection.value().y();
89 
90  double thickness = hitSiDetElement->thickness();
91  ATH_MSG_VERBOSE(name() << " thickness (atlas)" << thickness);
92 
93  const Amg::Transform3D &hitTransform = hitSiDetElement->transformHit().inverse();
94  // get the momentum direction into the local frame
95  Amg::Vector3D particleDir = hit.direction();
96  const Amg::Transform3D& sTransform = hitSurface.transform();
97  Amg::Vector3D localDirection = sTransform.inverse().linear() * particleDir;
98  localDirection *= thickness/cos(localDirection.theta());
99  // moving direction
100  int movingDirection = localDirection.z() > 0. ? 1 : -1;
101  // get he local distance of the intersection in x,y
102  double distX = localDirection.x();
103  double distY = localDirection.y();
104  // local entries in x,y
105  double localEntryX = interX-0.5*distX;
106  double localEntryY = interY-0.5*distY;
107  double localExitX = interX+0.5*distX;
108  double localExitY = interY+0.5*distY;
110  // transform into the hit frame
111  Amg::Vector3D localEntry(hitTransform * (sTransform * Amg::Vector3D(localEntryX,localEntryY,-0.5*movingDirection*thickness)));
112  Amg::Vector3D localExit(hitTransform * (sTransform * Amg::Vector3D(localExitX,localExitY,0.5*movingDirection*thickness)));
113  const HepGeom::Point3D<double> localEntryHep( localEntry.x(), localEntry.y(), localEntry.z() );
114  const HepGeom::Point3D<double> localExitHep( localExit.x(), localExit.y(), localExit.z() );
115 
116  auto isPixel=hitSiDetElement->isPixel();
117  ATH_MSG_VERBOSE(name() << " localEntryHep|localExitHep (atlas)" << localEntryHep << "|" << localExitHep);
118  ATH_MSG_VERBOSE(name() << " isPixel " << isPixel);
119  ATH_MSG_VERBOSE(name() << " barrel_ec (atlas)" << (isPixel ? m_pixIdHelper->barrel_ec(hitId) : m_sctIdHelper->barrel_ec(hitId)));
120  ATH_MSG_VERBOSE(name() << " layer_disk (atlas)" << (isPixel ? m_pixIdHelper->layer_disk(hitId) : m_sctIdHelper->layer_disk(hitId)));
121  ATH_MSG_VERBOSE(name() << " eta_module (atlas)" << (isPixel ? m_pixIdHelper->eta_module(hitId) : m_sctIdHelper->eta_module(hitId)));
122  ATH_MSG_VERBOSE(name() << " phi_module (atlas)" << (isPixel ? m_pixIdHelper->phi_module(hitId) : m_sctIdHelper->phi_module(hitId)));
123 
124  auto partLink = isp.getParticleLink();
125  auto siHit = SiHit(localEntryHep,
126  localExitHep,
128  time,
129  *partLink,
130  isPixel ? 0 : 1,
131  isPixel ? m_pixIdHelper->barrel_ec(hitId) : m_sctIdHelper->barrel_ec(hitId),
132  isPixel ? m_pixIdHelper->layer_disk(hitId) : m_sctIdHelper->layer_disk(hitId),
133  isPixel ? m_pixIdHelper->eta_module(hitId) : m_sctIdHelper->eta_module(hitId),
134  isPixel ? m_pixIdHelper->phi_module(hitId) : m_sctIdHelper->phi_module(hitId),
135  isPixel ? 0 : m_sctIdHelper->side(hitId));
136  if (isPixel)
137  pixelSiHits.push_back(siHit);
138  else
139  sctSiHits.push_back(siHit);
140  ATH_MSG_VERBOSE(name() << " convert and store 1 hit, total" << pixelSiHits.size() << "Pixel | "<<sctSiHits.size()<< " SCT hits stored for particle" << isp);
141  }
142  catch (const std::exception& e){
143  ATH_MSG_DEBUG(name() << "Can not find Acts Surface (" << e.what() << ")...Skip...");
144  }
145  }
146 }

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode ActsFatrasWriteHandler::finalize ( )
overridevirtual

Definition at line 53 of file ActsFatrasWriteHandler.cxx.

54 {
55  return StatusCode::SUCCESS;
56 }

◆ initialize()

StatusCode ActsFatrasWriteHandler::initialize ( )
overridevirtual

Definition at line 25 of file ActsFatrasWriteHandler.cxx.

26 {
27  ATH_MSG_INFO(name() << " initialize()" );
28  // Get the Pixel Identifier-helper
29  ATH_CHECK(detStore()->retrieve(m_pixIdHelper, "PixelID"));
30  // Get the SCT Identifier-helper
32  // setup handle keys
33  for(auto const& HitCollectionName:m_HitCollectionNames){
34  m_HitCollectionKeys.push_back(static_cast<std::string>(HitCollectionName));
35  }
36  ATH_CHECK(m_HitCollectionKeys.initialize());
37 
38  ATH_MSG_INFO(name() << " initialize() successful" );
39  return StatusCode::SUCCESS;
40 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles
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
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
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  }

◆ WriteHits()

StatusCode ActsFatrasWriteHandler::WriteHits ( std::vector< SiHitCollection > &  HitCollections,
const EventContext &  ctx 
) const

Definition at line 42 of file ActsFatrasWriteHandler.cxx.

43 {
44  auto HitsWriteHandles = m_HitCollectionKeys.makeHandles(ctx);
45  for(long unsigned int i=0;i<HitCollections.size();++i){
46  ATH_MSG_DEBUG(name() << " WriteHits: adding "<<m_HitCollectionNames[i]<< " "<<HitCollections[i].size()<<" hits");
47  ATH_CHECK(HitsWriteHandles[i].record(std::make_unique<SiHitCollection>(HitCollections[i])));
48  ATH_MSG_DEBUG(name() << " WriteHits: added "<<m_HitCollectionNames[i]<< " "<<HitCollections[i].size()<<" hits");
49  }
50  return StatusCode::SUCCESS;
51 }

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_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_HitCollectionKeys

SG::WriteHandleKeyArray<SiHitCollection> ActsFatrasWriteHandler::m_HitCollectionKeys
protected

Definition at line 73 of file ActsFatrasWriteHandler.h.

◆ m_HitCollectionNames

std::array<StringProperty,2> ActsFatrasWriteHandler::m_HitCollectionNames {{{this,"PixelCollectionName","PixelHits_ActsFatras"},{this,"SCTCollectionName","SCT_Hits_ActsFatras"}}}
protected

Definition at line 72 of file ActsFatrasWriteHandler.h.

◆ m_pixIdHelper

const PixelID* ActsFatrasWriteHandler::m_pixIdHelper {}
protected

the Pixel ID helper

Definition at line 69 of file ActsFatrasWriteHandler.h.

◆ m_sctIdHelper

const SCT_ID* ActsFatrasWriteHandler::m_sctIdHelper {}
protected

the SCT ID helper

Definition at line 70 of file ActsFatrasWriteHandler.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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
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::TrkDetElementBase
Definition: TrkDetElementBase.h:52
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
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.
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
Trk::energyDeposit
@ energyDeposit
Definition: MeasurementType.h:32
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
SiHit
Definition: SiHit.h:19
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Trk::Surface::isOnSurface
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
Definition: Surface.cxx:123
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetDD::SolidStateDetectorElementBase::thickness
double thickness() const
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ActsDetectorElement::atlasSurface
const Trk::Surface & atlasSurface() const
Return a shared pointer on the ATLAS surface associated with this identifier,.
Definition: ActsDetectorElement.cxx:259
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
calibdata.exception
exception
Definition: calibdata.py:496
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsDetectorElement
Definition: ActsDetectorElement.h:42
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsFatrasWriteHandler::m_sctIdHelper
const SCT_ID * m_sctIdHelper
the SCT ID helper
Definition: ActsFatrasWriteHandler.h:70
ISF::ISFParticle::getParticleLink
const HepMcParticleLink * getParticleLink() const
HepMcParticleLink accessors.
Definition: ISFParticle.h:172
ActsFatrasWriteHandler::m_HitCollectionNames
std::array< StringProperty, 2 > m_HitCollectionNames
Definition: ActsFatrasWriteHandler.h:72
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Trk::Surface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AtlasHitsVector::size
size_type size() const
Definition: AtlasHitsVector.h:143
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ActsFatrasWriteHandler::m_HitCollectionKeys
SG::WriteHandleKeyArray< SiHitCollection > m_HitCollectionKeys
Definition: ActsFatrasWriteHandler.h:73
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
InDetDD::SolidStateDetectorElementBase::transformHit
const GeoTrf::Transform3D & transformHit() const
Local (simulation/hit frame) to global transform.
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ActsFatrasWriteHandler::m_pixIdHelper
const PixelID * m_pixIdHelper
the Pixel ID helper
Definition: ActsFatrasWriteHandler.h:69
AtlasHitsVector::push_back
void push_back(const T &t)
Definition: AtlasHitsVector.h:145
fitman.k
k
Definition: fitman.py:528
Identifier
Definition: IdentifierFieldParser.cxx:14