CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TkMuonProducer Class Reference
Inheritance diagram for L1TkMuonProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  PropState
 

Public Types

enum  AlgoType { kTP = 1, kDynamicWindows = 2, kMantra = 3 }
 
typedef std::vector< L1TTTrackTypeL1TTTrackCollectionType
 
typedef TTTrack< Ref_Phase2TrackerDigi_L1TTTrackType
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 L1TkMuonProducer (const edm::ParameterSet &)
 
 ~L1TkMuonProducer () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void build_tkMuons_from_idxs (TkMuonCollection &tkMuons, const std::vector< int > &matches, const edm::Handle< L1TTTrackCollectionType > &l1tksH, const edm::Handle< RegionalMuonCandBxCollection > &muonH, int detector) const
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
std::vector< L1TkMuMantraDF::muon_dfproduct_to_muvec (const EMTFTrackCollection &l1mus) const
 
std::vector< L1TkMuMantraDF::muon_dfproduct_to_muvec (const RegionalMuonCandBxCollection &l1mtfs) const
 
std::vector< L1TkMuMantraDF::track_dfproduct_to_trkvec (const L1TTTrackCollectionType &l1tks) const
 
PropState propagateToGMT (const L1TTTrackType &l1tk) const
 
void runOnMTFCollection_v1 (const edm::Handle< RegionalMuonCandBxCollection > &, const edm::Handle< L1TTTrackCollectionType > &, TkMuonCollection &tkMuons, const int detector) const
 
void runOnMTFCollection_v2 (const edm::Handle< EMTFTrackCollection > &, const edm::Handle< L1TTTrackCollectionType > &, TkMuonCollection &tkMuons) const
 
double sigmaEtaTP (const RegionalMuonCand &mu) const
 
double sigmaPhiTP (const RegionalMuonCand &mu) const
 

Private Attributes

AlgoType bmtfMatchAlgoVersion_
 
const edm::EDGetTokenT< RegionalMuonCandBxCollectionbmtfToken_
 
float chi2Max_
 
bool correctGMTPropForTkZ_
 
float dRMax_
 
std::unique_ptr< L1TkMuCorrDynamicWindowsdwcorr_
 
AlgoType emtfMatchAlgoVersion_
 
const edm::EDGetTokenT< EMTFTrackCollectionemtfTCToken_
 
const edm::EDGetTokenT< RegionalMuonCandBxCollectionemtfToken_
 
float etaMax_
 
float etaMin_
 
int mantra_n_trk_par_
 
std::unique_ptr< L1TkMuMantramantracorr_barr_
 
std::unique_ptr< L1TkMuMantramantracorr_endc_
 
std::unique_ptr< L1TkMuMantramantracorr_ovrl_
 
int nStubsmin_
 
AlgoType omtfMatchAlgoVersion_
 
const edm::EDGetTokenT< RegionalMuonCandBxCollectionomtfToken_
 
float pTMinTra_
 
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
 
bool use5ParameterFit_
 
bool useTPMatchWindows_
 
float zMax_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 45 of file L1TkMuonProducer.cc.

Member Typedef Documentation

◆ L1TTTrackCollectionType

Definition at line 48 of file L1TkMuonProducer.cc.

◆ L1TTTrackType

Definition at line 47 of file L1TkMuonProducer.cc.

Member Enumeration Documentation

◆ AlgoType

Enumerator
kTP 
kDynamicWindows 
kMantra 

Definition at line 61 of file L1TkMuonProducer.cc.

61 { kTP = 1, kDynamicWindows = 2, kMantra = 3 };

Constructor & Destructor Documentation

◆ L1TkMuonProducer()

L1TkMuonProducer::L1TkMuonProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 129 of file L1TkMuonProducer.cc.

