ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimHitFilteringTool Class Reference

#include <FPGATrackSimHitFilteringTool.h>

Inheritance diagram for FPGATrackSimHitFilteringTool:
Collaboration diagram for FPGATrackSimHitFilteringTool:

Public Member Functions

 FPGATrackSimHitFilteringTool (const std::string &, const std::string &, const IInterface *)
virtual ~FPGATrackSimHitFilteringTool ()=default
virtual StatusCode initialize () override
virtual StatusCode DoRandomRemoval (FPGATrackSimLogicalEventInputHeader &, bool) const override
virtual StatusCode GetPairedStripPhysLayers (const FPGATrackSimPlaneMap *, std::vector< int > &) override
virtual StatusCode DoHitFiltering (FPGATrackSimLogicalEventInputHeader &, std::vector< int >, std::vector< int >, std::vector< FPGATrackSimCluster > &) override

Private Member Functions

void FilterHits (std::vector< FPGATrackSimHit > &, std::vector< int > &, std::vector< int > &, std::vector< FPGATrackSimHit > &)
bool check_hit_stub (const FPGATrackSimHit &, const FPGATrackSimHit &, float, float)
void fill_cut_values (const FPGATrackSimHit &, float &, float &)
TRandom3 * getRandomGen (unsigned long eventNumber) const
 Get thread-local random number generator, seeded per event.

Private Attributes

Gaudi::Property< bool > m_digitalClustering {this, "DigitalClustering", true, "flag to enable digital clustering instead of ToT weighted position calculation" }
Gaudi::Property< bool > m_doRandomRemoval {this, "doRandomRemoval", false, "remove hits/clusters at random"}
Gaudi::Property< float > m_rndPixelHitRmFrac {this, "pixelHitRmFrac", 0.0, "fraction of pixel hits to randomly remove"}
Gaudi::Property< float > m_rndStripHitRmFrac {this, "stripHitRmFrac", 0.0, "fraction of strip hits to randomly remove"}
Gaudi::Property< float > m_rndPixelClustRmFrac {this, "pixelClusRmFrac", 0.0, "fraction of pixel clusters to randomly remove"}
Gaudi::Property< float > m_rndStripClustRmFrac {this, "stripClusRmFrac", 0.0, "fraction of strip clusters to randomly remove"}
Gaudi::Property< bool > m_doStubs {this, "doStubs", false, "flag to enable dphi stub hit filtering"}
Gaudi::Property< std::string > m_stubCutsFile {this, "stubsCutsFile", "", "stubs cuts file"}
Gaudi::Property< float > m_barrelStubDphiCut {this, "barrelStubDphiCut", 0.0, "barrel stub dPhi cut. Overridden by stubCutsFile"}
Gaudi::Property< float > m_endcapStubDphiCut {this, "endcapStubDphiCut", 0.0, "endcap stub dPhi cut. Overridden by stubCutsFile"}
Gaudi::Property< bool > m_useNstrips {this, "useNstrips", false, "use nStrips instead of dPhi for stub filtering"}
Gaudi::Property< unsigned int > m_randomSeed {this, "RandomSeed", 1, "Seed for random number generator"}
boost::thread_specific_ptr< TRandom3 > m_random
std::unordered_map< std::string, std::unordered_map< int, std::unordered_map< int, std::pair< float, float > > > > m_stubCutMap

Detailed Description

Definition at line 30 of file FPGATrackSimHitFilteringTool.h.

Constructor & Destructor Documentation

◆ FPGATrackSimHitFilteringTool()

FPGATrackSimHitFilteringTool::FPGATrackSimHitFilteringTool ( const std::string & algname,
const std::string & name,
const IInterface * ifc )

Definition at line 26 of file FPGATrackSimHitFilteringTool.cxx.

27 : base_class(algname, name, ifc)
28{
29}

◆ ~FPGATrackSimHitFilteringTool()

virtual FPGATrackSimHitFilteringTool::~FPGATrackSimHitFilteringTool ( )
virtualdefault

Member Function Documentation

◆ check_hit_stub()

bool FPGATrackSimHitFilteringTool::check_hit_stub ( const FPGATrackSimHit & innerHit,
const FPGATrackSimHit & outerHit,
float cut_m,
float cut_p )
private

Definition at line 460 of file FPGATrackSimHitFilteringTool.cxx.

