 |
ATLAS Offline Software
|
#include <FPGATrackSimClusteringTool.h>
|
Gaudi::Property< bool > | m_digitalClustering {this, "DigitalClustering", true, "flag to enable digital clustering instead of ToT weighted position calculation" } |
|
Gaudi::Property< bool > | m_reduceCoordPrecision {this, "ReduceCoordPrecision", false, "flag to enable reducing the precision of global coordinates" } |
|
Gaudi::Property< float > | m_coordRPrecision {this, "CoordRPrecision", 1./64., "fixed point precision of r coordinate" } |
|
Gaudi::Property< float > | m_coordPhiPrecision {this, "CoordPhiPrecision", 1./8192., "fixed point precision of phi coordinate" } |
|
Gaudi::Property< float > | m_coordZPrecision {this, "CoordZPrecision", 1./32., "fixed point precision of z coordinate" } |
|
Gaudi::Property< int > | m_LorentzAngleShift { this, "LorentzAngleShift", -1, "flag for Lorentz angle shift. -1 means off, 0 means full corrections from first version, 1 means smaller LUT, 2 means very small LUT" } |
|
ToolHandle< FPGATrackSim::LorentzAngleTool > | m_lorentzAngleTool {this, "LorentzAngleTool", "", "FPGATrackSim tool to retrieve Lorentz angle"} |
|
◆ HitPtrCollection
◆ HitPtrContainer
◆ FPGATrackSimClusteringTool()
FPGATrackSimClusteringTool::FPGATrackSimClusteringTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ ~FPGATrackSimClusteringTool()
virtual FPGATrackSimClusteringTool::~FPGATrackSimClusteringTool |
( |
| ) |
|
|
virtualdefault |
◆ Clustering()
Definition at line 132 of file FPGATrackSimClusteringTool.cxx.
138 for(
auto& hit: moduleHits){
139 bool is_clustered_hit =
false;
146 if (!is_clustered_hit) {
147 is_clustered_hit =
true;
150 int cPhi =
it->getClusterEquiv().getPhiIndex();
151 int cPhiWidth =
it->getClusterEquiv().getPhiWidth();
152 int cEta =
it->getClusterEquiv().getEtaIndex();
153 int cEtaWidth =
it->getClusterEquiv().getEtaWidth();
154 int fCPhi = it_added_clus->getClusterEquiv().getPhiIndex();
155 int fCPhiWidth = it_added_clus->getClusterEquiv().getPhiWidth();
156 int fCEta = it_added_clus->getClusterEquiv().getEtaIndex();
157 int fCEtaWidth = it_added_clus->getClusterEquiv().getEtaWidth();
159 clusterEquiv = it_added_clus->getClusterEquiv();
164 if (cPhi + cPhiWidth < fCPhi + fCPhiWidth)
165 clusterEquiv.
setPhiWidth(fCPhiWidth + (fCPhi - cPhi));
170 if (!(cPhi + cPhiWidth < fCPhi + fCPhiWidth))
171 clusterEquiv.
setPhiWidth(cPhiWidth + (cPhi - fCPhi));
179 if (cEta + cEtaWidth < fCEta + fCEtaWidth)
180 clusterEquiv.
setEtaWidth(fCEtaWidth + (fCEta - cEta));
185 if (!(cEta + cEtaWidth < fCEta + fCEtaWidth))
186 clusterEquiv.
setEtaWidth(cEtaWidth + (cEta - fCEta));
191 it_added_clus->setClusterEquiv(clusterEquiv);
193 for (
auto& hit :
it->getHitList()) {
195 for (
auto& finalHit : it_added_clus->getHitList()) {
196 if (hit.getEtaIndex() == finalHit.getEtaIndex() &&
197 hit.getPhiIndex() == finalHit.getPhiIndex())
202 clusterEquiv = it_added_clus->getClusterEquiv();
203 float xOld = clusterEquiv.
getX();
204 float yOld = clusterEquiv.
getY();
205 float zOld = clusterEquiv.
getZ();
210 float xNew = hit.getX();
211 float yNew = hit.getY();
212 float zNew = hit.getZ();
213 float xPhiNew = hit.getPhiCoord();
214 float xEtaNew = hit.getEtaCoord();
215 float cPhiNew = hit.getPhiIndex();
216 float cEtaNew = hit.getEtaIndex();
218 int totNew = hit.getToT();
221 int n = it_added_clus->getHitList().size();
222 clusterEquiv.
setX((xOld*
n + xNew) / (
n+1));
223 clusterEquiv.
setY((yOld*
n + yNew) / (
n+1));
224 clusterEquiv.
setZ((zOld*
n + zNew) / (
n+1));
230 clusterEquiv.
setX((xOld*
tot + xNew*totNew) / (
tot+totNew));
231 clusterEquiv.
setY((yOld*
tot + yNew*totNew) / (
tot+totNew));
232 clusterEquiv.
setZ((zOld*
tot + zNew*totNew) / (
tot+totNew));
239 it_added_clus->setClusterEquiv(clusterEquiv);
240 it_added_clus->push_backHitList(hit);
247 if (
it != moduleClusters.end() - 1) {
248 *
it = moduleClusters.back();
249 moduleClusters.pop_back();
252 moduleClusters.pop_back();
260 is_clustered_hit =
true;
265 if((!is_clustered_hit) || (moduleClusters.size() == 0)){
270 }
else if(hit->isStrip()){
274 moduleClusters.push_back(cluster);
◆ DoClustering()
Definition at line 31 of file FPGATrackSimClusteringTool.cxx.
39 for (
auto& hit : tower.
hits()) {
40 hits.push_back(std::make_unique<FPGATrackSimHit>(hit));
44 std::vector<FPGATrackSimCluster> towerClusters;
47 for (
auto &hit :
hits)
59 clusters.reserve(towerClusters.size());
61 ATH_MSG_WARNING(
"more than one tower, m_clusters is only going to contain those from the last one");
63 unsigned cluster_count = 0;
64 unsigned int pixelCounter = 0;
65 unsigned int stripCounter = 0;
66 for (
auto &cluster: towerClusters){
88 tower.
addHit(cluster_as_FPGATrackSimhit);
89 cluster.setClusterEquiv(cluster_as_FPGATrackSimhit);
96 return StatusCode::SUCCESS;
◆ etaOrPhi()
◆ initialize()
StatusCode FPGATrackSimClusteringTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ normaliseClusters()
void FPGATrackSimClusteringTool::normaliseClusters |
( |
std::vector< FPGATrackSimCluster > & |
clusters | ) |
const |
|
private |
◆ reduceGlobalCoordPrecision() [1/2]
void FPGATrackSimClusteringTool::reduceGlobalCoordPrecision |
( |
FPGATrackSimCluster & |
cluster | ) |
const |
|
private |
◆ reduceGlobalCoordPrecision() [2/2]
void FPGATrackSimClusteringTool::reduceGlobalCoordPrecision |
( |
FPGATrackSimHit & |
hit | ) |
const |
|
private |
◆ SetMinMaxIndicies()
Definition at line 99 of file FPGATrackSimClusteringTool.cxx.
105 maxPhiIdx =
std::max(maxPhiIdx,
static_cast<int>(hit.getPhiIndex()));
106 minPhiIdx =
std::min(minPhiIdx,
static_cast<int>(hit.getPhiIndex()));
107 maxEtaIdx =
std::max(maxEtaIdx,
static_cast<int>(hit.getEtaIndex()));
108 minEtaIdx =
std::min(minEtaIdx,
static_cast<int>(hit.getEtaIndex()));
◆ SortedClustering()
◆ sortHitsOnModules() [1/2]
void FPGATrackSimClusteringTool::sortHitsOnModules |
( |
HitPtrContainer & |
hitsPerModule | ) |
const |
|
private |
◆ sortHitsOnModules() [2/2]
void FPGATrackSimClusteringTool::sortHitsOnModules |
( |
HitPtrContainer & |
hitsPerModule, |
|
|
int & |
eta_phi |
|
) |
| const |
|
private |
◆ sortIBLInput()
◆ sortPixelInput()
◆ splitAndSortHits() [1/2]
◆ splitAndSortHits() [2/2]
◆ splitHitsToModules()
Definition at line 293 of file FPGATrackSimClusteringTool.cxx.
298 for (
auto& hit:
hits){
300 hashing = hit->getIdentifierHash();
301 currentModule.push_back(std::move(hit));
302 }
else if (hit->getIdentifierHash() == hashing) {
303 currentModule.push_back(std::move(hit));
306 hashing = hit->getIdentifierHash();
307 currentModule.push_back(std::move(hit));
312 if (currentModule.size() > 0) hitsPerModule.
push_back(std::move(currentModule));
◆ m_coordPhiPrecision
Gaudi::Property<float> FPGATrackSimClusteringTool::m_coordPhiPrecision {this, "CoordPhiPrecision", 1./8192., "fixed point precision of phi coordinate" } |
|
private |
◆ m_coordRPrecision
Gaudi::Property<float> FPGATrackSimClusteringTool::m_coordRPrecision {this, "CoordRPrecision", 1./64., "fixed point precision of r coordinate" } |
|
private |
◆ m_coordZPrecision
Gaudi::Property<float> FPGATrackSimClusteringTool::m_coordZPrecision {this, "CoordZPrecision", 1./32., "fixed point precision of z coordinate" } |
|
private |
◆ m_digitalClustering
Gaudi::Property<bool> FPGATrackSimClusteringTool::m_digitalClustering {this, "DigitalClustering", true, "flag to enable digital clustering instead of ToT weighted position calculation" } |
|
private |
◆ m_LorentzAngleShift
Gaudi::Property<int> FPGATrackSimClusteringTool::m_LorentzAngleShift { this, "LorentzAngleShift", -1, "flag for Lorentz angle shift. -1 means off, 0 means full corrections from first version, 1 means smaller LUT, 2 means very small LUT" } |
|
private |
◆ m_lorentzAngleTool
◆ m_reduceCoordPrecision
Gaudi::Property<bool> FPGATrackSimClusteringTool::m_reduceCoordPrecision {this, "ReduceCoordPrecision", false, "flag to enable reducing the precision of global coordinates" } |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
bool updateStripCluster(FPGATrackSimCluster ¤tCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
#define CXXUTILS_TRAPPING_FP
hitVector const & getHitList() const
int getEtaModule(bool old=false) const
void setMinEtaIndex(int v)
void setEtaIndex(unsigned v)
bool updatePixelCluster(FPGATrackSimCluster ¤tCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
void setPhiCoord(float v)
void setCentroidPhiIndex(float v)
void setMaxEtaIndex(int v)
void setEtaWidth(unsigned v)
void setClusterEquiv(const FPGATrackSimHit &input)
bool sortITkInputPhi(const std::unique_ptr< FPGATrackSimHit > &hitA, const std::unique_ptr< FPGATrackSimHit > &HitB)
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
void setMaxPhiIndex(int v)
float getPhiCoord() const
void setMinPhiIndex(int v)
void setPhiIndex(unsigned v)
void setEtaCoord(float v)
void setCluster1ID(int v)
bool sortITkInputEta(const std::unique_ptr< FPGATrackSimHit > &hitA, const std::unique_ptr< FPGATrackSimHit > &hitB)
DetectorZone getDetectorZone() const
FPGATrackSimHit const & getClusterEquiv() const
float getCentroidPhiIndex() const
void setPhiWidth(unsigned v)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
float getEtaCoord() const
float getCentroidEtaIndex() const
constexpr float scaleHitFactor
#define ATH_MSG_WARNING(x)
SiliconTech getDetType() const
unsigned getPhysLayer(bool old=false) const
void setCentroidEtaIndex(float v)
void setParentageMask(unsigned long v)
unsigned getPhiWidth() const
void setHitType(HitType type)