ATLAS Offline Software
Loading...
Searching...
No Matches
IGeoIDSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_INTERFACES_IGEOIDSVC_H
6#define ISF_INTERFACES_IGEOIDSVC_H 1
7
8// Gaudi
9#include "GaudiKernel/IInterface.h"
10
11// Amg
13
14// DetectorDescription
16
17// ISF Simulation includes
19
20namespace ISF {
21
26 // to be used to allocate arrays
28 };
29
40
41 class IGeoIDSvc : virtual public IInterface {
42 public:
43
45 virtual ~IGeoIDSvc(){}
46
49
51 virtual ISF::InsideType inside(const Amg::Vector3D &pos, AtlasDetDescr::AtlasRegion geoID) const = 0;
53 inline ISF::InsideType inside(double x, double y, double z, AtlasDetDescr::AtlasRegion geoID) const;
54
59 inline AtlasDetDescr::AtlasRegion identifyGeoID(double x, double y, double z) const;
60
65 inline AtlasDetDescr::AtlasRegion identifyNextGeoID(double x, double y, double z,
66 double dx, double dy, double dz) const;
67
71 };
72
73
74 // inline methods (basically wrapper for ISFParticle/coord. -> HepGeom::Point3D<double>)
75 //
76 // inside() wrappers
78 return inside( sp.position(), geoID);
79 }
80 inline ISF::InsideType IGeoIDSvc::inside(double x, double y, double z, AtlasDetDescr::AtlasRegion geoID) const {
81 const Amg::Vector3D pos(x, y, z);
82 return inside( pos, geoID);
83 }
84
85 // identifyGeoID() wrappers
87 return identifyGeoID( sp.position());
88 }
89 inline AtlasDetDescr::AtlasRegion IGeoIDSvc::identifyGeoID(double x, double y, double z) const {
90 const Amg::Vector3D pos(x, y, z);
91 return identifyGeoID( pos);
92 }
93
94 // identifyNextGeoID() wrappers
96 return identifyNextGeoID( sp.position(), sp.momentum());
97 }
99 double dx, double dy, double dz) const {
100 const Amg::Vector3D pos(x, y, z);
101 const Amg::Vector3D dir(dx, dy, dz);
102 return identifyNextGeoID( pos, dir);
103 }
104
105 // identifyAndRegNextGeoID() wrapper
107 AtlasDetDescr::AtlasRegion geoID = identifyNextGeoID( part.position(), part.momentum());
108 part.setNextGeoID(geoID);
109 return geoID;
110 }
111
112} // end of namespace
113
114#endif // ISF_INTERFACES_IGEOIDSVC_H
static Double_t sp
#define y
#define x
#define z
The interface to chose between the sub geometry services, realized as an AlgTool since it does not ha...
Definition IGeoIDSvc.h:41
virtual AtlasDetDescr::AtlasRegion identifyGeoID(const Amg::Vector3D &pos) const =0
A static filter that returns the AtlasRegion of the given ISFParticle (position) -> returns ISF::fUnd...
DeclareInterfaceID(IGeoIDSvc, 1, 0)
Creates the InterfaceID and interfaceID() method.
virtual ~IGeoIDSvc()
Virtual destructor.
Definition IGeoIDSvc.h:45
virtual ISF::InsideType inside(const Amg::Vector3D &pos, AtlasDetDescr::AtlasRegion geoID) const =0
Checks if the given position (ISFParticle) is inside/outside/onsurface a given AtlasRegion.
virtual AtlasDetDescr::AtlasRegion identifyNextGeoID(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
Find the AtlasRegion that the particle will enter with its next infinitesimal step along the given di...
AtlasDetDescr::AtlasRegion identifyAndRegNextGeoID(ISFParticle &sp) const
Find the AtlasRegion that the particle will enter with its next infinitesimal step along the given di...
Definition IGeoIDSvc.h:106
The generic ISF particle definition,.
Definition ISFParticle.h:42
Eigen::Matrix< double, 3, 1 > Vector3D
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition AtlasRegion.h:21
ISFParticleOrderedQueue.
InsideType
Definition IGeoIDSvc.h:22
@ fInside
Definition IGeoIDSvc.h:25
@ fOutside
Definition IGeoIDSvc.h:23
@ fSurface
Definition IGeoIDSvc.h:24
@ fNumInsideTypes
Definition IGeoIDSvc.h:27