ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimSpacePointsTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FPGATrackSimSPACEPOINTSTOOL_H
6#define FPGATrackSimSPACEPOINTSTOOL_H
7
8
13
14#include <vector>
15#include <map>
16
17class TH1I;
18
19class FPGATrackSimSpacePointsTool : public extends<AthAlgTool, FPGATrackSimSpacePointsToolI> {
20 public:
22 using base_class::base_class;
23
24 virtual StatusCode initialize() override;
25 virtual StatusCode finalize() override;
26
27 virtual StatusCode DoSpacePoints(FPGATrackSimLogicalEventInputHeader &, std::vector<FPGATrackSimCluster> &) override;
28
29 private:
30 StatusCode fillMaps(std::vector<FPGATrackSimHit>& hits);
31 StatusCode makeSpacePoints(FPGATrackSimTowerInputHeader &tower, std::vector<FPGATrackSimCluster> &spacepoints);
32 void calcPosition(FPGATrackSimHit &hit_in, FPGATrackSimHit &hit_out, float &x, float &y, float &z);
33 bool searchForMatch(FPGATrackSimHit& hit_in,std::vector<FPGATrackSimHit>& hits_outer,FPGATrackSimTowerInputHeader &tower, std::vector<FPGATrackSimCluster> &spacepoints);
34 void addSpacePoints(FPGATrackSimHit hit_in, FPGATrackSimHit hit_out ,FPGATrackSimTowerInputHeader &tower, std::vector<FPGATrackSimCluster> &spacepoints);
36
37 //----------------------
38 // Working Memory
39 std::map<std::vector<int>,std::pair<std::vector<FPGATrackSimHit>,std::vector<FPGATrackSimHit>>> m_map;
40 std::vector<FPGATrackSimHit> m_pixel;
41
42 Gaudi::Property<float> m_phiwindow { this, "PhiWindow", 0.008, "Distance in phi to consider two hits for making a space-point" };
43 Gaudi::Property<bool> m_duplicate { this, "Duplication", false, "Duplicate spacepoints to layer on the other side of the stave" };
44 Gaudi::Property<bool> m_filter { this, "Filtering", false, "Filter out incomplete spacepoints" };
45 Gaudi::Property<bool> m_filterClose { this, "FilteringClosePoints", false, "Filter out single hits cloes to spacepoints" };
46 Gaudi::Property<bool> m_sameModulesOnly { this, "SameModulesOnly", false, "Only use hits on the same physical (eta) module" };
47 Gaudi::Property<bool> m_boundsCheck { this, "BoundsCheck", false, "Perform a module bounds check in the endcaps" };
48 Gaudi::Property<bool> m_reduceCoordPrecision {this, "ReduceCoordPrecision", false, "flag to enable reduc ing the precision of global coordinates" };
49 Gaudi::Property<float> m_coordRPrecision {this, "CoordRPrecision", 1./64., "fixed point precision of r coordinate" };
50 Gaudi::Property<float> m_coordPhiPrecision {this, "CoordPhiPrecision", 1./8192., "fixed point precision of phi coordinate" };
51 Gaudi::Property<float> m_coordZPrecision {this, "CoordZPrecision", 1./32., "fixed point precision of z coordinate" };
52
53 // self monitoring
54 unsigned m_inputhits = 0;
55 unsigned m_spacepts = 0;
56 unsigned m_filteredhits = 0;
57 unsigned m_adjacent_eta_sp = 0;
58 unsigned m_adjacent_phi_sp = 0;
59 unsigned m_diagonal_sp = 0;
60 TH1I* m_spacepts_per_hit = nullptr;
61
62};
63
64#endif // FPGATrackSimSPACEPOINTSTOOL_H
: FPGATrackSim-specific class to represent an hit in the detector.
Declares an abstract class that implements an interface for spacepoint formation. This class is imple...
#define y
#define x
#define z
void calcPosition(FPGATrackSimHit &hit_in, FPGATrackSimHit &hit_out, float &x, float &y, float &z)
bool searchForMatch(FPGATrackSimHit &hit_in, std::vector< FPGATrackSimHit > &hits_outer, FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
std::map< std::vector< int >, std::pair< std::vector< FPGATrackSimHit >, std::vector< FPGATrackSimHit > > > m_map
virtual StatusCode DoSpacePoints(FPGATrackSimLogicalEventInputHeader &, std::vector< FPGATrackSimCluster > &) override
void reduceGlobalCoordPrecision(FPGATrackSimHit &hit) const
Gaudi::Property< float > m_coordRPrecision
StatusCode makeSpacePoints(FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
virtual StatusCode finalize() override
std::vector< FPGATrackSimHit > m_pixel
Gaudi::Property< float > m_coordZPrecision
Gaudi::Property< float > m_coordPhiPrecision
StatusCode fillMaps(std::vector< FPGATrackSimHit > &hits)
Gaudi::Property< bool > m_sameModulesOnly
virtual StatusCode initialize() override
void addSpacePoints(FPGATrackSimHit hit_in, FPGATrackSimHit hit_out, FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
Gaudi::Property< bool > m_reduceCoordPrecision