CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
MuonCandidate::CandidateContainer CandidateContainer
void printHits(const ConstRecHitContainer &) const
print all RecHits of a trajectory
GlobalMuonTrackMatcher * trackMatcher() const
ConstRecHitContainer selectTrackerHits(const ConstRecHitContainer &) const
select tracker hits; exclude some tracker hits in the global trajectory
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
TransientTrackingRecHit::RecHitPointer RecHitPointer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
const TransientTrackingRecHitBuilder * theMuonRecHitBuilder
std::vector< ConstRecHitPointer > RecHitContainer
MuonCandidate::TrajectoryContainer TrajectoryContainer
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
bool operator()(const TransientTrackingRecHit::ConstRecHitPointer &a, const TransientTrackingRecHit::ConstRecHitPointer &b) const
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
~GlobalTrajectoryBuilderBase() override
destructor
void fixTEC(ConstRecHitContainer &all, double scl_x, double scl_y) const
rescale errors of outermost TEC RecHit
double trackProbability(const Trajectory &) const
calculate chi2 probability (-ln(P))
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
MuonDetLayerMeasurements * theLayerMeasurements
TransientTrackingRecHit::RecHitContainer RecHitContainer
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::Track &) const
get transient RecHits of a Track
const MuonServiceProxy * service() const
void setEvent(const edm::Event &) override
pass the Event to the algo at each event
ConstRecHitContainer selectMuonHits(const Trajectory &, const std::vector< int > &) const
select muon hits compatible with trajectory; check hits in chambers with showers
std::shared_ptr< TrackingRecHit const > RecHitPointer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
def all
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
std::vector< ConstRecHitPointer > ConstRecHitContainer
GlobalTrajectoryBuilderBase(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
constructor with Parameter Set and MuonServiceProxy
const MultipleScatteringParametrisationMaker * theMSMaker
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
GlobalMuonTrackMatcher * theTrackMatcher
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
double b
Definition: hdecay.h:118
RectangularEtaPhiTrackingRegion defineRegionOfInterest(const reco::TrackRef &) const
define region of interest with tracker
const Trajectory * chooseTrajectory(const std::vector< Trajectory * > &, int) const
choose final trajectory
double a
Definition: hdecay.h:119
RefitDirection checkRecHitsOrdering(const ConstRecHitContainer &) const
This does nothing now.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
MuonTrackingRegionBuilder * theRegionBuilder
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
std::vector< MuonRecHitPointer > MuonRecHitContainer
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
MuonTrajectoryBuilder::TrajectoryContainer trajectories(const TrajectorySeed &) override
dummy implementation, unused in this class
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 ...