Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:05

0001 #ifndef TSOSFromSimHitFactory_H
0002 #define TSOSFromSimHitFactory_H
0003 
0004 #include "FTSFromSimHitFactory.h"
0005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0006 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0007 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0008 
0009 class SimHit;
0010 class MagneticField;
0011 
0012 /** Produces a TrajectoryStateOnSurface from a SimHit.
0013  * the TrajectoryStateOnSurface position coinsides with the SimHit
0014  * position, and direction, momenta and charge are deduced
0015  * from the SimHit itself, without any access to the SimTrack 
0016  * that produced the SimHit. The surface of the result is 
0017  * the surface of the Det of the SimHit.
0018  */
0019 
0020 class TSOSFromSimHitFactory {
0021 public:
0022   TrajectoryStateOnSurface operator()(const PSimHit& hit, const GeomDetUnit& det, const MagneticField& field) const {
0023     return TrajectoryStateOnSurface(FTSFromSimHitFactory()(hit, det, field), det.surface());
0024   }
0025 };
0026 
0027 #endif