CMS 3D CMS Logo

CosmicTrajectoryBuilder.h
Go to the documentation of this file.
1 #ifndef CosmicTrajectoryBuilder_h
2 #define CosmicTrajectoryBuilder_h
3 
4 //
5 // Package: RecoTracker/SingleTrackPattern
6 // Class: CosmicTrajectoryBuilder
7 // Original Author: Michele Pioppi-INFN perugia
8 
9 #include <string>
10 
14 
40 
41 #ifndef TrajectoryBuilder_CompareHitY
42 #define TrajectoryBuilder_CompareHitY
43 
44 class CompareHitY {
45 public:
47  bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2) {
48  GlobalPoint gp1 = _tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
49  GlobalPoint gp2 = _tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
50  return gp1.y() < gp2.y();
51  };
52 
53 private:
54  // edm::ESHandle<TrackerGeometry> _tracker;
56 };
57 
59 public:
61  bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2) {
62  GlobalPoint gp1 = _tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
63  GlobalPoint gp2 = _tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
64  return gp1.y() > gp2.y();
65  };
66 
67 private:
68  // edm::ESHandle<TrackerGeometry> _tracker;
70 };
71 
72 #endif
73 
77 
78 public:
81 
83 
84  void run(const TrajectorySeedCollection &collseed,
85  const SiStripRecHit2DCollection &collstereo,
86  const SiStripRecHit2DCollection &collrphi,
87  const SiStripMatchedRecHit2DCollection &collmatched,
88  const SiPixelRecHitCollection &collpixel,
89  const edm::EventSetup &es,
90  edm::Event &e,
91  std::vector<Trajectory> &trajoutput);
92 
93  void init(const edm::EventSetup &es, bool);
95 
97 
98 private:
99  std::vector<TrajectoryMeasurement> seedMeasurements(const TrajectorySeed &seed) const;
100 
101  std::vector<const TrackingRecHit *> SortHits(const SiStripRecHit2DCollection &collstereo,
102  const SiStripRecHit2DCollection &collrphi,
103  const SiStripMatchedRecHit2DCollection &collmatched,
104  const SiPixelRecHitCollection &collpixel,
105  const TrajectorySeed &seed);
106 
107  TSOS startingTSOS(const TrajectorySeed &seed) const;
108  void updateTrajectory(Trajectory &traj, const TM &tm, const TransientTrackingRecHit &hit) const;
109 
110  void AddHit(Trajectory &traj, const std::vector<const TrackingRecHit *> &Hits);
111  // edm::OwnVector<TransientTrackingRecHit> hits);
112  bool qualityFilter(const Trajectory &traj);
113 
114 private:
120 
129 
131  double chi2cut;
132  std::vector<Trajectory> trajFit;
133  //RC edm::OwnVector<const TransientTrackingRecHit> hits;
135  bool seed_plus;
137 };
138 
139 #endif
void AddHit(Trajectory &traj, const std::vector< const TrackingRecHit *> &Hits)
KFTrajectoryFitter * theFitter
KFTrajectorySmoother * theSmoother
CosmicTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
CompareHitY_plus(const TrackerGeometry &tracker)
const MagneticField * magfield
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerToken_
TrajectoryStateOnSurface TSOS
const TransientTrackingRecHitBuilder * hitBuilder() const
PropagatorWithMaterial * thePropagatorOp
std::vector< ConstRecHitPointer > RecHitContainer
const TrackerGeometry & _tracker
const TrackerGeometry * tracker
std::vector< Trajectory > trajFit
void init(const edm::EventSetup &es, bool)
const TransientTrackingRecHitBuilder * RHBuilder
T y() const
Definition: PV3DBase.h:60
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > builderToken_
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
std::vector< TrajectorySeed > TrajectorySeedCollection
CompareHitY(const TrackerGeometry &tracker)
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
void updateTrajectory(Trajectory &traj, const TM &tm, const TransientTrackingRecHit &hit) const
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
TSOS startingTSOS(const TrajectorySeed &seed) const
DetId geographicalId() const
void run(const TrajectorySeedCollection &collseed, const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const edm::EventSetup &es, edm::Event &e, std::vector< Trajectory > &trajoutput)
Runs the algorithm.
PropagatorWithMaterial * thePropagator
std::vector< const TrackingRecHit * > SortHits(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed)
Chi2MeasurementEstimator * theEstimator
bool qualityFilter(const Trajectory &traj)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
TransientTrackingRecHit::RecHitContainer hits
virtual LocalPoint localPosition() const =0
const TrackerGeometry & _tracker