9#include <tracking/trackFindingCDC/findlets/minimal/AxialStraightTrackCreator.h>
11#include <mdst/dataobjects/ECLCluster.h>
12#include <tracking/trackFindingCDC/geometry/Vector2D.h>
13#include <tracking/trackFindingCDC/geometry/UncertainPerigeeCircle.h>
14#include <tracking/trackFindingCDC/fitting/CDCRiemannFitter.h>
15#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectorySZ.h>
16#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
17#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
18#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
20#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
22#include <framework/core/ModuleParamList.templateDetails.h>
25using namespace TrackFindingCDC;
31 return "A findlet looking for straight tracks between IP and reconstructed ECL clusters.";
35 const std::string& prefix)
37 moduleParamList->
addParameter(prefixed(prefix,
"minEnergy"),
39 "Parameter to define minimal threshold of ECL cluster energy.",
41 moduleParamList->
addParameter(prefixed(prefix,
"minNHits"),
43 "Parameter to define minimal threshold of track number of hits.",
45 moduleParamList->
addParameter(prefixed(prefix,
"maxDistance"),
47 "Parameter to define maximal threshold of hit distance to a line IP - ECL cluster.",
57 const std::vector<const CDCWireHit*>& axialWireHits,
58 std::vector<CDCTrack>& tracks)
60 for (
const ECLCluster* cluster : eclClusters) {
63 float phi = cluster->getPhi();
68 std::vector<const CDCWireHit*> foundHits =
search(axialWireHits, guidingTrajectory2D);
78 track.push_back(std::move(recoHit3D));
80 track.sortByArcLength2D();
81 tracks.emplace_back(std::move(track));
88 std::vector<const CDCWireHit*> foundHits;
90 const Vector2D point = hit->reconstruct2D(guidingTrajectory2D);
92 if (arc < 0)
continue;
93 float distance = guidingTrajectory2D.
getDist2D(point);
95 foundHits.push_back(hit);
@ c_nPhotons
CR is split into n photons (N1)
The Module parameter list class.
void apply(const std::vector< const ECLCluster * > &eclClusters, const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &tracks) final
Execute one pass over given clusters and wirehits and create tracks.
AxialStraightTrackCreator()
Constructor.
void initialize() final
Initialisation before the event processing starts.
std::string getDescription() final
Short description of the findlet.
std::vector< const CDCWireHit * > search(const std::vector< const CDCWireHit * > &axialWireHits, const CDCTrajectory2D &guidingTrajectory2D)
Search for hits compatible with given trajectory.
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.
float m_param_maxDistance
Maximum distance from hits to the track.
float m_param_minEnergy
ECL cluster energy threshold.
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 implementing the Riemann fit for two dimensional trajectory circle.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
Class representing a sequence of three dimensional reconstructed hits.
Particle trajectory as it is seen in xy projection represented as a circle.
double setLocalOrigin(const Vector2D &localOrigin)
Setter for the origin of the local coordinate system.
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
double getDist2D(const Vector2D &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
Receive and dispatch signal before the start of the event processing.
Adds an uncertainty matrix to the circle in perigee parameterisation.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
static Vector2D Phi(const double phi)
Constructs a unit vector with azimuth angle equal to phi.
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.