9#include <tracking/modules/spacePointCreator/SPTCmomentumSeedRetrieverModule.h>
10#include <framework/logging/Logger.h>
11#include <framework/geometry/BFieldManager.h>
21 setDescription(
"A module for creating momentum seeds for spacepoint track candidates.");
39 B2DEBUG(20,
"SPTCmomentumSeedRetrieverModule:beginRun: B-Field z-component: " <<
m_bFieldZ);
47 B2DEBUG(20,
"\n" <<
"SPTCmomentumSeedRetrieverModule:event: event " <<
m_eventCounter <<
", got " <<
54 B2DEBUG(20,
"\n" <<
"SPTCmomentumSeedRetrieverModule:event: this TC has got " << aTC.size() <<
" hits\n");
66 B2DEBUG(1,
"SPTCmomentumSeedRetrieverModule:endRun: events: " <<
m_eventCounter
67 <<
", nSPTCsPerEvent: " << invEvents *
float(
m_nTCsTotal)
74 TVectorD stateSeed(6);
75 TMatrixDSym covSeed(6);
77 covSeed(0, 0) = 0.01 ; covSeed(1, 1) = 0.01 ; covSeed(2, 2) = 0.04 ;
78 covSeed(3, 3) = 0.01 ; covSeed(4, 4) = 0.01 ; covSeed(5, 5) = 0.04 ;
84 stateSeed(0) = (sortedHits.front()->X());
85 stateSeed(1) = (sortedHits.front()->Y());
86 stateSeed(2) = (sortedHits.front()->Z());
88 auto momentumSeed = *(results.p);
89 stateSeed(3) = momentumSeed.X();
90 stateSeed(4) = momentumSeed.Y();
91 stateSeed(5) = momentumSeed.Z();
101 double chargeSeed = results.curvatureSign ? -1 * (*(results.curvatureSign)) : 0;
104 return (results.p && results.curvatureSign);
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void setMagneticFieldStrength(double magneticFieldZ=1.5)
Setter for z component of magnetic field.
virtual QualityEstimationResults estimateQualityAndProperties(std::vector< SpacePoint const * > const &measurements)
Quality estimation providing additional quantities Calculates quality indicator in range [0,...
QualityEstimatorRiemannHelixFit m_estimator
the QualityEstimator used to determine momentum seed.
unsigned int m_eventCounter
knows current event number.
bool createSPTCmomentumSeed(SpacePointTrackCand &aTC)
Generates momentum seed at the position of innermost hit of given TC.
void event() override
Applies the circleFit at given sets of TCs.
void InitializeCounters()
initialize variables to avoid nondeterministic behavior
void endRun() override
Prints a footer for each run which ended.
SPTCmomentumSeedRetrieverModule()
Constructor of the module.
void beginRun() override
Prints a header for each new run.
double m_bFieldZ
Bz component of the magnetic field, will be updated runwise.
std::string m_PARAMtcArrayName
sets the name of expected StoreArray with SpacePointTrackCand in it.
unsigned int m_nTCsTotal
total number of TCs found in SpacePointTrackCand-container.
StoreArray< SpacePointTrackCand > m_spacePointTrackCands
the storeArray for SpacePointTrackCands as member, is faster than recreating link for each event.
Storage for (VXD) SpacePoint-based track candidates.
void set6DSeed(const TVectorD &state6D)
set the 6D state seed
void setCovSeed(const TMatrixDSym &cov)
set the covariance matrix seed
@ c_isActive
bit 11: SPTC is active (i.e.
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter
void setChargeSeed(double charge)
Setter for assumed charge of tracked particle.
int getEntries() const
Get the number of objects in the array.
static const double T
[tesla]
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Abstract base class for different kinds of events.
Container for complete fit/estimation results.