LDMX Software
TrigScintRecHitProducer.h
Go to the documentation of this file.
1
7#ifndef TRIGSCINT_TRIGSCINTDIGIPRODUCER_H
8#define TRIGSCINT_TRIGSCINTDIGIPRODUCER_H
9
10#include <string>
11#include <vector>
12
13/*~~~~~~~~~~*/
14/* ROOT */
15/*~~~~~~~~~~*/
16#include "TRandom3.h"
17
18// LDMX
19#include "DetDescr/TrigScintID.h"
22#include "TrigScint/Event/TrigScintHit.h"
23#include "TrigScint/Event/TrigScintQIEDigis.h"
24
25/*~~~~~~~~~~~~~~~*/
26/* Framework */
27/*~~~~~~~~~~~~~~~*/
28#include "Framework/Configure/Parameters.h"
30
31/*~~~~~~~~~~~*/
32/* TrigScint */
33/*~~~~~~~~~~~*/
34#include "TrigScint/SimQIE.h"
35
36namespace trigscint {
37
45 public:
46 TrigScintRecHitProducer(const std::string& name, framework::Process& process);
47
49
56 void configure(framework::config::Parameters& parameters) override;
57
58 void produce(framework::Event& event) override;
59
60 private:
62 void readCalib(const std::string& filename,
63 std::vector<double>* gains,
64 std::vector<double>* pedestals);
65
67 std::string input_collection_;
68
71 std::string input_pass_name_;
72
75 std::string output_collection_;
76
78 double gain_{1e6};
79
81 double pedestal_{6.0};
82
84 double mev_per_mip_{1.40};
85
87 double pe_per_mip_{13.5};
88
91
93 bool use_calib_file_{false};
94
96 std::string calib_file_{""};
97
101
103 std::vector<double> gains_;
104
106 std::vector<double> pedestals_;
107};
108
109} // namespace trigscint
110
111#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_.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:37
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
Organizes digis into TrigScintHits, linearizes TDC and ADC info, and converts amplitudes to PEs.
std::string calib_file_
Path to the per-channel calibration file.
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.
std::string output_collection_
Name of the output collection that will be used to stored the digitized trigger scintillator hits.
void configure(framework::config::Parameters &parameters) override
Callback for the processor to configure itself from the given set of parameters.
int integration_window_
If > 0: integrate a fixed window starting at sample_of_interest_ If <= 0: integrate all samples.
void readCalib(const std::string &filename, std::vector< double > *gains, std::vector< double > *pedestals)
Read per-channel gains and pedestals from a calibration file.
std::vector< double > pedestals_
Per-channel pedestals read from the calibration file.
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.
int sample_of_interest_
Total number of photoelectrons per MIP.
bool use_calib_file_
If true, read per-channel gains/pedestals from calib_file_.
std::vector< double > gains_
Per-channel gains read from the calibration file.