130  : etaMin_((float)iConfig.getParameter<double>("ETAMIN")),
131  etaMax_((float)iConfig.getParameter<double>("ETAMAX")),
132  zMax_((float)iConfig.getParameter<double>("ZMAX")),
133  chi2Max_((float)iConfig.getParameter<double>("CHI2MAX")),
134  pTMinTra_((float)iConfig.getParameter<double>("PTMINTRA")),
135  dRMax_((float)iConfig.getParameter<double>("DRmax")),
136  nStubsmin_(iConfig.getParameter<int>("nStubsmin")),
137  // --- mantra corr params
138  mantra_n_trk_par_(iConfig.getParameter<int>("mantra_n_trk_par")),
139  bmtfToken_(consumes<RegionalMuonCandBxCollection>(iConfig.getParameter<edm::InputTag>("L1BMTFInputTag"))),
140  omtfToken_(consumes<RegionalMuonCandBxCollection>(iConfig.getParameter<edm::InputTag>("L1OMTFInputTag"))),
141  emtfToken_(consumes<RegionalMuonCandBxCollection>(iConfig.getParameter<edm::InputTag>("L1EMTFInputTag"))),
142  emtfTCToken_(consumes<EMTFTrackCollection>(iConfig.getParameter<edm::InputTag>("L1EMTFTrackCollectionInputTag"))),
144  iConfig.getParameter<edm::InputTag>("L1TrackInputTag"))) {
145  // --------------------- configuration of the muon algorithm type
146 
147  std::string bmtfMatchAlgoVersionString = iConfig.getParameter<std::string>("bmtfMatchAlgoVersion");
148  std::transform(bmtfMatchAlgoVersionString.begin(),
149  bmtfMatchAlgoVersionString.end(),
150  bmtfMatchAlgoVersionString.begin(),
151  ::tolower); // make lowercase
152 
153  std::string omtfMatchAlgoVersionString = iConfig.getParameter<std::string>("omtfMatchAlgoVersion");
154  std::transform(omtfMatchAlgoVersionString.begin(),
155  omtfMatchAlgoVersionString.end(),
156  omtfMatchAlgoVersionString.begin(),
157  ::tolower); // make lowercase
158 
159  std::string emtfMatchAlgoVersionString = iConfig.getParameter<std::string>("emtfMatchAlgoVersion");
160  std::transform(emtfMatchAlgoVersionString.begin(),
161  emtfMatchAlgoVersionString.end(),
162  emtfMatchAlgoVersionString.begin(),
163  ::tolower); // make lowercase
164 
165  if (bmtfMatchAlgoVersionString == "tp")
167  else if (bmtfMatchAlgoVersionString == "mantra")
169  else
170  throw cms::Exception("TkMuAlgoConfig")
171  << "the ID " << bmtfMatchAlgoVersionString << " of the BMTF algo matcher passed is invalid\n";
172 
173  if (omtfMatchAlgoVersionString == "tp")
175  else if (omtfMatchAlgoVersionString == "mantra")
177  else
178  throw cms::Exception("TkMuAlgoConfig")
179  << "the ID " << omtfMatchAlgoVersionString << " of the OMTF algo matcher passed is invalid\n";
180 
181  if (emtfMatchAlgoVersionString == "tp")
183  else if (emtfMatchAlgoVersionString == "dynamicwindows")
185  else if (emtfMatchAlgoVersionString == "mantra")
187  else
188  throw cms::Exception("TkMuAlgoConfig")
189  << "the ID " << emtfMatchAlgoVersionString << " of the EMTF algo matcher passed is invalid\n";
190 
191  correctGMTPropForTkZ_ = iConfig.getParameter<bool>("correctGMTPropForTkZ");
192 
193  use5ParameterFit_ = iConfig.getParameter<bool>("use5ParameterFit");
194  useTPMatchWindows_ = iConfig.getParameter<bool>("useTPMatchWindows");
195  produces<TkMuonCollection>();
196 
197  // initializations
199  // FIXME: to merge eventually into an unique file with bith phi and theta boundaries
200  std::string fIn_bounds_name = iConfig.getParameter<edm::FileInPath>("emtfcorr_boundaries").fullPath();
201  std::string fIn_theta_name = iConfig.getParameter<edm::FileInPath>("emtfcorr_theta_windows").fullPath();
202  std::string fIn_phi_name = iConfig.getParameter<edm::FileInPath>("emtfcorr_phi_windows").fullPath();
203  const auto& bounds = L1TkMuCorrDynamicWindows::prepare_corr_bounds(fIn_bounds_name, "h_dphi_l");
204  TFile* fIn_theta = TFile::Open(fIn_theta_name.c_str());
205  TFile* fIn_phi = TFile::Open(fIn_phi_name.c_str());
206  dwcorr_ = std::make_unique<L1TkMuCorrDynamicWindows>(bounds, fIn_theta, fIn_phi);
207 
208  // files can be closed since the correlator code clones the TF1s
209  fIn_theta->Close();
210  fIn_phi->Close();
211 
212  // FIXME: more initialisation using the parameters passed from the cfg
213  dwcorr_->set_safety_factor(iConfig.getParameter<double>("final_window_factor"));
214  dwcorr_->set_sf_initialrelax(iConfig.getParameter<double>("initial_window_factor"));
215 
216  dwcorr_->set_relaxation_pattern(iConfig.getParameter<double>("pt_start_relax"),
217  iConfig.getParameter<double>("pt_end_relax"));
218 
219  dwcorr_->set_do_relax_factor(iConfig.getParameter<bool>("do_relax_factors"));
220 
221  dwcorr_->set_n_trk_par(iConfig.getParameter<int>("n_trk_par"));
222  dwcorr_->set_min_trk_p(iConfig.getParameter<double>("min_trk_p"));
223  dwcorr_->set_max_trk_aeta(iConfig.getParameter<double>("max_trk_aeta"));
224  dwcorr_->set_max_trk_chi2(iConfig.getParameter<double>("max_trk_chi2"));
225  dwcorr_->set_min_trk_nstubs(iConfig.getParameter<int>("min_trk_nstubs"));
226  dwcorr_->set_do_trk_qual_presel(true);
227  }
228 
230  std::string fIn_bounds_name = iConfig.getParameter<edm::FileInPath>("mantra_bmtfcorr_boundaries").fullPath();
231  std::string fIn_theta_name = iConfig.getParameter<edm::FileInPath>("mantra_bmtfcorr_theta_windows").fullPath();
232  std::string fIn_phi_name = iConfig.getParameter<edm::FileInPath>("mantra_bmtfcorr_phi_windows").fullPath();
233 
234  const auto& bounds = L1TkMuMantra::prepare_corr_bounds(fIn_bounds_name, "h_dphi_l");
235 
236  TFile* fIn_theta = TFile::Open(fIn_theta_name.c_str());
237  TFile* fIn_phi = TFile::Open(fIn_phi_name.c_str());
238 
239  mantracorr_barr_ = std::make_unique<L1TkMuMantra>(bounds, fIn_theta, fIn_phi, "mantra_barrel");
240 
241  fIn_theta->Close();
242  fIn_phi->Close();
243 
244  // settings : NB : now hardcoded, could be read from cfg
245  mantracorr_barr_->set_safety_factor(0.5, 0.5);
246  mantracorr_barr_->setArbitrationType("MaxPt");
247  }
248 
250  std::string fIn_bounds_name = iConfig.getParameter<edm::FileInPath>("mantra_omtfcorr_boundaries").fullPath();
251  std::string fIn_theta_name = iConfig.getParameter<edm::FileInPath>("mantra_omtfcorr_theta_windows").fullPath();
252  std::string fIn_phi_name = iConfig.getParameter<edm::FileInPath>("mantra_omtfcorr_phi_windows").fullPath();
253 
254  const auto& bounds = L1TkMuMantra::prepare_corr_bounds(fIn_bounds_name, "h_dphi_l");
255 
256  TFile* fIn_theta = TFile::Open(fIn_theta_name.c_str());
257  TFile* fIn_phi = TFile::Open(fIn_phi_name.c_str());
258 
259  mantracorr_ovrl_ = std::make_unique<L1TkMuMantra>(bounds, fIn_theta, fIn_phi, "mantra_overlap");
260 
261  fIn_theta->Close();
262  fIn_phi->Close();
263 
264  // settings : NB : now hardcoded, could be read from cfg
265  mantracorr_ovrl_->set_safety_factor(0.5, 0.5);
266  mantracorr_ovrl_->setArbitrationType("MaxPt");
267  }
268 
270  std::string fIn_bounds_name = iConfig.getParameter<edm::FileInPath>("mantra_emtfcorr_boundaries").fullPath();
271  std::string fIn_theta_name = iConfig.getParameter<edm::FileInPath>("mantra_emtfcorr_theta_windows").fullPath();
272  std::string fIn_phi_name = iConfig.getParameter<edm::FileInPath>("mantra_emtfcorr_phi_windows").fullPath();
273 
274  const auto& bounds = L1TkMuMantra::prepare_corr_bounds(fIn_bounds_name, "h_dphi_l");
275 
276  TFile* fIn_theta = TFile::Open(fIn_theta_name.c_str());
277  TFile* fIn_phi = TFile::Open(fIn_phi_name.c_str());
278 
279  mantracorr_endc_ = std::make_unique<L1TkMuMantra>(bounds, fIn_theta, fIn_phi, "mantra_endcap");
280 
281  fIn_theta->Close();
282  fIn_phi->Close();
283 
284  // settings : NB : now hardcoded, could be read from cfg
285  mantracorr_endc_->set_safety_factor(0.5, 0.5);
286  mantracorr_endc_->setArbitrationType("MaxPt");
287  }
288 }

