ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_Core
ISF_Interfaces
ISF_Interfaces
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
12
#include "
GeoPrimitives/GeoPrimitives.h
"
13
14
// DetectorDescription
15
#include "
AtlasDetDescr/AtlasRegion.h
"
16
17
// ISF Simulation includes
18
#include "
ISF_Event/ISFParticle.h
"
19
20
namespace
ISF
{
21
22
enum
InsideType
{
23
fOutside
= 0,
24
fSurface
= 1,
25
fInside
= 2,
26
// to be used to allocate arrays
27
fNumInsideTypes
= 3
28
};
29
40
41
class
IGeoIDSvc
:
virtual
public
IInterface {
42
public
:
43
45
virtual
~IGeoIDSvc
(){}
46
48
DeclareInterfaceID
(
IGeoIDSvc
, 1, 0);
49
51
virtual
ISF::InsideType
inside
(
const
Amg::Vector3D
&pos,
AtlasDetDescr::AtlasRegion
geoID)
const
= 0;
52
inline
ISF::InsideType
inside
(
const
ISFParticle
&
sp
,
AtlasDetDescr::AtlasRegion
geoID)
const
;
53
inline
ISF::InsideType
inside
(
double
x
,
double
y
,
double
z
,
AtlasDetDescr::AtlasRegion
geoID)
const
;
54
57
virtual
AtlasDetDescr::AtlasRegion
identifyGeoID
(
const
Amg::Vector3D
&pos)
const
= 0;
58
inline
AtlasDetDescr::AtlasRegion
identifyGeoID
(
const
ISFParticle
&
sp
)
const
;
59
inline
AtlasDetDescr::AtlasRegion
identifyGeoID
(
double
x
,
double
y
,
double
z
)
const
;
60
63
virtual
AtlasDetDescr::AtlasRegion
identifyNextGeoID
(
const
Amg::Vector3D
&pos,
const
Amg::Vector3D
&dir)
const
= 0;
64
inline
AtlasDetDescr::AtlasRegion
identifyNextGeoID
(
const
ISFParticle
&
sp
)
const
;
65
inline
AtlasDetDescr::AtlasRegion
identifyNextGeoID
(
double
x
,
double
y
,
double
z
,
66
double
dx,
double
dy,
double
dz)
const
;
67
70
inline
AtlasDetDescr::AtlasRegion
identifyAndRegNextGeoID
(
ISFParticle
&
sp
)
const
;
71
};
72
73
74
// inline methods (basically wrapper for ISFParticle/coord. -> HepGeom::Point3D<double>)
75
//
76
// inside() wrappers
77
inline
ISF::InsideType
IGeoIDSvc::inside
(
const
ISFParticle
&
sp
,
AtlasDetDescr::AtlasRegion
geoID)
const
{
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
86
inline
AtlasDetDescr::AtlasRegion
IGeoIDSvc::identifyGeoID
(
const
ISFParticle
&
sp
)
const
{
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
95
inline
AtlasDetDescr::AtlasRegion
IGeoIDSvc::identifyNextGeoID
(
const
ISFParticle
&
sp
)
const
{
96
return
identifyNextGeoID
(
sp
.position(),
sp
.momentum());
97
}
98
inline
AtlasDetDescr::AtlasRegion
IGeoIDSvc::identifyNextGeoID
(
double
x
,
double
y
,
double
z
,
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
106
inline
AtlasDetDescr::AtlasRegion
IGeoIDSvc::identifyAndRegNextGeoID
(
ISFParticle
& part)
const
{
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
AtlasRegion.h
GeoPrimitives.h
ISFParticle.h
sp
static Double_t sp
Definition
LArPhysWaveHECTool.cxx:37
y
#define y
x
#define x
z
#define z
ISF::IGeoIDSvc
The interface to chose between the sub geometry services, realized as an AlgTool since it does not ha...
Definition
IGeoIDSvc.h:41
ISF::IGeoIDSvc::identifyGeoID
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...
ISF::IGeoIDSvc::DeclareInterfaceID
DeclareInterfaceID(IGeoIDSvc, 1, 0)
Creates the InterfaceID and interfaceID() method.
ISF::IGeoIDSvc::~IGeoIDSvc
virtual ~IGeoIDSvc()
Virtual destructor.
Definition
IGeoIDSvc.h:45
ISF::IGeoIDSvc::inside
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.
ISF::IGeoIDSvc::identifyNextGeoID
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...
ISF::IGeoIDSvc::identifyAndRegNextGeoID
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
ISF::ISFParticle
The generic ISF particle definition,.
Definition
ISFParticle.h:42
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
AtlasDetDescr::AtlasRegion
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition
AtlasRegion.h:21
ISF
ISFParticleOrderedQueue.
Definition
PrimaryParticleInformation.h:13
ISF::InsideType
InsideType
Definition
IGeoIDSvc.h:22
ISF::fInside
@ fInside
Definition
IGeoIDSvc.h:25
ISF::fOutside
@ fOutside
Definition
IGeoIDSvc.h:23
ISF::fSurface
@ fSurface
Definition
IGeoIDSvc.h:24
ISF::fNumInsideTypes
@ fNumInsideTypes
Definition
IGeoIDSvc.h:27
Generated on
for ATLAS Offline Software by
1.17.0