Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <FPGATrackSimSpacePointsTool.h>
|
StatusCode | fillMaps (std::vector< FPGATrackSimHit > &hits) |
|
StatusCode | makeSpacePoints (FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints) |
|
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) |
|
void | addSpacePoints (FPGATrackSimHit hit_in, FPGATrackSimHit hit_out, FPGATrackSimTowerInputHeader &tower, std::vector< FPGATrackSimCluster > &spacepoints) |
|
void | reduceGlobalCoordPrecision (FPGATrackSimHit &hit) const |
|
|
std::map< std::vector< int >, std::pair< std::vector< FPGATrackSimHit >, std::vector< FPGATrackSimHit > > > | m_map |
|
std::vector< FPGATrackSimHit > | m_pixel |
|
Gaudi::Property< float > | m_phiwindow { this, "PhiWindow", 0.008, "Distance in phi to consider two hits for making a space-point" } |
|
Gaudi::Property< bool > | m_duplicate { this, "Duplication", false, "Duplicate spacepoints to layer on the other side of the stave" } |
|
Gaudi::Property< bool > | m_filter { this, "Filtering", false, "Filter out incomplete spacepoints" } |
|
Gaudi::Property< bool > | m_filterClose { this, "FilteringClosePoints", false, "Filter out single hits cloes to spacepoints" } |
|
Gaudi::Property< bool > | m_sameModulesOnly { this, "SameModulesOnly", false, "Only use hits on the same physical (eta) module" } |
|
Gaudi::Property< bool > | m_boundsCheck { this, "BoundsCheck", false, "Perform a module bounds check in the endcaps" } |
|
Gaudi::Property< bool > | m_reduceCoordPrecision {this, "ReduceCoordPrecision", false, "flag to enable reduc ing 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" } |
|
unsigned | m_inputhits = 0 |
|
unsigned | m_spacepts = 0 |
|
unsigned | m_filteredhits = 0 |
|
unsigned | m_adjacent_eta_sp = 0 |
|
unsigned | m_adjacent_phi_sp = 0 |
|
unsigned | m_diagonal_sp = 0 |
|
TH1I * | m_spacepts_per_hit = nullptr |
|
◆ addSpacePoints()
◆ calcPosition()
Definition at line 323 of file FPGATrackSimSpacePointsTool.cxx.
326 float r_sp = (hit_in.
getR() + hit_out.
getR()) / 2.0;;
327 float z_sp = (hit_in.
getZ() + hit_out.
getZ()) / 2.0;;
329 float delta_phi_local = (hit_in.
getGPhi() - hit_out.
getGPhi()) * r_sp;
333 static const float stereo_angle = 0.026;
334 z_sp += delta_phi_local/
tan(stereo_angle)/2.0;
338 static const float stereo_angle = 0.020;
339 r_sp += delta_phi_local/
tan(stereo_angle)/2.0;
344 float r_bounds[19] = {394.0, 415.5, 442.0, 472.4, 498.85, 521.45, 547.05, 566.65, 591.0, 621.8, 654.7, 683.9, 710.2, 739.4, 784.2, 838.8, 887.6, 937.7, 967.8};
349 if (r_sp!=r_limited) {
350 ATH_MSG_WARNING(
"Spacepoint location not in module boundary: r_sp=" << r_sp
358 if (r_sp!=r_limited) {
359 ATH_MSG_WARNING(
"Crossing spacepoint location too far from module boundary: r_sp=" << r_sp
360 <<
" not in [" << r_bounds[hit_in.
getEtaModule()+1]-window <<
"," << r_bounds[hit_in.
getEtaModule()+1]+window <<
"]");
368 x = r_sp*
cos(phi_sp);
369 y = r_sp*
sin(phi_sp);
◆ DoSpacePoints()
◆ fillMaps()
StatusCode FPGATrackSimSpacePointsTool::fillMaps |
( |
std::vector< FPGATrackSimHit > & |
hits | ) |
|
|
private |
Definition at line 60 of file FPGATrackSimSpacePointsTool.cxx.
66 for (
auto hit :
hits) {
71 ATH_MSG_DEBUG(
"Pixel hit z = " << hit.getZ() <<
", r = " << hit.getR() <<
", phi = " << hit.getGPhi());
76 std::vector<int> module_desc(4);
78 module_desc[0] = (
int)hit.getDetectorZone();
79 module_desc[1] = hit.getPhysLayer()/2;
80 unsigned side = hit.getPhysLayer()%2;
81 module_desc[2] = hit.getPhiModule();
82 module_desc[3] = hit.getEtaModule();
85 m_map[module_desc].first.push_back(hit);
87 m_map[module_desc].second.push_back(hit);
90 ATH_MSG_DEBUG(
"Running spacepoints default tool over " << strip_hits <<
" strip hits.");
92 return StatusCode::SUCCESS;
◆ finalize()
StatusCode FPGATrackSimSpacePointsTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode FPGATrackSimSpacePointsTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ makeSpacePoints()
Definition at line 95 of file FPGATrackSimSpacePointsTool.cxx.
104 std::vector<FPGATrackSimHit>& hits_inner =
entry.second.first;
105 std::vector<FPGATrackSimHit>& hits_outer =
entry.second.second;
107 for (
auto hit_in : hits_inner) {
108 int startsize = spacepoints.size();
109 bool foundPair =
searchForMatch(hit_in,hits_outer,tower,spacepoints);
113 std::vector<int> nextmod =
entry.first;
115 auto entry2 =
m_map.find(nextmod);
116 if (entry2!=
m_map.end()) {
117 foundPair =
searchForMatch(hit_in,entry2->second.second,tower,spacepoints);
125 std::vector<int> nextphimod =
entry.first;
127 auto entry3 =
m_map.find(nextphimod);
128 if (entry3!=
m_map.end()) {
129 foundPair =
searchForMatch(hit_in,entry3->second.second,tower,spacepoints);
137 std::vector<int> next2mod =
entry.first;
140 auto entry4 =
m_map.find(next2mod);
141 if (entry4!=
m_map.end()) {
142 foundPair =
searchForMatch(hit_in,entry4->second.second,tower,spacepoints);
151 ATH_MSG_DEBUG(
"Unpaired hit z = " << hit_in.getZ() <<
", r = " << hit_in.getR() <<
", phi = " << hit_in.getGPhi() <<
", phi module = " << hit_in.getPhiModule() <<
", eta module = " << hit_in.getEtaModule());
160 bool foundPair=
false;
162 if (abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
169 std::vector<int> nextmod =
entry.first;
171 auto entry2 =
m_map.find(nextmod);
172 if (entry2!=
m_map.end()) {
173 for (
auto hit_in : entry2->second.first) {
174 if (abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
185 std::vector<int> nextphimod =
entry.first;
187 auto entry3 =
m_map.find(nextphimod);
188 if (entry3!=
m_map.end()) {
189 for (
auto hit_in : entry3->second.first) {
190 if (abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
202 std::vector<int> next2mod =
entry.first;
205 auto entry4 =
m_map.find(next2mod);
206 if (entry4!=
m_map.end()) {
207 for (
auto hit_in : entry4->second.first) {
208 if (abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
221 ATH_MSG_DEBUG(
"Unpaired hit z = " << hit_out.getZ() <<
", r = " << hit_out.getR() <<
", phi = " << hit_out.getGPhi() <<
", phi module = " << hit_out.getPhiModule() <<
", eta module = " << hit_out.getEtaModule());
234 return StatusCode::SUCCESS;
◆ reduceGlobalCoordPrecision()
void FPGATrackSimSpacePointsTool::reduceGlobalCoordPrecision |
( |
FPGATrackSimHit & |
hit | ) |
const |
|
private |
◆ searchForMatch()
◆ m_adjacent_eta_sp
unsigned FPGATrackSimSpacePointsTool::m_adjacent_eta_sp = 0 |
|
private |
◆ m_adjacent_phi_sp
unsigned FPGATrackSimSpacePointsTool::m_adjacent_phi_sp = 0 |
|
private |
◆ m_boundsCheck
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_boundsCheck { this, "BoundsCheck", false, "Perform a module bounds check in the endcaps" } |
|
private |
◆ m_coordPhiPrecision
Gaudi::Property<float> FPGATrackSimSpacePointsTool::m_coordPhiPrecision {this, "CoordPhiPrecision", 1./8192., "fixed point precision of phi coordinate" } |
|
private |
◆ m_coordRPrecision
Gaudi::Property<float> FPGATrackSimSpacePointsTool::m_coordRPrecision {this, "CoordRPrecision", 1./64., "fixed point precision of r coordinate" } |
|
private |
◆ m_coordZPrecision
Gaudi::Property<float> FPGATrackSimSpacePointsTool::m_coordZPrecision {this, "CoordZPrecision", 1./32., "fixed point precision of z coordinate" } |
|
private |
◆ m_diagonal_sp
unsigned FPGATrackSimSpacePointsTool::m_diagonal_sp = 0 |
|
private |
◆ m_duplicate
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_duplicate { this, "Duplication", false, "Duplicate spacepoints to layer on the other side of the stave" } |
|
private |
◆ m_filter
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_filter { this, "Filtering", false, "Filter out incomplete spacepoints" } |
|
private |
◆ m_filterClose
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_filterClose { this, "FilteringClosePoints", false, "Filter out single hits cloes to spacepoints" } |
|
private |
◆ m_filteredhits
unsigned FPGATrackSimSpacePointsTool::m_filteredhits = 0 |
|
private |
◆ m_inputhits
unsigned FPGATrackSimSpacePointsTool::m_inputhits = 0 |
|
private |
◆ m_map
◆ m_phiwindow
Gaudi::Property<float> FPGATrackSimSpacePointsTool::m_phiwindow { this, "PhiWindow", 0.008, "Distance in phi to consider two hits for making a space-point" } |
|
private |
◆ m_pixel
◆ m_reduceCoordPrecision
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_reduceCoordPrecision {this, "ReduceCoordPrecision", false, "flag to enable reduc ing the precision of global coordinates" } |
|
private |
◆ m_sameModulesOnly
Gaudi::Property<bool> FPGATrackSimSpacePointsTool::m_sameModulesOnly { this, "SameModulesOnly", false, "Only use hits on the same physical (eta) module" } |
|
private |
◆ m_spacepts
unsigned FPGATrackSimSpacePointsTool::m_spacepts = 0 |
|
private |
◆ m_spacepts_per_hit
TH1I* FPGATrackSimSpacePointsTool::m_spacepts_per_hit = nullptr |
|
private |
The documentation for this class was generated from the following files:
unsigned getPhiModule() const
int getEtaModule(bool old=false) const
void makeSpacepoint(float x, float y, float z, float window, FPGATrackSimHit &other, FPGATrackSimMultiTruth &new_truth)
void setClusterEquiv(const FPGATrackSimHit &input)
const FPGATrackSimMultiTruth & getTruth() const
void add(const FPGATrackSimMultiTruth::Barcode &code, const FPGATrackSimMultiTruth::Weight &weight)
int getCluster1ID() const
#define ATH_MSG_WARNING(x)
void setCluster2ID(int v)
void push_backHitList(const FPGATrackSimHit &input)