461{
462
463 float val;
464
465 if(!m_useNstrips) {
466 // calculate dphi - accounting for 2 pi wrapping
467 float pi = M_PI;
468 float dPhi = (outerHit.getGPhi() - innerHit.getGPhi());
469 if(dPhi > pi)
470 dPhi -= 2*pi;
471 if(dPhi < -pi)
472 dPhi += 2*pi;
473
474 // we want it in mrad
475 val = dPhi * 1000;
476 }
477
478 else {
479 val = 0;
480 }
481
482 // apply cuts
483 return (val > cut_m && val < cut_p);
484}
#define M_PI
#define pi
float getGPhi() const
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

◆ DoHitFiltering()

StatusCode FPGATrackSimHitFilteringTool::DoHitFiltering ( FPGATrackSimLogicalEventInputHeader & header,
std::vector< int > filter_pixel_physLayers,
std::vector< int > filter_strip_physLayers,
std::vector< FPGATrackSimCluster > & filteredClusters )
overridevirtual

Definition at line 236 of file FPGATrackSimHitFilteringTool.cxx.

240{
241
242 int nHits_preFilt = countHitsFromHeader(header);
243
244 for (int i = 0; i < header.nTowers(); ++i) {
245 FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
246 std::vector<FPGATrackSimHit> hits;
247 hits = tower.hits();
249
250 std::vector<FPGATrackSimHit> filteredHits;
251 FilterHits(hits, filter_pixel_physLayers, filter_strip_physLayers, filteredHits);
252
253 // replace old clusters with new ones (the things called hits here are actually clusters)
254 tower.clearHits();
255 for (auto& hit : filteredHits) {
256 tower.addHit(hit);
257 // make FPGATrackSimCluster for monitoring
258 FPGATrackSimCluster cluster;
259 if(hit.isPixel()){
261 }
262 if(hit.isStrip()){
264 }
265 filteredClusters.push_back(cluster);
266 }
267 }
268
269 int nHits_postFilt = countHitsFromHeader(header);
270
271 if(m_doStubs) { // random removal doesn't impact this so rather boring output
272 if(nHits_postFilt == nHits_preFilt) {
273 ANA_MSG_INFO("Stub filtering had no impact: " << nHits_preFilt << " hits/clusters");
274 }
275 else if(nHits_postFilt < nHits_preFilt) {
276 ANA_MSG_INFO("Stub filtering reduced from " << nHits_preFilt << " to " << nHits_postFilt << " hits/clusters");
277 }
278 else {
279 ANA_MSG_WARNING("Stub filtering has led to duplication - started with " << nHits_preFilt << " and ended up with " << nHits_postFilt << " hits/clusters");
280 printHitsFromHeader(header);
281 }
282 }
283
284 return StatusCode::SUCCESS;
285}
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
void printHitsFromHeader(FPGATrackSimLogicalEventInputHeader &)
int countHitsFromHeader(FPGATrackSimLogicalEventInputHeader &)
void FilterHits(std::vector< FPGATrackSimHit > &, std::vector< int > &, std::vector< int > &, std::vector< FPGATrackSimHit > &)
const std::vector< FPGATrackSimHit > & hits() const
void addHit(const FPGATrackSimHit &s)
bool updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
bool updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
void attachTruth(std::vector< FPGATrackSimHit > &)

◆ DoRandomRemoval()

StatusCode FPGATrackSimHitFilteringTool::DoRandomRemoval ( FPGATrackSimLogicalEventInputHeader & header,
bool hit_or_cluster ) const
overridevirtual

Definition at line 145 of file FPGATrackSimHitFilteringTool.cxx.