References bmtfMatchAlgoVersion_, correctGMTPropForTkZ_, dwcorr_, emtfMatchAlgoVersion_, Exception, contentValuesFiles::fullPath, edm::ParameterSet::getParameter(), kDynamicWindows, kMantra, kTP, mantracorr_barr_, mantracorr_endc_, mantracorr_ovrl_, omtfMatchAlgoVersion_, L1TkMuCorrDynamicWindows::prepare_corr_bounds(), L1TkMuMantra::prepare_corr_bounds(), AlCaHLTBitMon_QueryRunRegistry::string, HcalDetIdTransform::transform(), use5ParameterFit_, and useTPMatchWindows_.

◆ ~L1TkMuonProducer()

L1TkMuonProducer::~L1TkMuonProducer ( )
override

Definition at line 290 of file L1TkMuonProducer.cc.

290 {}

Member Function Documentation

◆ build_tkMuons_from_idxs()

void L1TkMuonProducer::build_tkMuons_from_idxs ( TkMuonCollection tkMuons,
const std::vector< int > &  matches,
const edm::Handle< L1TTTrackCollectionType > &  l1tksH,
const edm::Handle< RegionalMuonCandBxCollection > &  muonH,
int  detector 
) const
private

Definition at line 647 of file L1TkMuonProducer.cc.

651  {
652  for (uint imatch = 0; imatch < matches.size(); ++imatch) {
653  int match_trk_idx = matches[imatch];
654  if (match_trk_idx < 0)
655  continue; // this muon was not matched to any candidate
656 
657  // take properties of the track
658  const L1TTTrackType& matchTk = (*l1tksH.product())[match_trk_idx];
659  const auto& p3 = matchTk.momentum();
660  const auto& tkv3 = matchTk.POCA();
661  float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
662  math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);
663 
664  edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, match_trk_idx);
665  auto l1muRef = muonH.isValid() ? edm::Ref<RegionalMuonCandBxCollection>(muonH, imatch)
667 
668  float trkisol = -999;
669  TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
670  l1tkmu.setTrackCurvature(matchTk.rInv());
671  l1tkmu.setTrkzVtx((float)tkv3.z());
672  l1tkmu.setMuonDetector(detector);
673  tkMuons.push_back(l1tkmu);
674  }
675  return;
676 }

References hgcalTestNeighbor_cfi::detector, edm::HandleBase::isValid(), patCandidatesForDimuonsSequences_cff::matches, TTTrack< T >::momentum(), mu_mass, p3, TTTrack< T >::POCA(), edm::Handle< T >::product(), TTTrack< T >::rInv(), l1t::TkMuon::setMuonDetector(), l1t::TkMuon::setTrackCurvature(), l1t::TkMuon::setTrkzVtx(), mathSSE::sqrt(), l1pfProducer_cfi::tkMuons, and parallelization::uint.

Referenced by produce().

◆ fillDescriptions()

void L1TkMuonProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 522 of file L1TkMuonProducer.cc.

522  {
523  //The following says we do not know what parameters are allowed so do no validation
524  // Please change this to state exactly what you do use, even if it is no parameters
526  desc.setUnknown();
527  descriptions.addDefault(desc);
528 }

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

◆ produce()

void L1TkMuonProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 293 of file L1TkMuonProducer.cc.

293  {
294  // the L1Mu objects
299 
300  iEvent.getByToken(bmtfToken_, l1bmtfH);
301  iEvent.getByToken(omtfToken_, l1omtfH);
302  iEvent.getByToken(emtfToken_, l1emtfH);
303  iEvent.getByToken(emtfTCToken_, l1emtfTCH);
304 
305  // the L1Tracks
307  iEvent.getByToken(trackToken_, l1tksH);
308 
309  TkMuonCollection oc_bmtf_tkmuon;
310  TkMuonCollection oc_omtf_tkmuon;
311  TkMuonCollection oc_emtf_tkmuon;
312 
313  std::vector<L1TkMuMantraDF::track_df> mantradf_tracks; // if needed, just encode once for all trk finders
315  mantradf_tracks = product_to_trkvec(*l1tksH.product());
316  }
317 
318  // process each of the MTF collections separately! -- we don't want to filter the muons
319 
320  // ----------------------------------------------------- barrel
321  if (bmtfMatchAlgoVersion_ == kTP)
322  runOnMTFCollection_v1(l1bmtfH, l1tksH, oc_bmtf_tkmuon, barrel_MTF_region);
323  else if (bmtfMatchAlgoVersion_ == kMantra) {
324  const auto& muons = product_to_muvec(*l1bmtfH.product());
325  const auto& match_idx = mantracorr_barr_->find_match(mantradf_tracks, muons);
326  build_tkMuons_from_idxs(oc_bmtf_tkmuon, match_idx, l1tksH, l1bmtfH, barrel_MTF_region);
327  } else
328  throw cms::Exception("TkMuAlgoConfig") << " barrel : trying to run an invalid algorithm version "
329  << bmtfMatchAlgoVersion_ << " (this should never happen)\n";
330 
331  // ----------------------------------------------------- overlap
332  if (omtfMatchAlgoVersion_ == kTP)
333  runOnMTFCollection_v1(l1omtfH, l1tksH, oc_omtf_tkmuon, overlap_MTF_region);
334  else if (omtfMatchAlgoVersion_ == kMantra) {
335  const auto& muons = product_to_muvec(*l1omtfH.product());
336  const auto& match_idx = mantracorr_ovrl_->find_match(mantradf_tracks, muons);
337  build_tkMuons_from_idxs(oc_omtf_tkmuon, match_idx, l1tksH, l1omtfH, overlap_MTF_region);
338  } else
339  throw cms::Exception("TkMuAlgoConfig") << " overlap : trying to run an invalid algorithm version "
340  << omtfMatchAlgoVersion_ << " (this should never happen)\n";
341 
342  // ----------------------------------------------------- endcap
343  if (emtfMatchAlgoVersion_ == kTP)
344  runOnMTFCollection_v1(l1emtfH, l1tksH, oc_emtf_tkmuon, endcap_MTF_region);
346  runOnMTFCollection_v2(l1emtfTCH, l1tksH, oc_emtf_tkmuon);
347  else if (emtfMatchAlgoVersion_ == kMantra) {
348  const auto& muons = product_to_muvec(*l1emtfTCH.product());
349  const auto& match_idx = mantracorr_endc_->find_match(mantradf_tracks, muons);
350  //for the TkMu that were built from a EMTFCollection - do not produce a valid muon ref
352  build_tkMuons_from_idxs(oc_emtf_tkmuon, match_idx, l1tksH, invalidMuonH, endcap_MTF_region);
353  } else
354  throw cms::Exception("TkMuAlgoConfig") << "endcap : trying to run an invalid algorithm version "
355  << emtfMatchAlgoVersion_ << " (this should never happen)\n";
356 
357  // now combine all trk muons into a single output collection!
358  auto oc_tkmuon = std::make_unique<TkMuonCollection>();
359  for (const auto& p : {oc_bmtf_tkmuon, oc_omtf_tkmuon, oc_emtf_tkmuon}) {
360  oc_tkmuon->insert(oc_tkmuon->end(), p.begin(), p.end());
361  }
362 
363  // put the new track+muon objects in the event!
364  iEvent.put(std::move(oc_tkmuon));
365 };

