8#include <tracking/vxdHoughTracking/filters/pathFilters/TwoHitVirtualIPQIFilter.h>
9#include <tracking/trackFindingCDC/filters/base/Filter.icc.h>
10#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorMC.h>
11#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorRiemannHelixFit.h>
12#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorTripletFit.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14#include <framework/core/ModuleParamList.templateDetails.h>
15#include <framework/geometry/BFieldManager.h>
16#include <framework/database/DBObjPtr.h>
17#include <mdst/dbobjects/BeamSpot.h>
20using namespace TrackFindingCDC;
21using namespace vxdHoughTracking;
26 "Identifier which estimation method to use. Valid identifiers are: [mcInfo, tripletFit, helixFit]",
29 "Only required for MCInfo method. Name of StoreArray containing MCRecoTracks.",
32 "Only required for MCInfo method. If false combining several MCTracks is allowed.",
50 const B2Vector3D& BeamSpotPosition = (*beamSpotDB).getIPPosition();
51 const TMatrixDSym posErr = (*beamSpotDB).getIPPositionCovMatrix();
56 m_virtualIPSpacePoint =
SpacePoint(
B2Vector3D(0., 0., 0.),
B2Vector3D(0.1, 0.1, 0.5), {0.5, 0.5}, {
false,
false},
VxdID(0),
70 m_estimator = std::make_unique<QualityEstimatorTripletFit>();
72 m_estimator = std::make_unique<QualityEstimatorRiemannHelixFit>();
77TrackFindingCDC::Weight
80 const std::vector<TrackFindingCDC::WithWeight<const VXDHoughState*>>& previousHits = pair.first;
83 if (previousHits.size() != 1) {
87 std::vector<const SpacePoint*> spacePointsVirtIP;
88 spacePointsVirtIP.reserve(previousHits.size() + 2);
93 spacePointsVirtIP.emplace_back(pair.second->getHit());
94 spacePointsVirtIP.emplace_back(previousHits.at(0)->getHit());
95 const auto& estimatorResultVirtIP =
m_estimator->estimateQualityAndProperties(spacePointsVirtIP);
97 return estimatorResultVirtIP.qualityIndicator;
bool isValid() const
Check whether a valid object was obtained from the database.
Class for accessing objects in the database.
The Module parameter list class.
Class implementing the algorithm used for the MC based quality estimation.
void forceUpdateClusterNames()
Setter to force the class to update its cluster names.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
AObject Object
Type of the object to be analysed.
static const double T
[tesla]
@ VXD
Any type of VXD Sensor.
Class to uniquely identify a any structure of the PXD and SVD.
SpacePoint m_virtualIPSpacePoint
virtual IP SpacePoint
bool m_MCStrictQualityEstimator
Only required for MCInfo method.
void initialize() override
initialize quality estimator
std::string m_EstimationMethod
Identifier which estimation methsod to use.
TrackFindingCDC::Weight operator()(const BasePathFilter::Object &pair) override
Return the weight based on the quality estimator.
void beginRun() override
set BField value for estimator
std::string m_MCRecoTracksStoreArrayName
sets the name of the expected StoreArray containing MCRecoTracks. Only required for MCInfo method
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
B2Vector3< double > B2Vector3D
typedef for common usage with double
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.