146{
148 return StatusCode::SUCCESS;
149
150 float pixelFrac = hit_or_cluster ? m_rndPixelHitRmFrac : m_rndPixelClustRmFrac;
151 float stripFrac = hit_or_cluster ? m_rndStripHitRmFrac : m_rndStripClustRmFrac;
152
153 if(pixelFrac==0 && stripFrac==0)
154 return StatusCode::SUCCESS;
155
156 unsigned long eventNumber = header.event().eventNumber();
157 TRandom3* rng = getRandomGen(eventNumber);
158
159 for (int i = 0; i < header.nTowers(); ++i) {
160 FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
161 std::vector<FPGATrackSimHit> hits;
162 hits = tower.hits();
164
165 std::vector<FPGATrackSimHit> filteredHits;
166 for(const auto & hit : hits) {
167 if(hit.isStrip()) {
168 if(rng->Rndm() >= stripFrac)
169 filteredHits.push_back(hit);
170 }
171 else {
172 if(rng->Rndm() >= pixelFrac)
173 filteredHits.push_back(hit);
174 }
175 }
176
177 tower.clearHits();
178 for (const auto & hit : filteredHits) {
179 tower.addHit(hit);
180 }
181
182 std::string hit_or_cluster_str = hit_or_cluster ? "hit" : "cluster";
183 ANA_MSG_INFO("After random " << hit_or_cluster_str << " removal - (pixel, strip) = (" << pixelFrac << ", " << stripFrac << ") - have " << filteredHits.size() << " left of " << hits.size() << " " << hit_or_cluster_str << "s");
184
185 }
186 return StatusCode::SUCCESS;
187}
Gaudi::Property< float > m_rndPixelClustRmFrac
Gaudi::Property< float > m_rndStripHitRmFrac
Gaudi::Property< float > m_rndPixelHitRmFrac
TRandom3 * getRandomGen(unsigned long eventNumber) const
Get thread-local random number generator, seeded per event.
Gaudi::Property< float > m_rndStripClustRmFrac
uint32_t rng()
Definition FillerAlg.cxx:40

◆ fill_cut_values()

void FPGATrackSimHitFilteringTool::fill_cut_values ( const FPGATrackSimHit & hit,
float & cut_m,
float & cut_p )
private

Definition at line 413 of file FPGATrackSimHitFilteringTool.cxx.

414{
415 // if we're doing this globally, then no need to use map
416 // but probably best to for consistency
417
418 // get cut from map - first, find out which zone, layer and module ring we're in
419 // can maybe do this from module ID, might be faster
420
421 std::string zone;
422 int layer, ring;
423 if(hit.isBarrel()) {
424 zone = "bar";
425 layer = hit.getLayerDisk();
426 // barrel modules are spaced at 100mm intervals. This might go wrong at the ends, need to verify
427 ring = int(floor(hit.getZ() / 100.));
428 }
429 else {
430 zone = (hit.getZ() < 0) ? "EC-" : "EC+";
431 layer = hit.getLayerDisk();
432
433 // use hit radius to determine module ring from endcap geometry in geometry_constants namespace
434 int index = -1;
437 ANA_MSG_ERROR("hit radius " << hit.getR() << "is not within bounds of endcap innerRadii vector");
438 ring = hit.getR() < geometry_constants::strip_endcap_innerRadii.front() ? 0 : 5;
439 }
440 else {
444 int temp = index;
445 // subtract numbers from the start until get below zero
446 for(ring=0; ring < int(geometry_constants::strip_endcap_nRows.size()); ring++) {
448 if(temp<0)
449 break;
450 }
451 }
452 }
453
454 cut_m = m_stubCutMap[zone][layer][ring].first;
455 cut_p = m_stubCutMap[zone][layer][ring].second;
456
457}
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
std::unordered_map< std::string, std::unordered_map< int, std::unordered_map< int, std::pair< float, float > > > > m_stubCutMap
bool isBarrel() const
float getZ() const
float getR() const
unsigned getLayerDisk(bool old=false) const
str index
Definition DeMoScan.py:362
@ layer
Definition HitInfo.h:79
const std::vector< int > strip_endcap_nRows
const std::vector< float > strip_endcap_innerRadii

◆ FilterHits()

void FPGATrackSimHitFilteringTool::FilterHits ( std::vector< FPGATrackSimHit > & hits,
std::vector< int > & filter_pixel_physLayers,
std::vector< int > & filter_strip_physLayers,
std::vector< FPGATrackSimHit > & filteredHits )
private

Definition at line 288 of file FPGATrackSimHitFilteringTool.cxx.

