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 <iostream>
12#include <random> //for random num generators
13
14#include "DetDescr/TrigScintID.h"
15#include "Framework/Configure/Parameters.h"
16#include "Framework/Event.h"
18#include "Framework/Exception/Exception.h"
23#include "TrigScint/Event/TrigScintHit.h"
24
25namespace trigscint {
26
27enum TrigScintSection {
28 UPSTREAM_TAGGER = 1,
29 UPSTREAM_TARGET,
30 DOWNSTREAM_TARGET,
31 ACTIVE_TARGET,
32 NUM_SECTIONS
33};
34
40 public:
41 typedef int layer;
42
43 typedef std::pair<double, double> zboundaries;
44
45 TrigScintDigiProducer(const std::string& name, framework::Process& process);
46
47 ~TrigScintDigiProducer() = default;
48
55 void configure(framework::config::Parameters& parameters) override;
56
57 void produce(framework::Event& event) override;
58
62 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
63
64 ldmx::TrigScintID generateRandomID(int module);
65
66 private:
68 std::mt19937 rng_;
69
71 std::unique_ptr<ldmx::NoiseGenerator> noise_generator_{nullptr};
72
74 std::string input_collection_;
75
78 std::string input_pass_name_;
79
82 std::string output_collection_;
83
84 std::string sim_particles_passname_;
85
88
91
93 double mean_noise_{0};
94
96 double mev_per_mip_{1.40};
97
99 double pe_per_mip_{13.5};
100};
101
102} // namespace trigscint
103
104#endif
Class providing string constants for the event model.
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_.
Conditions object for random number seeds.
Class which stores simulated calorimeter hit information.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:36
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:29
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:57
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.
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.