|
ATLAS Offline Software
|
#include <TrackFitter.h>
|
void | resetCounters () |
|
int | fitTracks (const std::shared_ptr< const FPGATrackSimRoad > &road, std::vector< FPGATrackSimTrack > &tracks) |
| Creates tracks from the given road. More...
|
|
void | getMissingInfo (const FPGATrackSimRoad &road, int &nMissing, bool &missPixel, bool &missStrip, layer_bitmask_t &missing_mask, layer_bitmask_t &norecovery_mask) |
|
void | makeTrackCandidates (const FPGATrackSimRoad &road, const FPGATrackSimTrack &temp, std::vector< FPGATrackSimTrack > &track_cands) |
| Creates a list of track candidates by taking all possible combination of hits in road. More...
|
|
FPGATrackSimTrack | recoverTrack (FPGATrackSimTrack const &t, sector_t sector, layer_bitmask_t norecovery_mask, double qoverpt) |
| Given a N/N track that has a bad chi2, try to refit the track by taking away a single hit, trying N combinations of N-1/N tracks. More...
|
|
void | compute_truth (FPGATrackSimTrack &newtrk) const |
|
void | initMessaging () const |
| Initialize our message level and MessageSvc. More...
|
|
◆ TrackFitter() [1/2]
Definition at line 25 of file TrackFitter.cxx.
34 for (
auto bank : droppedLayerbanks)
◆ TrackFitter() [2/2]
TrackFitter::TrackFitter |
( |
void |
| ) |
|
◆ ~TrackFitter()
virtual TrackFitter::~TrackFitter |
( |
void |
| ) |
|
|
virtual |
◆ compute_truth()
Definition at line 427 of file TrackFitter.cxx.
429 std::vector<FPGATrackSimMultiTruth> mtv;
435 if (
layer <
t.getFPGATrackSimHits().size()) mtv.push_back(
t.getFPGATrackSimHits().at(
layer).getTruth());
438 mtv.back().assign_equal_normalization();
446 const bool ok = mt.best(tbarcode, tfrac);
449 t.setEventIndex(tbarcode.first);
450 t.setBarcode(tbarcode.second);
451 t.setBarcodeFrac(tfrac);
◆ createDkfTrack()
◆ extrapolate()
◆ fit()
◆ fitTracks() [1/2]
Creates tracks from the given road.
Takes all combinations of hits in the road to create track candidates, fits them using the constant bank, and filters them based on the chi2 of the fit.
Definition at line 74 of file TrackFitter.cxx.
88 ATH_MSG_DEBUG(
"Attempting to fit Hough road with y = " <<
y <<
", x = " <<
x <<
", sector = " << road->getSector());
92 int sector = road->getSector();
102 ATH_MSG_WARNING(
"Constants for sector " << sector <<
" are not valid");
112 getMissingInfo(*road, nMissing, missPixel, missStrip, missing_mask, norecovery_mask);
139 std::vector<FPGATrackSimTrack> track_cands;
144 for (
size_t icomb = 0; icomb < nFits; icomb++)
148 bool ok = track_cands[icomb].isValidCand();
160 if (!( (missing_mask >>
ic) & 0
x1))
break;
169 track_cands[icomb].setOrigChi2(track_cands[icomb].
getChi2());
171 if (track_cands[icomb].getNMissing() == 0) {
177 bitmask &= ~(1 << icoord);
179 bitmask &= ~(1 << (icoord+1));
191 tracks.push_back(track_cands[icomb]);
◆ fitTracks() [2/2]
Definition at line 56 of file TrackFitter.cxx.
58 for (
const std::shared_ptr<const FPGATrackSimRoad>& cur_road : roads) {
59 std::vector<FPGATrackSimTrack>
t;
62 else tracks.insert(tracks.end(),
t.begin(),
t.end());
◆ getChi2DofRecoveryMax()
float TrackFitter::getChi2DofRecoveryMax |
( |
| ) |
const |
|
inline |
◆ getChi2DofRecoveryMin()
float TrackFitter::getChi2DofRecoveryMin |
( |
| ) |
const |
|
inline |
◆ getDoDeltaGPhis()
bool TrackFitter::getDoDeltaGPhis |
( |
| ) |
const |
|
inline |
◆ getDoMajority()
unsigned TrackFitter::getDoMajority |
( |
| ) |
const |
|
inline |
◆ getDoMissingHitsCheck()
bool TrackFitter::getDoMissingHitsCheck |
( |
| ) |
const |
|
inline |
◆ getDoSecondStage()
bool TrackFitter::getDoSecondStage |
( |
| ) |
const |
|
inline |
◆ getIdealCoordFitType()
◆ getIdentifyBadHit()
bool TrackFitter::getIdentifyBadHit |
( |
| ) |
const |
|
inline |
◆ getMissingHitsCheckTracks()
◆ getMissingInfo()
Definition at line 234 of file TrackFitter.cxx.
254 missing_mask |= 1 << ix;
259 missing_mask |= (1<<ix) | (1<<iy);
266 else missPixel =
true;
269 else if (!((wclayers >>
layer) & 1)) {
274 missing_mask |= 1 << ix;
279 missing_mask |= (1<<ix) | (1<<iy);
285 norecovery_mask |= (1<<
layer);
◆ getNFits()
int TrackFitter::getNFits |
( |
| ) |
|
|
inline |
◆ getNFitsMajority()
int TrackFitter::getNFitsMajority |
( |
| ) |
|
|
inline |
◆ getNFitsMajorityPix()
int TrackFitter::getNFitsMajorityPix |
( |
| ) |
|
|
inline |
◆ getNFitsMajoritySCI()
int TrackFitter::getNFitsMajoritySCI |
( |
| ) |
|
|
inline |
◆ getNFitsRecovery()
int TrackFitter::getNFitsRecovery |
( |
| ) |
|
|
inline |
◆ getNorecoveryNhits()
int TrackFitter::getNorecoveryNhits |
( |
| ) |
const |
|
inline |
◆ getPlaneMap()
◆ getRequireFirst()
bool TrackFitter::getRequireFirst |
( |
| ) |
const |
|
inline |
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ makeTrackCandidates()
Creates a list of track candidates by taking all possible combination of hits in road.
Sets basic ID info and hits.
NB: If the number of combinations becomes large and memory is a concern, it may be worth turning this function into a sort of iterator over combs
, return a single track each call.
Definition at line 300 of file TrackFitter.cxx.
303 track_cands.resize(combs.size(), temp);
308 for (
size_t icomb = 0; icomb < combs.size(); icomb++)
311 track_cands[icomb].setTrackID(
m_idbase + icomb);
317 std::vector<int>
const & hit_indices = combs[icomb];
320 if (hit_indices[
layer] < 0)
328 if (wcbits & (1 <<
layer ) ) {
333 track_cands[icomb].setFPGATrackSimHit(
layer, newhit);
337 const std::shared_ptr<const FPGATrackSimHit> hit = road.
getHits(
layer)[hit_indices[
layer]];
345 track_cands[icomb].setValidCand(
false);
348 track_cands[icomb].setFPGATrackSimHit(
layer, *hit);
◆ matrixInversion5x5()
void TrackFitter::matrixInversion5x5 |
( |
double |
a[5][5] | ) |
|
|
protected |
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ recoverTrack()
Given a N/N track that has a bad chi2, try to refit the track by taking away a single hit, trying N combinations of N-1/N tracks.
Returns the track with the best chi2 (or the original track if none of the N-1/N tracks are an improvement).
- Parameters
-
norecovery_mask | - will skip removing hits from layers with bit set in this mask |
Definition at line 365 of file TrackFitter.cxx.
371 float best_chi2ndof =
t.getChi2ndof();
378 if (norecovery_mask & (1<<
layer))
continue;
386 recovered_tracks[
layer].setFPGATrackSimHit(
layer,newhit);
390 unsigned int missing_mask =
t.getHitMap();
391 missing_mask &= ~(1 << ix);
395 recovered_tracks[
layer].setHitMap(missing_mask);
399 recovered_tracks[
layer].setQOverPt(qoverpt);
409 if (recovered_tracks[
layer].getChi2ndof() < best_chi2ndof)
411 best_chi2ndof = recovered_tracks[
layer].getChi2ndof();
417 return recovered_tracks[best_i];
◆ resetCounters()
void TrackFitter::resetCounters |
( |
| ) |
|
|
private |
◆ setChi2DofRecoveryMax()
void TrackFitter::setChi2DofRecoveryMax |
( |
float |
v | ) |
|
|
inline |
◆ setChi2DofRecoveryMin()
void TrackFitter::setChi2DofRecoveryMin |
( |
float |
v | ) |
|
|
inline |
◆ setDoDeltaGPhis()
void TrackFitter::setDoDeltaGPhis |
( |
bool |
v | ) |
|
|
inline |
◆ setDoMajority()
void TrackFitter::setDoMajority |
( |
unsigned int |
v | ) |
|
|
inline |
◆ setDoMissingHitsCheck()
void TrackFitter::setDoMissingHitsCheck |
( |
bool |
v | ) |
|
|
inline |
◆ setDoSecondStage()
void TrackFitter::setDoSecondStage |
( |
bool |
v | ) |
|
|
inline |
◆ setIdealCoordFitType()
◆ setIdentifyBadHit()
void TrackFitter::setIdentifyBadHit |
( |
bool |
flag | ) |
|
|
inline |
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setNorecoveryNhits()
void TrackFitter::setNorecoveryNhits |
( |
int |
v | ) |
|
|
inline |
◆ setPlaneMap()
◆ setRegionMap()
◆ setRequireFirst()
void TrackFitter::setRequireFirst |
( |
bool |
v | ) |
|
|
inline |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_Chi2Dof_recovery_max
float TrackFitter::m_Chi2Dof_recovery_max = 1e30 |
|
private |
◆ m_Chi2Dof_recovery_min
float TrackFitter::m_Chi2Dof_recovery_min = 40. |
|
private |
◆ m_do2ndStage
bool TrackFitter::m_do2ndStage = false |
|
private |
◆ m_do_majority
unsigned TrackFitter::m_do_majority = 1 |
|
private |
◆ m_doDeltaGPhis
bool TrackFitter::m_doDeltaGPhis = false |
|
private |
◆ m_droppedLayerBanks
◆ m_endB
double TrackFitter::m_endB[3] {} |
|
protected |
◆ m_guessinghits
bool TrackFitter::m_guessinghits = true |
|
private |
◆ m_idbase
int TrackFitter::m_idbase = 0 |
|
private |
◆ m_IdealCoordFitType
◆ m_identify_badhit
bool TrackFitter::m_identify_badhit = false |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_max_ncomb
const int TrackFitter::m_max_ncomb = 10000 |
|
private |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nfits
int TrackFitter::m_nfits = 0 |
|
private |
◆ m_nfits_addrec
int TrackFitter::m_nfits_addrec = 0 |
|
private |
◆ m_nfits_maj
int TrackFitter::m_nfits_maj = 0 |
|
private |
◆ m_nfits_maj_pix
int TrackFitter::m_nfits_maj_pix = 0 |
|
private |
◆ m_nfits_maj_SCT
int TrackFitter::m_nfits_maj_SCT = 0 |
|
private |
◆ m_nfits_rec
int TrackFitter::m_nfits_rec = 0 |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_nominalBank
◆ m_norecovery_nhits
int TrackFitter::m_norecovery_nhits = -1 |
|
private |
◆ m_pmap
◆ m_reMapVector
std::vector<int> TrackFitter::m_reMapVector |
|
protected |
◆ m_require_first
bool TrackFitter::m_require_first = true |
|
private |
◆ m_rmap
◆ m_setDoMissingHitsCheck
bool TrackFitter::m_setDoMissingHitsCheck = false |
|
private |
◆ m_startB
double TrackFitter::m_startB[3] {} |
|
protected |
◆ m_tracks_missinghits_track
The documentation for this class was generated from the following files:
void setHitMap(unsigned int v)
void compute_truth(FPGATrackSimTrack &newtrk) const
std::atomic< MSG::Level > m_lvl
Current logging level.
void setSection(unsigned v)
uint32_t getNLogiLayers() const
unsigned getPhysLayer() const
float m_Chi2Dof_recovery_max
void makeTrackCandidates(const FPGATrackSimRoad &road, const FPGATrackSimTrack &temp, std::vector< FPGATrackSimTrack > &track_cands)
Creates a list of track candidates by taking all possible combination of hits in road.
const std::vector< std::shared_ptr< const FPGATrackSimHit > > & getHits(size_t layer) const
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
float m_Chi2Dof_recovery_min
void setHoughXBin(unsigned v)
uint32_t getNCoords() const
void setFirstSectorID(int v)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
FPGATrackSimTrack recoverTrack(FPGATrackSimTrack const &t, sector_t sector, layer_bitmask_t norecovery_mask, double qoverpt)
Given a N/N track that has a bad chi2, try to refit the track by taking away a single hit,...
std::vector< size_t > getNHits_layer() const
IMessageSvc * getMessageSvc(bool quiet=false)
std::vector< FPGATrackSimTrack > m_tracks_missinghits_track
uint32_t getCoordLayer(uint32_t coord) const
uint32_t getDim(size_t logiLayer) const
int fitTracks(const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads, std::vector< FPGATrackSimTrack > &tracks)
void setSecondSectorID(int v)
uint32_t getCoordOffset(size_t logiLayer) const
bool isPixel(int pl) const
void setDetType(SiliconTech detType)
AthMessaging()
Default constructor:
void setHoughYBin(unsigned v)
FPGATrackSimPlaneMap const * m_pmap
void setDoDeltaGPhis(bool v)
std::pair< unsigned long, unsigned long > Barcode
bool m_setDoMissingHitsCheck
TrackCorrType m_IdealCoordFitType
void setTrackCorrType(TrackCorrType v)
MsgStream & msg() const
The standard message stream.
std::vector< std::vector< int > > getComboIndices(std::vector< size_t > const &sizes)
Given a vector of sizes (of arrays), generates a vector of all combinations of indices to index one e...
void setTrackStage(TrackStage v)
FPGATrackSimRegionMap const * m_rmap
void getMissingInfo(const FPGATrackSimRoad &road, int &nMissing, bool &missPixel, bool &missStrip, layer_bitmask_t &missing_mask, layer_bitmask_t &norecovery_mask)
layer_bitmask_t getWCLayers() const
const std::vector< double > & getAvgRadii(unsigned region) const
bool getIsGood(sector_t sector) const
bool linfit(sector_t sector, FPGATrackSimTrack &track, bool isSecondStage) const
void setLayer(unsigned v)
const FPGATrackSimFitConstantBank * m_nominalBank
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
void setSubRegion(unsigned v)
void initMessaging() const
Initialize our message level and MessageSvc.
void setNLayers(int)
set the number of layers in the track.
bool getDoMissingHitsCheck() const
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
double getChi2(int &ndof, double ipt, double eta1, double seta1, double phi1, double sphi1, double ipt1, double sipt1, double eta2, double seta2, double phi2, double sphi2, double ipt2, double sipt2, bool useAbsPt)
Get OLD style (i.e. muFast time) Chi2.
HitType getHitType() const
void setHitType(HitType type)
bool hasGoodFit(std::vector< FPGATrackSimTrack > const &track_cands, float minchi2)
std::vector< const FPGATrackSimFitConstantBank * > m_droppedLayerBanks