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"
17#include "Framework/Exception/Exception.h"
22#include "TrigScint/Event/TrigScintHit.h"
23
24namespace trigscint {
25
26enum TrigScintSection {
27 UPSTREAM_TAGGER = 1,
28 UPSTREAM_TARGET,
29 DOWNSTREAM_TARGET,
30 NUM_SECTIONS
31};
32
38 public:
39 typedef int layer;
40
41 typedef std::pair<double, double> zboundaries;
42
43 TrigScintDigiProducer(const std::string& name, framework::Process& process);
44
45 ~TrigScintDigiProducer() = default;
46
53 void configure(framework::config::Parameters& parameters) override;
54
55 void produce(framework::Event& event) override;
56
60 virtual void onNewRun(const ldmx::RunHeader& runHeader) override;
61
62 ldmx::TrigScintID generateRandomID(int module);
63
64 private:
66 std::mt19937 rng_;
67
69 std::unique_ptr<ldmx::NoiseGenerator> noiseGenerator_{nullptr};
70
72 // TODO: Make use of the global verbose parameter.
73 bool verbose_{false};
74
76 std::string inputCollection_;
77
80 std::string inputPassName_;
81
84 std::string outputCollection_;
85
88
91
93 double meanNoise_{0};
94
96 double mevPerMip_{1.40};
97
99 double pePerMip_{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.
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.
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::mt19937 rng_
Random number generator.
std::string inputPassName_
Name of the pass that the input collection is on (empty string means take any pass)
std::string inputCollection_
Name of the input collection containing the sim hits.
double meanNoise_
Mean readout noise.
std::string outputCollection_
Name of the output collection that will be used to stored the digitized trigger scintillator hits.
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.
double pePerMip_
Total number of photoelectrons per MIP.
bool verbose_
Class to set the verbosity level.
void produce(framework::Event &event) override
Process the event and put new data products into it.
int stripsPerArray_
Number of strips per array.
std::unique_ptr< ldmx::NoiseGenerator > noiseGenerator_
Generate noise hits given the number of channels and mean noise.