292{
293
294 // there are two types of clusters
295 // 1. Those in a part of the detector I am not going to try and filter
296 // 2. Those in a part of the detector I am am going to try and filter
297
298 // for stub-type filtering, I want to compare all hits on one side to all hits on the other side
299 // don't want to duplicate by doing this twice
300 // use pair<FPGATrackSimHit,ID> to deal with duplicates
301
302 filteredHits.clear();
303
304 if(m_doStubs) {
305 // step 1: make a vector of just the hits I am going to try and filter, add the others straight to the passed list. Also give each hit an ID
306
307 std::vector< std::pair<FPGATrackSimHit,unsigned> > filteredHits_ID, hits_to_filter;
308 unsigned counter = 0;
309 for (const auto &hit : hits) {
310 // assign hit ID
311 std::pair<FPGATrackSimHit,unsigned> hit_ID;
312 hit_ID.first = hit;
313 hit_ID.second = counter;
314 counter ++;
315
316 // check pixel layer
317 if(!hit.isStrip()) {
318 if( std::any_of(std::begin(filter_pixel_physLayers), std::end(filter_pixel_physLayers),
319 [&](unsigned i) { return i == hit.getPhysLayer(); }) )
320 hits_to_filter.push_back(hit_ID);
321 else
322 filteredHits_ID.push_back(hit_ID);
323 }
324 // check strip layer
325 else {
326 if( std::any_of(std::begin(filter_strip_physLayers), std::end(filter_strip_physLayers),
327 [&](unsigned i) { return i == hit.getPhysLayer(); }) )
328 hits_to_filter.push_back(hit_ID);
329 else
330 filteredHits_ID.push_back(hit_ID);
331 }
332 }
333
334 // step 2: split into two lists: inner and outer side modules
335 std::vector< std::pair<FPGATrackSimHit,unsigned> > hits_to_filter_inner, hits_to_filter_outer;
336 // ideally use hit.GetSide(), but since this doesn't exist and can't be added
337 // (until I add a friend class, coming soon hopefully)
338 // have to use the hit physLayer
339
340 for (const auto &hit : hits_to_filter) {
341 if (hit.first.getPhysLayer() % 2 == 0)
342 hits_to_filter_inner.push_back(hit);
343 else
344 hits_to_filter_outer.push_back(hit);
345 }
346
347 // step 3: do the stub filtering
348 std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_inner_hits, passed_outer_hits;
349 for (const auto &innerHit : hits_to_filter_inner) {
350 std::vector<std::pair<FPGATrackSimHit,unsigned>> nearby_outer_hits;
351 fill_nearby_hits(innerHit.first, hits_to_filter_outer, nearby_outer_hits);
352
353 // get cut values to apply
354 float cut_m, cut_p;
355 fill_cut_values(innerHit.first, cut_m, cut_p);
356
357 for (const auto &outerHit : nearby_outer_hits) {
358 bool hitPassed = check_hit_stub(innerHit.first, outerHit.first, cut_m, cut_p);
359 if(hitPassed) {
360 // will have duplicates. Maybe interesting to count them, so remove later
361 passed_inner_hits.push_back(innerHit);
362 passed_outer_hits.push_back(outerHit);
363 }
364 }
365 }
366
367 // step 4: remove duplicates among the passed hits
368 std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_outer_hits_unique;
369 for (const auto &hit : passed_outer_hits) {
370 auto it = std::find_if(passed_outer_hits_unique.begin(), passed_outer_hits_unique.end(),
371 [&hit](const std::pair<FPGATrackSimHit,unsigned>& h) {return h.second == hit.second;} );
372 if(it == passed_outer_hits_unique.end()) {
373 passed_outer_hits_unique.push_back(hit);
374 }
375 }
376 std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_inner_hits_unique;
377 for (const auto &hit : passed_inner_hits) {
378 auto it = std::find_if(passed_inner_hits_unique.begin(), passed_inner_hits_unique.end(),
379 [&hit](const std::pair<FPGATrackSimHit,unsigned>& h) {return h.second == hit.second;} );
380 if(it == passed_inner_hits_unique.end()) {
381 passed_inner_hits_unique.push_back(hit);
382 }
383 }
384
385
386 // step 5: combine them all and sort
387 for (auto &hit : passed_inner_hits_unique) {
388 filteredHits_ID.push_back(hit);
389 }
390 for (const auto &hit : passed_outer_hits_unique) {
391 filteredHits_ID.push_back(hit);
392 }
393 if(true) {
394 // can sort by the hit ID
395 std::sort(filteredHits_ID.begin(), filteredHits_ID.end(),
396 [](const std::pair<FPGATrackSimHit,unsigned> & hit1, const std::pair<FPGATrackSimHit,unsigned> & hit2){
397 return hit1.second < hit2.second;
398 });
399 for (const auto &hit_ID : filteredHits_ID) {
400 filteredHits.push_back(hit_ID.first);
401 }
402 }
403
404 }
405 else {
406 // fill up filteredHits with the input hits (needed for random removal, which isn't done here)
407 filteredHits = hits;
408 }
409
410}
void fill_nearby_hits(const FPGATrackSimHit &, std::vector< std::pair< FPGATrackSimHit, unsigned > > &, std::vector< std::pair< FPGATrackSimHit, unsigned > > &)
void fill_cut_values(const FPGATrackSimHit &, float &, float &)
bool check_hit_stub(const FPGATrackSimHit &, const FPGATrackSimHit &, float, float)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ GetPairedStripPhysLayers()

