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::EDProducer 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::EDProducer
typedef EDProducer 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::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () 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::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

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 build_tkMuons_from_idxs (TkMuonCollection &tkMuons, const std::vector< int > &matches, const edm::Handle< L1TTTrackCollectionType > &l1tksH, int detector) const
 
void produce (edm::Event &, const edm::EventSetup &) override
 
std::vector< L1TkMuMantraDF::muon_dfproduct_to_muvec (const EMTFTrackCollection &l1mus)
 
std::vector< L1TkMuMantraDF::muon_dfproduct_to_muvec (const RegionalMuonCandBxCollection &l1mtfs)
 
std::vector< L1TkMuMantraDF::track_dfproduct_to_trkvec (const L1TTTrackCollectionType &l1tks)
 
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 46 of file L1TkMuonProducer.cc.

Member Typedef Documentation

◆ L1TTTrackCollectionType

Definition at line 49 of file L1TkMuonProducer.cc.

◆ L1TTTrackType

Definition at line 48 of file L1TkMuonProducer.cc.

Member Enumeration Documentation

◆ AlgoType

Enumerator
kTP 
kDynamicWindows 
kMantra 

Definition at line 62 of file L1TkMuonProducer.cc.

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

Constructor & Destructor Documentation

◆ L1TkMuonProducer()

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

Definition at line 136 of file L1TkMuonProducer.cc.

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

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 302 of file L1TkMuonProducer.cc.

302 {}

Member Function Documentation

◆ build_tkMuons_from_idxs() [1/2]

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 662 of file L1TkMuonProducer.cc.

666  {
667  for (uint imatch = 0; imatch < matches.size(); ++imatch) {
668  int match_trk_idx = matches.at(imatch);
669  if (match_trk_idx < 0)
670  continue; // this muon was not matched to any candidate
671 
672  // take properties of the track
673  const L1TTTrackType& matchTk = (*l1tksH.product())[match_trk_idx];
674  const auto& p3 = matchTk.momentum();
675  const auto& tkv3 = matchTk.POCA();
676  float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
677  math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);
678 
679  edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, match_trk_idx);
680  edm::Ref<RegionalMuonCandBxCollection> l1muRef(muonH, imatch);
681 
682  float trkisol = -999;
683  TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
684  l1tkmu.setTrackCurvature(matchTk.rInv());
685  l1tkmu.setTrkzVtx((float)tkv3.z());
686  l1tkmu.setMuonDetector(detector);
687  tkMuons.push_back(l1tkmu);
688  }
689  return;
690 }

References hgcalTestNeighbor_cfi::detector, 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().

◆ build_tkMuons_from_idxs() [2/2]

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

Definition at line 692 of file L1TkMuonProducer.cc.

695  {
696  for (uint imatch = 0; imatch < matches.size(); ++imatch) {
697  int match_trk_idx = matches.at(imatch);
698  if (match_trk_idx < 0)
699  continue; // this muon was not matched to any candidate
700 
701  // take properties of the track
702  const L1TTTrackType& matchTk = (*l1tksH.product())[match_trk_idx];
703  const auto& p3 = matchTk.momentum();
704  const auto& tkv3 = matchTk.POCA();
705  float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
706  math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);
707 
708  edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, match_trk_idx);
710  l1muRef; // NOTE: this is the only difference from the function above, but could not find a way to make a conditional constructor
711 
712  float trkisol = -999;
713  TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
714  l1tkmu.setTrackCurvature(matchTk.rInv());
715  l1tkmu.setTrkzVtx((float)tkv3.z());
716  l1tkmu.setMuonDetector(detector);
717  tkMuons.push_back(l1tkmu);
718  }
719  return;
720 }

References hgcalTestNeighbor_cfi::detector, 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.

◆ fillDescriptions()

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

Definition at line 535 of file L1TkMuonProducer.cc.

535  {
536  //The following says we do not know what parameters are allowed so do no validation
537  // Please change this to state exactly what you do use, even if it is no parameters
539  desc.setUnknown();
540  descriptions.addDefault(desc);
541 }

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

