LDMX Software
TrigScintDigiProducer.h
Go to the documentation of this file.
1
8#ifndef EVENTPROC_TRIGSCINTDIGIPRODUCER_H
9#define EVENTPROC_TRIGSCINTDIGIPRODUCER_H
10
11#include <random> //for random num generators
12
13#include "DetDescr/TrigScintID.h"
14#include "Framework/Configure/Parameters.h"
15#include "Framework/Event.h"
18
19namespace trigscint {
20
21enum TrigScintSection {
22 UPSTREAM_TAGGER = 1,
23 UPSTREAM_TARGET,
24 DOWNSTREAM_TARGET,
25 ACTIVE_TARGET,
26 NUM_SECTIONS
27};
28
34 public:
35 typedef int layer;
36
37 typedef std::pair<double, double> zboundaries;
38
39 TrigScintDigiProducer(const std::string& name, framework::Process& process);
40
41 ~TrigScintDigiProducer() = default;
42
49 void configure(framework::config::Parameters& parameters) override;
50
51 void produce(framework::Event& event) override;
52
56 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
57
58 ldmx::TrigScintID generateRandomID(int module);
59
60 private:
62 std::mt19937 rng_;
63
65 std::unique_ptr<ldmx::NoiseGenerator> noise_generator_{nullptr};
66
68 std::string input_collection_;
69
72 std::string input_pass_name_;
73
76 std::string output_collection_;
77
80 std::string sim_particles_passname_;
81
84
87
89 double mean_noise_{0};
90
92 double mev_per_mip_{1.40};
93
95 double pe_per_mip_{13.5};
96};
97
98} // namespace trigscint
99
100#endif
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
Utility used to generate noise hits_.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
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.
Definition Parameters.h:26
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:68
Class that defines the detector ID of the trigger scintillator.
Definition TrigScintID.h:14
Performs digitization of simulated Trigger Scintillator data.
std::string output_collection_
Name of the output collection that will be used to stored the digitized trigger scintillator hits.
std::mt19937 rng_
Random number generator.
std::string input_pass_name_
Name of the pass that the input collection is on (empty string means take any pass)
std::string input_collection_
Name of the input collection containing the sim hits.
std::unique_ptr< ldmx::NoiseGenerator > noise_generator_
Generate noise hits given the number of channels and mean noise.
std::string sim_particles_coll_name_
Name of sim particles collection and pass name.
int strips_per_array_
Number of strips per array.
double mev_per_mip_
Total MeV per MIP.
double mean_noise_
Mean readout noise.
virtual void onNewRun(const ldmx::RunHeader &runHeader) override
Random number generation.
void configure(framework::config::Parameters &parameters) override
Callback for the processor to configure itself from the given set of parameters.
void produce(framework::Event &event) override
Process the event and put new data products into it.
double pe_per_mip_
Total number of photoelectrons per MIP.