|
|
#include <L3TkMuonProducer.h>
This module creates a skimed list of reco::Track (pointing to the original TrackExtra and TrackingRecHitOwnedVector One highest pT track per L1/L2 is selected, requiring some quality.
- Author
- J-R Vlimant.
Definition at line 27 of file L3TkMuonProducer.h.
◆ LXtoL3sMap
◆ pseudoRef
◆ SeedRef
◆ L3TkMuonProducer()
◆ ~L3TkMuonProducer()
L3TkMuonProducer::~L3TkMuonProducer |
( |
| ) |
|
|
override |
◆ makePseudoRef()
Definition at line 49 of file L3TkMuonProducer.h.
53 return std::make_pair(l1ref.
id().
id(), l1ref.
key());
55 return std::make_pair(l2ref.
id().
id(), l2ref.
key());
References edm::ProductID::id(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::isNull(), edm::Ref< C, T, F >::key(), and alignCSCRings::s.
◆ produce()
produce candidates
reconstruct muons
Definition at line 108 of file L3TkMuonProducer.cc.
109 const string metname =
"Muon|RecoMuon|L3TkMuonProducer";
120 bool gotL3seeds =
false;
124 vector<TrackRef> orderedTrackTracks(
maxI);
125 for (
unsigned int i = 0;
i !=
maxI;
i++)
129 sort(orderedTrackTracks.begin(), orderedTrackTracks.end(),
trackRefBypT);
132 for (
unsigned int i = 0;
i !=
maxI;
i++) {
136 vector<SeedRef> allPossibleOrderedLx;
138 allPossibleOrderedLx.push_back(l3seedRef);
139 LogDebug(
metname) <<
"adding the seed ref: " << l3seedRef.id().id() <<
":" << l3seedRef.key()
140 <<
" for this tracker track: " << tk.
id().
id() <<
":" << tk.
key();
146 const edm::Provenance& seedsProv =
event.getProvenance(l3seedRef.id());
148 event.getByLabel(l3seedsTag, l3seeds);
153 for (
unsigned int iS = 0; iS != l3seeds->size(); ++iS) {
156 if (l3seedRef.key() == iS)
160 SeedRef thisSharedSeedRef(l3seeds, iS);
164 <<
"\nadding ANOTHER seed ref: " << thisSharedSeedRef.id().id() <<
":"
165 << thisSharedSeedRef.key() <<
" for this tracker track: " << tk.
id().
id() <<
":" << tk.
key();
167 allPossibleOrderedLx.push_back(thisSharedSeedRef);
174 <<
" before ordering\n"
176 sort(allPossibleOrderedLx.begin(), allPossibleOrderedLx.end(),
seedRefBypT);
178 <<
" after ordering\n"
181 for (
unsigned int iL = 0; iL != allPossibleOrderedLx.size(); ++iL) {
182 SeedRef thisRef = allPossibleOrderedLx[iL];
184 LogDebug(
metname) <<
"seed ref: " << thisRef.id().id() <<
":" << thisRef.key()
185 <<
" transcribe to pseudoref: " << ref.first <<
":" << ref.second;
186 LXtoL3sMap::iterator
f = LXtoL3s.find(ref);
187 if (
f != LXtoL3s.end()) {
191 <<
"\n cannot compete in pT with track: " <<
f->second.first.id().id() <<
":"
192 <<
f->second.first.key() <<
" (" <<
f->second.first->pt() <<
")"
193 <<
"\n already assigned to pseudo ref: " << ref.first <<
":" << ref.second
194 <<
" which corresponds to seedRef: " <<
f->second.second.id().id() <<
":"
195 <<
f->second.second.key();
200 <<
" is assigned to pseudo ref: " << ref.first <<
":" << ref.second
201 <<
" which corresponds to seedRef: " << thisRef.id().id() <<
":" << thisRef.key();
202 LXtoL3s[ref] = std::make_pair(tk, thisRef);
210 auto outTracks = std::make_unique<TrackCollection>(LXtoL3s.size());
211 auto outTrackExtras = std::make_unique<TrackExtraCollection>(LXtoL3s.size());
213 auto outRecHits = std::make_unique<TrackingRecHitCollection>();
216 LogDebug(
metname) <<
"reading the map to make " << LXtoL3s.size() <<
"products.";
218 LXtoL3sMap::iterator
f = LXtoL3s.begin();
220 for (;
f != LXtoL3s.end(); ++
f, ++
i) {
222 const Track& trk = *(
f->second.first);
223 (*outTracks)[
i] =
Track(trk);
226 LogDebug(
metname) <<
"copy the trackExtra too, and change the seedref";
239 seedRef->direction(),
243 unsigned int iRH = 0;
245 outRecHits->push_back((*hit)->clone());
247 (*outTrackExtras)[
i].setHits(rHits, 0, iRH);
250 LogDebug(
metname) <<
"made: " << outTracks->size() <<
" tracks, " << outTrackExtras->size() <<
" extras and "
251 << outRecHits->size() <<
" rechits.";
259 <<
"================================";
References TrajectorySeed::direction(), f, mps_fire::i, edm::ProductID::id(), edm::Ref< C, T, F >::id(), reco::Track::innerDetId(), reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), reco::Track::innerStateCovariance(), edm::Ref< C, T, F >::key(), LogDebug, findQualityFiles::maxI, metname, edm::Provenance::moduleLabel(), eostools::move(), reco::Track::outerDetId(), reco::Track::outerMomentum(), reco::Track::outerOk(), reco::Track::outerPosition(), reco::Track::outerStateCovariance(), printseed(), printvector(), edm::Provenance::processName(), edm::Provenance::productInstanceName(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), fileCollector::seed, and PDWG_EXOHSCP_cff::tracks.
◆ seedRefBypT()
static bool L3TkMuonProducer::seedRefBypT |
( |
const SeedRef & |
s1, |
|
|
const SeedRef & |
s2 |
|
) |
| |
|
inlinestaticprivate |
◆ sharedSeed()
◆ trackRefBypT()
◆ theL3CollectionLabel
◆ trackToken_
const math::XYZPoint & outerPosition() const
position of the outermost hit
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
std::string const & moduleLabel() const
bool sharedSeed(const L3MuonTrajectorySeed &s1, const L3MuonTrajectorySeed &s2)
std::pair< unsigned int, unsigned int > pseudoRef
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
std::string const & productInstanceName() const
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
unsigned int nHits() const
bool isNull() const
Checks for null.
bool outerOk() const
return true if the outermost hit is valid
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
bool innerOk() const
return true if the innermost hit is valid
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
string printvector(const vector< TrackRef > &v)
edm::Ref< L3MuonTrajectorySeedCollection > SeedRef
std::string const & processName() const
std::string const & processName() const
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
TypeID unwrappedTypeID() const
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
std::string const & productInstanceName() const
edm::InputTag theL3CollectionLabel
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
const math::XYZPoint & innerPosition() const
position of the innermost hit
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
RecHitRange recHits() const
static bool trackRefBypT(const reco::TrackRef &t1, const reco::TrackRef &t2)
ProductID id() const
Accessor for product ID.
std::map< pseudoRef, std::pair< reco::TrackRef, SeedRef > > LXtoL3sMap
pseudoRef makePseudoRef(const L3MuonTrajectorySeed &s)
static bool seedRefBypT(const SeedRef &s1, const SeedRef &s2)
std::string const & moduleLabel() const
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
T getParameter(std::string const &) const
key_type key() const
Accessor for product key.
string printseed(const L3TkMuonProducer::SeedRef &s)
const std::string metname