CMS 3D CMS Logo

GlobalTrajectoryBuilderBase.h
Go to the documentation of this file.
1 #ifndef RecoMuon_GlobalTrackingTools_GlobalTrajectoryBuilderBase_H
2 #define RecoMuon_GlobalTrackingTools_GlobalTrajectoryBuilderBase_H
3 
25 
37 
38 //Forward declare classes from same package (RecoMuon)
41 class MuonServiceProxy;
43 class GlobalMuonRefitter;
45 
47 public:
56  typedef std::vector<Trajectory> TC;
57  typedef TC::const_iterator TI;
58 
61 
64 
68  }
69 
71  void setEvent(const edm::Event&) override;
72 
73 protected:
75 
78 
80  virtual std::vector<TrackCand> makeTkCandCollection(const TrackCand&) = 0;
81 
83  std::vector<TrackCand> chooseRegionalTrackerTracks(const TrackCand&, const std::vector<TrackCand>&);
84 
87 
89  void checkMuonHits(const reco::Track&, ConstRecHitContainer&, ConstRecHitContainer&, std::vector<int>&) const;
90 
92  ConstRecHitContainer selectMuonHits(const Trajectory&, const std::vector<int>&) const;
93 
96 
98  void fixTEC(ConstRecHitContainer& all, double scl_x, double scl_y) const;
99 
101  const Trajectory* chooseTrajectory(const std::vector<Trajectory*>&, int) const;
102 
104  double trackProbability(const Trajectory&) const;
105 
107  void printHits(const ConstRecHitContainer&) const;
108 
110  void addTraj(TrackCand&) {}
111 
114 
117 
120 
122  const MuonServiceProxy* service() const { return theService; }
123 
127  bool barrel_a = (a->det()->subDetector() == GeomDetEnumerators::DT ||
128  a->det()->subDetector() == GeomDetEnumerators::RPCBarrel);
129 
130  bool barrel_b = (b->det()->subDetector() == GeomDetEnumerators::DT ||
131  b->det()->subDetector() == GeomDetEnumerators::RPCBarrel);
132 
133  if (barrel_a && barrel_b)
134  return a->det()->surface().position().perp() < b->det()->surface().position().perp();
135 
136  else if (!barrel_a && !barrel_b)
137  return fabs(a->globalPosition().z()) < fabs(b->globalPosition().z());
138  else if (barrel_a && !barrel_b)
139  return true;
140  else if (!barrel_a && barrel_b)
141  return false;
142  //shouldn't really get here in any case (there's some sense to throw here )
143  return false;
144  }
145  };
146 
148  float thePtCut;
149  float thePCut;
150 
151 private:
175 };
176 #endif
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::Track &) const
get transient RecHits of a Track
MuonCandidate::CandidateContainer CandidateContainer
ConstRecHitContainer selectMuonHits(const Trajectory &, const std::vector< int > &) const
select muon hits compatible with trajectory; check hits in chambers with showers
virtual std::vector< TrackCand > makeTkCandCollection(const TrackCand &)=0
make a TrackCand collection using tracker Track, Trajectory information
void addTraj(TrackCand &)
if TrackCand has only a TrackRef, attempt to add Trajectory*
std::pair< const Trajectory *, reco::TrackRef > TrackCand
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
ConstRecHitContainer selectTrackerHits(const ConstRecHitContainer &) const
select tracker hits; exclude some tracker hits in the global trajectory
TransientTrackingRecHit::RecHitPointer RecHitPointer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
const MuonServiceProxy * service() const
const TransientTrackingRecHitBuilder * theMuonRecHitBuilder
void checkMuonHits(const reco::Track &, ConstRecHitContainer &, ConstRecHitContainer &, std::vector< int > &) const
check muon RecHits, calculate chamber occupancy and select hits to be used in the final fit ...
std::vector< ConstRecHitPointer > RecHitContainer
MuonCandidate::TrajectoryContainer TrajectoryContainer
void fixTEC(ConstRecHitContainer &all, double scl_x, double scl_y) const
rescale errors of outermost TEC RecHit
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
std::vector< TrackCand > chooseRegionalTrackerTracks(const TrackCand &, const std::vector< TrackCand > &)
choose tracker tracks within region of interest
const TransientTrackingRecHitBuilder * theTrackerRecHitBuilder
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
~GlobalTrajectoryBuilderBase() override
destructor
double trackProbability(const Trajectory &) const
calculate chi2 probability (-ln(P))
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
void printHits(const ConstRecHitContainer &) const
print all RecHits of a trajectory
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
bool operator()(const TransientTrackingRecHit::ConstRecHitPointer &a, const TransientTrackingRecHit::ConstRecHitPointer &b) const
MuonDetLayerMeasurements * theLayerMeasurements
TransientTrackingRecHit::RecHitContainer RecHitContainer
void setEvent(const edm::Event &) override
pass the Event to the algo at each event
std::shared_ptr< TrackingRecHit const > RecHitPointer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
GlobalTrajectoryBuilderBase(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
constructor with Parameter Set and MuonServiceProxy
const MultipleScatteringParametrisationMaker * theMSMaker
RectangularEtaPhiTrackingRegion defineRegionOfInterest(const reco::TrackRef &) const
define region of interest with tracker
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
GlobalMuonTrackMatcher * theTrackMatcher
double b
Definition: hdecay.h:118
const Trajectory * chooseTrajectory(const std::vector< Trajectory *> &, int) const
choose final trajectory
double a
Definition: hdecay.h:119
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
MuonTrackingRegionBuilder * theRegionBuilder
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
std::vector< MuonRecHitPointer > MuonRecHitContainer
GlobalMuonTrackMatcher * trackMatcher() const
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
MuonTrajectoryBuilder::TrajectoryContainer trajectories(const TrajectorySeed &) override
dummy implementation, unused in this class
RefitDirection checkRecHitsOrdering(const ConstRecHitContainer &) const
This does nothing now.