ATLAS Offline Software
|
#include <SiTrajectory_xk.h>
Protected Member Functions | |
void | erase (int) |
bool | isNewTrack (std::multimap< const Trk::PrepRawData *, const Trk::Track * > &) const |
Protected Attributes | |
int | m_firstElement {} |
int | m_lastElement {} |
index of the first element where we have More... | |
int | m_nclusters {} |
index of the last element where we have More... | |
int | m_nclustersNoAdd {} |
Number of clusters on trajectory. More... | |
int | m_difference {} |
int | m_nHolesBefore {} |
int | m_nHolesAfter {} |
int | m_nholes {} |
int | m_dholes {} |
int | m_nActiveElements {} |
int | m_nElements {} |
count active elements More... | |
int | m_elementsMap [300] {} |
int | m_ndfcut {} |
int | m_ndf {} |
int | m_ntos {} |
int | m_atos [100] {} |
int | m_itos [100] {} |
SiTrajectoryElement_xk | m_elements [300] {} |
const InDet::SiTools_xk * | m_tools {} |
Trajectory elements on this trajectory. More... | |
std::unique_ptr< const Trk::Surface > | m_surfacedead |
PatternHoleSearchOutcome | m_patternHoleOutcome {} |
Friends | |
class | SiCombinatorialTrackFinder_xk |
Definition at line 43 of file SiTrajectory_xk.h.
InDet::SiTrajectory_xk::SiTrajectory_xk | ( | ) |
InDet::SiTrajectory_xk::SiTrajectory_xk | ( | const SiTrajectory_xk & | ) |
|
default |
bool InDet::SiTrajectory_xk::backwardExtension | ( | int | itmax, |
const EventContext & | ctx | ||
) |
Definition at line 1186 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::backwardSmoother | ( | bool | TWO, |
const EventContext & | ctx | ||
) |
Definition at line 1094 of file SiTrajectory_xk.cxx.
std::unique_ptr< Trk::FitQuality > InDet::SiTrajectory_xk::convertToFitQuality | ( | ) | const |
Definition at line 290 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToNextTrackStateOnSurface | ( | ) |
Definition at line 2202 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurface | ( | const EventContext & | ctx | ) |
Definition at line 152 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurface | ( | int | cosmic, |
const EventContext & | ctx | ||
) |
Definition at line 139 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceForDisTrackTrigger | ( | const EventContext & | ctx | ) |
Definition at line 245 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceForDisTrackTrigger | ( | int | cosmic, |
const EventContext & | ctx | ||
) |
Definition at line 231 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceWithNewDirection | ( | ) |
Definition at line 198 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurface | ( | ) |
Definition at line 56 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurface | ( | int | cosmic | ) |
Definition at line 43 of file SiTrajectory_xk.cxx.
Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurfaceWithNewDirection | ( | ) |
Definition at line 103 of file SiTrajectory_xk.cxx.
|
inline |
Definition at line 63 of file SiTrajectory_xk.h.
|
inline |
Definition at line 71 of file SiTrajectory_xk.h.
std::ostream & InDet::SiTrajectory_xk::dump | ( | std::ostream & | out | ) | const |
Definition at line 352 of file SiTrajectory_xk.cxx.
|
inline |
Definition at line 72 of file SiTrajectory_xk.h.
|
protected |
Definition at line 30 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::filterWithPreciseClustersError | ( | const EventContext & | ctx | ) |
Definition at line 1892 of file SiTrajectory_xk.cxx.
const Trk::PatternTrackParameters* InDet::SiTrajectory_xk::firstParameters | ( | ) | const |
Return the pattern track parameters of the first element of this trajectory matching its status.
std::unique_ptr<Trk::TrackParameters> InDet::SiTrajectory_xk::firstTrackParameters | ( | ) |
bool InDet::SiTrajectory_xk::forwardExtension | ( | bool | smoother, |
int | itmax, | ||
const EventContext & | ctx | ||
) |
index at which we start the extension
last element on the trajectory
smoothing step, if requested. Will re-evaluate the extension start and parameters there
This checks if we already ran a forward and backward propagation within the current hits on the trajectory. Will enter this branch if we have not.
in this case, we will simply set up for forward propagation, projecting the predicted state forward without searching for new hits yet
prepare first element for forward propagation
for all following elements with until the last with a known hit:
propagate forward the state from the previous element
this branch is entered if the first element is already in agreement between forward and back so we already ran a smoothing step for the current hits on the trajectory
for all elements starting from the one after our first hit, up to the last one with a hit:
this branch is entered while the range of hits we are looking at was still covered by the previously made backward smoothing
update flag if we are still covered by the smoothing
if not (first element not covered):
re-add cluster - this will update the counters and chi2 based on the refined upstream elements
case if we have entered a piece of the tracks where there was no back smoothing yet
propagate forward
end loop from second to last element with hit
end case of existing smoothing
decrement extensionStartIndex to get back to the last element with a hit on it
end smoother
if we are already at the last element on the trajectory, we have no-where to extend further
These represent the indices used for the extension. Only contains the elements beyond the start (so not the piece already existing).
Trajectory elements of clusters on the best candidate
Clusters on the best candidate
hole and double-hole cuts
max iteration we expect to reach
current iteration
index of best iteration so far
best quality seen so far
number of hits on the best extension
holes for best extension (only up to last hit)
holes beyond last hit for best extension
number of missing expected hits on best extension (holes + deads)
max holes plus deads
best number of clusters
start index for best extension
index for looping over detector elements
current index in the MP array - runs along all elements on the candidate track
first point of current trajectory: start of extension
maximum dPhi
this is the at the location of the first hit on track
start to iterate
index of the previous detector element in the forward propagation
Last index in the M array where we found a cluster
missing clusters on the best candidate compared to the maximum possible
hole flag
loop over detector elements - the first time this is called, we start at the first one beyond the one that saw the last hit
propagate forward to the current element, and search for matching clusters
In case of a forward propagation error, try to recover cases due to barrel-endcap transitions
we are already in the endcaps, or if the incompatible elements the failure are not subsequent: abooooort!
in the barrel or if the previous element is the one just before this, loop over the remaining elements and look for the first one not in the barrel. This detects barrel-endcap transitions
we didn't find any endcap elements? Likely a bad attempt, so abort
If we found a barrel-endcap transition, we continue our loop at the first endcap element along the trajectory.
end of propagation failure handling
NOTE: The 'else' here is mainly for clarity - due to the 'continue'/'break' statements in the 'if' above, we only reach here if the condition above (propagation failure) is not met.
if the forward propagation was succesful: update the 'previous element' to the current one
Reminder: we only reach this point in case of a succesful forward propagation
add the current element to the MP list, increment M index
if we found a matching cluster at this element:
get the dPhi w.r.t the first hit
wrap into 0...pi space
and bail out if the track is curving too extremely in phi
update indices for last hit
we did not find a compatible hit, but we would expect one --> hole!
check if we exceeded the maximum number of holes or double holes. If yes, abort!
and do the dPhi check again, but using the predicted parameters (as no hit)
we did not find a hit, but also do not cross the active surface (no hit expected)
apply only the dPhi check
number of missing clusters so far (for whatever reason) note: negative number (0 == all possible collected)
Now, check a number of reasons to exit early:
if we have too many deads
or we have already missed more hits than in the best so far
or we have missed the same #hits but have a worse chi2
end of loop over elements
now we have assembled a full candidate for the extended trajectory.
get the index of the element where we last saw a hit
get the number of clusters we saw at that point
and the number of holes (this means we exclude holes after the last hit!)
set the number of holes after the last hit - total holes minus holes until last hit
if we are in the first iteration, and have not found any new clusters beyond the ones already collected in initialize(), return.
get the last element we reached before exiting the loop
if we looped over all, make it the last element there is
number of missed expected hits seen
clusters minus holes before last hit This is used as a quality estimator
total chi2
if the quality is better than the current best (chi2 as tie-breaker):
update the quality flags
reset the running index of clusters on best track (will now be populated)
and the degree-of-freedom count
update best candidate hole counts
as well as holes after last hit
store the iteration number...
extensionStartIndex-value used for the best candidate (starting point)
the chi2...
the number of missed expected hits
if our track went through the full trajectory and we collect a small number of missed expected hits: update the cut for the future (need to be better)
now, loop over the elements on this possible extension again, up to the last cluster
get the corresponding element
if we are inside or within tolerance
then store this index in MPbest (meaning we skip any element that isn't crossed)
if we have a hit here,
store the cluster and l-index
and increment NDF count
best total cluster count: clusters we had so far + newly found ones
if we have an amazing track with at least 14(!) clusters and no holes, or if we passed along the full trajectory without any missed expected hits, we stop iterating, as we can not improve
end of branch for quality better than current best
set index_currentElement negative (use as iteration exit condition below)
boolean to check if we have two clusters on a given element
helper number - used below
chi square holder
Now, we prepare for the next iteration. This is done by walking backward along the found trajectory and seeing if, by not using one cluster, we could theoretically come to a better solution if doing so would give us hits everywhere else along the remaining trajectory. The first such case is used to start the next iteration.
Start reverse loop
corresponding element
if we are not on the last element, have a hit, and removing the hit would not make us fail the cuts:
this is Ei.nclustersF() + [steps from lastElementOnTraj to i] - nclbest - 1 ==> change in number of hits that would be possible w.r.t the best track if ALL following elements had hits, if we removed this hit (to get a better extension)
if removing this hit would result in us losing a hit on track (no backup on hand):
if we would gain a missed expected hit by removing this one and fail the missing hit cut due to this, keep iterating and don't do anything here
if we would keep a hit even if we remove this cluster, increment the counter to account for this
if we can not possibly improve (nm < 0) or if we can not improve and the chi2 can not go below the best one, keep looping, look for another cluster to pull out
otherwise, start the next iteration here!
end of reverse loop
if we did not find any candidate where we could improve by removing a hit, stop iteration
if we are not in the last iteration, final preparation for iterating by making our new start point skip the cluster used there so far.
if reaching max iterations, reset iteration counter to the last iteration that was run
exit if no good track found
set members to counters of best track
if the indices do not match, there is an element along the way which we do not traverse on the sensitive area
update the element map, removing unused elements
if the last iteration was the best, all is good and we return
reset index_currentElement again
loop over all detector elements beyond the start point
get the corresponding element
find the index in the hits-on-track array corresponding to this DE
if we found this element in the array:
if we have since switched to a different cluster on this element compared to the one in the best track:
if this is the time we need to update a cluster:
update the index
set the cluster to be used at this element to the one used for the best extension and propagate info from previous element
if we already updated one element: Can't use addNextClusterF directly, need to clean up later. For now, just update the cluster info itself
end branch for different active cluster on DE
exit if we have dealt with all of the clusters now
end of case if we found this element in the cluster-on-track array
case if a detector element is not on best trajectory
if this element has an active cluster:
if this is the first we need to update a cluster, can do the full work
tell this DE to not use a cluster, and propagate info from prev. element
if we already updated one element: Can't use addNextClusterF directly, need to clean up later. For now, just update the cluster info itself
tell this DE to not use a cluster
end of loop over all DE beyond start point
if we did not have to update any cluster, or if we only had to change the last hit: all good, can exit
otherwise, if we had to update a cluster along the way, need one more forward propagation run to make sure all the counters and chi2 etc reflect the best track's cluster configuration
now we can finally exit
Definition at line 1401 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::forwardFilter | ( | const EventContext & | ctx | ) |
Definition at line 1872 of file SiTrajectory_xk.cxx.
void InDet::SiTrajectory_xk::getClusters | ( | std::vector< const InDet::SiCluster * > & | Cl | ) | const |
Definition at line 1859 of file SiTrajectory_xk.cxx.
|
inline |
Definition at line 73 of file SiTrajectory_xk.h.
bool InDet::SiTrajectory_xk::globalPositionsToClusters | ( | const PixelClusterContainer * | , |
const SCT_ClusterContainer * | , | ||
const std::vector< Amg::Vector3D > & | , | ||
std::vector< const InDet::SiDetElementBoundaryLink_xk * > & | , | ||
std::multimap< const Trk::PrepRawData *, const Trk::Track * > & | , | ||
std::vector< const InDet::SiCluster * > & | |||
) |
Definition at line 999 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::goodOrder | ( | ) |
Definition at line 1947 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::initialize | ( | bool | , |
bool | , | ||
const PixelClusterContainer * | , | ||
const SCT_ClusterContainer * | , | ||
const Trk::TrackParameters & | , | ||
std::vector< const InDet::SiCluster * > & | , | ||
std::vector< const InDet::SiDetElementBoundaryLink_xk * > & | , | ||
bool & | , | ||
const EventContext & | |||
) |
reset state
loop over all detector elements and assign the starting set of silicon clusters at the right indices
get the associated detector element from the boundary link
book a placeholder for a potential cluster on this element
First case: Current element is a pixel module
check if we are configured to use pixels!
check for the pixel clusters on the given detector element, using the ID hash
if we have any hits:
set iterators to the local cluster collection
Loop over the passed list with Si clusters to initiate the track with - these are for example the clusters on our seed in inside-out- or backtracking.
if this cluster is on the current element...
if it is the first cluster we see, set the first element to the current index
otherwise, set the last element to the current index (will eventually point to the final cluster)
increment cluster counter
add 2 to the number of degrees of freedom counter (Pix is 2D)
set our cluster pointer to point to this cluster
remove the cluster from the list
and exit the loop over Si clusters. We can do this because no two clusters are allowed to be on the same detector element
done, now we know if one of the existing clusters is on this element set status = 1 (there are hits on this module), give it the boundary link and the space points on this element. Finally, also give it the cluster, if we found one.
and increment the counter of active (nonzero hits) elements
this branch is the case of a pixel module with no hits on it, if we have previously had an active element
here we set a status of 0.
this branch is taken if we have not yet found an active element and there are no hits on this module. No need to already start the trajectory!
map the index to itself. Always useful. Don't worry, it will get more interesting later...
if we exceed the bounds of our array, bail out. Also increment the detector element index
end of check on pixel flag
end of pixel case
case 2: Strip module
again, we fetch the clusters for this detector element
do we have any?
is this the first cluster we found?
then mark it as the first element
otherwise, mark it as the last element
increment cluster counter
for SCT, add one degree of freedom (1D measurement)
and update the cluster pointer, before cleaning up
remember - only one cluster per detector element is possible due to upstream filtering. So we can exit when we found one.
Now, set up the trajectory element (det status 1) as in the pixel case
and increment the active element count
branch if no clusters on module and previously seen active element
set an corresponding element to detstatus = 0
branch for no clusters and no active elements seen so far
skip this one
update elements map
and array boundary checking (yuck!!) Also increment the detector element index
end of SCT if-statement
if the element we are currently processing is the first one where we saw a cluster:
set the upper populated point to the current index
and update the current trajectory
element with the track parameters we obtained upstream for the starting surface
if the element we are currently processing saw a cluster but is not the first one
run forward propagation from the last element with a cluster to this one
update index of last element that had a cluster to point to this one
if the chi2 looks good for the forward extension step, update index of last good cluster
if it does not look good
add the ndf to "ndfwrong"
if we have collected more than 3 badly fitting DoF (2 pix or 1 Pix + 1 SCT or 3 SCT), bail out
reduce ndf for cut by the bad degrees of freedom
reduce cluster count, don't include this track
and erase the cluster again
Case if we already have clusters from the seed on track, and some clusters left to put on it, but no seed cluster on this element Corresponds to have a hole in the seed.
propagate to the current DE from the last one where we had a cluster from the seed if the propagation fails
if we have a cluster here, something went wrong in the upstream logic
otherwise, remove this guy from consideration. It will be overwritten by the next one we see
also adapt the number of active elements if needed
if the propagation succeeded
increment hole count if we expect a hit
update the index of the last element
end of case of no hit and expecting a hit
end of loop over boundary links
did we manage to assign all our seed hits to elements on the road?
no? Then our search road was badly chosen. Return this info for logging and bail out
if some seed hits are badly fitting and we have less than 6 remaining good DoF, we give up
update degrees of freedom to the current count of good ones
truncate the ndfcut variable to 6
Kill empty trajectory elements at the end of our trajectory
count downwards
and if the element is active, stop looping
the index where we aborted is the last one where we found an active element.
Find last detector element with clusters
Kill uncrossed detector elements this repopulates the elementsMap we started to fill earlier
loop from the element after the one with the first hit to the one with the last hit from the seed
if we either have a cluster on track or at least cross the element, plug it into the m_elementsMap at the next position
now m_elementsMap contains the interesting elements
if we kicked out some elements:
update the index of the last element
then add the remaining ones beyond the last cluster back to the map
If we run with brem, update noise model for last trajectory elements
Definition at line 579 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::isLastPixel | ( | ) | const |
|
protected |
Definition at line 299 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::jumpThroughPerigee | ( | ) |
Definition at line 2091 of file SiTrajectory_xk.cxx.
|
inline |
Definition at line 70 of file SiTrajectory_xk.h.
|
inline |
Definition at line 66 of file SiTrajectory_xk.h.
|
inline |
Definition at line 68 of file SiTrajectory_xk.h.
|
inline |
Definition at line 67 of file SiTrajectory_xk.h.
|
inline |
Definition at line 69 of file SiTrajectory_xk.h.
|
inline |
Definition at line 62 of file SiTrajectory_xk.h.
|
inline |
Definition at line 65 of file SiTrajectory_xk.h.
|
inline |
Definition at line 64 of file SiTrajectory_xk.h.
SiTrajectory_xk& InDet::SiTrajectory_xk::operator= | ( | const SiTrajectory_xk & | ) |
double InDet::SiTrajectory_xk::pTfirst | ( | ) | const |
Definition at line 2227 of file SiTrajectory_xk.cxx.
double InDet::SiTrajectory_xk::pTseed | ( | const Trk::TrackParameters & | Tp, |
std::vector< const InDet::SiCluster * > & | Cl, | ||
std::vector< const InDet::SiDetElementBoundaryLink_xk * > & | DE, | ||
const EventContext & | ctx | ||
) |
Definition at line 549 of file SiTrajectory_xk.cxx.
double InDet::SiTrajectory_xk::quality | ( | ) | const |
Definition at line 2118 of file SiTrajectory_xk.cxx.
double InDet::SiTrajectory_xk::qualityOptimization | ( | ) |
Definition at line 2133 of file SiTrajectory_xk.cxx.
void InDet::SiTrajectory_xk::setParameters | ( | ) |
Definition at line 21 of file SiTrajectory_xk.cxx.
void InDet::SiTrajectory_xk::setTools | ( | const InDet::SiTools_xk * | t | ) |
void InDet::SiTrajectory_xk::sortStep | ( | ) |
Definition at line 1992 of file SiTrajectory_xk.cxx.
bool InDet::SiTrajectory_xk::trackParametersToClusters | ( | const PixelClusterContainer * | , |
const SCT_ClusterContainer * | , | ||
const Trk::TrackParameters & | , | ||
std::vector< const InDet::SiDetElementBoundaryLink_xk * > & | , | ||
std::multimap< const Trk::PrepRawData *, const Trk::Track * > & | , | ||
std::vector< const InDet::SiCluster * > & | , | ||
const EventContext & | ctx | ||
) |
Definition at line 914 of file SiTrajectory_xk.cxx.
void InDet::SiTrajectory_xk::updateHoleSearchResult | ( | ) |
Helper method to determine the hole search outcome for use in the later reco.
instantiate an outcome object to populate
counter to find subsequent SCT holes
loop between the first and last hit on the trajectory
Now get the current element
check if this is a pixel element
if we have a cluster on-track, this is neither a hole nor a dead Same goes for outliers
otherwise, need to check more carefully:
if this is a candidate (we expect a hit and we are not on a dead sensor)
in this case, we have a hole.
end of SCT case
in all other cases, apart from dead, nothing to be incremented
fallthrough
fallthrough
fallthrough
fallthrough
in all of these cases, we have to reset the double holes
if we encounter a dead element, increment the appropriate counters
end switch over boundary check result
end no-cluster case
if the previous element was also an SCT hole, we now have a double hole
end loop over elements
Definition at line 2237 of file SiTrajectory_xk.cxx.
|
friend |
Definition at line 45 of file SiTrajectory_xk.h.
|
protected |
Definition at line 187 of file SiTrajectory_xk.h.
|
protected |
Definition at line 180 of file SiTrajectory_xk.h.
|
protected |
Definition at line 176 of file SiTrajectory_xk.h.
|
protected |
Definition at line 189 of file SiTrajectory_xk.h.
|
protected |
Definition at line 183 of file SiTrajectory_xk.h.
|
protected |
Definition at line 170 of file SiTrajectory_xk.h.
|
protected |
Definition at line 188 of file SiTrajectory_xk.h.
|
protected |
index of the first element where we have
a cluster
Definition at line 172 of file SiTrajectory_xk.h.
|
protected |
Definition at line 181 of file SiTrajectory_xk.h.
|
protected |
|
protected |
Number of clusters on trajectory.
Definition at line 175 of file SiTrajectory_xk.h.
|
protected |
Definition at line 185 of file SiTrajectory_xk.h.
|
protected |
Definition at line 184 of file SiTrajectory_xk.h.
|
protected |
count active elements
Definition at line 182 of file SiTrajectory_xk.h.
|
protected |
Definition at line 179 of file SiTrajectory_xk.h.
|
protected |
Definition at line 178 of file SiTrajectory_xk.h.
|
protected |
Definition at line 177 of file SiTrajectory_xk.h.
|
protected |
Definition at line 186 of file SiTrajectory_xk.h.
|
protected |
Definition at line 194 of file SiTrajectory_xk.h.
|
protected |
Definition at line 193 of file SiTrajectory_xk.h.
|
protected |
Trajectory elements on this trajectory.
Each one corresponds to one detector element on the search road
Definition at line 192 of file SiTrajectory_xk.h.