1#include "Tracking/Reco/TruthSeedProcessor.h"
3#include "Tracking/Sim/GeometryContainers.h"
5namespace tracking::reco {
12 gctx_ = Acts::GeometryContext();
13 normal_ = std::make_shared<std::normal_distribution<float>>(0., 1.);
15 Acts::StraightLineStepper stepper;
16 Acts::Navigator::Config navCfg{geometry().getTG()};
17 const Acts::Navigator navigator(navCfg);
19 linpropagator_ = std::make_shared<LinPropagator>(stepper, navigator);
20 trk_extrap_ = std::make_shared<std::decay_t<
decltype(*trk_extrap_)>>(
21 *linpropagator_, geometry_context(), magnetic_field_context());
26 parameters.
getParameter<std::string>(
"scoring_hits_coll_name");
28 parameters.
getParameter<std::string>(
"recoil_sim_hits_coll_name");
30 parameters.
getParameter<std::string>(
"tagger_sim_hits_coll_name");
39 p_cut_ecal_ = parameters.
getParameter<
double>(
"p_cut_ecal", -1.);
40 recoil_sp_ = parameters.
getParameter<
double>(
"recoil_sp",
true);
41 target_sp_ = parameters.
getParameter<
double>(
"tagger_sp",
true);
42 seedSmearing_ = parameters.
getParameter<
bool>(
"seedSmearing",
false);
43 max_track_id_ = parameters.
getParameter<
int>(
"max_track_id", 5);
45 ldmx_log(info) <<
"Seed Smearing is set to " << seedSmearing_;
47 d0smear_ = parameters.
getParameter<std::vector<double>>(
"d0smear",
50 parameters.
getParameter<std::vector<double>>(
"z0smear", {0.1, 0.1, 0.1});
51 phismear_ = parameters.
getParameter<
double>(
"phismear", 0.001);
52 thetasmear_ = parameters.
getParameter<
double>(
"thetasmear", 0.001);
53 relpsmear_ = parameters.
getParameter<
double>(
"relpsmear", 0.1);
56 rel_smearfactors_ = parameters.
getParameter<std::vector<double>>(
57 "rel_smearfactors", {0.1, 0.1, 0.1, 0.1, 0.1, 0.1});
58 inflate_factors_ = parameters.
getParameter<std::vector<double>>(
59 "inflate_factors", {10., 10., 10., 10., 10., 10.});
67 beamOrigin_ = parameters.
getParameter<std::vector<double>>(
68 "beamOrigin", {-883.0, -21.745876, 0.0});
71 skip_tagger_ = parameters.
getParameter<
bool>(
"skip_tagger",
false);
72 skip_recoil_ = parameters.
getParameter<
bool>(
"skip_recoil",
false);
77 ldmx::Track& trk,
const std::shared_ptr<Acts::Surface>& target_surface) {
78 std::vector<double> pos{
static_cast<double>(hit.
getPosition()[0]),
90 const std::shared_ptr<Acts::Surface>& target_surface) {
92 particle.
getCharge(), trk, target_surface);
98 const std::vector<double>& pos_vec,
const std::vector<double>& p_vec,
100 const std::shared_ptr<Acts::Surface>& target_surface) {
108 Acts::Vector3 pos{pos_vec[0], pos_vec[1], pos_vec[2]};
109 Acts::Vector3 mom{p_vec[0], p_vec[1], p_vec[2]};
112 pos = tracking::sim::utils::Ldmx2Acts(pos);
113 mom = tracking::sim::utils::Ldmx2Acts(mom);
117 double q{charge * Acts::UnitConstants::e};
125 auto free_params{tracking::sim::utils::toFreeParameters(pos, mom, q)};
130 auto gen_surface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
131 Acts::Vector3(free_params[Acts::eFreePos0], free_params[Acts::eFreePos1],
132 free_params[Acts::eFreePos2]))};
140 Acts::transformFreeToBoundParameters(free_params, *gen_surface,
gctx_)
143 if (charge > 0) pdgid = -11;
144 auto part{Acts::GenericParticleHypothesis(
145 Acts::ParticleHypothesis(Acts::PdgParticle(pdgid)))};
146 Acts::BoundTrackParameters boundTrkPars(gen_surface, bound_params,
151 Acts::Vector3 tgt_surf_center = target_surface->center(geometry_context());
152 Acts::Vector3 gen_surf_center = gen_surface->center(geometry_context());
156 if (abs(tgt_surf_center(0) - gen_surf_center(0)) > tol)
157 ldmx_log(error) <<
"Linear extrapolation to a far away surface in B field."
158 <<
" This will cause inaccuracies in track parameters"
159 <<
" Distance extrapolated = "
160 << (tgt_surf_center(0) - gen_surf_center(0)) << std::endl;
162 auto propBoundState = trk_extrap_->extrapolate(boundTrkPars, target_surface);
165 Acts::Vector3 ref = target_surface->center(geometry_context());
170 trk.setPerigeeLocation(ref(0), ref(1), ref(2));
172 auto propBoundVec = (propBoundState.value()).parameters();
175 tracking::sim::utils::convertActsToLdmxPars(propBoundVec));
177 trk.setPosition(pos(0), pos(1), pos(2));
178 trk.setMomentum(mom(0), mom(1), mom(2));
186 const std::map<
int, std::vector<int>>& hit_count_map,
187 const std::shared_ptr<Acts::Surface>& origin_surface,
188 const std::shared_ptr<Acts::Surface>& target_surface,
189 const std::shared_ptr<Acts::Surface>& ecal_surface) {
192 truth_recoil_track.setTrackID(trackID);
203 Acts::Vector3 ref = target_surface->center(geometry_context());
204 ts_truth_target.refX = ref(0);
205 ts_truth_target.refY = ref(1);
206 ts_truth_target.refZ = ref(2);
207 ts_truth_target.params = truth_track_target.getPerigeeParameters();
209 ts_truth_target.ts_type = ldmx::TrackStateType::AtTarget;
210 smearedTruthTrack.addTrackState(ts_truth_target);
217 Acts::Vector3 ref_ecal = ecal_surface->center(geometry_context());
218 ts_truth_ecal.refX = ref_ecal(0);
219 ts_truth_ecal.refY = ref_ecal(1);
220 ts_truth_ecal.refZ = ref_ecal(2);
221 ts_truth_ecal.params = truth_track_ecal.getPerigeeParameters();
223 ts_truth_ecal.ts_type = ldmx::TrackStateType::AtECAL;
224 smearedTruthTrack.addTrackState(ts_truth_ecal);
229 for (
auto sim_hit_idx : hit_count_map.at(smearedTruthTrack.getTrackID())) {
230 smearedTruthTrack.addMeasurementIndex(sim_hit_idx);
234 smearedTruthTrack.setNhits(nhits);
236 return smearedTruthTrack;
242 const std::map<
int, std::vector<int>>& hit_count_map,
243 const std::shared_ptr<Acts::Surface>& origin_surface,
244 const std::shared_ptr<Acts::Surface>& target_surface) {
248 truth_track.setTrackID(trackID);
253 ldmx_log(debug) <<
"Truth parameters at beam origin" << std::endl;
254 for (
auto par : truth_track.getPerigeeParameters())
255 ldmx_log(debug) << par <<
" ";
256 ldmx_log(debug) << std::endl;
267 Acts::Vector3 ref = target_surface->center(geometry_context());
268 ts_truth_target.refX = ref(0);
269 ts_truth_target.refY = ref(1);
270 ts_truth_target.refZ = ref(2);
271 ts_truth_target.params = truth_track_target.getPerigeeParameters();
273 ts_truth_target.ts_type = ldmx::TrackStateType::AtTarget;
274 smearedTruthTrack.addTrackState(ts_truth_target);
276 ldmx_log(debug) <<
"Truth parameters at target" << std::endl;
277 for (
auto par : truth_track_target.getPerigeeParameters())
278 ldmx_log(debug) << par <<
" ";
279 ldmx_log(debug) << std::endl;
285 Acts::Vector3 ref_origin = origin_surface->center(geometry_context());
286 ts_truth_beam_origin.refX = ref_origin(0);
287 ts_truth_beam_origin.refY = ref_origin(1);
288 ts_truth_beam_origin.refZ = ref_origin(2);
289 ts_truth_beam_origin.params = seedTruthTrack.getPerigeeParameters();
291 ts_truth_beam_origin.ts_type = ldmx::TrackStateType::AtBeamOrigin;
292 smearedTruthTrack.addTrackState(ts_truth_beam_origin);
294 ldmx_log(debug) <<
"Smeared parameters at origin" << std::endl;
295 for (
auto par : smearedTruthTrack.getPerigeeParameters())
296 ldmx_log(debug) << par <<
" ";
297 ldmx_log(debug) << std::endl;
306 for (
auto sim_hit_idx : hit_count_map.at(smearedTruthTrack.getTrackID())) {
307 smearedTruthTrack.addMeasurementIndex(sim_hit_idx);
311 smearedTruthTrack.setNhits(nhits);
313 return smearedTruthTrack;
317 bool seed_smearing) {
319 seed.setPerigeeLocation(tt.getPerigeeLocation()[0],
320 tt.getPerigeeLocation()[1],
321 tt.getPerigeeLocation()[2]);
323 seed.setNhits(tt.getNhits());
325 seed.setNsharedHits(0);
326 seed.setTrackID(tt.getTrackID());
327 seed.setPdgID(tt.getPdgID());
328 seed.setTruthProb(1.);
330 Acts::BoundVector bound_params;
331 Acts::BoundVector stddev;
334 ldmx_log(debug) <<
"Smear track and inflate covariance" << std::endl;
346 double sigma_d0 = d0smear_[0];
347 double sigma_z0 = z0smear_[0];
348 double sigma_phi = phismear_;
349 double sigma_theta = thetasmear_;
350 double sigma_p = relpsmear_ * abs(1 / tt.getQoP());
351 double sigma_t = 1. * Acts::UnitConstants::ns;
353 double smear = (*normal_)(generator_);
354 double d0smear = tt.getD0() + smear * sigma_d0;
356 smear = (*normal_)(generator_);
357 double z0smear = tt.getZ0() + smear * sigma_z0;
359 smear = (*normal_)(generator_);
360 double Phismear = tt.getPhi() + smear * sigma_phi;
362 smear = (*normal_)(generator_);
363 double Thetasmear = tt.getTheta() + smear * sigma_theta;
365 double p = std::abs(1. / tt.getQoP());
366 smear = (*normal_)(generator_);
367 double Psmear = p + smear * sigma_p;
369 double Q = tt.getQoP() < 0 ? -1. : 1.;
370 double QoPsmear = Q / Psmear;
372 smear = (*normal_)(generator_);
373 double Tsmear = tt.getT() + smear * sigma_t;
375 bound_params << d0smear, z0smear, Phismear, Thetasmear, QoPsmear, Tsmear;
377 stddev[Acts::eBoundLoc0] =
378 inflate_factors_[Acts::eBoundLoc0] * sigma_d0 * Acts::UnitConstants::mm;
379 stddev[Acts::eBoundLoc1] =
380 inflate_factors_[Acts::eBoundLoc1] * sigma_z0 * Acts::UnitConstants::mm;
381 stddev[Acts::eBoundPhi] = inflate_factors_[Acts::eBoundPhi] * sigma_phi;
382 stddev[Acts::eBoundTheta] =
383 inflate_factors_[Acts::eBoundTheta] * sigma_theta;
384 stddev[Acts::eBoundQOverP] =
385 inflate_factors_[Acts::eBoundQOverP] * (1. / p) * (1. / p) * sigma_p;
386 stddev[Acts::eBoundTime] =
387 inflate_factors_[Acts::eBoundTime] * sigma_t * Acts::UnitConstants::ns;
389 ldmx_log(debug) << stddev << std::endl;
391 std::vector<double> v_seed_params(
392 (bound_params).data(),
393 bound_params.data() + bound_params.rows() * bound_params.cols());
395 Acts::BoundSquareMatrix bound_cov =
396 stddev.cwiseProduct(stddev).asDiagonal();
397 std::vector<double> v_seed_cov;
398 tracking::sim::utils::flatCov(bound_cov, v_seed_cov);
400 seed.setPerigeeCov(v_seed_cov);
405 bound_params << tt.getD0(), tt.getZ0(), tt.getPhi(), tt.getTheta(),
406 tt.getQoP(), tt.getT();
408 std::vector<double> v_seed_params(
409 (bound_params).data(),
410 bound_params.data() + bound_params.rows() * bound_params.cols());
412 double p = std::abs(1. / tt.getQoP());
413 double sigma_p = 0.75 * p * Acts::UnitConstants::GeV;
414 stddev[Acts::eBoundLoc0] = 2 * Acts::UnitConstants::mm;
415 stddev[Acts::eBoundLoc1] = 5 * Acts::UnitConstants::mm;
416 stddev[Acts::eBoundTime] = 1000 * Acts::UnitConstants::ns;
417 stddev[Acts::eBoundPhi] = 5 * Acts::UnitConstants::degree;
418 stddev[Acts::eBoundTheta] = 5 * Acts::UnitConstants::degree;
419 stddev[Acts::eBoundQOverP] = (1. / p) * (1. / p) * sigma_p;
421 Acts::BoundSquareMatrix bound_cov =
422 stddev.cwiseProduct(stddev).asDiagonal();
423 std::vector<double> v_seed_cov;
424 tracking::sim::utils::flatCov(bound_cov, v_seed_cov);
426 seed.setPerigeeCov(v_seed_cov);
433 const std::vector<ldmx::SimTrackerHit>& sim_hits,
434 std::map<
int, std::vector<int>>& hit_count_map) {
435 for (
int i_sim_hit = 0; i_sim_hit < sim_hits.size(); i_sim_hit++) {
436 auto& sim_hit = sim_hits.at(i_sim_hit);
438 if (!hit_count_map.count(sim_hit.getTrackID())) {
439 hit_count_map[sim_hit.getTrackID()].push_back(i_sim_hit);
446 int sensorID = tracking::sim::utils::getSensorID(sim_hit);
447 bool foundHit =
false;
449 for (
auto& i_rhit : hit_count_map[sim_hit.getTrackID()]) {
451 tracking::sim::utils::getSensorID(sim_hits.at(i_rhit));
453 if (sensorID == tmp_sensorID) {
460 hit_count_map[sim_hit.getTrackID()].push_back(i_sim_hit);
468 const std::vector<ldmx::SimTrackerHit>& ecal_sp_hits) {
484 if (
p_cut_ >= 0. && p_vec.norm() <
p_cut_)
return false;
493 bool pass_ecal_scoring_plane =
true;
495 if (p_cut_ecal_ > 0) {
497 for (
auto& e_sp_hit : ecal_sp_hits) {
498 if (e_sp_hit.getTrackID() == hit.
getTrackID() &&
499 e_sp_hit.getPdgID() == hit.
getPdgID()) {
500 Acts::Vector3 e_sp_p{e_sp_hit.getMomentum()[0],
501 e_sp_hit.getMomentum()[1],
502 e_sp_hit.getMomentum()[2]};
504 if (e_sp_p.norm() < p_cut_ecal_) pass_ecal_scoring_plane =
false;
515 if (!pass_ecal_scoring_plane)
return false;
528 const std::vector<ldmx::SimTrackerHit> scoring_hits{
532 const std::vector<ldmx::SimTrackerHit> scoring_hits_ecal{
536 const std::vector<ldmx::SimTrackerHit> tagger_sim_hits =
540 const std::vector<ldmx::SimTrackerHit> recoil_sim_hits =
544 if (tagger_sim_hits.size() == 0 && !skip_tagger_)
545 ldmx_log(error) <<
"Tagger sim hits collection empty for event "
546 <<
event.getEventNumber() <<
" in run "
547 <<
event.getEventHeader().getRun() << std::endl;
548 if (recoil_sim_hits.size() == 0 && !skip_recoil_)
549 ldmx_log(error) <<
"Recoil sim hits collection empty for event "
550 <<
event.getEventNumber() <<
" in run "
551 <<
event.getEventHeader().getRun() << std::endl;
554 std::map<int, std::vector<int>> hit_count_map_recoil;
557 std::map<int, std::vector<int>> hit_count_map_tagger;
561 std::vector<int> recoil_sh_idxs;
562 std::unordered_map<int, std::vector<int>> recoil_sh_count_map;
564 std::vector<int> tagger_sh_idxs;
565 std::unordered_map<int, std::vector<int>> tagger_sh_count_map;
569 for (
unsigned int i_sh = 0; i_sh < scoring_hits.size(); i_sh++) {
575 double tagger_p_max = 0.;
581 if (p_vec(2) < 0. || p_vec.norm() <
p_cut_)
continue;
584 if (abs(particleMap[hit.
getTrackID()].getCharge()) < 1e-8)
continue;
586 if (p_vec.norm() > tagger_p_max) {
587 tagger_sh_count_map[hit.
getTrackID()].push_back(i_sh);
595 if (p_vec(2) < 0. || p_vec.norm() <
p_cut_)
continue;
598 if (abs(particleMap[hit.
getTrackID()].getCharge()) < 1e-8)
continue;
600 recoil_sh_count_map[hit.
getTrackID()].push_back(i_sh);
605 for (std::pair<
int, std::vector<int>> element : recoil_sh_count_map) {
607 element.second.begin(), element.second.end(),
608 [&](
const int idx1,
int idx2) ->
bool {
609 const ldmx::SimTrackerHit& hit1 = scoring_hits.at(idx1);
610 const ldmx::SimTrackerHit& hit2 = scoring_hits.at(idx2);
612 Acts::Vector3 phit1{hit1.getMomentum()[0], hit1.getMomentum()[1],
613 hit1.getMomentum()[2]};
614 Acts::Vector3 phit2{hit2.getMomentum()[0], hit2.getMomentum()[1],
615 hit2.getMomentum()[2]};
617 return phit1.norm() > phit2.norm();
622 for (
auto& [_track_id, hit_indices] : tagger_sh_count_map) {
624 hit_indices.begin(), hit_indices.end(),
625 [&](
const int idx1,
int idx2) ->
bool {
626 const ldmx::SimTrackerHit& hit1 = scoring_hits.at(idx1);
627 const ldmx::SimTrackerHit& hit2 = scoring_hits.at(idx2);
629 Acts::Vector3 phit1{hit1.getMomentum()[0], hit1.getMomentum()[1],
630 hit1.getMomentum()[2]};
631 Acts::Vector3 phit2{hit2.getMomentum()[0], hit2.getMomentum()[1],
632 hit2.getMomentum()[2]};
634 return phit1.norm() > phit2.norm();
641 std::vector<ldmx::Track> tagger_truth_tracks;
642 std::vector<ldmx::Track> tagger_truth_seeds;
643 std::vector<ldmx::Track> recoil_truth_tracks;
644 std::vector<ldmx::Track> recoil_truth_seeds;
645 ldmx::Tracks beam_electrons;
649 auto targetSurface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
650 Acts::Vector3(0., 0., 0.))};
653 auto targetUnboundSurface = tracking::sim::utils::unboundSurface(0.);
656 auto ecalSurface = tracking::sim::utils::unboundSurface(240.5);
658 auto beamOriginSurface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
659 Acts::Vector3(beamOrigin_[0], beamOrigin_[1], beamOrigin_[2]))};
662 for (
const auto& [track_id, hit_indices] : tagger_sh_count_map) {
666 if (hit_count_map_tagger[hit.
getTrackID()].size() > n_min_hits_tagger_) {
668 createTruthTrack(phit, hit, truth_tagger_track, targetSurface);
669 truth_tagger_track.setNhits(
670 hit_count_map_tagger[hit.
getTrackID()].size());
671 tagger_truth_tracks.push_back(truth_tagger_track);
676 hit_count_map_tagger, beamOriginSurface, targetUnboundSurface);
677 beam_electrons.push_back(beamETruthSeed);
684 std::vector<ldmx::SimTrackerHit> ecal_spHits =
687 std::vector<ldmx::SimTrackerHit> sel_ecal_spHits;
689 for (
auto sp_hit : ecal_spHits) {
690 if (sp_hit.getMomentum()[2] > 0 && ((sp_hit.getID() & 0xfff) == 31)) {
691 sel_ecal_spHits.push_back(sp_hit);
697 for (std::pair<
int, std::vector<int>> element : recoil_sh_count_map) {
705 bool foundEcalHit =
false;
706 for (
auto ecal_sp_hit : sel_ecal_spHits) {
707 if (ecal_sp_hit.getTrackID() == hit.
getTrackID()) {
708 ecal_hit = ecal_sp_hit;
715 if (hit_count_map_recoil[hit.
getTrackID()].size() > n_min_hits_recoil_ &&
716 foundEcalHit && !skip_recoil_) {
719 ecal_hit, hit_count_map_recoil, targetSurface,
720 targetUnboundSurface, ecalSurface);
721 recoil_truth_tracks.push_back(truth_recoil_track);
742 for (
auto& tt : tagger_truth_tracks) {
743 ldmx::Track seed = seedFromTruth(tt, seedSmearing_);
745 tagger_truth_seeds.push_back(seed);
748 ldmx_log(debug) <<
"Forming seeds from truth" << std::endl;
749 for (
auto& tt : recoil_truth_tracks) {
750 ldmx_log(debug) <<
"Smearing truth track" << std::endl;
752 ldmx::Track seed = seedFromTruth(tt, seedSmearing_);
754 recoil_truth_seeds.push_back(seed);
759 event.add(
"beamElectrons", beam_electrons);
760 event.add(
"TaggerTruthTracks", tagger_truth_tracks);
761 event.add(
"RecoilTruthTracks", recoil_truth_tracks);
762 event.add(
"TaggerTruthSeeds", tagger_truth_seeds);
763 event.add(
"RecoilTruthSeeds", recoil_truth_seeds);
#define DECLARE_PRODUCER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Class representing a simulated particle.
double getCharge() const
Get the charge of this particle.
std::vector< double > getVertex() const
Get a vector containing the vertex of this particle in mm.
int getPdgID() const
Get the PDG ID of this particle.
std::vector< double > getMomentum() const
Get a vector containing the momentum of this particle [MeV].
Represents a simulated tracker hit in the simulation.
int getPdgID() const
Get the Sim particle track ID of the hit.
std::vector< float > getPosition() const
Get the XYZ position of the hit [mm].
std::vector< double > getMomentum() const
Get the XYZ momentum of the particle at the position at which the hit took place [MeV].
int getTrackID() const
Get the Sim particle track ID of the hit.
Implementation of a track object.
void setPerigeeParameters(const std::vector< double > &par)
d_0 z_0 phi_0 theta q/p t
a helper base class providing some methods to shorten access to common conditions used within the tra...
float z_min_
Min cut on the z of the scoring hit.
void createTruthTrack(const ldmx::SimParticle &particle, ldmx::Track &trk, const std::shared_ptr< Acts::Surface > &target_surface)
Use the vertex position of the SimParticle to extract (x, y, z, px, py, pz, q) and create a track see...
ldmx::Track TaggerFullSeed(const ldmx::SimParticle &beam_electron, const int trackID, const ldmx::SimTrackerHit &hit, const std::map< int, std::vector< int > > &hit_count_map, const std::shared_ptr< Acts::Surface > &origin_surface, const std::shared_ptr< Acts::Surface > &target_surface)
This method retrieves the beam electron and forms a full seed The seed parameters are the truth param...
std::string recoil_sim_hits_coll_name_
Sim hits to check if the truth seed is findable.
void onNewRun(const ldmx::RunHeader &rh) override
onNewRun is the first function called for each processor after the conditions are fully configured an...
std::vector< int > pdg_ids_
pdg_ids of the particles we want to select for the seeds
void produce(framework::Event &event) override
Main loop that creates the seed tracks for both the tagger and recoil tracker.
int track_id_
Only select a particular trackID.
void configure(framework::config::Parameters ¶meters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
double pz_cut_
Ask for a minimum pz for the seeds.
TruthSeedProcessor(const std::string &name, framework::Process &process)
Constructor.
double p_cut_
Ask for a minimum p for the seeds.
void makeHitCountMap(const std::vector< ldmx::SimTrackerHit > &sim_hits, std::map< int, std::vector< int > > &hit_count_map)
Create a mapping from the selected scoring plane hit objects to the number of hits they associated pa...
std::string scoring_hits_coll_name_
Which scoring plane hits to use for the truth seeds generation.
std::string tagger_sim_hits_coll_name_
Sim hits to check if the truth seed is findable.
bool scoringPlaneHitFilter(const ldmx::SimTrackerHit &hit, const std::vector< ldmx::SimTrackerHit > &ecal_sp_hits)
Filter that checks if a scoring plane passes specified momentum cuts as well as if the associated Sim...
double p_cut_max_
Ask for a maximum p for the seeds.
int n_min_hits_tagger_
Minimum number of hits left in the recoil tracker to consider the seed as findable.
int n_min_hits_recoil_
Minimum number of hits left in the recoil tracker to consider the seed as findable.
ldmx::Track seedFromTruth(const ldmx::Track &tt, bool seed_smearing)
Create a track seed from a truth track applying a smearing to the truth parameters as well as an infl...
Acts::GeometryContext gctx_
The ACTS geometry context properly.