![]() |
![]() |
#include <RecoTracker/DebugTools/interface/FTSFromSimHitFactory.h>
Public Member Functions | |
FreeTrajectoryState | operator() (const PSimHit &hit, const GeomDetUnit &det, const MagneticField &field) const |
Private Member Functions | |
TrackCharge | charge (int particleId) const |
the FreeTrajectoryState position coinsides with the SimHit position, and direction, momenta and charge are deduced from the SimHit itself, without any access to the SimTrack that produced the SimHit.
Definition at line 17 of file FTSFromSimHitFactory.h.
TrackCharge FTSFromSimHitFactory::charge | ( | int | particleId | ) | const [private] |
Definition at line 17 of file FTSFromSimHitFactory.cc.
References funct::abs().
Referenced by operator()().
00018 { 00019 if (std::abs( particleId) < 20) { 00020 // lepton 00021 return TrackCharge( (particleId > 0) ? -1 : 1); 00022 } 00023 else { 00024 // only correct for stable mesoms and baryons 00025 return TrackCharge( (particleId > 0) ? 1 : -1); 00026 } 00027 }
FreeTrajectoryState FTSFromSimHitFactory::operator() | ( | const PSimHit & | hit, | |
const GeomDetUnit & | det, | |||
const MagneticField & | field | |||
) | const |
Definition at line 7 of file FTSFromSimHitFactory.cc.
References charge(), PSimHit::localPosition(), PSimHit::momentumAtEntry(), PSimHit::particleType(), and GeomDet::toGlobal().
00010 { 00011 GlobalVector momenta = det.toGlobal( hit.momentumAtEntry()); 00012 TrackCharge ch = charge( hit.particleType()); 00013 GlobalTrajectoryParameters param( det.toGlobal( hit.localPosition()), momenta, ch, &field); 00014 return FreeTrajectoryState( param); 00015 }