ATLAS Offline Software
Loading...
Searching...
No Matches
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
19typedef int32_t pid_t; // pattern id
20typedef int32_t module_t; // module id
21typedef int32_t sector_t; // sector number
22typedef uint32_t layer_bitmask_t; // bitmask that stores at least as many bits as layers
23
24//To label the origin of FPGATrackSimHits
26
27//The detector zone that the FPGATrackSimHit was in
29
30// Enum to hold the different types of hits in FPGATrackSimOfflineHit
32
33// An Enum to hold the stage of the track
34enum class TrackStage { FIRST, SECOND };
35
36// Enum to hold the type of correction for hits on track
37enum class TrackCorrType { None = 0, First = 1, Second = 2 };
38
39// Enum to hold type of sample (for truth cuts)
41
42std::ostream& operator<<(std::ostream& os, SiliconTech t);
43std::ostream& operator<<(std::ostream& os, DetectorZone t);
44
45// Calculate euclidean norm
46inline 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
52inline 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
int32_t module_t
double eucangle(double x, double y, double z, double u, double v, double w)
SiliconTech
int32_t pid_t
OfflineHitType
int32_t sector_t
DetectorZone
std::ostream & operator<<(std::ostream &os, SiliconTech t)
uint32_t layer_bitmask_t
double eucnorm(double x, double y, double z)
TrackCorrType
@ None
#define y
#define x
#define z
constexpr int pow(int base, int exp) noexcept