test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
13 
38 
40 
41 #ifndef TrajectoryBuilder_CompareHitY
42 #define TrajectoryBuilder_CompareHitY
43 
44 class CompareHitY {
45  public:
47  bool operator()( const TrackingRecHit *rh1,
48  const TrackingRecHit *rh2)
49  {
50  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
51  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
52  return gp1.y()<gp2.y();};
53  private:
54  // edm::ESHandle<TrackerGeometry> _tracker;
56 };
57 
59  public:
61  bool operator()( const TrackingRecHit *rh1,
62  const TrackingRecHit *rh2)
63  {
64  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
65  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
66  return gp1.y()>gp2.y();};
67  private:
68  // edm::ESHandle<TrackerGeometry> _tracker;
70 };
71 
72 #endif
73 
75 {
76 
79 
80  public:
81 
84 
86 
87  void run(const TrajectorySeedCollection &collseed,
88  const SiStripRecHit2DCollection &collstereo,
89  const SiStripRecHit2DCollection &collrphi ,
90  const SiStripMatchedRecHit2DCollection &collmatched,
91  const SiPixelRecHitCollection &collpixel,
92  const edm::EventSetup& es,
93  edm::Event& e,
94  std::vector<Trajectory> &trajoutput);
95 
96  void init(const edm::EventSetup& es,bool);
98 
100 
101 
102  private:
103  std::vector<TrajectoryMeasurement> seedMeasurements(const TrajectorySeed& seed) const;
104 
105 
106  std::vector<const TrackingRecHit*> SortHits(const SiStripRecHit2DCollection &collstereo,
107  const SiStripRecHit2DCollection &collrphi ,
108  const SiStripMatchedRecHit2DCollection &collmatched,
109  const SiPixelRecHitCollection &collpixel,
110  const TrajectorySeed &seed);
111 
112  TSOS startingTSOS(const TrajectorySeed& seed)const;
113  void updateTrajectory( Trajectory& traj,
114  const TM& tm,
115  const TransientTrackingRecHit& hit) const;
116 
117  void AddHit(Trajectory &traj,
118  const std::vector<const TrackingRecHit*>&Hits);
119  // edm::OwnVector<TransientTrackingRecHit> hits);
120  bool qualityFilter(const Trajectory& traj);
121 
122 
123  private:
126 
135 
136 
137 
139  double chi2cut;
140  std::vector<Trajectory> trajFit;
141  //RC edm::OwnVector<const TransientTrackingRecHit> hits;
143  bool seed_plus;
146 };
147 
148 #endif
KFTrajectoryFitter * theFitter
KFTrajectorySmoother * theSmoother
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
CompareHitY_plus(const TrackerGeometry &tracker)
edm::ESHandle< MagneticField > magfield
void updateTrajectory(Trajectory &traj, const TM &tm, const TransientTrackingRecHit &hit) const
edm::ESHandle< TrackerGeometry > tracker
TrajectoryStateOnSurface TSOS
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:52
PropagatorWithMaterial * thePropagatorOp
T y() const
Definition: PV3DBase.h:63
std::vector< ConstRecHitPointer > RecHitContainer
const TrackerGeometry & _tracker
std::vector< Trajectory > trajFit
void init(const edm::EventSetup &es, bool)
const TransientTrackingRecHitBuilder * RHBuilder
const TransientTrackingRecHitBuilder * hitBuilder() const
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
std::vector< TrajectorySeed > TrajectorySeedCollection
CompareHitY(const TrackerGeometry &tracker)
TSOS startingTSOS(const TrajectorySeed &seed) 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)
void AddHit(Trajectory &traj, const std::vector< const TrackingRecHit * > &Hits)
Chi2MeasurementEstimator * theEstimator
bool qualityFilter(const Trajectory &traj)
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
CosmicTrajectoryBuilder(const edm::ParameterSet &conf)
DetId geographicalId() const
TransientTrackingRecHit::RecHitContainer hits
virtual LocalPoint localPosition() const =0
const TrackerGeometry & _tracker
virtual const TrackerGeomDet * idToDet(DetId) const