◆ produce()

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

Implements edm::EDProducer.

Definition at line 305 of file L1TkMuonProducer.cc.

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

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)
private

Definition at line 649 of file L1TkMuonProducer.cc.

649  {
650  std::vector<L1TkMuMantraDF::muon_df> result(l1mus.size());
651  for (uint imu = 0; imu < l1mus.size(); ++imu) {
652  auto& mu = l1mus.at(imu);
653  result.at(imu).pt = mu.Pt();
654  result.at(imu).eta = mu.Eta();
656  result.at(imu).phi = L1TkMuMantra::deg_to_rad(mu.Phi_glob());
657  result.at(imu).charge = mu.Charge();
658  }
659  return result;
660 }

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)
private

Definition at line 633 of file L1TkMuonProducer.cc.

633  {
634  std::vector<L1TkMuMantraDF::muon_df> result;
635  for (auto l1mu = l1mtfs.begin(0); l1mu != l1mtfs.end(0); ++l1mu) // considering BX = 0 only
636  {
637  L1TkMuMantraDF::muon_df this_mu;
638  this_mu.pt = l1mu->hwPt() * 0.5;
639  this_mu.eta = l1mu->hwEta() * eta_scale;
641  this_mu.phi =
642  MicroGMTConfiguration::calcGlobalPhi(l1mu->hwPhi(), l1mu->trackFinderType(), l1mu->processor()) * phi_scale;
643  this_mu.charge = (l1mu->hwSign() == 0 ? 1 : -1); // charge sign bit (charge = (-1)^(sign))
644  result.push_back(this_mu);
645  }
646  return result;
647 }

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)
private

Definition at line 616 of file L1TkMuonProducer.cc.

616  {
617  std::vector<L1TkMuMantraDF::track_df> result(l1tks.size());
618  for (uint itrk = 0; itrk < l1tks.size(); ++itrk) {
619  auto& trk = l1tks.at(itrk);
620 
621  result.at(itrk).pt = trk.momentum().perp();
622  result.at(itrk).eta = trk.momentum().eta();
623  result.at(itrk).theta = L1TkMuMantra::to_mpio2_pio2(L1TkMuMantra::eta_to_theta(trk.momentum().eta()));
624  result.at(itrk).phi = trk.momentum().phi();
625  result.at(itrk).nstubs = trk.getStubRefs().size();
626  result.at(itrk).chi2 = trk.chi2();
627  result.at(itrk).charge = (trk.rInv() > 0 ? 1 : -1);
628  }
629 
630  return result;
631 }

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 543 of file L1TkMuonProducer.cc.

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

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(), 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 377 of file L1TkMuonProducer.cc.

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

References funct::abs(), BXVector< T >::begin(), chi2Max_, SiPixelRawToDigiRegional_cfi::deltaPhi, HLTMuonOfflineAnalyzer_cfi::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(), muonTiming_cfi::ptmax, 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 495 of file L1TkMuonProducer.cc.

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

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 601 of file L1TkMuonProducer.cc.

601  {
602  float l1mu_eta = l1mu.hwEta() * eta_scale;
603  if (std::abs(l1mu_eta) <= 1.55)
604  return 0.0288;
605  else if (std::abs(l1mu_eta) > 1.55 && std::abs(l1mu_eta) <= 1.65)
606  return 0.025;
607  else if (std::abs(l1mu_eta) > 1.65 && std::abs(l1mu_eta) <= 2.4)
608  return 0.0144;
609  return 0.0288;
610 }

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 612 of file L1TkMuonProducer.cc.

612 { return 0.0126; }

Referenced by runOnMTFCollection_v1().

Member Data Documentation

◆ bmtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::bmtfMatchAlgoVersion_
private

Definition at line 117 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ bmtfToken_

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

Definition at line 128 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ chi2Max_

float L1TkMuonProducer::chi2Max_
private

Definition at line 109 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ correctGMTPropForTkZ_

bool L1TkMuonProducer::correctGMTPropForTkZ_
private

