9#include <tracking/trackFindingCDC/findlets/minimal/AxialStraightTrackCreator.h>
11#include <mdst/dataobjects/ECLCluster.h>
12#include <tracking/trackingUtilities/geometry/VectorUtil.h>
13#include <tracking/trackingUtilities/geometry/UncertainPerigeeCircle.h>
14#include <tracking/trackFindingCDC/fitting/CDCRiemannFitter.h>
15#include <tracking/trackingUtilities/eventdata/trajectories/CDCTrajectorySZ.h>
16#include <tracking/trackingUtilities/eventdata/trajectories/CDCTrajectory2D.h>
17#include <tracking/trackingUtilities/eventdata/tracks/CDCTrack.h>
18#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
20#include <tracking/trackingUtilities/utilities/StringManipulation.h>
22#include <framework/core/ModuleParamList.templateDetails.h>
24#include <Math/Vector2D.h>
27using namespace TrackFindingCDC;
28using namespace TrackingUtilities;
34 return "A findlet looking for straight tracks between IP and reconstructed ECL clusters.";
38 const std::string& prefix)
40 moduleParamList->
addParameter(prefixed(prefix,
"minEnergy"),
42 "Parameter to define minimal threshold of ECL cluster energy.",
44 moduleParamList->
addParameter(prefixed(prefix,
"minNHits"),
46 "Parameter to define minimal threshold of track number of hits.",
48 moduleParamList->
addParameter(prefixed(prefix,
"maxDistance"),
50 "Parameter to define maximal threshold of hit distance to a line IP - ECL cluster.",
60 const std::vector<const CDCWireHit*>& axialWireHits,
61 std::vector<CDCTrack>& tracks)
63 for (
const ECLCluster* cluster : eclClusters) {
66 float phi = cluster->getPhi();
71 std::vector<const CDCWireHit*> foundHits =
search(axialWireHits, guidingTrajectory2D);
81 track.push_back(std::move(recoHit3D));
83 track.sortByArcLength2D();
84 tracks.emplace_back(std::move(track));
91 std::vector<const CDCWireHit*> foundHits;
93 const ROOT::Math::XYVector point = hit->reconstruct2D(guidingTrajectory2D);
95 if (arc < 0)
continue;
96 float distance = guidingTrajectory2D.
getDist2D(point);
98 foundHits.push_back(hit);
@ c_nPhotons
CR is split into n photons (N1)
The Module parameter list class.
AxialStraightTrackCreator()
Constructor.
void initialize() final
Initialisation before the event processing starts.
std::string getDescription() final
Short description of the findlet.
void apply(const std::vector< const ECLCluster * > &eclClusters, const std::vector< const TrackingUtilities::CDCWireHit * > &axialWireHits, std::vector< TrackingUtilities::CDCTrack > &tracks) final
Execute one pass over given clusters and wirehits and create tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
unsigned int m_param_minNHits
Track number of hits threshold.
std::vector< const TrackingUtilities::CDCWireHit * > search(const std::vector< const TrackingUtilities::CDCWireHit * > &axialWireHits, const TrackingUtilities::CDCTrajectory2D &guidingTrajectory2D)
Search for hits compatible with given trajectory.
float m_param_maxDistance
Maximum distance from hits to the track.
float m_param_minEnergy
ECL cluster energy threshold.
Class implementing the Riemann fit for two dimensional trajectory circle.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
Class representing a three dimensional reconstructed hit.
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
Class representing a sequence of three dimensional reconstructed hits.
Particle trajectory as it is seen in xy projection represented as a circle.
double calcArcLength2D(const ROOT::Math::XYVector &point) const
Calculate the travel distance from the start position of the trajectory.
double setLocalOrigin(const ROOT::Math::XYVector &localOrigin)
Setter for the origin of the local coordinate system.
double getDist2D(const ROOT::Math::XYVector &point) const
Calculates the distance from the point to the trajectory as seen from the xy projection.
Particle full three dimensional trajectory.
static CDCTrajectorySZ basicAssumption()
Constructs a basic assumption, what the z0 start position and the sz slope are, including some broad ...
Class representing a hit wire in the central drift chamber.
void initialize() override
Adds an uncertainty matrix to the circle in perigee parameterisation.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.