CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalTrajectoryBuilderBase.h
Go to the documentation of this file.
1 #ifndef RecoMuon_GlobalTrackingTools_GlobalTrajectoryBuilderBase_H
2 #define RecoMuon_GlobalTrackingTools_GlobalTrajectoryBuilderBase_H
3 
27 
32 class MuonServiceProxy;
33 class Trajectory;
34 class TrackTransformer;
35 class TrajectoryFitter;
38 class GlobalMuonRefitter;
39 class TrackerTopology;
40 
41 namespace edm {class ParameterSet; class Event;}
42 namespace reco {class TransientTrack;}
43 
44 // ---------------------
45 // -- Class Interface --
46 // ---------------------
47 
49 
50  public:
51 
56 
61 
62  typedef std::vector<Trajectory> TC;
63  typedef TC::const_iterator TI;
64 
65  public:
66 
69 
72 
75 
77  virtual void setEvent(const edm::Event&);
78 
79  protected:
80 
82 
86 
88  virtual std::vector<TrackCand> makeTkCandCollection(const TrackCand&) = 0;
89 
91  std::vector<TrackCand> chooseRegionalTrackerTracks(const TrackCand&,
92  const std::vector<TrackCand>&);
93 
96 
98  void checkMuonHits(const reco::Track&,
101  std::vector<int>&) const;
102 
105  const std::vector<int>&) const;
106 
109 
112  double scl_x,
113  double scl_y) const;
114 
116  const Trajectory* chooseTrajectory(const std::vector<Trajectory*>&, int) const;
117 
119  double trackProbability(const Trajectory&) const;
120 
122  void printHits(const ConstRecHitContainer&) const;
123 
125  void addTraj(TrackCand&){}
126 
129 
132  getTransientRecHits(const reco::Track&) const;
133 
136 
138  const MuonServiceProxy* service() const { return theService; }
139 
141 
144  bool barrel_a = ( a->det()->subDetector() == GeomDetEnumerators::DT ||
145  a->det()->subDetector() == GeomDetEnumerators::RPCBarrel );
146 
147  bool barrel_b = ( b->det()->subDetector() == GeomDetEnumerators::DT ||
148  b->det()->subDetector() == GeomDetEnumerators::RPCBarrel );
149 
150  if ( barrel_a && barrel_b ) return a->det()->surface().position().perp() < b->det()->surface().position().perp();
151 
152  else if ( !barrel_a && !barrel_b ) return fabs(a->globalPosition().z()) < fabs(b->globalPosition().z());
153  else if ( barrel_a && !barrel_b ) return true;
154  else if ( !barrel_a && barrel_b ) return false;
155  //shouldn;t really get here in any case (there's some sense to throw here )
156  return false;
157  }
158  };
159 
160  protected:
161 
163  float thePtCut;
164  float thePCut;
165 
166  private:
167 
174  unsigned long long theCacheId_TRH;
176 
181 
183 
186 
189 
191 };
192 #endif
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 void setEvent(const edm::Event &)
pass the Event to the algo at each event
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
GlobalTrajectoryBuilderBase(const edm::ParameterSet &, const MuonServiceProxy *)
constructor with Parameter Set and MuonServiceProxy
TransientTrackingRecHit::RecHitPointer RecHitPointer
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
MuonCandidate::TrajectoryContainer TrajectoryContainer
bool operator()(const TransientTrackingRecHit::ConstRecHitPointer &a, const TransientTrackingRecHit::ConstRecHitPointer &b) const
std::vector< TrackCand > chooseRegionalTrackerTracks(const TrackCand &, const std::vector< TrackCand > &)
choose tracker tracks within region of interest
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
std::vector< ConstRecHitPointer > RecHitContainer
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
virtual ~GlobalTrajectoryBuilderBase()
destructor
MuonDetLayerMeasurements * theLayerMeasurements
TransientTrackingRecHit::RecHitContainer RecHitContainer
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::Track &) const
get transient RecHits of a Track
MuonTrajectoryBuilder::TrajectoryContainer trajectories(const TrajectorySeed &)
dummy implementation, unused in this class
const MuonServiceProxy * service() const
ConstRecHitContainer selectMuonHits(const Trajectory &, const std::vector< int > &) const
select muon hits compatible with trajectory; check hits in chambers with showers
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
GlobalMuonTrackMatcher * theTrackMatcher
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
double b
Definition: hdecay.h:120
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:121
RefitDirection checkRecHitsOrdering(const ConstRecHitContainer &) const
This does nothing now.
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
MuonTrackingRegionBuilder * theRegionBuilder
std::vector< MuonRecHitPointer > MuonRecHitContainer
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
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 ...