7#ifndef ECAL_ECALTRACKFINDERPROCESSOR_H_
8#define ECAL_ECALTRACKFINDERPROCESSOR_H_
13#include "Ecal/Event/EcalHit.h"
14#include "Framework/Configure/Parameters.h"
17#include "Tracking/Event/Measurement.h"
18#include "Tracking/Event/Track.h"
19#include "Tracking/Sim/IndexSourceLink.h"
22#include "Acts/Definitions/Algebra.hpp"
23#include "Acts/Definitions/TrackParametrization.hpp"
24#include "Acts/EventData/TrackContainer.hpp"
25#include "Acts/EventData/VectorMultiTrajectory.hpp"
26#include "Acts/EventData/VectorTrackContainer.hpp"
27#include "Acts/Geometry/GeometryIdentifier.hpp"
28#include "Acts/Geometry/TrackingGeometry.hpp"
29#include "Acts/MagneticField/ConstantBField.hpp"
30#include "Acts/Material/HomogeneousVolumeMaterial.hpp"
31#include "Acts/Propagator/EigenStepper.hpp"
32#include "Acts/Propagator/Navigator.hpp"
33#include "Acts/Propagator/Propagator.hpp"
34#include "Acts/Surfaces/PlaneSurface.hpp"
35#include "Acts/Surfaces/RectangleBounds.hpp"
36#include "Acts/Surfaces/Surface.hpp"
37#include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
38#include "Acts/TrackFinding/MeasurementSelector.hpp"
39#include "Acts/TrackFinding/TrackStateCreator.hpp"
40#include "Acts/TrackFitting/GainMatrixUpdater.hpp"
45#include <unordered_map>
99 const std::vector<ldmx::EcalHit>& hits, std::vector<double>& energies);
110 const std::vector<ldmx::Measurement>& measurements);
117 const std::vector<Acts::Vector3>& points);
122 std::unordered_multimap<Acts::GeometryIdentifier,
127 using EcalPropagator =
128 Acts::Propagator<Acts::EigenStepper<>, Acts::Navigator>;
129 using TrackContainer = Acts::TrackContainer<Acts::VectorTrackContainer,
130 Acts::VectorMultiTrajectory>;
133 std::unique_ptr<const EcalPropagator> propagator_;
135 const Acts::CombinatorialKalmanFilter<EcalPropagator, TrackContainer>>
139 std::map<int, std::shared_ptr<Acts::Surface>> layer_surfaces_;
144 std::map<int, Acts::GeometryIdentifier> layer_geo_ids_;
147 std::shared_ptr<Acts::Surface> reference_surface_;
150 std::shared_ptr<const Acts::TrackingGeometry> tracking_geometry_;
153 Acts::RotationMatrix3 surf_rotation_;
156 std::string rec_coll_name_{
"EcalRecHits"};
157 std::string rec_pass_name_{
""};
158 std::string out_track_collection_{
"EcalTracks"};
160 double max_chi2_{10.0};
161 double cell_resolution_{1.5};
165 double max_seed_rms_{10.0};
166 double min_momentum_{50.0};
167 double max_momentum_{10000.0};
170 bool use_roc_energy_{
true};
171 std::string roc_file_name_;
172 std::vector<std::vector<float>> roc_range_values_;
181 double processing_time_{0.0};
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
Class that defines an ECal detector ID with a cell number.
The only reason this file exists is to silence an annoying maybe-uninitialized warning that originate...
Base classes for all user event processing components to extend.
A source link that stores just an index_.
Uses ACTS framework to fit tracks through ECAL hits with zero B-field.
virtual ~EcalTrackFinderProcessor()=default
Destructor.
EcalTrackFinderProcessor(const std::string &name, framework::Process &process)
Constructor.
void onNewRun(const ldmx::RunHeader &) override
Initialize ACTS tracking objects once the detector geometry is known.
std::vector< ldmx::Measurement > createMeasurements(const std::vector< ldmx::EcalHit > &hits, std::vector< double > &energies)
Create ACTS measurement objects from ECAL hits.
std::unordered_multimap< Acts::GeometryIdentifier, acts_examples::IndexSourceLink > makeGeoIdSourceLinkMap(const std::vector< ldmx::Measurement > &measurements)
Create geometry ID to source link map for CKF.
std::tuple< Acts::Vector3, Acts::Vector3, double > fitStraightLine(const std::vector< Acts::Vector3 > &points)
Fit straight line through 3D points Returns: (position, direction, RMS residual)
void produce(framework::Event &event) override
Process event to find ECAL tracks.
void configure(framework::config::Parameters ¶meters) override
Configure the processor.
std::vector< ldmx::Track > findSeeds(const std::vector< ldmx::Measurement > &measurements)
Find seed tracks via straight-line fitting.
void createEcalSurfaces()
Create unbounded plane surfaces at each ECAL layer.
void onProcessEnd() override
Print statistics.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Base class for a module which produces a data product.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Translation between real-space positions and cell IDs within the ECal.