 |
ATLAS Offline Software
|
Remove (mark) duplicate tracks This tool takes FPGATrackSimTrack as input and mark their status of passing/failing the overlap removal criteria.
More...
#include <FPGATrackSimOverlapRemovalTool.h>
|
| | FPGATrackSimOverlapRemovalTool (const std::string &, const std::string &, const IInterface *) |
| |
| | FPGATrackSimOverlapRemovalTool ()=delete |
| |
| StatusCode | initialize () override |
| |
| StatusCode | runOverlapRemoval (std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads) |
| |
| StatusCode | runOverlapRemoval (std::vector< FPGATrackSimTrack > &tracks) |
| |
| void | setDoSecondStage (bool v) |
| |
| bool | getDoSecondStage () const |
| |
| ORAlgo | getAlgorithm () const |
| |
| StatusCode | removeOverlapping (FPGATrackSimTrack &track1, FPGATrackSimTrack &track2) |
| |
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | evtStore () const |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| virtual StatusCode | sysInitialize () override |
| | Perform system initialization for an algorithm. More...
|
| |
| virtual StatusCode | sysStart () override |
| | Handle START transition. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles. More...
|
| |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| | Declare a new Gaudi property. More...
|
| |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| |
| MsgStream & | msg () const |
| |
| MsgStream & | msg (const MSG::Level lvl) const |
| |
| bool | msgLvl (const MSG::Level lvl) const |
| |
|
| StatusCode | runOverlapRemoval_fast (std::vector< FPGATrackSimTrack > &tracks) |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| Gaudi::Property< bool > | m_do2ndStage { this, "DoSecondStage", false, "Do second stage of not?"} |
| |
| Gaudi::Property< int > | m_NumOfHitPerGrouping { this, "NumOfHitPerGrouping", 5, "Number of hits pre grouping"} |
| |
| Gaudi::Property< float > | m_minChi2 { this, "MinChi2", 40, "Minimum chi2 requirement for tracks being considered in OR"} |
| |
| Gaudi::Property< bool > | m_roadSliceOR { this, "roadSliceOR", true, "Do slice-wise overlap removal for roads (Hough-only)"} |
| |
| Gaudi::Property< int > | m_localMaxWindowSize { this, "localMaxWindowSize", 0, "Only create roads that are a local maximum within this window size. Set this to 0 to turn off local max filtering"} |
| |
| Gaudi::Property< unsigned > | m_imageSize_x { this, "nBins_x", 0, "number of bins in, eg, phi_track"} |
| |
| Gaudi::Property< unsigned > | m_imageSize_y { this, "nBins_y", 0, "number of bins in, eg, q/pT"} |
| |
| Gaudi::Property< std::string > | m_algorithm { this, "ORAlgo", "Normal", "Overlap removal algorithm"} |
| |
| Gaudi::Property< bool > | m_doFastOR { this, "doFastOR", false, "Use fast overlap removal algorithm instead of default"} |
| |
| Gaudi::Property< bool > | m_compareAllHits {this, "compareAllHits", true, "Compare all hits to all other hits when comparing two tracks"} |
| |
| ToolHandle< GenericMonitoringTool > | m_monTool {this,"MonTool", "", "Monitoring tool"} |
| |
| ORAlgo | m_algo {ORAlgo::Normal} |
| |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default) More...
|
| |
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default) More...
|
| |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| |
| bool | m_varHandleArraysDeclared |
| |
Remove (mark) duplicate tracks This tool takes FPGATrackSimTrack as input and mark their status of passing/failing the overlap removal criteria.
Definition at line 35 of file FPGATrackSimOverlapRemovalTool.h.
◆ StoreGateSvc_t
◆ FPGATrackSimOverlapRemovalTool() [1/2]
| FPGATrackSimOverlapRemovalTool::FPGATrackSimOverlapRemovalTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ FPGATrackSimOverlapRemovalTool() [2/2]
| FPGATrackSimOverlapRemovalTool::FPGATrackSimOverlapRemovalTool |
( |
| ) |
|
|
delete |
◆ compareTrackQuality()
Definition at line 190 of file FPGATrackSimOverlapRemovalTool.cxx.
192 std::vector<const FPGATrackSimHit*> hitsInTrack1;
194 if (hit.isReal()) hitsInTrack1.push_back(&hit);
197 std::vector<const FPGATrackSimHit*> hitsInTrack2;
199 if (hit.isReal()) hitsInTrack2.push_back(&hit);
205 bool goodOrder =
true;
206 if (hitsInTrack1.size() == hitsInTrack2.size()) {
213 }
else if (hitsInTrack1.size() > hitsInTrack2.size()) {
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getAlgorithm()
| ORAlgo FPGATrackSimOverlapRemovalTool::getAlgorithm |
( |
| ) |
const |
|
inline |
◆ getDoSecondStage()
| bool FPGATrackSimOverlapRemovalTool::getDoSecondStage |
( |
| ) |
const |
|
inline |
◆ initialize()
| StatusCode FPGATrackSimOverlapRemovalTool::initialize |
( |
| ) |
|
|
override |
Definition at line 19 of file FPGATrackSimOverlapRemovalTool.cxx.
21 ATH_MSG_INFO(
"FPGATrackSimOverlapRemovalTool::initialize()" );
27 ATH_MSG_WARNING(
"LocalMaxOR only being run per hough slice (i.e. this tool does nothing) since roadSliceOR is turned off");
36 return StatusCode::FAILURE;
40 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ removeOverlapping()
Definition at line 117 of file FPGATrackSimOverlapRemovalTool.cxx.
122 auto hash_a =
a->getIdentifierHash();
123 auto hash_b =
b->getIdentifierHash();
124 if ( hash_a == hash_b ) {
125 auto phi_a =
a->getPhiIndex();
126 auto phi_b =
b->getPhiIndex();
127 if ( phi_a == phi_b ) {
128 auto eta_a =
a->getEtaIndex();
129 auto eta_b =
b->getEtaIndex();
130 if ( eta_a == eta_b) {
131 auto layer_a =
a->getPhysLayer();
132 auto layer_b =
b->getPhysLayer();
133 return layer_a < layer_b;
135 return eta_a < eta_b;
137 return phi_a < phi_b;
139 return hash_a < hash_b;
143 std::set<const FPGATrackSimHit*, HitCompare > hitsInTrack1;
145 if (hit.isReal()) hitsInTrack1.insert(&hit);
148 std::set<const FPGATrackSimHit*, HitCompare> hitsInTrack2;
150 if (hit.isReal()) hitsInTrack2.insert(&hit);
153 std::vector<const FPGATrackSimHit*> sharedHits;
155 hitsInTrack2.begin(), hitsInTrack2.end(),
156 std::back_inserter(sharedHits),
160 int nHitsInTrack1 = hitsInTrack1.size();
161 int nHitsInTrack2 = hitsInTrack2.size();
162 int nSharedHits = sharedHits.size();
165 int nonOverlappingHits =
std::min(nHitsInTrack1 - nSharedHits, nHitsInTrack2 - nSharedHits);
179 return StatusCode::FAILURE;
187 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ runOverlapRemoval() [1/2]
| StatusCode FPGATrackSimOverlapRemovalTool::runOverlapRemoval |
( |
std::vector< FPGATrackSimTrack > & |
tracks | ) |
|
◆ runOverlapRemoval() [2/2]
| StatusCode FPGATrackSimOverlapRemovalTool::runOverlapRemoval |
( |
std::vector< std::shared_ptr< const FPGATrackSimRoad >> & |
roads | ) |
|
Definition at line 66 of file FPGATrackSimOverlapRemovalTool.cxx.
68 if (roads.empty())
return StatusCode::SUCCESS;
71 size_t in = roads.size();
81 else if (
r->getNHitLayers() >
old->getNHitLayers()) *
old = *
r.get();
82 else if (
r->getNHitLayers() ==
old->getNHitLayers() &&
r->getNHits() >
old->getNHits()) *
old = *
r.get();
90 roads.emplace_back(std::shared_ptr<const FPGATrackSimRoad>(tempPtr));
98 ATH_MSG_DEBUG(
"Input: " << in <<
" Output: " << roads.size());
99 return StatusCode::SUCCESS;
◆ runOverlapRemoval_fast()
| StatusCode FPGATrackSimOverlapRemovalTool::runOverlapRemoval_fast |
( |
std::vector< FPGATrackSimTrack > & |
tracks | ) |
|
|
private |
Definition at line 221 of file FPGATrackSimOverlapRemovalTool.cxx.
236 for (
unsigned int i=0;
i < tracks.size();
i++) {
239 if (tracks.at(
i).getChi2ndof() >
m_minChi2.value()) {
240 tracks.at(
i).setPassedOR(0);
245 for (
unsigned int j=
i+1; j< tracks.size(); j++) {
251 if (!tracks.at(
i).passedOR())
break;
254 if (tracks.at(j).getChi2ndof() >
m_minChi2.value()) tracks.at(j).setPassedOR(0);
258 if (!tracks.at(j).passedOR())
continue;
267 return StatusCode::SUCCESS;
◆ setDoSecondStage()
| void FPGATrackSimOverlapRemovalTool::setDoSecondStage |
( |
bool |
v | ) |
|
|
inline |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_algo
◆ m_algorithm
| Gaudi::Property<std::string> FPGATrackSimOverlapRemovalTool::m_algorithm { this, "ORAlgo", "Normal", "Overlap removal algorithm"} |
|
private |
◆ m_compareAllHits
| Gaudi::Property<bool> FPGATrackSimOverlapRemovalTool::m_compareAllHits {this, "compareAllHits", true, "Compare all hits to all other hits when comparing two tracks"} |
|
private |
◆ m_detStore
◆ m_do2ndStage
| Gaudi::Property<bool> FPGATrackSimOverlapRemovalTool::m_do2ndStage { this, "DoSecondStage", false, "Do second stage of not?"} |
|
private |
◆ m_doFastOR
| Gaudi::Property<bool> FPGATrackSimOverlapRemovalTool::m_doFastOR { this, "doFastOR", false, "Use fast overlap removal algorithm instead of default"} |
|
private |
◆ m_evtStore
◆ m_imageSize_x
| Gaudi::Property<unsigned> FPGATrackSimOverlapRemovalTool::m_imageSize_x { this, "nBins_x", 0, "number of bins in, eg, phi_track"} |
|
private |
◆ m_imageSize_y
| Gaudi::Property<unsigned> FPGATrackSimOverlapRemovalTool::m_imageSize_y { this, "nBins_y", 0, "number of bins in, eg, q/pT"} |
|
private |
◆ m_localMaxWindowSize
| Gaudi::Property<int> FPGATrackSimOverlapRemovalTool::m_localMaxWindowSize { this, "localMaxWindowSize", 0, "Only create roads that are a local maximum within this window size. Set this to 0 to turn off local max filtering"} |
|
private |
◆ m_minChi2
| Gaudi::Property<float> FPGATrackSimOverlapRemovalTool::m_minChi2 { this, "MinChi2", 40, "Minimum chi2 requirement for tracks being considered in OR"} |
|
private |
◆ m_monTool
◆ m_NumOfHitPerGrouping
| Gaudi::Property<int> FPGATrackSimOverlapRemovalTool::m_NumOfHitPerGrouping { this, "NumOfHitPerGrouping", 5, "Number of hits pre grouping"} |
|
private |
◆ m_roadSliceOR
| Gaudi::Property<bool> FPGATrackSimOverlapRemovalTool::m_roadSliceOR { this, "roadSliceOR", true, "Do slice-wise overlap removal for roads (Hough-only)"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void setPassedOR(unsigned int)
virtual void setOwner(IDataHandleHolder *o)=0
const std::vector< FPGATrackSimHit > & getFPGATrackSimHits() const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float getChi2ndof() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode runOverlapRemoval(std::vector< FPGATrackSimTrack > &tracks, const float minChi2, const int NumOfHitPerGrouping, ORAlgo orAlgo, ToolHandle< GenericMonitoringTool > &monTool, bool compareAllHits=false)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
decltype(auto) operator()(ObjectId< CI, CM > id) const noexcept
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.