14 constexpr
unsigned int ETA = 1;
15 constexpr
unsigned int PHI = 0;
30 std::vector<FPGATrackSimHit>
hits = tower.
hits();
32 std::vector<std::vector<FPGATrackSimHit>> hitsPerModule;
33 std::vector<FPGATrackSimCluster> towerClusters;
42 clusters.reserve(towerClusters.size());
44 ATH_MSG_WARNING(
"more than one tower, m_clusters is only going to contain those from the last one");
45 unsigned cluster_count = 0;
46 for (
auto &cluster: towerClusters){
50 tower.
addHit(cluster_as_FPGATrackSimhit);
57 return StatusCode::SUCCESS;
62 std::vector<FPGATrackSimCluster> moduleClusters;
64 for(
auto& moduleHits:sorted_hits){
68 clusters.insert(
clusters.end(), moduleClusters.begin(), moduleClusters.end());
70 moduleClusters.clear();
77 for(
auto& hit: moduleHits){
78 int is_clustered_hit =0;
81 for(
auto& cluster: moduleClusters){
90 if((is_clustered_hit==0) or (moduleClusters.size()==0)){
94 }
else if(hit.isStrip()){
98 moduleClusters.push_back(cluster);
117 std::vector<FPGATrackSimHit> currentModule;
120 for (
auto& hit:
hits){
122 currentModule.push_back(hit);
123 hashing = hit.getIdentifierHash();
124 }
else if (hit.getIdentifierHash() == hashing) {
125 currentModule.push_back(hit);
127 hitsPerModule.push_back(currentModule);
128 currentModule.clear();
129 hashing = hit.getIdentifierHash();
130 currentModule.push_back(hit);
135 if (currentModule.size() > 0) hitsPerModule.push_back(currentModule);
140 for (
auto&
module:hitsPerModule){
158 for (
auto&
module:hitsPerModule){
183 cluster.setClusterEquiv(clusterEquiv);
257 for(
auto& hit :
hits) {
260 if(!hit.getTruth().isEmpty()) {
261 mt.
add(hit.getTruth());
265 mt.
maximize(uniquecode, hit.getBarcodePt());
391 clusterCol = clusterCol - clusterColWidth;
393 clusterColWidth = clusterColWidth+tempWidth+1;
395 clusterCol = clusterCol + clusterColWidth;
414 float xOld = clusterEquiv.
getX();
415 float yOld = clusterEquiv.
getY();
416 float zOld = clusterEquiv.
getZ();
417 float xNew = incomingHit.
getX();
418 float yNew = incomingHit.
getY();
419 float zNew = incomingHit.
getZ();
424 clusterEquiv.
setX((xOld*
n + xNew) / (
n+1));
425 clusterEquiv.
setY((yOld*
n + yNew) / (
n+1));
426 clusterEquiv.
setZ((zOld*
n + zNew) / (
n+1));
433 clusterEquiv.
setX((xOld*
N + xNew*newN) / (
N+newN));
434 clusterEquiv.
setY((yOld*
N + yNew*newN) / (
N+newN));
435 clusterEquiv.
setZ((zOld*
N + zNew*newN) / (
N+newN));