References barrel_MTF_region, bmtfMatchAlgoVersion_, bmtfToken_, build_tkMuons_from_idxs(), emtfMatchAlgoVersion_, emtfTCToken_, emtfToken_, endcap_MTF_region, Exception, iEvent, kDynamicWindows, kMantra, kTP, mantracorr_barr_, mantracorr_endc_, mantracorr_ovrl_, eostools::move(), PDWG_BPHSkim_cff::muons, omtfMatchAlgoVersion_, omtfToken_, overlap_MTF_region, AlCaHLTBitMon_ParallelJobs::p, edm::Handle< T >::product(), product_to_muvec(), product_to_trkvec(), runOnMTFCollection_v1(), runOnMTFCollection_v2(), and trackToken_.

◆ product_to_muvec() [1/2]

std::vector< L1TkMuMantraDF::muon_df > L1TkMuonProducer::product_to_muvec ( const EMTFTrackCollection l1mus) const
private

Definition at line 634 of file L1TkMuonProducer.cc.

634  {
635  std::vector<L1TkMuMantraDF::muon_df> result(l1mus.size());
636  for (uint imu = 0; imu < l1mus.size(); ++imu) {
637  auto& mu = l1mus[imu];
638  result[imu].pt = mu.Pt();
639  result[imu].eta = mu.Eta();
641  result[imu].phi = L1TkMuMantra::deg_to_rad(mu.Phi_glob());
642  result[imu].charge = mu.Charge();
643  }
644  return result;
645 }

References L1TkMuMantra::deg_to_rad(), L1TkMuMantra::eta_to_theta(), amptDefaultParameters_cff::mu, mps_fire::result, L1TkMuMantra::to_mpio2_pio2(), and parallelization::uint.

◆ product_to_muvec() [2/2]

std::vector< L1TkMuMantraDF::muon_df > L1TkMuonProducer::product_to_muvec ( const RegionalMuonCandBxCollection l1mtfs) const
private

Definition at line 617 of file L1TkMuonProducer.cc.

618  {
619  std::vector<L1TkMuMantraDF::muon_df> result;
620  for (auto l1mu = l1mtfs.begin(0); l1mu != l1mtfs.end(0); ++l1mu) // considering BX = 0 only
621  {
622  L1TkMuMantraDF::muon_df this_mu;
623  this_mu.pt = l1mu->hwPt() * 0.5;
624  this_mu.eta = l1mu->hwEta() * eta_scale;
626  this_mu.phi =
627  MicroGMTConfiguration::calcGlobalPhi(l1mu->hwPhi(), l1mu->trackFinderType(), l1mu->processor()) * phi_scale;
628  this_mu.charge = (l1mu->hwSign() == 0 ? 1 : -1); // charge sign bit (charge = (-1)^(sign))
629  result.push_back(this_mu);
630  }
631  return result;
632 }

References BXVector< T >::begin(), L1TkMuMantraDF::muon_df::charge, BXVector< T >::end(), L1TkMuMantraDF::muon_df::eta, eta_scale, L1TkMuMantra::eta_to_theta(), L1TkMuMantraDF::muon_df::phi, phi_scale, L1TkMuMantraDF::muon_df::pt, mps_fire::result, L1TkMuMantraDF::muon_df::theta, and L1TkMuMantra::to_mpio2_pio2().

Referenced by produce().

◆ product_to_trkvec()

std::vector< L1TkMuMantraDF::track_df > L1TkMuonProducer::product_to_trkvec ( const L1TTTrackCollectionType l1tks) const
private

Definition at line 600 of file L1TkMuonProducer.cc.

600  {
601  std::vector<L1TkMuMantraDF::track_df> result(l1tks.size());
602  for (uint itrk = 0; itrk < l1tks.size(); ++itrk) {
603  auto& trk = l1tks[itrk];
604 
605  result[itrk].pt = trk.momentum().perp();
606  result[itrk].eta = trk.momentum().eta();
607  result[itrk].theta = L1TkMuMantra::to_mpio2_pio2(L1TkMuMantra::eta_to_theta(trk.momentum().eta()));
608  result[itrk].phi = trk.momentum().phi();
609  result[itrk].nstubs = trk.getStubRefs().size();
610  result[itrk].chi2 = trk.chi2();
611  result[itrk].charge = (trk.rInv() > 0 ? 1 : -1);
612  }
613 
614  return result;
615 }

References L1TkMuMantra::eta_to_theta(), mps_fire::result, L1TkMuMantra::to_mpio2_pio2(), and parallelization::uint.

Referenced by produce().

◆ propagateToGMT()

L1TkMuonProducer::PropState L1TkMuonProducer::propagateToGMT ( const L1TTTrackType l1tk) const
private

