ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
EFTracking
FPGATrackSim
FPGATrackSimObjects
FPGATrackSimObjects
FPGATrackSimTypes.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGFPGATrackSimOBJECTS_FPGATrackSimTYPES_H
6
#define TRIGFPGATrackSimOBJECTS_FPGATrackSimTYPES_H
7
8
#include <iostream>
9
#include <cmath>
10
#include <array>
11
#include <cstdint>
12
13
#define MODULE_BADMODULE -1
14
#define SECTOR_NOTFOUND -1
15
#define FITTRACKS_OK 0
16
#define FITTRACKS_BAD -1
17
18
19
typedef
int32_t
pid_t
;
// pattern id
20
typedef
int32_t
module_t
;
// module id
21
typedef
int32_t
sector_t
;
// sector number
22
typedef
uint32_t
layer_bitmask_t
;
// bitmask that stores at least as many bits as layers
23
24
//To label the origin of FPGATrackSimHits
25
enum class
SiliconTech
{
strip
,
pixel
,
nTechs
,
undefined
};
26
27
//The detector zone that the FPGATrackSimHit was in
28
enum class
DetectorZone
{
barrel
,
posEndcap
,
negEndcap
,
nZones
,
undefined
};
29
30
// Enum to hold the different types of hits in FPGATrackSimOfflineHit
31
enum class
OfflineHitType
{
Measurement
,
InertMaterial
,
BremPoint
,
Scatterer
,
Perigee
,
Outlier
,
Hole
,
Other
};
32
33
// An Enum to hold the stage of the track
34
enum class
TrackStage
{
FIRST
,
SECOND
};
35
36
// Enum to hold the type of correction for hits on track
37
enum class
TrackCorrType
{
None
= 0,
First
= 1,
Second
= 2 };
38
39
// Enum to hold type of sample (for truth cuts)
40
enum class
SampleType
{
skipTruth
,
singleElectrons
=11,
singleMuons
=13,
singlePions
=211,
LLPs
=1000 };
41
42
std::ostream&
operator<<
(std::ostream& os,
SiliconTech
t);
43
std::ostream&
operator<<
(std::ostream& os,
DetectorZone
t);
44
45
// Calculate euclidean norm
46
inline
double
eucnorm
(
double
x
,
double
y
,
double
z
)
47
{
48
return
sqrt(
pow
(
x
, 2) +
pow
(
y
, 2) +
pow
(
z
, 2));
49
}
50
51
// Calculate opening angle between two vectors in euclidean space
52
inline
double
eucangle
(
double
x
,
double
y
,
double
z
,
double
u,
double
v,
double
w)
53
{
54
return
acos((
x
* u +
y
* v +
z
* w) / (
eucnorm
(
x
,
y
,
z
) *
eucnorm
(u, v, w)));
55
}
56
57
58
#endif
HitType::undefined
@ undefined
Definition
FPGATrackSimHit.h:39
module_t
int32_t module_t
Definition
FPGATrackSimTypes.h:20
eucangle
double eucangle(double x, double y, double z, double u, double v, double w)
Definition
FPGATrackSimTypes.h:52
TrackStage
TrackStage
Definition
FPGATrackSimTypes.h:34
TrackStage::SECOND
@ SECOND
Definition
FPGATrackSimTypes.h:34
TrackStage::FIRST
@ FIRST
Definition
FPGATrackSimTypes.h:34
SiliconTech
SiliconTech
Definition
FPGATrackSimTypes.h:25
SiliconTech::strip
@ strip
Definition
FPGATrackSimTypes.h:25
SiliconTech::pixel
@ pixel
Definition
FPGATrackSimTypes.h:25
SiliconTech::nTechs
@ nTechs
Definition
FPGATrackSimTypes.h:25
pid_t
int32_t pid_t
Definition
FPGATrackSimTypes.h:19
OfflineHitType
OfflineHitType
Definition
FPGATrackSimTypes.h:31
OfflineHitType::InertMaterial
@ InertMaterial
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Perigee
@ Perigee
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Other
@ Other
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Hole
@ Hole
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Scatterer
@ Scatterer
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Measurement
@ Measurement
Definition
FPGATrackSimTypes.h:31
OfflineHitType::Outlier
@ Outlier
Definition
FPGATrackSimTypes.h:31
OfflineHitType::BremPoint
@ BremPoint
Definition
FPGATrackSimTypes.h:31
sector_t
int32_t sector_t
Definition
FPGATrackSimTypes.h:21
DetectorZone
DetectorZone
Definition
FPGATrackSimTypes.h:28
DetectorZone::nZones
@ nZones
Definition
FPGATrackSimTypes.h:28
DetectorZone::barrel
@ barrel
Definition
FPGATrackSimTypes.h:28
DetectorZone::negEndcap
@ negEndcap
Definition
FPGATrackSimTypes.h:28
DetectorZone::posEndcap
@ posEndcap
Definition
FPGATrackSimTypes.h:28
SampleType
SampleType
Definition
FPGATrackSimTypes.h:40
SampleType::singleMuons
@ singleMuons
Definition
FPGATrackSimTypes.h:40
SampleType::skipTruth
@ skipTruth
Definition
FPGATrackSimTypes.h:40
SampleType::singlePions
@ singlePions
Definition
FPGATrackSimTypes.h:40
SampleType::singleElectrons
@ singleElectrons
Definition
FPGATrackSimTypes.h:40
SampleType::LLPs
@ LLPs
Definition
FPGATrackSimTypes.h:40
operator<<
std::ostream & operator<<(std::ostream &os, SiliconTech t)
Definition
FPGATrackSimTypes.cxx:6
layer_bitmask_t
uint32_t layer_bitmask_t
Definition
FPGATrackSimTypes.h:22
eucnorm
double eucnorm(double x, double y, double z)
Definition
FPGATrackSimTypes.h:46
TrackCorrType
TrackCorrType
Definition
FPGATrackSimTypes.h:37
TrackCorrType::First
@ First
Definition
FPGATrackSimTypes.h:37
TrackCorrType::Second
@ Second
Definition
FPGATrackSimTypes.h:37
None
@ None
Definition
TRIGGERidentity.h:17
y
#define y
x
#define x
z
#define z
pow
constexpr int pow(int base, int exp) noexcept
Definition
ap_fixedTest.cxx:15
Generated on
for ATLAS Offline Software by
1.14.0