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 
13 
38 
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:
117 
126 
128  double chi2cut;
129  std::vector<Trajectory> trajFit;
130  //RC edm::OwnVector<const TransientTrackingRecHit> hits;
132  bool seed_plus;
135 };
136 
137 #endif
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
CosmicTrajectoryBuilder::thePropagatorOp
PropagatorWithMaterial * thePropagatorOp
Definition: CosmicTrajectoryBuilder.h:119
CosmicTrajectoryBuilder::AddHit
void AddHit(Trajectory &traj, const std::vector< const TrackingRecHit * > &Hits)
Definition: CosmicTrajectoryBuilder.cc:192
Chi2MeasurementEstimator.h
TrackExtra.h
TrackerGeometry.h
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition: TrajectorySeedCollection.h:6
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator.h:15
TrackCandidateCollection.h
ESHandle.h
SiStripMatchedRecHit2DCollection.h
CosmicTrajectoryBuilder::theUpdator
KFUpdator * theUpdator
Definition: CosmicTrajectoryBuilder.h:120
CosmicTrajectoryBuilder::theSmoother
KFTrajectorySmoother * theSmoother
Definition: CosmicTrajectoryBuilder.h:124
TrackerRecoGeometryRecord.h
CosmicTrajectoryBuilder::theFitter
KFTrajectoryFitter * theFitter
Definition: CosmicTrajectoryBuilder.h:125
KFTrajectoryFitter
Definition: KFTrajectoryFitter.h:22
KFTrajectorySmoother.h
CosmicTrajectoryBuilder::hitCloner
TkClonerImpl hitCloner
Definition: CosmicTrajectoryBuilder.h:123
CompareHitY_plus
Definition: CosmicTrajectoryBuilder.h:58
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
CompareHitY_plus::operator()
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
Definition: CosmicTrajectoryBuilder.h:61
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
TkTransientTrackingRecHitBuilder.h
CosmicTrajectoryBuilder::tracker
edm::ESHandle< TrackerGeometry > tracker
Definition: CosmicTrajectoryBuilder.h:116
fileCollector.seed
seed
Definition: fileCollector.py:127
CompareHitY_plus::CompareHitY_plus
CompareHitY_plus(const TrackerGeometry &tracker)
Definition: CosmicTrajectoryBuilder.h:60
GeometricSearchTracker.h
CosmicTrajectoryBuilder::chi2cut
double chi2cut
Definition: CosmicTrajectoryBuilder.h:128
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
Track.h
CosmicTrajectoryBuilder::updateTrajectory
void updateTrajectory(Trajectory &traj, const TM &tm, const TransientTrackingRecHit &hit) const
CosmicTrajectoryBuilder::magfield
edm::ESHandle< MagneticField > magfield
Definition: CosmicTrajectoryBuilder.h:115
TrackingRecHit::RecHitContainer
std::vector< ConstRecHitPointer > RecHitContainer
Definition: TrackingRecHit.h:31
CompareHitY::_tracker
const TrackerGeometry & _tracker
Definition: CosmicTrajectoryBuilder.h:51
LayerMeasurements.h
CosmicTrajectoryBuilder::TSOS
TrajectoryStateOnSurface TSOS
Definition: CosmicTrajectoryBuilder.h:75
edm::ESHandle< MagneticField >
CosmicTrajectoryBuilder
Definition: CosmicTrajectoryBuilder.h:74
Point3DBase< float, GlobalTag >
CosmicTrajectoryBuilder::trajFit
std::vector< Trajectory > trajFit
Definition: CosmicTrajectoryBuilder.h:129
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CosmicTrajectoryBuilder::run
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.
Definition: CosmicTrajectoryBuilder.cc:68
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
CosmicTrajectoryBuilder::theMinHits
int theMinHits
Definition: CosmicTrajectoryBuilder.h:127
SiPixelRecHitCollection.h
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
KFUpdator.h
edm::ParameterSet
Definition: ParameterSet.h:47
CosmicTrajectoryBuilder::init
void init(const edm::EventSetup &es, bool)
Definition: CosmicTrajectoryBuilder.cc:35
CosmicTrajectoryBuilder::thePropagator
PropagatorWithMaterial * thePropagator
Definition: CosmicTrajectoryBuilder.h:118
PropagatorWithMaterial.h
CosmicTrajectoryBuilder::RHBuilder
const TransientTrackingRecHitBuilder * RHBuilder
Definition: CosmicTrajectoryBuilder.h:122
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
CosmicTrajectoryBuilder::SortHits
std::vector< const TrackingRecHit * > SortHits(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed)
Definition: CosmicTrajectoryBuilder.cc:140
SiStripRecHit2DCollection.h
CosmicTrajectoryBuilder::CosmicTrajectoryBuilder
CosmicTrajectoryBuilder(const edm::ParameterSet &conf)
Definition: CosmicTrajectoryBuilder.cc:21
CosmicTrajectoryBuilder::qualityFilter
bool qualityFilter(const Trajectory &traj)
Definition: CosmicTrajectoryBuilder.cc:271
CosmicTrajectoryBuilder::theBuilderName
std::string theBuilderName
Definition: CosmicTrajectoryBuilder.h:134
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
AnalyticalPropagator.h
TrajectorySeedCollection.h
CompareHitY_plus::_tracker
const TrackerGeometry & _tracker
Definition: CosmicTrajectoryBuilder.h:65
CosmicTrajectoryBuilder::~CosmicTrajectoryBuilder
~CosmicTrajectoryBuilder()
Definition: CosmicTrajectoryBuilder.cc:33
CosmicTrajectoryBuilder::hits
TransientTrackingRecHit::RecHitContainer hits
Definition: CosmicTrajectoryBuilder.h:131
TrackingRecHit
Definition: TrackingRecHit.h:21
CosmicTrajectoryBuilder::geometry
std::string geometry
Definition: CosmicTrajectoryBuilder.h:133
Trajectory.h
edmNew::DetSetVector
Definition: DetSetNew.h:13
CosmicTrajectoryBuilder::seed_plus
bool seed_plus
Definition: CosmicTrajectoryBuilder.h:132
CosmicTrajectoryBuilder::seedMeasurements
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
Definition: CosmicTrajectoryBuilder.cc:120
TkClonerImpl
Definition: TkClonerImpl.h:12
CompareHitY::CompareHitY
CompareHitY(const TrackerGeometry &tracker)
Definition: CosmicTrajectoryBuilder.h:46
Trajectory
Definition: Trajectory.h:38
KFTrajectorySmoother
Definition: KFTrajectorySmoother.h:20
TrajectorySeed
Definition: TrajectorySeed.h:18
EventSetup.h
TrajectoryStateTransform.h
KFTrajectoryFitter.h
TransientTrackingRecHitBuilder.h
CosmicTrajectoryBuilder::TM
TrajectoryMeasurement TM
Definition: CosmicTrajectoryBuilder.h:76
CosmicTrajectoryBuilder::createStartingTrajectory
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
Definition: CosmicTrajectoryBuilder.cc:112
CompareHitY
Definition: CosmicTrajectoryBuilder.h:44
CosmicTrajectoryBuilder::startingTSOS
TSOS startingTSOS(const TrajectorySeed &seed) const
Definition: CosmicTrajectoryBuilder.cc:185
ParameterSet.h
CompareHitY::operator()
bool operator()(const TrackingRecHit *rh1, const TrackingRecHit *rh2)
Definition: CosmicTrajectoryBuilder.h:47
edm::Event
Definition: Event.h:73
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
GlobalPoint.h
CosmicTrajectoryBuilder::hitBuilder
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: CosmicTrajectoryBuilder.h:96
CosmicTrajectoryBuilder::theEstimator
Chi2MeasurementEstimator * theEstimator
Definition: CosmicTrajectoryBuilder.h:121
KFUpdator
Definition: KFUpdator.h:32
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MeasurementTracker.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
TrackerGeometry
Definition: TrackerGeometry.h:14