|
ATLAS Offline Software
|
#include <ActsFatrasWriteHandler.h>
|
| 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 |
|
◆ StoreGateSvc_t
◆ ActsFatrasWriteHandler()
ActsFatrasWriteHandler::ActsFatrasWriteHandler |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ActsFatrasWriteHandler()
ActsFatrasWriteHandler::~ActsFatrasWriteHandler |
( |
| ) |
|
◆ createHits()
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.
66 double time = hit.time();
69 auto hit_geoid = hit.geometryId();
72 auto acts_surface = trackingGeometry->findSurface(hit_geoid);
90 double thickness = hitSiDetElement->
thickness();
97 Amg::Vector3D localDirection = sTransform.inverse().linear() * particleDir;
98 localDirection *= thickness/
cos(localDirection.theta());
100 int movingDirection = localDirection.z() > 0. ? 1 : -1;
102 double distX = localDirection.x();
103 double distY = localDirection.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;
111 Amg::Vector3D localEntry(hitTransform * (sTransform *
Amg::Vector3D(localEntryX,localEntryY,-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() );
116 auto isPixel=hitSiDetElement->
isPixel();
117 ATH_MSG_VERBOSE(
name() <<
" localEntryHep|localExitHep (atlas)" << localEntryHep <<
"|" << localExitHep);
125 auto siHit =
SiHit(localEntryHep,
140 ATH_MSG_VERBOSE(
name() <<
" convert and store 1 hit, total" << pixelSiHits.
size() <<
"Pixel | "<<sctSiHits.
size()<<
" SCT hits stored for particle" << isp);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode ActsFatrasWriteHandler::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode ActsFatrasWriteHandler::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ WriteHits()
StatusCode ActsFatrasWriteHandler::WriteHits |
( |
std::vector< SiHitCollection > & |
HitCollections, |
|
|
const EventContext & |
ctx |
|
) |
| const |
Definition at line 42 of file ActsFatrasWriteHandler.cxx.
45 for(
long unsigned int i=0;
i<HitCollections.size();++
i){
47 ATH_CHECK(HitsWriteHandles[
i].record(std::make_unique<SiHitCollection>(HitCollections[
i])));
50 return StatusCode::SUCCESS;
◆ m_detStore
◆ m_evtStore
◆ m_HitCollectionKeys
◆ m_HitCollectionNames
std::array<StringProperty,2> ActsFatrasWriteHandler::m_HitCollectionNames {{{this,"PixelCollectionName","PixelHits_ActsFatras"},{this,"SCTCollectionName","SCT_Hits_ActsFatras"}}} |
|
protected |
◆ m_pixIdHelper
◆ m_sctIdHelper
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & center() const
Returns the center position of the Surface.
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
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...
const Trk::Surface & atlasSurface() const
Return a shared pointer on the ATLAS surface associated with this identifier,.
Eigen::Affine3d Transform3D
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
int layer_disk(const Identifier &id) const
Eigen::Matrix< double, 3, 1 > Vector3D
const SCT_ID * m_sctIdHelper
the SCT ID helper
const HepMcParticleLink * getParticleLink() const
HepMcParticleLink accessors.
std::array< StringProperty, 2 > m_HitCollectionNames
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...
def time(flags, cells_name, *args, **kw)
int eta_module(const Identifier &id) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int side(const Identifier &id) const
SG::WriteHandleKeyArray< SiHitCollection > m_HitCollectionKeys
int phi_module(const Identifier &id) const
const GeoTrf::Transform3D & transformHit() const
Local (simulation/hit frame) to global transform.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const PixelID * m_pixIdHelper
the Pixel ID helper
void push_back(const T &t)