LDMX Software
LinearTrackFinder.h
1#pragma once
2
3//--- Framework ---//
4#include "Framework/Configure/Parameters.h"
7
8//--- C++ ---//
9#include <memory>
10#include <random>
11
12//--- LDMX ---//
13#include "Tracking/Reco/TrackingGeometryUser.h"
14
15//--- Tracking ---//
16#include "TFile.h"
17#include "TTree.h"
18#include "Tracking/Event/Measurement.h"
19#include "Tracking/Event/StraightTrack.h"
20
21namespace tracking {
22namespace reco {
23
25 public:
32 LinearTrackFinder(const std::string &name, framework::Process &process);
33
35 virtual ~LinearTrackFinder() = default;
36
40 void onProcessEnd() override;
46 void configure(framework::config::Parameters &parameters) override;
47
53 void produce(framework::Event &event) override;
54
55 private:
56 int n_events_{0};
57 double processing_time_{0.};
58
59 // The output track collection
60 std::string out_trk_collection_{"LinearRecoilTracks"};
61
62 // The seed track collection
63 std::string seed_collection_{"LinearRecoilSeedTracks"};
64 std::string input_pass_name_{""};
65
66 int n_seeds_{0};
67 int n_tracks_{0};
68
69 // Find tracks from seeds by taking the seeds with lowest chi2 for each RecHit
70 std::vector<ldmx::StraightTrack> findTracks(
71 const std::vector<ldmx::StraightTrack> &track_seeds);
72
73 // Helper function to check if a measurement's position is already used
74 bool isPositionUsed(
75 const ldmx::Measurement &measurement,
76 const std::set<std::tuple<float, float, float>> &used_sensor_positions);
77
78}; // LinearTrackFinder
79
80} // namespace reco
81} // namespace tracking
Base classes for all user event processing components to extend.
Conditions object for random number seeds.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
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...