LDMX Software
TestBeamClusterProducer.h
Go to the documentation of this file.
1
7#ifndef TRIGSCINT_TESTBEAMCLUSTERPRODUCER_H
8#define TRIGSCINT_TESTBEAMCLUSTERPRODUCER_H
9
10// LDMX Framework
11#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
12#include "Framework/Event.h"
13#include "Framework/EventProcessor.h" //Needed to declare processor
15#include "TrigScint/Event/TrigScintCluster.h"
16
17namespace trigscint {
18
24 public:
25 TestBeamClusterProducer(const std::string& name, framework::Process& process)
26 : Producer(name, process) {}
27
29
30 virtual void produce(framework::Event& event);
31
35 virtual void addHit(uint idx, trigscint::TestBeamHit hit);
36
37 virtual void onProcessStart();
38
39 virtual void onProcessEnd();
40
41 private:
42 // collection of clusters produced
43 std::vector<ldmx::TrigScintCluster> clusters_;
44
45 // cluster seeding threshold
46 double seed_{0.};
47
48 // min threshold for adding a hit to a cluster
49 double min_thr_{0.};
50
51 // max number of neighboring hits to combine when forming a cluster
52 int max_width_{2};
53
54 // max channel number (to avoid unused channels)
55 int max_channel_id_{11};
56
57 // specific verbosity of this producer
58 int verbose_{0};
59
60 // expected arrival time of hits in the pad [ns]
61 double pad_time_{0.};
62
63 // maximum allowed delay for hits to be considered for clustering
64 double time_tolerance_{0.};
65
66 // input collection (hits)
67 std::string input_collection_;
68
69 // output collection (clusters)
70 std::string output_collection_;
71
72 // specific pass name to use for track making
73 std::string pass_name_{""};
74
75 // cluster channel nb centroid (will be content weighted)
76 float centroid_{0.};
77
78 // energy (edep), PE, or sth
79 float val_{0.};
80
81 // edep content, only; leave val_ for PE
82 float val_e_{0.};
83
84 // book keep which channels have already been added to the cluster at hand
85 std::vector<unsigned int> v_added_indices_;
86
87 // book keep which channels have already been added to any cluster
88 std::vector<unsigned int> v_used_indices_;
89
90 // fraction of cluster energy deposition associated with beam electron sim
91 // hits
92 // -- could convert this to instead be a "cleanb frac"; fraction of cluster
93 // energy coming from clean hits
94 float beam_e_{0.};
95
98 bool do_clean_hits_{false};
99
100 // cluster time (energy weighted based on hit time)
101 float time_{0.};
102
103 // empty map container
104 std::map<int, int> hit_channel_map_;
105};
106
107} // namespace trigscint
108
109#endif /* TRIGSCINT_TESTBEAMCLUSTERPRODUCER_H */
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
Class that stores full reconstructed (linearized) readout QIE sample from the TS.
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.
Producer(const std::string &name, Process &process)
Class constructor.
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
virtual void configure(framework::config::Parameters &ps)
Callback for the EventProcessor to configure itself from the given set of parameters.
virtual void produce(framework::Event &event)
Process the event and put new data products into it.
virtual void onProcessStart()
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
bool do_clean_hits_
boolean indicating whether we want to apply quality criteria from hit reconstruction
virtual void addHit(uint idx, trigscint::TestBeamHit hit)
add a hit at index idx to a cluster
virtual void onProcessEnd()
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
This class represents the linearised QIE output from the trigger scintillator, in charge (fC).
Definition TestBeamHit.h:24