-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42663 from cms-L1TK/L1TK-PR-13_3_0_pre2
Improvements to L1 tracking code
- Loading branch information
Showing
78 changed files
with
3,733 additions
and
1,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<use name="L1Trigger/TrackFindingTMTT"/> | ||
<use name="MagneticField/Engine"/> | ||
<use name="MagneticField/Records"/> | ||
|
||
<flags CXXFLAGS="-g -Wno-unused-variable -Wno-misleading-indentation"/> | ||
<flags EDM_PLUGIN="1"/> | ||
<library file="*.cc" name="TrackFindingTMTTPlugins"> | ||
<use name="L1Trigger/TrackFindingTMTT"/> | ||
<use name="MagneticField/Engine"/> | ||
<use name="MagneticField/Records"/> | ||
<flags EDM_PLUGIN="1"/> | ||
</library> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
To run L1 tracking & create TTree of tracking performance: | ||
To run the L1 tracking & create a TTree of tracking performance: | ||
|
||
cmsRun L1TrackNtupleMaker_cfg.py | ||
|
||
By setting variable L1TRKALGO inside this script, you can change the | ||
L1 tracking algo used. | ||
By setting variable L1TRKALGO inside this script, you can change which | ||
L1 tracking algo is used. It defaults to HYBRID. | ||
|
||
For the baseline HYBRID algo, which runs Tracklet pattern reco followed | ||
by KF track fit, TrackFindingTracklet/interface/Settings.h configures the pattern reco, (although some | ||
parameters there are overridden by l1tTTTracksFromTrackletEmulation_cfi.py). | ||
The KF fit is configued by the constructor of TrackFindingTMTT/src/Settings.cc. | ||
by KF track fit, TrackFindingTracklet/interface/Settings.h configures the pattern reco stage, (although some parameters there are overridden by l1tTTTracksFromTrackletEmulation_cfi.py). | ||
The KF fit is configured by the constructor of TrackFindingTMTT/src/Settings.cc. | ||
|
||
The ROOT macros L1TrackNtuplePlot.C & L1TrackQualityPlot.C make tracking | ||
performance & BDT track quality performance plots from the TTree. | ||
Both can be run via makeHists.csh . | ||
|
||
The optional "NewKF" track fit, (which is not yet baseline, as no duplicate | ||
track removal is compatible with it), is configured via | ||
The optional "NewKF" track fit can be run by changing L1TRKALGO=HYBRID_NEWKF. It corresponds to the curent FW, but is is not yet the default, as only a basic duplicate track removal is available for it. It is configured via | ||
TrackTrigger/python/ProducerSetup_cfi.py, (which also configures the DTC). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#ifndef L1Trigger_TrackFindingTracklet_DR_h | ||
#define L1Trigger_TrackFindingTracklet_DR_h | ||
|
||
#include "L1Trigger/TrackTrigger/interface/Setup.h" | ||
#include "L1Trigger/TrackerTFP/interface/DataFormats.h" | ||
#include "L1Trigger/TrackFindingTracklet/interface/ChannelAssignment.h" | ||
|
||
#include <vector> | ||
|
||
namespace trklet { | ||
|
||
/*! \class trklet::DR | ||
* \brief Class to bit- and clock-accurate emulate duplicate removal | ||
* DR identifies duplicates based on pairs of tracks that share stubs in at least 3 layers. | ||
* It keeps the first such track in each pair. | ||
* \author Thomas Schuh | ||
* \date 2023, Feb | ||
*/ | ||
class DR { | ||
public: | ||
DR(const edm::ParameterSet& iConfig, | ||
const tt::Setup* setup_, | ||
const trackerTFP::DataFormats* dataFormats, | ||
const ChannelAssignment* channelAssignment, | ||
int region); | ||
~DR() {} | ||
// read in and organize input tracks and stubs | ||
void consume(const tt::StreamsTrack& streamsTrack, const tt::StreamsStub& streamsStub); | ||
// fill output products | ||
void produce(tt::StreamsStub& accpetedStubs, | ||
tt::StreamsTrack& acceptedTracks, | ||
tt::StreamsStub& lostStubs, | ||
tt::StreamsTrack& lostTracks); | ||
|
||
private: | ||
struct Stub { | ||
Stub(const tt::FrameStub& frame, int stubId, int channel) : frame_(frame), stubId_(stubId), channel_(channel) {} | ||
bool operator==(const Stub& s) const { return s.stubId_ == stubId_; } | ||
tt::FrameStub frame_; | ||
// all stubs id | ||
int stubId_; | ||
// kf layer id | ||
int channel_; | ||
}; | ||
struct Track { | ||
// max number of stubs a track may formed of (we allow only one stub per layer) | ||
static constexpr int max_ = 7; | ||
Track() { stubs_.reserve(max_); } | ||
Track(const tt::FrameTrack& frame, const std::vector<Stub*>& stubs) : frame_(frame), stubs_(stubs) {} | ||
tt::FrameTrack frame_; | ||
std::vector<Stub*> stubs_; | ||
}; | ||
// compares two tracks, returns true if those are considered duplicates | ||
bool equalEnough(Track* t0, Track* t1) const; | ||
// true if truncation is enbaled | ||
bool enableTruncation_; | ||
// provides run-time constants | ||
const tt::Setup* setup_; | ||
// provides dataformats | ||
const trackerTFP::DataFormats* dataFormats_; | ||
// helper class to assign tracks to channel | ||
const ChannelAssignment* channelAssignment_; | ||
// processing region (0 - 8) aka processing phi nonant | ||
const int region_; | ||
// storage of input tracks | ||
std::vector<Track> tracks_; | ||
// storage of input stubs | ||
std::vector<Stub> stubs_; | ||
// h/w liked organized pointer to input tracks | ||
std::vector<std::vector<Track*>> input_; | ||
}; | ||
|
||
} // namespace trklet | ||
|
||
#endif |
Oops, something went wrong.