ATLAS Offline Software
FPGATrackSimClusteringTool.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 FPGATrackSimCLUSTERINGTOOL_H
6 #define FPGATrackSimCLUSTERINGTOOL_H
7 
8 /*
9  * httClustering
10  * ---------------
11  *
12  * Routines to perform clustering in the pixels, based on FPGATrackSim
13  *
14  */
15 
20 #include <vector>
21 #include <memory>
22 
24  void attachTruth(std::vector<FPGATrackSimHit> &);
25  bool updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster);
26  bool updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster);
27  void updateClusterContents(FPGATrackSimCluster &currentCluster, int &clusterRow, int &clusterRowWidth, int &clusterCol, int &clusterColWidth, FPGATrackSimHit &incomingHit);
28  bool sortITkInputEta(const FPGATrackSimHit& hitA, const FPGATrackSimHit& hitB);
29  bool sortITkInputPhi(const FPGATrackSimHit& hitA, const FPGATrackSimHit& HitB);
30 }
31 
32 class FPGATrackSimClusteringTool : public extends <AthAlgTool,FPGATrackSimClusteringToolI> {
33 public:
34 
35  FPGATrackSimClusteringTool(const std::string&, const std::string&, const IInterface*);
36 
37  virtual ~FPGATrackSimClusteringTool() = default;
38 
39  virtual StatusCode DoClustering(FPGATrackSimLogicalEventInputHeader &, std::vector<FPGATrackSimCluster> &) const override;
40 
41  private:
42 
43  //FPGATrackSim pixel clustering using the FPGATrackSim objects
44  void SortedClustering(const std::vector<std::vector<FPGATrackSimHit> >& sorted_hits, std::vector<FPGATrackSimCluster> &) const;
45  void Clustering(std::vector<FPGATrackSimHit>, std::vector<FPGATrackSimCluster> &) const ;
46 
47  // Other helper functions
48  void splitAndSortHits(std::vector<FPGATrackSimHit>& hits, std::vector<std::vector<FPGATrackSimHit> >& hitsPerModule, int& eta_phi) const;
49  void splitAndSortHits(std::vector<FPGATrackSimHit>& hits, std::vector<std::vector<FPGATrackSimHit> >& hitsPerModule) const;
50  void splitHitsToModules(std::vector<FPGATrackSimHit>& hits, std::vector<std::vector<FPGATrackSimHit> >& hitsPerModule) const;
51  void normaliseClusters(std::vector<FPGATrackSimCluster> &clusters) const;
52  void sortHitsOnModules(std::vector<std::vector<FPGATrackSimHit> >& hitsPerModule, int& eta_phi) const;
53  void sortHitsOnModules(std::vector<std::vector<FPGATrackSimHit> >& hitsPerModule) const;
54  bool etaOrPhi(const FPGATrackSimHit& hit) const;
55  bool sortIBLInput(const std::unique_ptr<FPGATrackSimHit>& i, const std::unique_ptr<FPGATrackSimHit>& j) const;
56  bool sortPixelInput(const std::unique_ptr<FPGATrackSimHit>& i, const std::unique_ptr<FPGATrackSimHit>& j) const;
57 
58 
59 
60 };
61 
62 #endif // FPGATrackSimCLUSTERINGTOOL_H
FPGATrackSimClusteringTool::sortHitsOnModules
void sortHitsOnModules(std::vector< std::vector< FPGATrackSimHit > > &hitsPerModule, int &eta_phi) const
Definition: FPGATrackSimClusteringTool.cxx:138
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimCLUSTERING::sortITkInputPhi
bool sortITkInputPhi(const FPGATrackSimHit &hitA, const FPGATrackSimHit &HitB)
Definition: FPGATrackSimClusteringTool.cxx:453
FPGATrackSimCLUSTERING::attachTruth
void attachTruth(std::vector< FPGATrackSimHit > &)
Definition: FPGATrackSimClusteringTool.cxx:256
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimCLUSTERING::updateStripCluster
bool updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster)
Definition: FPGATrackSimClusteringTool.cxx:356
FPGATrackSimClusteringTool::sortIBLInput
bool sortIBLInput(const std::unique_ptr< FPGATrackSimHit > &i, const std::unique_ptr< FPGATrackSimHit > &j) const
FPGATrackSimCLUSTERING::updateClusterContents
void updateClusterContents(FPGATrackSimCluster &currentCluster, int &clusterRow, int &clusterRowWidth, int &clusterCol, int &clusterColWidth, FPGATrackSimHit &incomingHit)
Definition: FPGATrackSimClusteringTool.cxx:403
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimClusteringTool::etaOrPhi
bool etaOrPhi(const FPGATrackSimHit &hit) const
Definition: FPGATrackSimClusteringTool.cxx:192
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
FPGATrackSimClusteringTool::normaliseClusters
void normaliseClusters(std::vector< FPGATrackSimCluster > &clusters) const
Definition: FPGATrackSimClusteringTool.cxx:167
FPGATrackSimCLUSTERING::sortITkInputEta
bool sortITkInputEta(const FPGATrackSimHit &hitA, const FPGATrackSimHit &hitB)
Definition: FPGATrackSimClusteringTool.cxx:446
FPGATrackSimClusteringTool::FPGATrackSimClusteringTool
FPGATrackSimClusteringTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimClusteringTool.cxx:18
FPGATrackSimCLUSTERING::updatePixelCluster
bool updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster)
Definition: FPGATrackSimClusteringTool.cxx:275
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
FPGATrackSimClusteringTool::SortedClustering
void SortedClustering(const std::vector< std::vector< FPGATrackSimHit > > &sorted_hits, std::vector< FPGATrackSimCluster > &) const
Definition: FPGATrackSimClusteringTool.cxx:61
FPGATrackSimClusteringTool::~FPGATrackSimClusteringTool
virtual ~FPGATrackSimClusteringTool()=default
FPGATrackSimClusteringTool::splitAndSortHits
void splitAndSortHits(std::vector< FPGATrackSimHit > &hits, std::vector< std::vector< FPGATrackSimHit > > &hitsPerModule, int &eta_phi) const
Definition: FPGATrackSimClusteringTool.cxx:103
FPGATrackSimClusteringTool::sortPixelInput
bool sortPixelInput(const std::unique_ptr< FPGATrackSimHit > &i, const std::unique_ptr< FPGATrackSimHit > &j) const
FPGATrackSimClusteringTool::splitHitsToModules
void splitHitsToModules(std::vector< FPGATrackSimHit > &hits, std::vector< std::vector< FPGATrackSimHit > > &hitsPerModule) const
Definition: FPGATrackSimClusteringTool.cxx:115
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
FPGATrackSimCLUSTERING
Definition: FPGATrackSimClusteringTool.h:23
FPGATrackSimClusteringTool::DoClustering
virtual StatusCode DoClustering(FPGATrackSimLogicalEventInputHeader &, std::vector< FPGATrackSimCluster > &) const override
Definition: FPGATrackSimClusteringTool.cxx:24
FPGATrackSimClusteringToolI.h
Declares an abstract class that implements an interface for pixel clustering. This class is implement...
FPGATrackSimClusteringTool
Definition: FPGATrackSimClusteringTool.h:32
FPGATrackSimCluster.h
FPGATrackSimClusteringTool::Clustering
void Clustering(std::vector< FPGATrackSimHit >, std::vector< FPGATrackSimCluster > &) const
Definition: FPGATrackSimClusteringTool.cxx:74