Definition at line 530 of file L1TkMuonProducer.cc.

530  {
531  auto p3 = tk.momentum();
532  float tk_pt = p3.perp();
533  float tk_p = p3.mag();
534  float tk_eta = p3.eta();
535  float tk_aeta = std::abs(tk_eta);
536  float tk_phi = p3.phi();
537  float tk_q = tk.rInv() > 0 ? 1. : -1.;
538  float tk_z = tk.POCA().z();
540  tk_z = 0;
541 
543  if (tk_p < min_mu_propagator_p)
544  return dest;
545  if (tk_aeta < 1.1 && tk_pt < min_mu_propagator_barrel_pT)
546  return dest;
547  if (tk_aeta > max_mu_propagator_eta)
548  return dest;
549 
550  //0th order:
551  dest.valid = true;
552 
553  float dzCorrPhi = 1.;
554  float deta = 0;
555  float etaProp = tk_aeta;
556 
557  if (tk_aeta < 1.1) {
558  etaProp = 1.1;
559  deta = tk_z / 550. / cosh(tk_aeta);
560  } else {
561  float delta = tk_z / 850.; //roughly scales as distance to 2nd station
562  if (tk_eta > 0)
563  delta *= -1;
564  dzCorrPhi = 1. + delta;
565 
566  float zOzs = tk_z / 850.;
567  if (tk_eta > 0)
568  deta = zOzs / (1. - zOzs);
569  else
570  deta = zOzs / (1. + zOzs);
571  deta = deta * tanh(tk_eta);
572  }
573  float resPhi = tk_phi - 1.464 * tk_q * cosh(1.7) / cosh(etaProp) / tk_pt * dzCorrPhi - M_PI / 144.;
574  resPhi = reco::reduceRange(resPhi);
575 
576  dest.eta = tk_eta + deta;
577  dest.phi = resPhi;
578  dest.pt = tk_pt; //not corrected for eloss
579 
580  dest.sigmaEta = 0.100 / tk_pt; //multiple scattering term
581  dest.sigmaPhi = 0.106 / tk_pt; //need a better estimate for these
582  return dest;
583 }

References funct::abs(), correctGMTPropForTkZ_, dumpMFGeometry_cfg::delta, mps_fire::dest, M_PI, max_mu_propagator_eta, min_mu_propagator_barrel_pT, min_mu_propagator_p, TTTrack< T >::momentum(), p3, TTTrack< T >::POCA(), reco::reduceRange(), TTTrack< T >::rInv(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by runOnMTFCollection_v1().

◆ runOnMTFCollection_v1()

void L1TkMuonProducer::runOnMTFCollection_v1 ( const edm::Handle< RegionalMuonCandBxCollection > &  muonH,
const edm::Handle< L1TTTrackCollectionType > &  l1tksH,
TkMuonCollection tkMuons,
const int  detector 
) const
private

Definition at line 367 of file L1TkMuonProducer.cc.

370  {
371  const L1TTTrackCollectionType& l1tks = (*l1tksH.product());
372  const RegionalMuonCandBxCollection& l1mtfs = (*muonH.product());
373 
374  int imu = 0;
375  for (auto l1mu = l1mtfs.begin(0); l1mu != l1mtfs.end(0); ++l1mu) { // considering BX = only
376 
377  edm::Ref<RegionalMuonCandBxCollection> l1muRef(muonH, imu);
378  imu++;
379 
380  float l1mu_eta = l1mu->hwEta() * eta_scale;
381  // get the global phi
382  float l1mu_phi =
383  MicroGMTConfiguration::calcGlobalPhi(l1mu->hwPhi(), l1mu->trackFinderType(), l1mu->processor()) * phi_scale;
384 
385  float l1mu_feta = std::abs(l1mu_eta);
386  if (l1mu_feta < etaMin_)
387  continue;
388  if (l1mu_feta > etaMax_)
389  continue;
390 
391  float drmin = 999;
392 
393  PropState matchProp;
394  int match_idx = -1;
395  int il1tk = -1;
396 
397  int nTracksMatch = 0;
398 
399  for (const auto& l1tk : l1tks) {
400  il1tk++;
401 
402  float l1tk_pt = l1tk.momentum().perp();
403  if (l1tk_pt < pTMinTra_)
404  continue;
405 
406  float l1tk_z = l1tk.POCA().z();
407  if (std::abs(l1tk_z) > zMax_)
408  continue;
409 
410  float l1tk_chi2 = l1tk.chi2();
411  if (l1tk_chi2 > chi2Max_)
412  continue;
413 
414  int l1tk_nstubs = l1tk.getStubRefs().size();
415  if (l1tk_nstubs < nStubsmin_)
416  continue;
417 
418  float l1tk_eta = l1tk.momentum().eta();
419  float l1tk_phi = l1tk.momentum().phi();
420 
421  float dr2 = reco::deltaR2(l1mu_eta, l1mu_phi, l1tk_eta, l1tk_phi);
422  if (dr2 > dr2_cutoff)
423  continue;
424 
425  nTracksMatch++;
426 
427  const PropState& pstate = propagateToGMT(l1tk);
428  if (!pstate.valid)
429  continue;
430 
431  float dr2prop = reco::deltaR2(l1mu_eta, l1mu_phi, pstate.eta, pstate.phi);
432  // FIXME: check if this matching procedure can be improved with
433  // a pT dependent dR window
434  if (dr2prop < drmin) {
435  drmin = dr2prop;
436  match_idx = il1tk;
437  matchProp = pstate;
438  }
439  } // over l1tks
440 
441  LogDebug("L1TkMuonProducer") << "matching index is " << match_idx;
442  if (match_idx >= 0) {
443  const L1TTTrackType& matchTk = l1tks[match_idx];
444 
445  float sigmaEta = sigmaEtaTP(*l1mu);
446  float sigmaPhi = sigmaPhiTP(*l1mu);
447 
448  float etaCut = matching_factor_eta * sqrt(sigmaEta * sigmaEta + matchProp.sigmaEta * matchProp.sigmaEta);
449  float phiCut = matching_factor_phi * sqrt(sigmaPhi * sigmaPhi + matchProp.sigmaPhi * matchProp.sigmaPhi);
450 
451  float dEta = std::abs(matchProp.eta - l1mu_eta);
452  float dPhi = std::abs(deltaPhi(matchProp.phi, l1mu_phi));
453 
454  bool matchCondition = useTPMatchWindows_ ? dEta < etaCut && dPhi < phiCut : drmin < dRMax_;
455 
456  if (matchCondition) {
457  edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, match_idx);
458 
459  const auto& p3 = matchTk.momentum();
460  float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
461 
462  math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);
463 
464  const auto& tkv3 = matchTk.POCA();
465  math::XYZPoint v3(tkv3.x(), tkv3.y(), tkv3.z()); // why is this defined?
466 
467  float trkisol = -999;
468 
469  TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
470 
471  l1tkmu.setTrackCurvature(matchTk.rInv());
472  l1tkmu.setTrkzVtx((float)tkv3.z());
473  l1tkmu.setdR(drmin);
474  l1tkmu.setNTracksMatched(nTracksMatch);
475  l1tkmu.setMuonDetector(detector);
476  tkMuons.push_back(l1tkmu);
477  }
478  }
479  } //over l1mus
480 }

