207 file <<
", If[rt, {AbsolutePointSize[6]";
216 const std::vector<Trajectory>* trajectories = trajectoryHandle.
product();
220 << recTracks->size();
224 file <<
", RGBColor[0,0,0.4]";
225 reco::TrackCollection::const_iterator recTrack = recTracks->begin();
228 for(std::vector<Trajectory>::const_iterator it = trajectories->begin();
229 it!= trajectories->end();
230 it++, i++, recTrack++)
238 ostringstream
o; o <<
i;
240 ostringstream d; d << fixed << std::setprecision(2)
241 <<
" | d0=" << recTrack->d0() <<
" cm"
242 <<
" | z0=" << recTrack->dz() <<
" cm"
243 <<
" | pt=" << recTrack->pt() <<
" GeV/c";
247 for(std::vector<TrajectoryMeasurement>::const_reverse_iterator
268 theRecHits.printPixelRecHit(pixelRecHit);
275 const SiStripMatchedRecHit2D* stripMatchedRecHit =
276 dynamic_cast<const SiStripMatchedRecHit2D *
>(recHit);
279 const SiStripRecHit2D* stripRecHit =
280 dynamic_cast<const SiStripRecHit2D *
>(recHit);
282 if(stripMatchedRecHit != 0)
284 auto m = stripMatchedRecHit->monoHit();
285 auto s = stripMatchedRecHit->stereoHit();
286 theRecHits.printStripRecHit(&
m);
287 theRecHits.printStripRecHit(&
s);
289 DetId id = stripMatchedRecHit->geographicalId();
290 LocalPoint lpos = stripMatchedRecHit->localPosition();
293 file <<
", Point[{"<< p.
x()<<
","<<p.
y()<<
",("<<p.
z()<<
"-zs)*mz}]" << std::endl;
296 if(stripProjectedRecHit != 0)
297 theRecHits.printStripRecHit(&(stripProjectedRecHit->
originalHit()));
300 theRecHits.printStripRecHit(stripRecHit);
302 if(stripMatchedRecHit != 0 ||
303 stripProjectedRecHit != 0 ||
314 recTrack = recTracks->begin();
316 for(std::vector<Trajectory>::const_iterator it = trajectories->begin();
317 it!= trajectories->end();
321 switch(recTrack->algo())
329 if(algo == 0)
file <<
", RGBColor[1,0,0]";
330 if(algo == 1)
file <<
", RGBColor[0.2,0.6,0.2]";
331 if(algo == 2)
file <<
", RGBColor[0.2,0.2,0.6]";
333 std::vector<TrajectoryMeasurement> meas = it->measurements();
335 for(std::vector<TrajectoryMeasurement>::reverse_iterator im = meas.rbegin();
336 im!= meas.rend(); im++)
338 if(im == meas.rbegin())
341 GlobalVector v2 = (*(im )).updatedState().globalDirection();
343 recTrack->vertex().y(),
344 recTrack->vertex().z());
349 if(im+1 != meas.rend())
351 GlobalPoint p1 = (*(im )).updatedState().globalPosition();
352 GlobalPoint p2 = (*(im+1)).updatedState().globalPosition();
353 GlobalVector v2 = (*(im+1)).updatedState().globalDirection();
360 GlobalPoint p1 = (*(meas.rend()-1)).forwardPredictedState().globalPosition();
void printHelix(const GlobalPoint &p1, const GlobalPoint &p2, const GlobalVector &n2, std::ofstream &outFile, int charge)
std::string getPixelInfo(const TrackingRecHit *recHit, const std::ostringstream &o, const std::ostringstream &d)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
virtual SubDetector subDetector() const =0
Which subdetector.
GlobalPoint globalPosition() const
static PlanePointer build(const PositionType &pos, const RotationType &rot, MediumProperties *mp=0)
TrackerHitAssociator * theHitAssociator
const TrackerGeometry * theTracker
DataContainer const & measurements() const
const Propagator * thePropagator
const edm::EventSetup & es
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, MediumProperties *mp=0)
T const * product() const
std::string getStripInfo(const TrackingRecHit *recHit, const std::ostringstream &o, const std::ostringstream &d)
FreeTrajectoryState getTrajectoryAtOuterPoint(const reco::Track &track)
DetId geographicalId() const
const SiStripRecHit2D & originalHit() const
std::string trackProducer
GlobalVector globalDirection() const