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 nav_cfg{geometry().getTG()};
17 const Acts::Navigator navigator(nav_cfg);
19 linpropagator_ = std::make_shared<LinPropagator>(stepper, navigator);
20 trk_extrap_ = std::make_shared<std::decay_t<
decltype(*trk_extrap_)>>(
21 *linpropagator_, geometryContext(), magneticFieldContext());
26 parameters.
get<std::string>(
"scoring_hits_coll_name");
27 sp_pass_name_ = parameters.
get<std::string>(
"sp_pass_name");
29 parameters.
get<std::string>(
"recoil_sim_hits_coll_name");
31 parameters.
get<std::string>(
"tagger_sim_hits_coll_name");
33 sim_particles_passname_ =
34 parameters.
get<std::string>(
"sim_particles_passname");
38 pdg_ids_ = parameters.
get<std::vector<int>>(
"pdg_ids", {11});
39 z_min_ = parameters.
get<
double>(
"z_min", -9999);
41 pz_cut_ = parameters.
get<
double>(
"pz_cut", -9999);
42 p_cut_ = parameters.
get<
double>(
"p_cut", 0.);
44 p_cut_ecal_ = parameters.
get<
double>(
"p_cut_ecal", -1.);
45 recoil_sp_ = parameters.
get<
double>(
"recoil_sp",
true);
46 target_sp_ = parameters.
get<
double>(
"tagger_sp",
true);
47 seed_smearing_ = parameters.
get<
bool>(
"seedSmearing",
false);
48 max_track_id_ = parameters.
get<
int>(
"max_track_id", 5);
50 ldmx_log(info) <<
"Seed Smearing is set to " << seed_smearing_;
52 d0smear_ = parameters.
get<std::vector<double>>(
"d0smear", {0.01, 0.01, 0.01});
53 z0smear_ = parameters.
get<std::vector<double>>(
"z0smear", {0.1, 0.1, 0.1});
54 phismear_ = parameters.
get<
double>(
"phismear", 0.001);
55 thetasmear_ = parameters.
get<
double>(
"thetasmear", 0.001);
56 relpsmear_ = parameters.
get<
double>(
"relpsmear", 0.1);
59 rel_smearfactors_ = parameters.
get<std::vector<double>>(
60 "rel_smearfactors", {0.1, 0.1, 0.1, 0.1, 0.1, 0.1});
61 inflate_factors_ = parameters.
get<std::vector<double>>(
62 "inflate_factors", {10., 10., 10., 10., 10., 10.});
70 beam_origin_ = parameters.
get<std::vector<double>>(
"beamOrigin",
71 {-883.0, -21.745876, 0.0});
74 skip_tagger_ = parameters.
get<
bool>(
"skip_tagger",
false);
75 skip_recoil_ = parameters.
get<
bool>(
"skip_recoil",
false);
76 particle_hypothesis_ = parameters.
get<
int>(
"particle_hypothesis");
81 ldmx::Track& trk,
const std::shared_ptr<Acts::Surface>& target_surface) {
82 std::vector<double> pos{
static_cast<double>(hit.
getPosition()[0]),
94 const std::shared_ptr<Acts::Surface>& target_surface) {
96 particle.
getCharge(), trk, target_surface);
102 const std::vector<double>& pos_vec,
const std::vector<double>& p_vec,
104 const std::shared_ptr<Acts::Surface>& target_surface) {
112 Acts::Vector3 pos{pos_vec[0], pos_vec[1], pos_vec[2]};
113 Acts::Vector3 mom{p_vec[0], p_vec[1], p_vec[2]};
116 pos = tracking::sim::utils::ldmx2Acts(pos);
117 mom = tracking::sim::utils::ldmx2Acts(mom);
121 double q{charge * Acts::UnitConstants::e};
129 auto free_params{tracking::sim::utils::toFreeParameters(pos, mom, q)};
134 auto gen_surface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
135 Acts::Vector3(free_params[Acts::eFreePos0], free_params[Acts::eFreePos1],
136 free_params[Acts::eFreePos2]))};
143 Acts::transformFreeToBoundParameters(free_params, *gen_surface,
gctx_)
146 auto part{Acts::GenericParticleHypothesis(
147 Acts::ParticleHypothesis(Acts::PdgParticle(particle_hypothesis_)))};
148 Acts::BoundTrackParameters bound_trk_pars(gen_surface, bound_params,
153 Acts::Vector3 tgt_surf_center = target_surface->center(geometryContext());
154 Acts::Vector3 gen_surf_center = gen_surface->center(geometryContext());
158 if (abs(tgt_surf_center(0) - gen_surf_center(0)) > tol)
159 ldmx_log(error) <<
"Linear extrapolation to a far away surface in B field."
160 <<
" This will cause inaccuracies in track parameters"
161 <<
" Distance extrapolated = "
162 << (tgt_surf_center(0) - gen_surf_center(0));
164 auto prop_bound_state =
165 trk_extrap_->extrapolate(bound_trk_pars, target_surface);
168 Acts::Vector3 ref = target_surface->center(geometryContext());
173 trk.setPerigeeLocation(ref(0), ref(1), ref(2));
175 auto prop_bound_vec = (prop_bound_state.value()).parameters();
178 tracking::sim::utils::convertActsToLdmxPars(prop_bound_vec));
180 trk.setPosition(pos(0), pos(1), pos(2));
181 trk.setMomentum(mom(0), mom(1), mom(2));
189 const std::map<
int, std::vector<int>>& hit_count_map,
190 const std::shared_ptr<Acts::Surface>& origin_surface,
191 const std::shared_ptr<Acts::Surface>& target_surface,
192 const std::shared_ptr<Acts::Surface>& ecal_surface) {
195 truth_recoil_track.setTrackID(trackID);
206 Acts::Vector3 ref = target_surface->center(geometryContext());
207 ts_truth_target.ref_x_ = ref(0);
208 ts_truth_target.ref_y_ = ref(1);
209 ts_truth_target.ref_z_ = ref(2);
210 ts_truth_target.params_ = truth_track_target.getPerigeeParameters();
212 ts_truth_target.ts_type_ = ldmx::TrackStateType::AtTarget;
213 smeared_truth_track.addTrackState(ts_truth_target);
220 Acts::Vector3 ref_ecal = ecal_surface->center(geometryContext());
221 ts_truth_ecal.ref_x_ = ref_ecal(0);
222 ts_truth_ecal.ref_y_ = ref_ecal(1);
223 ts_truth_ecal.ref_z_ = ref_ecal(2);
224 ts_truth_ecal.params_ = truth_track_ecal.getPerigeeParameters();
226 ts_truth_ecal.ts_type_ = ldmx::TrackStateType::AtECAL;
227 smeared_truth_track.addTrackState(ts_truth_ecal);
232 for (
auto sim_hit_idx : hit_count_map.at(smeared_truth_track.getTrackID())) {
233 smeared_truth_track.addMeasurementIndex(sim_hit_idx);
237 smeared_truth_track.setNhits(nhits);
239 return smeared_truth_track;
245 const std::map<
int, std::vector<int>>& hit_count_map,
246 const std::shared_ptr<Acts::Surface>& origin_surface,
247 const std::shared_ptr<Acts::Surface>& target_surface) {
251 truth_track.setTrackID(trackID);
262 ldmx_log(debug) <<
"Truth parameters at beam origin";
263 for (
auto par : truth_track.getPerigeeParameters())
264 ldmx_log(debug) << par <<
" ";
276 Acts::Vector3 ref = target_surface->center(geometryContext());
277 ts_truth_target.ref_x_ = ref(0);
278 ts_truth_target.ref_y_ = ref(1);
279 ts_truth_target.ref_z_ = ref(2);
280 ts_truth_target.params_ = truth_track_target.getPerigeeParameters();
282 ts_truth_target.ts_type_ = ldmx::TrackStateType::AtTarget;
283 smeared_truth_track.addTrackState(ts_truth_target);
285 ldmx_log(debug) <<
"Truth parameters at target";
286 for (
auto par : truth_track_target.getPerigeeParameters())
287 ldmx_log(debug) << par <<
" ";
294 Acts::Vector3 ref_origin = origin_surface->center(geometryContext());
295 ts_truth_beam_origin.ref_x_ = ref_origin(0);
296 ts_truth_beam_origin.ref_y_ = ref_origin(1);
297 ts_truth_beam_origin.ref_z_ = ref_origin(2);
298 ts_truth_beam_origin.params_ = seed_truth_track.getPerigeeParameters();
300 ts_truth_beam_origin.ts_type_ = ldmx::TrackStateType::AtBeamOrigin;
301 smeared_truth_track.addTrackState(ts_truth_beam_origin);
303 ldmx_log(debug) <<
"Smeared parameters at origin";
304 for (
auto par : smeared_truth_track.getPerigeeParameters())
305 ldmx_log(debug) << par <<
" ";
314 for (
auto sim_hit_idx : hit_count_map.at(smeared_truth_track.getTrackID())) {
315 smeared_truth_track.addMeasurementIndex(sim_hit_idx);
319 smeared_truth_track.setNhits(nhits);
321 return smeared_truth_track;
325 bool seed_smearing) {
327 seed.setPerigeeLocation(tt.getPerigeeLocation()[0],
328 tt.getPerigeeLocation()[1],
329 tt.getPerigeeLocation()[2]);
331 seed.setNhits(tt.getNhits());
333 seed.setNsharedHits(0);
334 seed.setTrackID(tt.getTrackID());
335 seed.setPdgID(tt.getPdgID());
336 seed.setTruthProb(1.);
338 Acts::BoundVector bound_params;
339 Acts::BoundVector stddev;
342 ldmx_log(debug) <<
"Smear track and inflate covariance";
354 double sigma_d0 = d0smear_[0];
355 double sigma_z0 = z0smear_[0];
356 double sigma_phi = phismear_;
357 double sigma_theta = thetasmear_;
358 double sigma_p = relpsmear_ * abs(1 / tt.getQoP());
359 double sigma_t = 1. * Acts::UnitConstants::ns;
361 double smear = (*normal_)(generator_);
362 double d0smear = tt.getD0() + smear * sigma_d0;
364 smear = (*normal_)(generator_);
365 double z0smear = tt.getZ0() + smear * sigma_z0;
367 smear = (*normal_)(generator_);
368 double phismear = tt.getPhi() + smear * sigma_phi;
370 smear = (*normal_)(generator_);
371 double thetasmear = tt.getTheta() + smear * sigma_theta;
373 double p = std::abs(1. / tt.getQoP());
374 smear = (*normal_)(generator_);
375 double psmear = p + smear * sigma_p;
377 double q = tt.getQoP() < 0 ? -1. : 1.;
378 double qo_psmear = q / psmear;
380 smear = (*normal_)(generator_);
381 double tsmear = tt.getT() + smear * sigma_t;
383 bound_params << d0smear, z0smear, phismear, thetasmear, qo_psmear, tsmear;
385 stddev[Acts::eBoundLoc0] =
386 inflate_factors_[Acts::eBoundLoc0] * sigma_d0 * Acts::UnitConstants::mm;
387 stddev[Acts::eBoundLoc1] =
388 inflate_factors_[Acts::eBoundLoc1] * sigma_z0 * Acts::UnitConstants::mm;
389 stddev[Acts::eBoundPhi] = inflate_factors_[Acts::eBoundPhi] * sigma_phi;
390 stddev[Acts::eBoundTheta] =
391 inflate_factors_[Acts::eBoundTheta] * sigma_theta;
392 stddev[Acts::eBoundQOverP] =
393 inflate_factors_[Acts::eBoundQOverP] * (1. / p) * (1. / p) * sigma_p;
394 stddev[Acts::eBoundTime] =
395 inflate_factors_[Acts::eBoundTime] * sigma_t * Acts::UnitConstants::ns;
397 ldmx_log(debug) << stddev;
399 std::vector<double> v_seed_params(
400 (bound_params).data(),
401 bound_params.data() + bound_params.rows() * bound_params.cols());
403 Acts::BoundSquareMatrix bound_cov =
404 stddev.cwiseProduct(stddev).asDiagonal();
405 std::vector<double> v_seed_cov;
406 tracking::sim::utils::flatCov(bound_cov, v_seed_cov);
408 seed.setPerigeeCov(v_seed_cov);
413 bound_params << tt.getD0(), tt.getZ0(), tt.getPhi(), tt.getTheta(),
414 tt.getQoP(), tt.getT();
416 std::vector<double> v_seed_params(
417 (bound_params).data(),
418 bound_params.data() + bound_params.rows() * bound_params.cols());
420 double p = std::abs(1. / tt.getQoP());
421 double sigma_p = 0.75 * p * Acts::UnitConstants::GeV;
422 stddev[Acts::eBoundLoc0] = 2 * Acts::UnitConstants::mm;
423 stddev[Acts::eBoundLoc1] = 5 * Acts::UnitConstants::mm;
424 stddev[Acts::eBoundTime] = 1000 * Acts::UnitConstants::ns;
425 stddev[Acts::eBoundPhi] = 5 * Acts::UnitConstants::degree;
426 stddev[Acts::eBoundTheta] = 5 * Acts::UnitConstants::degree;
427 stddev[Acts::eBoundQOverP] = (1. / p) * (1. / p) * sigma_p;
429 Acts::BoundSquareMatrix bound_cov =
430 stddev.cwiseProduct(stddev).asDiagonal();
431 std::vector<double> v_seed_cov;
432 tracking::sim::utils::flatCov(bound_cov, v_seed_cov);
434 seed.setPerigeeCov(v_seed_cov);
441 const std::vector<ldmx::SimTrackerHit>& sim_hits,
442 std::map<
int, std::vector<int>>& hit_count_map) {
443 for (
int i_sim_hit = 0; i_sim_hit < sim_hits.size(); i_sim_hit++) {
444 auto& sim_hit = sim_hits.at(i_sim_hit);
446 if (!hit_count_map.count(sim_hit.getTrackID())) {
447 hit_count_map[sim_hit.getTrackID()].push_back(i_sim_hit);
454 int sensor_id = tracking::sim::utils::getSensorID(sim_hit);
455 bool found_hit =
false;
457 for (
auto& i_rhit : hit_count_map[sim_hit.getTrackID()]) {
459 tracking::sim::utils::getSensorID(sim_hits.at(i_rhit));
461 if (sensor_id == tmp_sensor_id) {
468 hit_count_map[sim_hit.getTrackID()].push_back(i_sim_hit);
476 const std::vector<ldmx::SimTrackerHit>& ecal_sp_hits) {
492 if (
p_cut_ >= 0. && p_vec.norm() <
p_cut_)
return false;
501 bool pass_ecal_scoring_plane =
true;
503 if (p_cut_ecal_ > 0) {
505 for (
auto& e_sp_hit : ecal_sp_hits) {
506 if (e_sp_hit.getTrackID() == hit.
getTrackID() &&
507 e_sp_hit.getPdgID() == hit.
getPdgID()) {
508 Acts::Vector3 e_sp_p{e_sp_hit.getMomentum()[0],
509 e_sp_hit.getMomentum()[1],
510 e_sp_hit.getMomentum()[2]};
512 if (e_sp_p.norm() < p_cut_ecal_) pass_ecal_scoring_plane =
false;
523 if (!pass_ecal_scoring_plane)
return false;
531 "SimParticles", sim_particles_passname_)};
537 const std::vector<ldmx::SimTrackerHit> scoring_hits{
542 const std::vector<ldmx::SimTrackerHit> scoring_hits_ecal{
547 const std::vector<ldmx::SimTrackerHit> tagger_sim_hits =
552 const std::vector<ldmx::SimTrackerHit> recoil_sim_hits =
557 if (tagger_sim_hits.size() == 0 && !skip_tagger_) {
558 ldmx_log(error) <<
"Tagger sim hits collection empty for event ";
560 if (recoil_sim_hits.size() == 0 && !skip_recoil_) {
561 ldmx_log(error) <<
"Recoil sim hits collection empty for event ";
565 std::map<int, std::vector<int>> hit_count_map_recoil;
568 std::map<int, std::vector<int>> hit_count_map_tagger;
572 std::vector<int> recoil_sh_idxs;
573 std::unordered_map<int, std::vector<int>> recoil_sh_count_map;
575 std::vector<int> tagger_sh_idxs;
576 std::unordered_map<int, std::vector<int>> tagger_sh_count_map;
580 for (
unsigned int i_sh = 0; i_sh < scoring_hits.size(); i_sh++) {
586 double tagger_p_max = 0.;
592 if (p_vec(2) < 0. || p_vec.norm() <
p_cut_)
continue;
595 if (abs(particle_map[hit.
getTrackID()].getCharge()) < 1e-8)
continue;
597 if (p_vec.norm() > tagger_p_max) {
598 tagger_sh_count_map[hit.
getTrackID()].push_back(i_sh);
606 if (p_vec(2) < 0. || p_vec.norm() <
p_cut_)
continue;
609 if (abs(particle_map[hit.
getTrackID()].getCharge()) < 1e-8)
continue;
611 recoil_sh_count_map[hit.
getTrackID()].push_back(i_sh);
616 for (std::pair<
int, std::vector<int>> element : recoil_sh_count_map) {
618 element.second.begin(), element.second.end(),
619 [&](
const int idx1,
int idx2) ->
bool {
620 const ldmx::SimTrackerHit& hit1 = scoring_hits.at(idx1);
621 const ldmx::SimTrackerHit& hit2 = scoring_hits.at(idx2);
623 Acts::Vector3 phit1{hit1.getMomentum()[0], hit1.getMomentum()[1],
624 hit1.getMomentum()[2]};
625 Acts::Vector3 phit2{hit2.getMomentum()[0], hit2.getMomentum()[1],
626 hit2.getMomentum()[2]};
628 return phit1.norm() > phit2.norm();
633 for (
auto& [_track_id, hit_indices] : tagger_sh_count_map) {
635 hit_indices.begin(), hit_indices.end(),
636 [&](
const int idx1,
int idx2) ->
bool {
637 const ldmx::SimTrackerHit& hit1 = scoring_hits.at(idx1);
638 const ldmx::SimTrackerHit& hit2 = scoring_hits.at(idx2);
640 Acts::Vector3 phit1{hit1.getMomentum()[0], hit1.getMomentum()[1],
641 hit1.getMomentum()[2]};
642 Acts::Vector3 phit2{hit2.getMomentum()[0], hit2.getMomentum()[1],
643 hit2.getMomentum()[2]};
645 return phit1.norm() > phit2.norm();
652 std::vector<ldmx::Track> tagger_truth_tracks;
653 std::vector<ldmx::Track> tagger_truth_seeds;
654 std::vector<ldmx::Track> recoil_truth_tracks;
655 std::vector<ldmx::Track> recoil_truth_seeds;
656 ldmx::Tracks beam_electrons;
660 auto target_surface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
661 Acts::Vector3(0., 0., 0.))};
664 auto target_unbound_surface = tracking::sim::utils::unboundSurface(0.);
667 auto ecal_surface = tracking::sim::utils::unboundSurface(240.5);
669 auto beam_origin_surface{Acts::Surface::makeShared<Acts::PerigeeSurface>(
670 Acts::Vector3(beam_origin_[0], beam_origin_[1], beam_origin_[2]))};
673 for (
const auto& [track_id, hit_indices] : tagger_sh_count_map) {
677 if (hit_count_map_tagger[hit.
getTrackID()].size() > n_min_hits_tagger_) {
679 createTruthTrack(phit, hit, truth_tagger_track, target_surface);
680 truth_tagger_track.setNhits(
681 hit_count_map_tagger[hit.
getTrackID()].size());
682 tagger_truth_tracks.push_back(truth_tagger_track);
687 hit, hit_count_map_tagger, beam_origin_surface,
688 target_unbound_surface);
689 beam_electrons.push_back(beam_e_truth_seed);
696 std::vector<ldmx::SimTrackerHit> ecal_sp_hits =
700 std::vector<ldmx::SimTrackerHit> sel_ecal_sp_hits;
702 for (
auto sp_hit : ecal_sp_hits) {
703 if (sp_hit.getMomentum()[2] > 0 && ((sp_hit.getID() & 0xfff) == 31)) {
704 sel_ecal_sp_hits.push_back(sp_hit);
710 for (std::pair<
int, std::vector<int>> element : recoil_sh_count_map) {
718 bool found_ecal_hit =
false;
719 for (
auto ecal_sp_hit : sel_ecal_sp_hits) {
720 if (ecal_sp_hit.getTrackID() == hit.
getTrackID()) {
721 ecal_hit = ecal_sp_hit;
722 found_ecal_hit =
true;
730 if (hit_count_map_recoil[hit.
getTrackID()].size() > n_min_hits_recoil_ &&
731 found_ecal_hit && !skip_recoil_) {
734 ecal_hit, hit_count_map_recoil, target_surface,
735 target_unbound_surface, ecal_surface);
743 recoil_truth_tracks.push_back(truth_recoil_track);
764 for (
auto& tt : tagger_truth_tracks) {
765 ldmx::Track seed = seedFromTruth(tt, seed_smearing_);
767 tagger_truth_seeds.push_back(seed);
770 ldmx_log(debug) <<
"Forming seeds from truth";
771 for (
auto& tt : recoil_truth_tracks) {
772 ldmx_log(debug) <<
"Smearing truth track";
774 ldmx::Track seed = seedFromTruth(tt, seed_smearing_);
776 recoil_truth_seeds.push_back(seed);
781 event.add(
"beamElectrons", beam_electrons);
782 event.add(
"TaggerTruthTracks", tagger_truth_tracks);
783 event.add(
"RecoilTruthTracks", recoil_truth_tracks);
784 event.add(
"TaggerTruthSeeds", tagger_truth_seeds);
785 event.add(
"RecoilTruthSeeds", recoil_truth_seeds);
#define DECLARE_PRODUCER(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.
const T & get(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...
Create a track seed using truth information extracted from the corresponding SimParticle or SimTracke...
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 ...
std::string input_pass_name_
Pass name for the sim hit collections.
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.
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...
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.