References funct::abs(), BXVector< T >::begin(), chi2Max_, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::deltaR2(), HLT_2018_cff::dEta, hgcalTestNeighbor_cfi::detector, HLT_2018_cff::dPhi, dr2_cutoff, dRMax_, BXVector< T >::end(), L1TkMuonProducer::PropState::eta, eta_scale, fftjetproducer_cfi::etaCut, etaMax_, etaMin_, LogDebug, matching_factor_eta, matching_factor_phi, TTTrack< T >::momentum(), mu_mass, nStubsmin_, p3, L1TkMuonProducer::PropState::phi, phi_scale, TTTrack< T >::POCA(), edm::Handle< T >::product(), propagateToGMT(), pTMinTra_, TTTrack< T >::rInv(), l1t::TkMuon::setdR(), l1t::TkMuon::setMuonDetector(), l1t::TkMuon::setNTracksMatched(), l1t::TkMuon::setTrackCurvature(), l1t::TkMuon::setTrkzVtx(), L1TkMuonProducer::PropState::sigmaEta, sigmaEtaTP(), L1TkMuonProducer::PropState::sigmaPhi, sigmaPhiTP(), mathSSE::sqrt(), l1pfProducer_cfi::tkMuons, useTPMatchWindows_, L1TkMuonProducer::PropState::valid, and zMax_.

Referenced by produce().

◆ runOnMTFCollection_v2()

void L1TkMuonProducer::runOnMTFCollection_v2 ( const edm::Handle< EMTFTrackCollection > &  muonH,
const edm::Handle< L1TTTrackCollectionType > &  l1tksH,
TkMuonCollection tkMuons 
) const
private

Definition at line 482 of file L1TkMuonProducer.cc.

484  {
485  const EMTFTrackCollection& l1mus = (*muonH.product());
486  const L1TTTrackCollectionType& l1trks = (*l1tksH.product());
487  const auto& corr_mu_idxs = dwcorr_->find_match(l1mus, l1trks);
488  // it's a vector with as many entries as the L1TT vector.
489  // >= 0 : the idx in the EMTF vector of matched mu
490  // < 0: no match
491 
492  // sanity check
493  if (corr_mu_idxs.size() != l1trks.size())
494  throw cms::Exception("TkMuAlgoOutput")
495  << "the size of tkmu indices does not match the size of input trk collection\n";
496 
497  for (uint il1ttrack = 0; il1ttrack < corr_mu_idxs.size(); ++il1ttrack) {
498  int emtf_idx = corr_mu_idxs[il1ttrack];
499  if (emtf_idx < 0)
500  continue;
501 
502  const L1TTTrackType& matchTk = l1trks[il1ttrack];
503  const auto& p3 = matchTk.momentum();
504  const auto& tkv3 = matchTk.POCA();
505  float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
506  math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);
507 
509  edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, il1ttrack);
510  float trkisol = -999; // now doing as in the TP algo
511  TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
512  l1tkmu.setTrackCurvature(matchTk.rInv());
513  l1tkmu.setTrkzVtx((float)tkv3.z());
514  l1tkmu.setMuonDetector(endcap_MTF_region);
515  tkMuons.push_back(l1tkmu);
516  }
517 
518  return;
519 }

References dwcorr_, endcap_MTF_region, TTTrack< T >::momentum(), mu_mass, p3, TTTrack< T >::POCA(), edm::Handle< T >::product(), TTTrack< T >::rInv(), l1t::TkMuon::setMuonDetector(), l1t::TkMuon::setTrackCurvature(), l1t::TkMuon::setTrkzVtx(), mathSSE::sqrt(), l1pfProducer_cfi::tkMuons, and parallelization::uint.

Referenced by produce().

◆ sigmaEtaTP()

double L1TkMuonProducer::sigmaEtaTP ( const RegionalMuonCand mu) const
private

Definition at line 585 of file L1TkMuonProducer.cc.

585  {
586  float l1mu_eta = l1mu.hwEta() * eta_scale;
587  if (std::abs(l1mu_eta) <= 1.55)
588  return 0.0288;
589  else if (std::abs(l1mu_eta) > 1.55 && std::abs(l1mu_eta) <= 1.65)
590  return 0.025;
591  else if (std::abs(l1mu_eta) > 1.65 && std::abs(l1mu_eta) <= 2.4)
592  return 0.0144;
593  return 0.0288;
594 }

References funct::abs(), eta_scale, and l1t::RegionalMuonCand::hwEta().

Referenced by runOnMTFCollection_v1().

◆ sigmaPhiTP()

double L1TkMuonProducer::sigmaPhiTP ( const RegionalMuonCand mu) const
private

Definition at line 596 of file L1TkMuonProducer.cc.

596 { return 0.0126; }

Referenced by runOnMTFCollection_v1().

Member Data Documentation

◆ bmtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::bmtfMatchAlgoVersion_
private

Definition at line 110 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ bmtfToken_

const edm::EDGetTokenT<RegionalMuonCandBxCollection> L1TkMuonProducer::bmtfToken_
private

Definition at line 121 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ chi2Max_

float L1TkMuonProducer::chi2Max_
private

Definition at line 102 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ correctGMTPropForTkZ_

bool L1TkMuonProducer::correctGMTPropForTkZ_
private

Definition at line 106 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and propagateToGMT().

◆ dRMax_

float L1TkMuonProducer::dRMax_
private

Definition at line 104 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ dwcorr_

