9 #include <alignment/modules/SetRecoTrackMomentum/SetRecoTrackMomentumModule.h>
11 #include <framework/geometry/BFieldManager.h>
27 setDescription(R
"DOC("Set momentum magnitude for RecoTracks seed to given value (for runs without magnetic field)
29 Take the momentum direction from seed and update its magnitude to artificial value for all RecoTracks - needed for tracks without magnetic field.
30 By default activated automatically, when zero B-field is detected at the origin
34 addParam(
"automatic", m_automatic,
"Detect the B-field at origin automatically - disable module if non-zero",
true);
35 addParam(
"momentum", m_momentum,
"Default momentum magnitude (GeV/c) to set for seed of RecoTracks", 10.);
55 track.setPositionAndMomentum(track.getPositionSeed(), mom);
DataType Mag() const
The magnitude (rho in spherical coordinate system).
static BFieldManager & getInstance()
Return the instance of the magnetic field manager.
Set momentum magnitude for RecoTracks to given value (for runs without magnetic field)
bool m_automatic
Detect the B-field at origin automatically - disable module if non-zero.
double m_momentum
Default momentum magnitude (GeV/c) to set for RecoTracks.
virtual void event() override
Loop over RecoTracks and set the momentum magnitude.
virtual void initialize() override
Register input and output data.
StoreArray< RecoTrack > m_tracks
The array with RecoTracks to work with.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.