LDMX Software
LinearTrackFinder.h
1#pragma once
2
3//--- Framework ---//
4#include "Framework/Configure/Parameters.h"
6
7//--- C++ ---//
8
9//--- LDMX ---//
10#include "Tracking/Reco/TrackingGeometryUser.h"
11
12//--- Tracking ---//
13#include "Tracking/Event/Measurement.h"
14#include "Tracking/Event/StraightTrack.h"
15
16namespace tracking {
17namespace reco {
18
20 public:
27 LinearTrackFinder(const std::string& name, framework::Process& process);
28
30 virtual ~LinearTrackFinder() = default;
31
35 void onProcessEnd() override;
41 void configure(framework::config::Parameters& parameters) override;
42
48 void produce(framework::Event& event) override;
49
50 private:
51 int n_events_{0};
52 double processing_time_{0.};
53
54 // The output track collection
55 std::string out_trk_collection_{"LinearRecoilTracks"};
56
57 // The seed track collection
58 std::string seed_collection_{"LinearRecoilSeedTracks"};
59 std::string input_pass_name_{""};
60
61 int n_seeds_{0};
62 int n_tracks_{0};
63
64 // Find tracks from seeds by taking the seeds with lowest chi2 for each RecHit
65 std::vector<ldmx::StraightTrack> findTracks(
66 const std::vector<ldmx::StraightTrack>& track_seeds);
67
68 // Helper function to check if a measurement's position is already used
69 bool isPositionUsed(
70 const ldmx::Measurement& measurement,
71 const std::set<std::tuple<float, float, float>>& used_sensor_positions);
72
73}; // LinearTrackFinder
74
75} // namespace reco
76} // namespace tracking
Base classes for all user event processing components to extend.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void onProcessEnd() override
Output event statistics.
LinearTrackFinder(const std::string &name, framework::Process &process)
Constructor.
void configure(framework::config::Parameters &parameters) override
Configure the processor using the given user specified parameters.
virtual ~LinearTrackFinder()=default
Destructor.
void produce(framework::Event &event) override
Run the processor.
a helper base class providing some methods to shorten access to common conditions used within the tra...
The measurement calibrator can be a function or a class/struct able to retrieve the sim hits containe...