std::unique_ptr<L1TkMuCorrDynamicWindows> L1TkMuonProducer::dwcorr_
private

Definition at line 114 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and runOnMTFCollection_v2().

◆ emtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::emtfMatchAlgoVersion_
private

Definition at line 112 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ emtfTCToken_

const edm::EDGetTokenT<EMTFTrackCollection> L1TkMuonProducer::emtfTCToken_
private

Definition at line 125 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ emtfToken_

const edm::EDGetTokenT<RegionalMuonCandBxCollection> L1TkMuonProducer::emtfToken_
private

Definition at line 123 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ etaMax_

float L1TkMuonProducer::etaMax_
private

Definition at line 100 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ etaMin_

float L1TkMuonProducer::etaMin_
private

Definition at line 99 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ mantra_n_trk_par_

int L1TkMuonProducer::mantra_n_trk_par_
private

Definition at line 119 of file L1TkMuonProducer.cc.

◆ mantracorr_barr_

std::unique_ptr<L1TkMuMantra> L1TkMuonProducer::mantracorr_barr_
private

Definition at line 116 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ mantracorr_endc_

std::unique_ptr<L1TkMuMantra> L1TkMuonProducer::mantracorr_endc_
private

Definition at line 118 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ mantracorr_ovrl_

std::unique_ptr<L1TkMuMantra> L1TkMuonProducer::mantracorr_ovrl_
private

Definition at line 117 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ nStubsmin_

int L1TkMuonProducer::nStubsmin_
private

Definition at line 105 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ omtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::omtfMatchAlgoVersion_
private

Definition at line 111 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ omtfToken_

const edm::EDGetTokenT<RegionalMuonCandBxCollection> L1TkMuonProducer::omtfToken_
private

Definition at line 122 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ pTMinTra_

float L1TkMuonProducer::pTMinTra_
private

Definition at line 103 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ trackToken_

const edm::EDGetTokenT<std::vector<TTTrack<Ref_Phase2TrackerDigi_> > > L1TkMuonProducer::trackToken_
private

Definition at line 126 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ use5ParameterFit_

bool L1TkMuonProducer::use5ParameterFit_
private

Definition at line 107 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer().

◆ useTPMatchWindows_

bool L1TkMuonProducer::useTPMatchWindows_
private

Definition at line 108 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and runOnMTFCollection_v1().

◆ zMax_

float L1TkMuonProducer::zMax_
private

Definition at line 101 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