StatusCode FPGATrackSimHitFilteringTool::GetPairedStripPhysLayers ( const FPGATrackSimPlaneMap * planeMap,
std::vector< int > & paired_strip_layers )
overridevirtual

Definition at line 191 of file FPGATrackSimHitFilteringTool.cxx.

192{
193 std::vector<int> all_strip_layers;
194
195 for(int logiLayer = 0; logiLayer < int(planeMap->getNLogiLayers()); logiLayer++) {
196 for(int section = 0; section < int(planeMap->getNSections(logiLayer)); section++) {
197 LayerInfo thisLayerInfo = planeMap->getLayerInfo(logiLayer,section);
198 if(thisLayerInfo.siTech == SiliconTech::pixel) {
199 continue;
200 }
201 else if (thisLayerInfo.siTech == SiliconTech::strip) {
202 all_strip_layers.push_back(thisLayerInfo.physLayer);
203 // check assumptions about physLayer and stereo parity
204 if((thisLayerInfo.physLayer - thisLayerInfo.stereo) % 2 != 0) {
205 ANA_MSG_ERROR("expected parity of strip physLayer and stereo doesn't hold: " <<
206 logiLayer << ", " << section << ": " << thisLayerInfo.siTech <<
207 ", " << thisLayerInfo.zone << ", " << thisLayerInfo.physLayer <<
208 ", " << thisLayerInfo.stereo);
209 return StatusCode::FAILURE;
210 }
211
212 }
213 else {
214 ANA_MSG_WARNING("siTech not in (pixel,strip)");
215 continue;
216 }
217 }
218 }
219 // need both stereo sides
220 // for each odd one, need x-1, then odd one is good
221 // for each even one, need x+1, then even one is good
222 for(const auto& physLayer : all_strip_layers) {
223 if(physLayer % 2 == 1) {
224 if(std::find(all_strip_layers.begin(), all_strip_layers.end(), physLayer-1) != all_strip_layers.end())
225 paired_strip_layers.push_back(physLayer);
226 }
227 else {
228 if(std::find(all_strip_layers.begin(), all_strip_layers.end(), physLayer+1) != all_strip_layers.end())
229 paired_strip_layers.push_back(physLayer);
230 }
231 }
232 return StatusCode::SUCCESS;
233}
void section(const std::string &sec)
uint32_t getNLogiLayers() const
uint32_t getNSections(size_t logiLayer) const
const LayerInfo & getLayerInfo(uint32_t layer, uint32_t section) const
SiliconTech siTech
DetectorZone zone

◆ getRandomGen()

TRandom3 * FPGATrackSimHitFilteringTool::getRandomGen ( unsigned long eventNumber) const
private

Get thread-local random number generator, seeded per event.

Returns a thread-specific TRandom3 instance. Re-seeds for each event using event number to ensure reproducibility: same event always gets same random sequence regardless of which thread processes it.

Parameters
eventNumberEvent number used for seeding
Returns
Pointer to thread-local TRandom3 instance

Definition at line 136 of file FPGATrackSimHitFilteringTool.cxx.

136 {
137 if (!m_random.get()) {
138 m_random.reset(new TRandom3(0));
139 }
140 // Re-seed for each event to ensure reproducibility
141 m_random->SetSeed(m_randomSeed.value() + eventNumber);
142 return m_random.get();
143}
Gaudi::Property< unsigned int > m_randomSeed
boost::thread_specific_ptr< TRandom3 > m_random

◆ initialize()

StatusCode FPGATrackSimHitFilteringTool::initialize ( )
overridevirtual

Definition at line 32 of file FPGATrackSimHitFilteringTool.cxx.

