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 
37 
39 
40 #ifndef TrajectoryBuilder_CompareHitY
41 #define TrajectoryBuilder_CompareHitY
42 
43 class CompareHitY {
44  public:
46  bool operator()( const TrackingRecHit *rh1,
47  const TrackingRecHit *rh2)
48  {
49  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
50  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
51  return gp1.y()<gp2.y();};
52  private:
53  // edm::ESHandle<TrackerGeometry> _tracker;
55 };
56 
58  public:
60  bool operator()( const TrackingRecHit *rh1,
61  const TrackingRecHit *rh2)
62  {
63  GlobalPoint gp1=_tracker.idToDet(rh1->geographicalId())->surface().toGlobal(rh1->localPosition());
64  GlobalPoint gp2=_tracker.idToDet(rh2->geographicalId())->surface().toGlobal(rh2->localPosition());
65  return gp1.y()>gp2.y();};
66  private:
67  // edm::ESHandle<TrackerGeometry> _tracker;
69 };
70 
71 #endif
72 
74 {
75 
78 
79  public:
80 
83 
85 
86  void run(const TrajectorySeedCollection &collseed,
87  const SiStripRecHit2DCollection &collstereo,
88  const SiStripRecHit2DCollection &collrphi ,
89  const SiStripMatchedRecHit2DCollection &collmatched,
90  const SiPixelRecHitCollection &collpixel,
91  const edm::EventSetup& es,
92  edm::Event& e,
93  std::vector<Trajectory> &trajoutput);
94 
95  void init(const edm::EventSetup& es,bool);
97  private:
98  std::vector<TrajectoryMeasurement> seedMeasurements(const TrajectorySeed& seed) const;
99 
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,
109  const TM& tm,
110  const TransientTrackingRecHit& hit) const;
111 
112  void AddHit(Trajectory &traj,
113  std::vector<const TrackingRecHit*>Hits);
114  // edm::OwnVector<TransientTrackingRecHit> hits);
115  bool qualityFilter(Trajectory traj);
116 
117 
118 
119  private:
123 
131 
132 
133 
135  double chi2cut;
136  std::vector<Trajectory> trajFit;
137  //RC edm::OwnVector<const TransientTrackingRecHit> hits;
139  bool seed_plus;
140  std::string geometry;
141 };
142 
143 #endif
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:47
PropagatorWithMaterial * thePropagatorOp
T y() const
Definition: PV3DBase.h:62
const TrackerGeometry & _tracker
std::vector< Trajectory > trajFit
std::vector< ConstRecHitPointer > RecHitContainer
void init(const edm::EventSetup &es, bool)
const TransientTrackingRecHitBuilder * RHBuilder
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
std::vector< TrajectorySeed > TrajectorySeedCollection
const KFTrajectorySmoother * theSmoother
CompareHitY(const TrackerGeometry &tracker)
TSOS startingTSOS(const TrajectorySeed &seed) const
void AddHit(Trajectory &traj, std::vector< const TrackingRecHit * >Hits)
virtual const GeomDet * idToDet(DetId) const
tuple conf
Definition: dbtoconf.py:185
const KFTrajectoryFitter * theFitter
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.
bool qualityFilter(Trajectory traj)
PropagatorWithMaterial * thePropagator
std::vector< const TrackingRecHit * > SortHits(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed)
Chi2MeasurementEstimator * theEstimator
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