40 BFieldTag_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
41 nParam_(iConfig.getParameter<
unsigned int>(
"nParam")),
44 redigitizeTrackWord_(iConfig.getParameter<
bool>(
"redigitizeTrackWord")) {
45 for (
const auto &
cut : iConfig.getParameter<std::vector<std::string>>(
"qualityBits")) {
46 qualityBitSetters_.emplace_back(
cut);
48 produces<l1t::PFTrackCollection>();
52 if (BFieldWatcher_.check(iSetup)) {
60 iEvent.getByToken(TrackTag_, htracks);
61 const auto &
tracks = *htracks;
63 for (
unsigned int i = 0,
n =
tracks.size();
i <
n; ++
i) {
66 float pt = tk.momentum().perp();
67 float eta = tk.momentum().eta();
68 float phi = tk.momentum().phi();
69 float z0 = tk.POCA().z();
70 int charge = tk.rInv() > 0 ? +1 : -1;
81 for (
int i = 0,
n = qualityBitSetters_.size(),
bit = 1;
i <
n; ++
i,
bit <<= 1) {
82 if (qualityBitSetters_[
i](tk))
96 if (redigitizeTrackWord_) {
112 ap_uint<TTTrack_TrackWord::kMVAOtherSize>(
quality));
edm::ESWatcher< IdealMagneticFieldRecord > BFieldWatcher_
std::pair< float, float > propagateToCalo(const math::XYZTLorentzVector &iMom, const math::XYZTLorentzVector &iVtx, double iCharge, double iBField)
chi2rphi_t getChi2RPhiWord() const
bool redigitizeTrackWord_
Global3DPoint GlobalPoint
valid_t getValidWord() const
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< StringCutObjectSelector< l1t::PFTrack::L1TTTrackType > > qualityBitSetters_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void setTrackWord(unsigned int valid, const GlobalVector &momentum, const GlobalPoint &POCA, double rInv, double chi2RPhi, double chi2RZ, double bendChi2, unsigned int hitPattern, unsigned int mvaQuality, unsigned int mvaOther, unsigned int sector)
edm::EDGetTokenT< std::vector< l1t::PFTrack::L1TTTrackType > > TrackTag_
math::XYZPoint Point
point in the space
Abs< T >::type abs(const T &t)
l1tpf::ParametricResolution resolCalo_
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
rinv_t getRinvWord() const
~PFTrackProducerFromL1Tracks() override
bendChi2_t getBendChi2Word() const
qualityMVA_t getMVAQualityWord() const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > BFieldTag_
auto const & tracks
cannot be loose
Class to store the L1 Track Trigger tracks.
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
std::vector< l1t::PFTrack > PFTrackCollection
PFTrackProducerFromL1Tracks(const edm::ParameterSet &)
chi2rz_t getChi2RZWord() const
l1tpf::ParametricResolution resolTrk_
hit_t getHitPatternWord() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setTrackWordBits()
Set bits in 96-bit Track word.
tanl_t getTanlWord() const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.