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