CMS 3D CMS Logo

L3TkMuonProducer.h
Go to the documentation of this file.
1 #ifndef RecoMuon_L3MuonProducer_L3TkMuonProducer_H
2 #define RecoMuon_L3MuonProducer_L3TkMuonProducer_H
3 
14 
20 
21 namespace edm {
22  class ParameterSet;
23  class Event;
24  class EventSetup;
25 } // namespace edm
26 
28 public:
31 
33  ~L3TkMuonProducer() override;
34 
36  void produce(edm::Event&, const edm::EventSetup&) override;
37 
39 
40 private:
41  // L3/GLB Collection Label
44 
45  //psuedo ref is L2 or L1 ref.
46  typedef std::pair<unsigned int, unsigned int> pseudoRef;
47  typedef std::map<pseudoRef, std::pair<reco::TrackRef, SeedRef> > LXtoL3sMap;
48 
50  reco::TrackRef l2ref = s.l2Track();
51  if (l2ref.isNull()) {
52  l1extra::L1MuonParticleRef l1ref = s.l1Particle();
53  return std::make_pair(l1ref.id().id(), l1ref.key());
54  } else
55  return std::make_pair(l2ref.id().id(), l2ref.key());
56  }
57 
59 
60  //ordering functions
61  static bool seedRefBypT(const SeedRef& s1, const SeedRef& s2) {
62  double pt1, pt2;
63  reco::TrackRef l2ref1 = s1->l2Track();
64  if (l2ref1.isNull())
65  pt1 = s1->l1Particle()->pt();
66  else
67  pt1 = l2ref1->pt();
68  reco::TrackRef l2ref2 = s2->l2Track();
69  if (l2ref2.isNull())
70  pt2 = s2->l1Particle()->pt();
71  else
72  pt2 = l2ref2->pt();
73  return (pt1 > pt2);
74  }
75 
76  static bool trackRefBypT(const reco::TrackRef& t1, const reco::TrackRef& t2) { return (t1->pt() > t2->pt()); }
77 };
78 
79 #endif
L3TkMuonProducer::sharedSeed
bool sharedSeed(const L3MuonTrajectorySeed &s1, const L3MuonTrajectorySeed &s2)
Definition: L3TkMuonProducer.cc:50
L3TkMuonProducer::pseudoRef
std::pair< unsigned int, unsigned int > pseudoRef
Definition: L3TkMuonProducer.h:46
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
L3MuonTrajectorySeedCollection.h
L3TkMuonProducer::L3TkMuonProducer
L3TkMuonProducer(const edm::ParameterSet &)
constructor with config
Definition: L3TkMuonProducer.cc:26
edm::EDGetTokenT< reco::TrackCollection >
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
edm
HLT enums.
Definition: AlignableModifier.h:19
EDProducer.h
indexGen.s2
s2
Definition: indexGen.py:107
edm::Ref
Definition: AssociativeIterator.h:58
alignCSCRings.s
s
Definition: alignCSCRings.py:92
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
Track.h
TrackFwd.h
L3TkMuonProducer::SeedRef
edm::Ref< L3MuonTrajectorySeedCollection > SeedRef
Definition: L3TkMuonProducer.h:38
L3TkMuonProducer
Definition: L3TkMuonProducer.h:27
Event
HLT_FULL_cff.pt1
pt1
Definition: HLT_FULL_cff.py:9870
L3TkMuonProducer::trackToken_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: L3TkMuonProducer.h:43
L3MuonTrajectorySeed.h
L3TkMuonProducer::theL3CollectionLabel
edm::InputTag theL3CollectionLabel
Definition: L3TkMuonProducer.h:42
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
L3TkMuonProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
produce candidates
Definition: L3TkMuonProducer.cc:108
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
HLT_FULL_cff.pt2
pt2
Definition: HLT_FULL_cff.py:9872
L3TkMuonProducer::trackRefBypT
static bool trackRefBypT(const reco::TrackRef &t1, const reco::TrackRef &t2)
Definition: L3TkMuonProducer.h:76
InputTag.h
L3TkMuonProducer::~L3TkMuonProducer
~L3TkMuonProducer() override
destructor
Definition: L3TkMuonProducer.cc:46
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
L3TkMuonProducer::LXtoL3sMap
std::map< pseudoRef, std::pair< reco::TrackRef, SeedRef > > LXtoL3sMap
Definition: L3TkMuonProducer.h:47
L1MuonParticle.h
L3TkMuonProducer::makePseudoRef
pseudoRef makePseudoRef(const L3MuonTrajectorySeed &s)
Definition: L3TkMuonProducer.h:49
L3TkMuonProducer::seedRefBypT
static bool seedRefBypT(const SeedRef &s1, const SeedRef &s2)
Definition: L3TkMuonProducer.h:61
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
EventSetup
edm::Event
Definition: Event.h:73
L3MuonTrajectorySeed
Definition: L3MuonTrajectorySeed.h:16
edm::InputTag
Definition: InputTag.h:15
edm::ProductID::id
ProductIndex id() const
Definition: ProductID.h:35