L1TkMuonProducer::sigmaPhiTP
double sigmaPhiTP(const RegionalMuonCand &mu) const
Definition: L1TkMuonProducer.cc:596
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
L1TkMuonProducer::pTMinTra_
float pTMinTra_
Definition: L1TkMuonProducer.cc:103
L1TkMuMantraDF::muon_df::theta
double theta
Definition: L1TkMuMantra.h:27
L1TkMuonProducer::omtfMatchAlgoVersion_
AlgoType omtfMatchAlgoVersion_
Definition: L1TkMuonProducer.cc:111
L1TkMuonProducer::product_to_muvec
std::vector< L1TkMuMantraDF::muon_df > product_to_muvec(const RegionalMuonCandBxCollection &l1mtfs) const
Definition: L1TkMuonProducer.cc:617
edm::Handle::product
T const * product() const
Definition: Handle.h:70
TTTrack::momentum
GlobalVector momentum() const
Track momentum.
Definition: TTTrack.h:281
L1TkMuonProducer::etaMax_
float etaMax_
Definition: L1TkMuonProducer.cc:100
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
L1TkMuonProducer::runOnMTFCollection_v1
void runOnMTFCollection_v1(const edm::Handle< RegionalMuonCandBxCollection > &, const edm::Handle< L1TTTrackCollectionType > &, TkMuonCollection &tkMuons, const int detector) const
Definition: L1TkMuonProducer.cc:367
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
L1TkMuonProducer::dRMax_
float dRMax_
Definition: L1TkMuonProducer.cc:104
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
L1TkMuMantra::prepare_corr_bounds
static std::vector< double > prepare_corr_bounds(std::string fname, std::string hname)
Definition: L1TkMuMantra.cc:199
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:26
L1TkMuonProducer::bmtfMatchAlgoVersion_
AlgoType bmtfMatchAlgoVersion_
Definition: L1TkMuonProducer.cc:110
L1TkMuonProducer::zMax_
float zMax_
Definition: L1TkMuonProducer.cc:101
max_mu_propagator_eta
static constexpr float max_mu_propagator_eta
Definition: L1TkMuonProducer.cc:41
endcap_MTF_region
static constexpr int endcap_MTF_region
Definition: L1TkMuonProducer.cc:33
L1TkMuonProducer::mantra_n_trk_par_
int mantra_n_trk_par_
Definition: L1TkMuonProducer.cc:119
L1TkMuonProducer::emtfMatchAlgoVersion_
AlgoType emtfMatchAlgoVersion_
Definition: L1TkMuonProducer.cc:112
edm::Handle
Definition: AssociativeIterator.h:50
L1TkMuonProducer::omtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > omtfToken_
Definition: L1TkMuonProducer.cc:122
parallelization.uint
uint
Definition: parallelization.py:124
TTTrack::rInv
double rInv() const
Track curvature.
Definition: TTTrack.h:286
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
edm::Ref
Definition: AssociativeIterator.h:58
l1pfProducer_cfi.tkMuons
tkMuons
Definition: l1pfProducer_cfi.py:8
L1TkMuCorrDynamicWindows::prepare_corr_bounds
static std::vector< double > prepare_corr_bounds(const string &fname, const string &hname)
Definition: L1TkMuCorrDynamicWindows.cc:387
phi_scale
static constexpr float phi_scale
Definition: L1TkMuonProducer.cc:35
BXVector< RegionalMuonCand >
TTTrack::POCA
GlobalPoint POCA() const
POCA.
Definition: TTTrack.h:316
edm::FileInPath
Definition: FileInPath.h:64
L1TkMuonProducer::kTP
Definition: L1TkMuonProducer.cc:61
L1TkMuonProducer::kDynamicWindows
Definition: L1TkMuonProducer.cc:61
l1t::EMTFTrackCollection
std::vector< EMTFTrack > EMTFTrackCollection
Definition: EMTFTrack.h:219
L1TkMuonProducer::emtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > emtfToken_
Definition: L1TkMuonProducer.cc:123
min_mu_propagator_barrel_pT
static constexpr float min_mu_propagator_barrel_pT
Definition: L1TkMuonProducer.cc:40
L1TkMuonProducer::dwcorr_
std::unique_ptr< L1TkMuCorrDynamicWindows > dwcorr_
Definition: L1TkMuonProducer.cc:114
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
L1TkMuonProducer::kMantra
Definition: L1TkMuonProducer.cc:61
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
L1TkMuonProducer::correctGMTPropForTkZ_
bool correctGMTPropForTkZ_
Definition: L1TkMuonProducer.cc:106
matching_factor_eta
static constexpr float matching_factor_eta
Definition: L1TkMuonProducer.cc:37
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
min_mu_propagator_p
static constexpr float min_mu_propagator_p
Definition: L1TkMuonProducer.cc:39
dr2_cutoff
static constexpr float dr2_cutoff
Definition: L1TkMuonProducer.cc:36
overlap_MTF_region
static constexpr int overlap_MTF_region
Definition: L1TkMuonProducer.cc:32
BXVector::begin
const_iterator begin(int bx) const
L1TkMuonProducer::useTPMatchWindows_
bool useTPMatchWindows_
Definition: L1TkMuonProducer.cc:108
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TkMuMantraDF::muon_df::phi
double phi
Definition: L1TkMuMantra.h:28
L1TkMuonProducer::chi2Max_
float chi2Max_
Definition: L1TkMuonProducer.cc:102
L1TkMuonProducer::product_to_trkvec
std::vector< L1TkMuMantraDF::track_df > product_to_trkvec(const L1TTTrackCollectionType &l1tks) const
Definition: L1TkMuonProducer.cc:600
L1TkMuMantraDF::muon_df::eta
double eta
Definition: L1TkMuMantra.h:26
BXVector::end
const_iterator end(int bx) const
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
L1TkMuonProducer::PropState
Definition: L1TkMuonProducer.cc:50
L1TkMuonProducer::emtfTCToken_
const edm::EDGetTokenT< EMTFTrackCollection > emtfTCToken_
Definition: L1TkMuonProducer.cc:125
eta_scale
static constexpr float eta_scale
Definition: L1TkMuonProducer.cc:34
fftjetproducer_cfi.etaCut
etaCut
Definition: fftjetproducer_cfi.py:168
L1TkMuonProducer::use5ParameterFit_
bool use5ParameterFit_
Definition: L1TkMuonProducer.cc:107
barrel_MTF_region
static constexpr int barrel_MTF_region
Definition: L1TkMuonProducer.cc:31
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
iEvent
int iEvent
Definition: GenABIO.cc:224
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
L1TkMuonProducer::L1TTTrackCollectionType
std::vector< L1TTTrackType > L1TTTrackCollectionType
Definition: L1TkMuonProducer.cc:48
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
L1TkMuMantraDF::muon_df
Definition: L1TkMuMantra.h:24
l1t::TkMuon
Definition: TkMuon.h:12
L1TkMuonProducer::sigmaEtaTP
double sigmaEtaTP(const RegionalMuonCand &mu) const
Definition: L1TkMuonProducer.cc:585
edm::Ptr
Definition: AssociationVector.h:31
L1TkMuonProducer::mantracorr_ovrl_
std::unique_ptr< L1TkMuMantra > mantracorr_ovrl_
Definition: L1TkMuonProducer.cc:117
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
mu_mass
static constexpr float mu_mass
Definition: L1TkMuonProducer.cc:30
L1TkMuMantra::to_mpio2_pio2
static double to_mpio2_pio2(double x)
Definition: L1TkMuMantra.h:92
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1TkMuMantra::eta_to_theta
static double eta_to_theta(double x)
Definition: L1TkMuMantra.h:87
L1TkMuMantraDF::muon_df::charge
int charge
Definition: L1TkMuMantra.h:29
L1TkMuonProducer::trackToken_
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
Definition: L1TkMuonProducer.cc:126
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition: JetExtendedAssociation.h:32
Exception
Definition: hltDiff.cc:246
L1TkMuonProducer::etaMin_
float etaMin_
Definition: L1TkMuonProducer.cc:99
L1TkMuMantraDF::muon_df::pt
double pt
Definition: L1TkMuMantra.h:25
L1TkMuonProducer::bmtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > bmtfToken_
Definition: L1TkMuonProducer.cc:121
p3
double p3[4]
Definition: TauolaWrapper.h:91
patCandidatesForDimuonsSequences_cff.matches
matches
Definition: patCandidatesForDimuonsSequences_cff.py:131
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
matching_factor_phi
static constexpr float matching_factor_phi
Definition: L1TkMuonProducer.cc:38
l1t::TkMuonCollection
std::vector< TkMuon > TkMuonCollection
Definition: TkMuonFwd.h:16
L1TkMuMantra::deg_to_rad
static double deg_to_rad(double x)
Definition: L1TkMuMantra.h:85
L1TkMuonProducer::mantracorr_barr_
std::unique_ptr< L1TkMuMantra > mantracorr_barr_
Definition: L1TkMuonProducer.cc:116
mps_fire.result
result
Definition: mps_fire.py:303
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1TkMuonProducer::mantracorr_endc_
std::unique_ptr< L1TkMuMantra > mantracorr_endc_
Definition: L1TkMuonProducer.cc:118
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
L1TkMuonProducer::propagateToGMT
PropState propagateToGMT(const L1TTTrackType &l1tk) const
Definition: L1TkMuonProducer.cc:530
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
L1TkMuonProducer::nStubsmin_
int nStubsmin_
Definition: L1TkMuonProducer.cc:105
edm::InputTag
Definition: InputTag.h:15
L1TkMuonProducer::runOnMTFCollection_v2
void runOnMTFCollection_v2(const edm::Handle< EMTFTrackCollection > &, const edm::Handle< L1TTTrackCollectionType > &, TkMuonCollection &tkMuons) const
Definition: L1TkMuonProducer.cc:482
L1TkMuonProducer::build_tkMuons_from_idxs
void build_tkMuons_from_idxs(TkMuonCollection &tkMuons, const std::vector< int > &matches, const edm::Handle< L1TTTrackCollectionType > &l1tksH, const edm::Handle< RegionalMuonCandBxCollection > &muonH, int detector) const
Definition: L1TkMuonProducer.cc:647
mps_fire.dest
dest
Definition: mps_fire.py:179
reco::reduceRange
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18