33{
34
35 // random removal
37 m_doRandomRemoval = true;
39 ANA_MSG_INFO("Doing random removal with pixel hit, cluster = " << m_rndPixelHitRmFrac << ", " << m_rndPixelClustRmFrac << " and strip = " << m_rndStripHitRmFrac << ", " << m_rndStripClustRmFrac);
40 ANA_MSG_INFO("Random seed base value: " << m_randomSeed.value());
41 }
42
43 // stubs
44 if(m_doStubs) {
45 ANA_MSG_INFO("Doing stub filtering");
46
47 if(m_stubCutsFile != "") {
48 // look for it via absolute path
49 ANA_MSG_INFO("looking for stub cuts file " << m_stubCutsFile);
50 std::ifstream inFile;
52 if(inFile) {
53 ANA_MSG_INFO("reading in from there");
54 }
55 else { // if not there, try PathResolver (might be in TrigHttHitFiltering/config/)
56 std::string stubCutsFile = PathResolver::find_file(m_stubCutsFile, "DATAPATH");
57 inFile.open(stubCutsFile);
58 if(inFile) {
59 ANA_MSG_INFO("read in " << stubCutsFile);
60 }
61 else {
62 ANA_MSG_ERROR("Couldn't find it");
63 return StatusCode::FAILURE;
64 }
65 }
66
67 std::string line;
68
69 while(!inFile.eof()) {
70 std::getline(inFile, line);
71 if(line.substr(0,1) == "#" || line == "")
72 continue;
73 std::vector<std::string> strs, cuts_str;
74 boost::split(strs, line, boost::is_any_of("\t"));
75 if(m_useNstrips)
76 boost::split(cuts_str, strs[4], boost::is_any_of(","));
77 else
78 boost::split(cuts_str, strs[3], boost::is_any_of(","));
79 std::pair<float,float> cuts;
80 cuts.first = std::stof(cuts_str[0]);
81 cuts.second = std::stof(cuts_str[1]);
82 m_stubCutMap[strs[0]][std::stoi(strs[1])][std::stoi(strs[2])] = cuts;
83 }
84 }
85
86 else {
87 // populate it with uniform values
88 ANA_MSG_INFO("using global values for stub cuts");
89
90 if(m_useNstrips) {
91 ANA_MSG_ERROR("you asked to use Nstrips in stub selection, but that only works when reading in a file (defaults not set)");
92 return StatusCode::FAILURE;
93 }
94 for(int i=0; i<4; i++) {
95 for(int j=-14; j<14; j++) {
96 m_stubCutMap["bar"][i][j] = std::pair<float,float>(-m_barrelStubDphiCut, m_barrelStubDphiCut);
97 }
98 }
99 for(int i=0; i<6; i++) {
100 for(int j=0; j<6; j++) {
101 m_stubCutMap["EC+"][i][j] = std::pair<float,float>(-m_endcapStubDphiCut, m_endcapStubDphiCut);
102 m_stubCutMap["EC-"][i][j] = std::pair<float,float>(-m_endcapStubDphiCut, m_endcapStubDphiCut);
103 }
104 }
105 }
106
107 // print out the stubCutMap
108 if(m_useNstrips)
109 ANA_MSG_INFO("using stub cut map (nStrips):");
110 else
111 ANA_MSG_INFO("using stub cut map (dPhi):");
112 for(const auto& zone_map : m_stubCutMap) {
113 for(const auto& layer_map : zone_map.second) {
114 for(const auto& ring_map : layer_map.second) {
115 ANA_MSG_INFO(" " << zone_map.first << " " << layer_map.first
116 << " " << ring_map.first << " " << ring_map.second.first
117 << ", " << ring_map.second.second);
118 }
119 }
120 }
121 }
122
123 return StatusCode::SUCCESS;
124}
Gaudi::Property< float > m_barrelStubDphiCut
Gaudi::Property< std::string > m_stubCutsFile
Gaudi::Property< float > m_endcapStubDphiCut
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
str inFile
Definition makeTOC.py:5

Member Data Documentation

◆ m_barrelStubDphiCut

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_barrelStubDphiCut {this, "barrelStubDphiCut", 0.0, "barrel stub dPhi cut. Overridden by stubCutsFile"}
private

Definition at line 61 of file FPGATrackSimHitFilteringTool.h.

61{this, "barrelStubDphiCut", 0.0, "barrel stub dPhi cut. Overridden by stubCutsFile"};

◆ m_digitalClustering

Gaudi::Property<bool> FPGATrackSimHitFilteringTool::m_digitalClustering {this, "DigitalClustering", true, "flag to enable digital clustering instead of ToT weighted position calculation" }
private

