|
ATLAS Offline Software
|
#include <InDetAmbiTrackSelectionTool.h>
|
PublicToolHandle< ITrtDriftCircleCutTool > | m_selectortool {this, "DriftCircleCutTool", "InDet::InDetTrtDriftCircleCutTool"} |
| TRT minimum number of drift circles tool- returns allowed minimum number of TRT drift circles. More...
|
|
ToolHandle< Trk::IPRDtoTrackMapTool > | m_assoTool {this, "AssociationTool", "Trk::PRDtoTrackMapTool" } |
|
const SiliconID * | m_detID {nullptr} |
| atlas id helper More...
|
|
IntegerProperty | m_minHits {this, "minHits", 5} |
| some cut values More...
|
|
IntegerProperty | m_minTRT_Hits {this, "minTRTHits", 0} |
|
int | m_maxShared {0} |
|
IntegerProperty | m_maxSharedModules {this, "maxShared", 1} |
|
IntegerProperty | m_maxTracksPerPRD {this, "maxTracksPerSharedPRD", 2} |
|
IntegerProperty | m_minNotShared {this, "minNotShared", 6} |
|
FloatProperty | m_minScoreShareTracks {this, "minScoreShareTracks", 0.0} |
|
BooleanProperty | m_cosmics {this, "Cosmics", false} |
|
BooleanProperty | m_parameterization {this, "UseParameterization", true} |
|
BooleanProperty | m_doPixelClusterSplitting {this, "doPixelSplitting", false} |
|
FloatProperty | m_sharedProbCut {this, "sharedProbCut", 0.02} |
|
IntegerProperty | m_maxSplitSize {this, "MaximalSplitSize", 49, "A.S.: remove that when solved properly by updating the SplitProb info with isExcluded. A.S.: to be removed once EDM is updated"} |
|
This tool cross checks the hits on a track with the hits already stored in a PRD_AssociationTool. Shared hits are allowed to some extent und under certain conditions (e.g. the track score is high enough), additional shared hits are removed if necessary. This tool does not delete any tracks. If the client is going to discard tracks entered into this tool, the tracks have to be deleted by this client.
- Author
- Martin Siebel Marti.nosp@m.n.Si.nosp@m.ebel@.nosp@m.CERN.nosp@m..ch
Definition at line 46 of file InDetAmbiTrackSelectionTool.h.
◆ InDetAmbiTrackSelectionTool()
InDet::InDetAmbiTrackSelectionTool::InDetAmbiTrackSelectionTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~InDetAmbiTrackSelectionTool()
virtual InDet::InDetAmbiTrackSelectionTool::~InDetAmbiTrackSelectionTool |
( |
| ) |
|
|
virtualdefault |
◆ createSubTrack()
method to create a new track from a vector of TSOS's
Definition at line 534 of file InDetAmbiTrackSelectionTool.cxx.
545 auto vecTsos = std::make_unique<Trk::TrackStates>();
550 vecTsos->push_back(newTsos);
554 info.addPatternRecoAndProperties(
track->info());
557 info.addPatternReco(newInfo);
◆ finalize()
StatusCode InDet::InDetAmbiTrackSelectionTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCleanedOutTrack()
Definition at line 60 of file InDetAmbiTrackSelectionTool.cxx.
68 bool TrkCouldBeAccepted =
true;
75 bool thishasblayer =
false;
76 bool hassharedblayer =
false;
77 bool hassharedpixel =
false;
78 bool firstisshared =
true;
92 if (expected > nCutTRT) nCutTRT = expected;
97 ATH_MSG_DEBUG (
"Study new Track "<< ptrTrack<<
"\t , it has "<<tsos->
size()<<
"\t track states");
98 ATH_MSG_DEBUG (
"trackId "<< trackId <<
", subtrackId "<<subtrackId);
102 if (ispatterntrack) {
103 ATH_MSG_DEBUG (
"==> this is a pattern track, outliers are good hits (reintegration) !");
105 ATH_MSG_DEBUG (
"==> this is a refitted track, so we can use the chi2 ! ");
109 int nPixelDeadSensor = -1;
110 int nSCTDeadSensor = -1;
125 if (nPixelDeadSensor == -1) nPixelDeadSensor = 0;
126 if (nSCTDeadSensor == -1) nSCTDeadSensor = 0;
127 ATH_MSG_VERBOSE (
"---> Number of dead si sensors: " << nPixelDeadSensor + nSCTDeadSensor);
143 std::vector<int> tsosType;
144 tsosType.resize(tsos->
size());
149 for (
int index = 0 ; iTsos != iTsosEnd ; ++iTsos, ++
index) {
152 tsosType[
index] = OtherTsos;
159 ATH_MSG_VERBOSE (
"-> No measurement on TSOS, it is another type, to be copied over");
160 tsosType[
index] = OtherTsos;
172 ATH_MSG_WARNING (
"-> Measurement is not a pseudo measurment, not yet supported, try to copy !");
174 tsosType[
index] = OtherTsos;
190 if (isBlayer && (!isoutlier || ispatterntrack)) thishasblayer =
true;
193 if ( isPixel && !thishasblayer && npixholes>0 &&
194 ( ( npixel==1 && !isoutlier ) ||
195 ( ispatterntrack && npixel==0 && isoutlier) ) ) {
196 ATH_MSG_VERBOSE (
"-> Special case, problematic single pixel hit on track, reject it !");
197 tsosType[
index] = RejectedHit;
199 TrkCouldBeAccepted =
false;
206 ATH_MSG_VERBOSE (
"-> Prd is outlier on a fitter track (or not InDet), copy it over");
216 ATH_MSG_VERBOSE (
"-> Prd is outlier on a pattern track and is unused, copy it over");
219 tsosType[
index] = UnusedHit;
224 if (
numShared == 0) firstisshared =
false;
226 lastbutonerot = lastrot;
228 lastrotindex =
index;
238 if ( isoutlier && ispatterntrack ) {
239 ATH_MSG_VERBOSE (
"-> Shared Prd is outlier on a pattern track, we do not want to reintegrate it, so reject it ");
240 tsosType[
index] = RejectedHit;
242 TrkCouldBeAccepted =
false;
249 tsosType[
index] = RejectedHit;
251 TrkCouldBeAccepted =
false;
266 (!isPixel || npixholes<=0) ) {
274 ATH_MSG_WARNING (
"-----> cast to Pixel cluster failed, should not happen !");
276 TrkCouldBeAccepted =
false;
283 ATH_MSG_VERBOSE (
"-----> Pixel cluster is split, reject shared hit !!!");
284 tsosType[
index] = RejectedHit;
286 TrkCouldBeAccepted =
false;
294 ATH_MSG_VERBOSE (
"-----> Pixel cluster is not compatible with being shared (splitProb = "
296 tsosType[
index] = RejectedHit;
298 TrkCouldBeAccepted =
false;
304 ATH_MSG_VERBOSE (
"---> Shared hit, but good track, let's enter hit in the list and try to keep it !");
305 tsosType[
index] = SharedHit;
312 if (isBlayer) hassharedblayer =
true;
313 else hassharedpixel =
true;
316 lastbutonerot = lastrot;
318 lastrotindex =
index;
325 tsosType[
index] = RejectedHit;
327 TrkCouldBeAccepted =
false;
334 if (ispatterntrack &&
336 (lastrot && lastbutonerot) &&
338 ATH_MSG_DEBUG (
"Special cut on distance, reject last hit on track !");
339 tsosType[lastrotindex] = RejectedHit;
342 TrkCouldBeAccepted =
false;
346 if (ispatterntrack &&
349 ATH_MSG_DEBUG (
"Special cut on too many holes, reject last hit on track !");
350 tsosType[lastrotindex] = RejectedHit;
353 TrkCouldBeAccepted =
false;
359 if ( !ispatterntrack ) {
360 double trackchi2 = 0.;
361 if (ptrTrack->fitQuality() && ptrTrack->fitQuality()->numberDoF()>0 )
362 trackchi2 = ptrTrack->fitQuality()->chiSquared()/ptrTrack->fitQuality()->numberDoF();
365 if (
numShared > 0 && !ispatterntrack && trackchi2 > 3 ) {
366 ATH_MSG_DEBUG (
"Shared hits, we have a bad chi2 track, mark it as bad !");
368 TrkCouldBeAccepted =
false;
377 TrkCouldBeAccepted =
false;
385 if ( TrkCouldBeAccepted &&
386 ( !hassharedblayer || npixholes<=1 ) &&
392 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
true);
401 ATH_MSG_DEBUG (
"=> Cosmics, accept input track even with shared hits");
402 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
true);
413 ATH_MSG_VERBOSE (
"Trying to recover track, allow for some shared hits is possible.");
416 std::vector<const Trk::TrackStateOnSurface*> newTSOS;
425 for (
int index = 0 ; iTsos != iTsosEnd ; ++iTsos,++
index ) {
428 if (tsosType[
index] == RejectedHit) {
431 }
else if (tsosType[
index] != SharedHit ) {
433 newTSOS.push_back(*iTsos);
462 bool otherhasblayer =
false;
463 if ( numberOfTracksWithThisPrd == 1 ) {
465 std::vector< const Trk::PrepRawData* > prdsToCheck =
m_assoTool->getPrdsOnTrack(prd_to_track_map,*(
range.first->second));
467 if (prd_to_track_map.
isShared(*prd))
479 (!isPixel || !hassharedblayer || npixholes <= 0) &&
480 ( iShared <
m_maxShared || (isPixel && !firstisshared) ) &&
481 (!isPixel || thishasblayer == otherhasblayer ) &&
482 (!isPixel || npixel >= othernpixel ) ) {
484 ATH_MSG_VERBOSE (
"---> Accepted hit shared with " << numberOfTracksWithThisPrd <<
" tracks !");
485 newTSOS.push_back(*iTsos);
489 cntIns += (isPixel ? 2 : 1);
492 ATH_MSG_VERBOSE (
"---> Reject hit shared with " << numberOfTracksWithThisPrd <<
" tracks !");
499 ATH_MSG_DEBUG (
"=> Too few hits, reject track with shared hits");
500 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
false);
504 if ( newTSOS.size() == tsos->
size() ) {
506 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
true);
512 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
false);
516 info.addPatternRecoAndProperties(ptrTrack->info());
519 info.addPatternReco(newInfo);
522 ATH_MSG_DEBUG (
"=> Successfully created subtrack with shared hits recovered !");
523 return std::make_tuple(newTrack,
false);
529 return std::make_tuple(
static_cast<Trk::Track *
>(
nullptr),
false);
◆ initialize()
StatusCode InDet::InDetAmbiTrackSelectionTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_assoTool
◆ m_cosmics
BooleanProperty InDet::InDetAmbiTrackSelectionTool::m_cosmics {this, "Cosmics", false} |
|
private |
◆ m_detID
const SiliconID* InDet::InDetAmbiTrackSelectionTool::m_detID {nullptr} |
|
private |
◆ m_doPixelClusterSplitting
BooleanProperty InDet::InDetAmbiTrackSelectionTool::m_doPixelClusterSplitting {this, "doPixelSplitting", false} |
|
private |
◆ m_maxShared
int InDet::InDetAmbiTrackSelectionTool::m_maxShared {0} |
|
private |
◆ m_maxSharedModules
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_maxSharedModules {this, "maxShared", 1} |
|
private |
◆ m_maxSplitSize
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_maxSplitSize {this, "MaximalSplitSize", 49, "A.S.: remove that when solved properly by updating the SplitProb info with isExcluded. A.S.: to be removed once EDM is updated"} |
|
private |
◆ m_maxTracksPerPRD
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_maxTracksPerPRD {this, "maxTracksPerSharedPRD", 2} |
|
private |
◆ m_minHits
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_minHits {this, "minHits", 5} |
|
private |
◆ m_minNotShared
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_minNotShared {this, "minNotShared", 6} |
|
private |
◆ m_minScoreShareTracks
FloatProperty InDet::InDetAmbiTrackSelectionTool::m_minScoreShareTracks {this, "minScoreShareTracks", 0.0} |
|
private |
◆ m_minTRT_Hits
IntegerProperty InDet::InDetAmbiTrackSelectionTool::m_minTRT_Hits {this, "minTRTHits", 0} |
|
private |
◆ m_parameterization
BooleanProperty InDet::InDetAmbiTrackSelectionTool::m_parameterization {this, "UseParameterization", true} |
|
private |
◆ m_selectortool
◆ m_sharedProbCut
FloatProperty InDet::InDetAmbiTrackSelectionTool::m_sharedProbCut {this, "sharedProbCut", 0.02} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Contains information about the 'fitter' of this track.
Const iterator class for DataVector/DataList.
PrepRawDataTrackMapRange onTracks(const PrepRawData &prd)
get the Tracks associated with this PrepRawData.
@ numberOfSCTDeadSensors
number of TRT hits
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
virtual const Amg::Vector3D & globalPosition() const override=0
Interface method to get the global Position.
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
bool is_trt(Identifier id) const
#define ATH_MSG_VERBOSE(x)
@ InDetAmbiTrackSelectionTool
Added because of compilation problems.
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
bool is_blayer(const Identifier &id) const
Test for pixle b-layer - generic, i.e. works for EITHER pixel or sct id.
Class to handle pseudo-measurements in fitters and on track objects.
void addPatternReco(const TrackInfo &)
A method adding just pattern recognition info without adding the actual properties.
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
represents the track state (measurement, material, fit parameters and quality) at a surface.
A summary of the information contained by a track.
bool is_indet(Identifier id) const
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
float splitProbability1() const
const ProbabilityInfo & splitProbability(const PrepRawData *cluster) const
void setPatternRecognitionInfo(const TrackPatternRecoInfo &patternReco)
Method setting the pattern recognition algorithm.
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
size_type size() const noexcept
Returns the number of elements in the collection.
bool isShared(const PrepRawData &prd) const
does this PRD belong to more than one track?
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
std::pair< PrepRawDataTrackMap::const_iterator, PrepRawDataTrackMap::const_iterator > ConstPrepRawDataTrackMapRange
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
@ Unknown
Track fitter not defined.