ATLAS Offline Software
FPGATrackSimSpacePointsTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef FPGATrackSimSPACEPOINTSTOOL_H
6 #define FPGATrackSimSPACEPOINTSTOOL_H
7 
8 #include <array>
9 #include <vector>
10 #include <map>
11 
16 
17 class TH1I;
18 
19 class FPGATrackSimSpacePointsTool : public extends<AthAlgTool, FPGATrackSimSpacePointsToolI> {
20  public:
21  FPGATrackSimSpacePointsTool(const std::string &, const std::string &, const IInterface *);
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);
35 
36  //----------------------
37  // Working Memory
38  std::map<std::vector<int>,std::pair<std::vector<FPGATrackSimHit>,std::vector<FPGATrackSimHit>>> m_map;
39  std::vector<FPGATrackSimHit> m_pixel;
40 
41  Gaudi::Property<float> m_phiwindow { this, "PhiWindow", 0.008, "Distance in phi to consider two hits for making a space-point" };
42  Gaudi::Property<bool> m_duplicate { this, "Duplication", false, "Duplicate spacepoints to layer on the other side of the stave" };
43  Gaudi::Property<bool> m_filter { this, "Filtering", false, "Filter out incomplete spacepoints" };
44  Gaudi::Property<bool> m_filterClose { this, "FilteringClosePoints", false, "Filter out single hits cloes to spacepoints" };
45  Gaudi::Property<bool> m_sameModulesOnly { this, "SameModulesOnly", false, "Only use hits on the same physical (eta) module" };
46  Gaudi::Property<bool> m_boundsCheck { this, "BoundsCheck", false, "Perform a module bounds check in the endcaps" };
47 
48  // self monitoring
49  unsigned m_inputhits = 0;
50  unsigned m_spacepts = 0;
51  unsigned m_filteredhits = 0;
52  unsigned m_adjacent_eta_sp = 0;
53  unsigned m_adjacent_phi_sp = 0;
54  unsigned m_diagonal_sp = 0;
56 
57 };
58 
59 #endif // FPGATrackSimSPACEPOINTSTOOL_H
FPGATrackSimSpacePointsTool::fillMaps
StatusCode fillMaps(std::vector< FPGATrackSimHit > &hits)
Definition: FPGATrackSimSpacePointsTool.cxx:65
FPGATrackSimSpacePointsTool::m_spacepts
unsigned m_spacepts
Definition: FPGATrackSimSpacePointsTool.h:50
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
FPGATrackSimSpacePointsTool::makeSpacePoints
StatusCode makeSpacePoints(FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
Definition: FPGATrackSimSpacePointsTool.cxx:100
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimSpacePointsTool::m_phiwindow
Gaudi::Property< float > m_phiwindow
Definition: FPGATrackSimSpacePointsTool.h:41
FPGATrackSimSpacePointsTool
Definition: FPGATrackSimSpacePointsTool.h:19
FPGATrackSimSpacePointsTool::m_map
std::map< std::vector< int >, std::pair< std::vector< FPGATrackSimHit >, std::vector< FPGATrackSimHit > > > m_map
Definition: FPGATrackSimSpacePointsTool.h:38
FPGATrackSimSpacePointsTool::m_duplicate
Gaudi::Property< bool > m_duplicate
Definition: FPGATrackSimSpacePointsTool.h:42
FPGATrackSimSpacePointsTool::DoSpacePoints
virtual StatusCode DoSpacePoints(FPGATrackSimLogicalEventInputHeader &, std::vector< FPGATrackSimCluster > &) override
Definition: FPGATrackSimSpacePointsTool.cxx:48
x
#define x
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimSpacePointsTool::FPGATrackSimSpacePointsTool
FPGATrackSimSpacePointsTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimSpacePointsTool.cxx:14
FPGATrackSimSpacePointsTool::searchForMatch
bool searchForMatch(FPGATrackSimHit &hit_in, std::vector< FPGATrackSimHit > &hits_outer, FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
Definition: FPGATrackSimSpacePointsTool.cxx:243
FPGATrackSimSpacePointsTool::m_pixel
std::vector< FPGATrackSimHit > m_pixel
Definition: FPGATrackSimSpacePointsTool.h:39
z
#define z
FPGATrackSimSpacePointsTool::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimSpacePointsTool.cxx:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimSpacePointsTool::m_boundsCheck
Gaudi::Property< bool > m_boundsCheck
Definition: FPGATrackSimSpacePointsTool.h:46
AthAlgTool.h
FPGATrackSimSpacePointsTool::m_filteredhits
unsigned m_filteredhits
Definition: FPGATrackSimSpacePointsTool.h:51
FPGATrackSimSpacePointsTool::m_spacepts_per_hit
TH1I * m_spacepts_per_hit
Definition: FPGATrackSimSpacePointsTool.h:55
FPGATrackSimSpacePointsTool::m_inputhits
unsigned m_inputhits
Definition: FPGATrackSimSpacePointsTool.h:49
FPGATrackSimSpacePointsTool::m_filter
Gaudi::Property< bool > m_filter
Definition: FPGATrackSimSpacePointsTool.h:43
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
FPGATrackSimSpacePointsToolI.h
Declares an abstract class that implements an interface for spacepoint formation. This class is imple...
y
#define y
FPGATrackSimSpacePointsTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimSpacePointsTool.cxx:21
FPGATrackSimSpacePointsTool::calcPosition
void calcPosition(FPGATrackSimHit &hit_in, FPGATrackSimHit &hit_out, float &x, float &y, float &z)
Definition: FPGATrackSimSpacePointsTool.cxx:326
FPGATrackSimSpacePointsTool::m_adjacent_phi_sp
unsigned m_adjacent_phi_sp
Definition: FPGATrackSimSpacePointsTool.h:53
FPGATrackSimSpacePointsTool::addSpacePoints
void addSpacePoints(FPGATrackSimHit hit_in, FPGATrackSimHit hit_out, FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints)
Definition: FPGATrackSimSpacePointsTool.cxx:257
FPGATrackSimTowerInputHeader
Definition: FPGATrackSimTowerInputHeader.h:18
FPGATrackSimSpacePointsTool::m_diagonal_sp
unsigned m_diagonal_sp
Definition: FPGATrackSimSpacePointsTool.h:54
FPGATrackSimSpacePointsTool::m_sameModulesOnly
Gaudi::Property< bool > m_sameModulesOnly
Definition: FPGATrackSimSpacePointsTool.h:45
FPGATrackSimSpacePointsTool::m_filterClose
Gaudi::Property< bool > m_filterClose
Definition: FPGATrackSimSpacePointsTool.h:44
FPGATrackSimSpacePointsTool::~FPGATrackSimSpacePointsTool
virtual ~FPGATrackSimSpacePointsTool()
Definition: FPGATrackSimSpacePointsTool.h:22
FPGATrackSimCluster.h
FPGATrackSimSpacePointsTool::m_adjacent_eta_sp
unsigned m_adjacent_eta_sp
Definition: FPGATrackSimSpacePointsTool.h:52