Definition at line 113 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and propagateToGMT().

◆ dRMax_

float L1TkMuonProducer::dRMax_
private

Definition at line 111 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ dwcorr_

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

Definition at line 121 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and runOnMTFCollection_v2().

◆ emtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::emtfMatchAlgoVersion_
private

Definition at line 119 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ emtfTCToken_

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

Definition at line 132 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ emtfToken_

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

Definition at line 130 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ etaMax_

float L1TkMuonProducer::etaMax_
private

Definition at line 107 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ etaMin_

float L1TkMuonProducer::etaMin_
private

Definition at line 106 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ mantra_n_trk_par_

int L1TkMuonProducer::mantra_n_trk_par_
private

Definition at line 126 of file L1TkMuonProducer.cc.

◆ mantracorr_barr_

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

Definition at line 123 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ mantracorr_endc_

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

Definition at line 125 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ mantracorr_ovrl_

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

Definition at line 124 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ nStubsmin_

int L1TkMuonProducer::nStubsmin_
private

Definition at line 112 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ omtfMatchAlgoVersion_

AlgoType L1TkMuonProducer::omtfMatchAlgoVersion_
private

Definition at line 118 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and produce().

◆ omtfToken_

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

Definition at line 129 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ pTMinTra_

float L1TkMuonProducer::pTMinTra_
private

Definition at line 110 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

◆ trackToken

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

Definition at line 133 of file L1TkMuonProducer.cc.

Referenced by produce().

◆ use5ParameterFit_

bool L1TkMuonProducer::use5ParameterFit_
private

Definition at line 114 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer().

◆ useTPMatchWindows_

bool L1TkMuonProducer::useTPMatchWindows_
private

Definition at line 115 of file L1TkMuonProducer.cc.

Referenced by L1TkMuonProducer(), and runOnMTFCollection_v1().

◆ zMax_

float L1TkMuonProducer::zMax_
private

Definition at line 108 of file L1TkMuonProducer.cc.

Referenced by runOnMTFCollection_v1().

