LDMX Software
DigitizationProcessor.h
1#pragma once
2
4#include "Tracking/Reco/TrackingGeometryUser.h"
5
6//--- ACTS ---//
7#include "Acts/Definitions/Units.hpp"
8#include "Acts/Surfaces/RectangleBounds.hpp"
9#include "Acts/Surfaces/Surface.hpp"
10
11//--- LDMX ---//
12#include "Tracking/Sim/TrackingUtils.h"
13
14//--- ACTS ---//
15#include "Acts/Definitions/Units.hpp"
16
17//--- C++ ---//
18#include <random>
19
20namespace ldmx {
21class Measurement;
22}
23
24namespace tracking::reco {
25
27 public:
28 DigitizationProcessor(const std::string& name, framework::Process& process);
29 ~DigitizationProcessor() = default;
30
31 void onProcessStart() override;
32
33 void configure(framework::config::Parameters& parameters) override;
34
41 void onNewRun(const ldmx::RunHeader& header) override;
42
43 void produce(framework::Event& event) override;
44
53 std::vector<ldmx::Measurement> digitizeHits(
54 const std::vector<ldmx::SimTrackerHit>& sim_hits);
55
56 // TODO avoid copies and use references
57 bool mergeSimHits(const std::vector<ldmx::SimTrackerHit>& sim_hits,
58 std::vector<ldmx::SimTrackerHit>& merged_hits);
59 bool mergeHits(const std::vector<ldmx::SimTrackerHit>& sihits,
60 std::vector<ldmx::SimTrackerHit>& mergedHits);
61
62 private:
65 std::string hit_collection_;
67 std::string out_collection_;
69 double min_e_dep_;
73 bool merge_hits_{false};
75 bool do_smearing_{true};
77 double sigma_u_{0};
79 double sigma_v_{0};
80
81 //--- Smearing ---//
82
83 std::default_random_engine generator_;
84 std::shared_ptr<std::normal_distribution<float>> normal_;
85
86}; // Digitization Processor
87} // namespace tracking::reco
Conditions object for random number seeds.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:54
std::string out_collection_
Output hit collection name.
std::string hit_collection_
The path to the GDML description of the detector Input hit collection to smear.
bool do_smearing_
Flag to enable/disable smearing.
void produce(framework::Event &event) override
Process the event and put new data products into it.
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
void onNewRun(const ldmx::RunHeader &header) override
Before the run starts (but after the conditions are configured) set up the random seeds for this run.
double min_e_dep_
Minimum energy deposition cut.
int track_id_
Select a particular track ID.
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
bool merge_hits_
Merge the sim hits before digitizing.
std::vector< ldmx::Measurement > digitizeHits(const std::vector< ldmx::SimTrackerHit > &sim_hits)
Does basic digitization of SimTrackerHits.
a helper base class providing some methods to shorten access to common conditions used within the tra...