43 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxHel.hh"
44 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxFittedHel.hh"
45 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxHit.hh"
46 #include "RecoTracker/RoadSearchHelixMaker/interface/DcxTrackCandidatesToTracks.hh"
66 edm::LogInfo(
"RoadSearch") <<
"Input of " << input->size() <<
" track candidate(s).";
71 if ( input->empty() ){
72 edm::LogInfo(
"RoadSearch") <<
"Created " << output.size() <<
" tracks.";
89 unsigned int trackcandidate_ctr=0;
92 for ( TrackCandidateCollection::const_iterator trackcandidate = input->begin(); trackcandidate != input->end(); ++trackcandidate ) {
95 unsigned int trackcandidate_number_rechits = 0;
98 ++trackcandidate_number_rechits;
101 LogDebug(
"RoadSearch") <<
"Track candidate number, number of TrackingRecHits = " << trackcandidate_ctr <<
" "
102 << trackcandidate_number_rechits;
107 edm::LogInfo(
"RoadSearch") <<
"Beware - Use Simple Helix Fitted Tracks only for Debugging Purposes!!" ;
109 std::vector<DcxHit*> listohits;
112 DetId recHitId = recHit->geographicalId();
113 const GeomDet *recHitGeomDet = tracker->idToDet(recHitId);
121 if ( recHitGluedGeomDet != 0 ) {
122 recHitGeomDetUnit = recHitGluedGeomDet->
monoDet();
124 recHitGeomDetUnit = tracker->idToDetUnit(recHitId);
128 LocalPoint temp_lpos = recHit->localPosition();
129 LocalPoint temp_lpos_f(temp_lpos.
x(),temp_lpos.
y()+iLength/2.0,temp_lpos.
z());
130 LocalPoint temp_lpos_b(temp_lpos.
x(),temp_lpos.
y()-iLength/2.0,temp_lpos.
z());
133 GlobalVector fir_uvec((temp_gpos_f.x()-temp_gpos_b.
x())/iLength,
134 (temp_gpos_f.y()-temp_gpos_b.
y())/iLength,(temp_gpos_f.z()-temp_gpos_b.
z())/iLength);
135 DcxHit* try_me =
new DcxHit(hit_global_pos.
x(), hit_global_pos.
y(), hit_global_pos.
z(),
136 fir_uvec.
x(), fir_uvec.
y(), fir_uvec.
z());
137 listohits.push_back(try_me);
140 DcxTrackCandidatesToTracks make_tracks(listohits,output, field);
143 edm::LogInfo(
"RoadSearch") <<
"Created " << output.size() <<
" tracks.";
ESHandle< MagneticField > fieldHandle
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
const GeomDetUnit * monoDet() const
std::vector< TrackCandidate > TrackCandidateCollection
std::vector< Track > TrackCollection
collection of Tracks
std::pair< const_iterator, const_iterator > range
~RoadSearchHelixMakerAlgorithm()
virtual const Topology & topology() const =0
virtual float stripLength() const =0
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
T const * product() const
void run(const TrackCandidateCollection *input, const edm::EventSetup &es, reco::TrackCollection &output)
Runs the algorithm.
const BoundPlane & surface() const
The nominal surface of the GeomDet.
RoadSearchHelixMakerAlgorithm(const edm::ParameterSet &conf)
RecHitContainer::const_iterator const_iterator