L1TkMuonProducer::sigmaPhiTP
double sigmaPhiTP(const RegionalMuonCand &mu) const
Definition: L1TkMuonProducer.cc:612
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
L1TkMuonProducer::pTMinTra_
float pTMinTra_
Definition: L1TkMuonProducer.cc:110
L1TkMuMantraDF::muon_df::theta
double theta
Definition: L1TkMuMantra.h:27
L1TkMuonProducer::omtfMatchAlgoVersion_
AlgoType omtfMatchAlgoVersion_
Definition: L1TkMuonProducer.cc:118
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:107
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:377
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
L1TkMuonProducer::dRMax_
float dRMax_
Definition: L1TkMuonProducer.cc:111
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:117
L1TkMuonProducer::zMax_
float zMax_
Definition: L1TkMuonProducer.cc:108
max_mu_propagator_eta
static constexpr float max_mu_propagator_eta
Definition: L1TkMuonProducer.cc:42
endcap_MTF_region
static constexpr int endcap_MTF_region
Definition: L1TkMuonProducer.cc:34
L1TkMuonProducer::product_to_muvec
std::vector< L1TkMuMantraDF::muon_df > product_to_muvec(const RegionalMuonCandBxCollection &l1mtfs)
Definition: L1TkMuonProducer.cc:633
L1TkMuonProducer::mantra_n_trk_par_
int mantra_n_trk_par_
Definition: L1TkMuonProducer.cc:126
L1TkMuonProducer::emtfMatchAlgoVersion_
AlgoType emtfMatchAlgoVersion_
Definition: L1TkMuonProducer.cc:119
edm::Handle
Definition: AssociativeIterator.h:50
L1TkMuonProducer::omtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > omtfToken_
Definition: L1TkMuonProducer.cc:129
parallelization.uint
uint
Definition: parallelization.py:124
TTTrack::rInv
double rInv() const
Track curvature.
Definition: TTTrack.h:286
L1TkMuonProducer::trackToken
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken
Definition: L1TkMuonProducer.cc:133
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:36
BXVector< RegionalMuonCand >
TTTrack::POCA
GlobalPoint POCA() const
POCA.
Definition: TTTrack.h:316
edm::FileInPath
Definition: FileInPath.h:64
L1TkMuonProducer::kTP
Definition: L1TkMuonProducer.cc:62
L1TkMuonProducer::kDynamicWindows
Definition: L1TkMuonProducer.cc:62
l1t::EMTFTrackCollection
std::vector< EMTFTrack > EMTFTrackCollection
Definition: EMTFTrack.h:219
L1TkMuonProducer::emtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > emtfToken_
Definition: L1TkMuonProducer.cc:130
min_mu_propagator_barrel_pT
static constexpr float min_mu_propagator_barrel_pT
Definition: L1TkMuonProducer.cc:41
L1TkMuonProducer::dwcorr_
std::unique_ptr< L1TkMuCorrDynamicWindows > dwcorr_
Definition: L1TkMuonProducer.cc:121
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
L1TkMuonProducer::kMantra
Definition: L1TkMuonProducer.cc:62
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
L1TkMuonProducer::correctGMTPropForTkZ_
bool correctGMTPropForTkZ_
Definition: L1TkMuonProducer.cc:113
matching_factor_eta
static constexpr float matching_factor_eta
Definition: L1TkMuonProducer.cc:38
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:40
dr2_cutoff
static constexpr float dr2_cutoff
Definition: L1TkMuonProducer.cc:37
overlap_MTF_region
static constexpr int overlap_MTF_region
Definition: L1TkMuonProducer.cc:33
BXVector::begin
const_iterator begin(int bx) const
L1TkMuonProducer::useTPMatchWindows_
bool useTPMatchWindows_
Definition: L1TkMuonProducer.cc:115
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:109
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:51
L1TkMuonProducer::emtfTCToken_
const edm::EDGetTokenT< EMTFTrackCollection > emtfTCToken_
Definition: L1TkMuonProducer.cc:132
eta_scale
static constexpr float eta_scale
Definition: L1TkMuonProducer.cc:35
fftjetproducer_cfi.etaCut
etaCut
Definition: fftjetproducer_cfi.py:168
L1TkMuonProducer::use5ParameterFit_
bool use5ParameterFit_
Definition: L1TkMuonProducer.cc:114
barrel_MTF_region
static constexpr int barrel_MTF_region
Definition: L1TkMuonProducer.cc:32
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:49
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:601
edm::Ptr
Definition: AssociationVector.h:31
L1TkMuonProducer::mantracorr_ovrl_
std::unique_ptr< L1TkMuMantra > mantracorr_ovrl_
Definition: L1TkMuonProducer.cc:124
L1TkMuonProducer::product_to_trkvec
std::vector< L1TkMuMantraDF::track_df > product_to_trkvec(const L1TTTrackCollectionType &l1tks)
Definition: L1TkMuonProducer.cc:616
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
mu_mass
static constexpr float mu_mass
Definition: L1TkMuonProducer.cc:31
L1TkMuMantra::to_mpio2_pio2
static double to_mpio2_pio2(double x)
Definition: L1TkMuMantra.h:92
muonTiming_cfi.ptmax
ptmax
Definition: muonTiming_cfi.py:22
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
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Exception
Definition: hltDiff.cc:246
L1TkMuonProducer::etaMin_
float etaMin_
Definition: L1TkMuonProducer.cc:106
L1TkMuMantraDF::muon_df::pt
double pt
Definition: L1TkMuMantra.h:25
L1TkMuonProducer::bmtfToken_
const edm::EDGetTokenT< RegionalMuonCandBxCollection > bmtfToken_
Definition: L1TkMuonProducer.cc:128
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:39
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:123
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:125
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:543
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
L1TkMuonProducer::nStubsmin_
int nStubsmin_
Definition: L1TkMuonProducer.cc:112
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:495
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:662
mps_fire.dest
dest
Definition: mps_fire.py:179