9 #include <tracking/modules/spacePointCreator/SPTCmomentumSeedRetrieverModule.h>
10 #include <framework/logging/Logger.h>
11 #include <framework/geometry/BFieldManager.h>
22 setDescription(
"A module for creating momentum seeds for spacepoint track candidates.");
23 setPropertyFlags(c_ParallelProcessingCertified);
25 addParam(
"tcArrayName", m_PARAMtcArrayName,
" sets the name of expected StoreArray with SpacePointTrackCand in it.",
40 B2DEBUG(1,
"SPTCmomentumSeedRetrieverModule:beginRun: B-Field z-component: " <<
m_bFieldZ);
48 B2DEBUG(1,
"\n" <<
"SPTCmomentumSeedRetrieverModule:event: event " <<
m_eventCounter <<
", got " <<
55 B2DEBUG(1,
"\n" <<
"SPTCmomentumSeedRetrieverModule:event: this TC has got " << aTC.size() <<
" hits\n");
67 B2DEBUG(1,
"SPTCmomentumSeedRetrieverModule:endRun: events: " <<
m_eventCounter
68 <<
", nSPTCsPerEvent: " << invEvents *
float(
m_nTCsTotal)
75 TVectorD stateSeed(6);
76 TMatrixDSym covSeed(6);
78 covSeed(0, 0) = 0.01 ; covSeed(1, 1) = 0.01 ; covSeed(2, 2) = 0.04 ;
79 covSeed(3, 3) = 0.01 ; covSeed(4, 4) = 0.01 ; covSeed(5, 5) = 0.04 ;
85 stateSeed(0) = (sortedHits.front()->X());
86 stateSeed(1) = (sortedHits.front()->Y());
87 stateSeed(2) = (sortedHits.front()->Z());
89 auto momentumSeed = *(results.p);
90 stateSeed(3) = momentumSeed.X();
91 stateSeed(4) = momentumSeed.Y();
92 stateSeed(5) = momentumSeed.Z();
102 double chargeSeed = results.curvatureSign ? -1 * (*(results.curvatureSign)) : 0;
105 return (results.p && results.curvatureSign);
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,...
A module for creating momentum seeds for spacepoint track candidates.
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.
void beginRun() override
Prints a header for each new run.
double m_bFieldZ
Bz component of the magnetic field, will be updated runwise.
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]
#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.