Definition at line 53 of file FPGATrackSimHitFilteringTool.h.

53{this, "DigitalClustering", true, "flag to enable digital clustering instead of ToT weighted position calculation" };

◆ m_doRandomRemoval

Gaudi::Property<bool> FPGATrackSimHitFilteringTool::m_doRandomRemoval {this, "doRandomRemoval", false, "remove hits/clusters at random"}
private

Definition at line 54 of file FPGATrackSimHitFilteringTool.h.

54{this, "doRandomRemoval", false, "remove hits/clusters at random"};

◆ m_doStubs

Gaudi::Property<bool> FPGATrackSimHitFilteringTool::m_doStubs {this, "doStubs", false, "flag to enable dphi stub hit filtering"}
private

Definition at line 59 of file FPGATrackSimHitFilteringTool.h.

59{this, "doStubs", false, "flag to enable dphi stub hit filtering"};

◆ m_endcapStubDphiCut

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_endcapStubDphiCut {this, "endcapStubDphiCut", 0.0, "endcap stub dPhi cut. Overridden by stubCutsFile"}
private

Definition at line 62 of file FPGATrackSimHitFilteringTool.h.

62{this, "endcapStubDphiCut", 0.0, "endcap stub dPhi cut. Overridden by stubCutsFile"};

◆ m_random

boost::thread_specific_ptr<TRandom3> FPGATrackSimHitFilteringTool::m_random
mutableprivate

Definition at line 66 of file FPGATrackSimHitFilteringTool.h.

◆ m_randomSeed

Gaudi::Property<unsigned int> FPGATrackSimHitFilteringTool::m_randomSeed {this, "RandomSeed", 1, "Seed for random number generator"}
private

Definition at line 64 of file FPGATrackSimHitFilteringTool.h.

64{this, "RandomSeed", 1, "Seed for random number generator"}; // for reproducibility

◆ m_rndPixelClustRmFrac

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_rndPixelClustRmFrac {this, "pixelClusRmFrac", 0.0, "fraction of pixel clusters to randomly remove"}
private

Definition at line 57 of file FPGATrackSimHitFilteringTool.h.

57{this, "pixelClusRmFrac", 0.0, "fraction of pixel clusters to randomly remove"};

◆ m_rndPixelHitRmFrac

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_rndPixelHitRmFrac {this, "pixelHitRmFrac", 0.0, "fraction of pixel hits to randomly remove"}
private

Definition at line 55 of file FPGATrackSimHitFilteringTool.h.

55{this, "pixelHitRmFrac", 0.0, "fraction of pixel hits to randomly remove"};

◆ m_rndStripClustRmFrac

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_rndStripClustRmFrac {this, "stripClusRmFrac", 0.0, "fraction of strip clusters to randomly remove"}
private

Definition at line 58 of file FPGATrackSimHitFilteringTool.h.

58{this, "stripClusRmFrac", 0.0, "fraction of strip clusters to randomly remove"};

◆ m_rndStripHitRmFrac

Gaudi::Property<float> FPGATrackSimHitFilteringTool::m_rndStripHitRmFrac {this, "stripHitRmFrac", 0.0, "fraction of strip hits to randomly remove"}
private

Definition at line 56 of file FPGATrackSimHitFilteringTool.h.

56{this, "stripHitRmFrac", 0.0, "fraction of strip hits to randomly remove"};

◆ m_stubCutMap

std::unordered_map<std::string, std::unordered_map<int, std::unordered_map<int, std::pair<float,float> > > > FPGATrackSimHitFilteringTool::m_stubCutMap
private

Definition at line 67 of file FPGATrackSimHitFilteringTool.h.

◆ m_stubCutsFile

Gaudi::Property<std::string> FPGATrackSimHitFilteringTool::m_stubCutsFile {this, "stubsCutsFile", "", "stubs cuts file"}
private

Definition at line 60 of file FPGATrackSimHitFilteringTool.h.

60{this, "stubsCutsFile", "", "stubs cuts file"};

◆ m_useNstrips

Gaudi::Property<bool> FPGATrackSimHitFilteringTool::m_useNstrips {this, "useNstrips", false, "use nStrips instead of dPhi for stub filtering"}
private

Definition at line 63 of file FPGATrackSimHitFilteringTool.h.

63{this, "useNstrips", false, "use nStrips instead of dPhi for stub filtering"};

The documentation for this class was generated from the following files: