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
16#include "TrigScint/Event/TrigScintCluster.h"
17
18namespace trigscint {
19
25 public:
26 TestBeamClusterProducer(const std::string& name, framework::Process& process)
27 : Producer(name, process) {}
28
30
31 virtual void produce(framework::Event& event);
32
36 virtual void addHit(uint idx, trigscint::TestBeamHit hit);
37
38 virtual void onProcessStart();
39
40 virtual void onProcessEnd();
41
42 private:
43 // collection of clusters produced
44 std::vector<ldmx::TrigScintCluster> clusters_;
45
46 // cluster seeding threshold
47 double seed_{0.};
48
49 // min threshold for adding a hit to a cluster
50 double minThr_{0.};
51
52 // max number of neighboring hits to combine when forming a cluster
53 int maxWidth_{2};
54
55 // max channel number (to avoid unused channels)
56 int maxChannelID_{11};
57
58 // specific verbosity of this producer
59 int verbose_{0};
60
61 // expected arrival time of hits in the pad [ns]
62 double padTime_{0.};
63
64 // maximum allowed delay for hits to be considered for clustering
65 double timeTolerance_{0.};
66
67 // input collection (hits)
68 std::string input_collection_;
69
70 // output collection (clusters)
71 std::string output_collection_;
72
73 // specific pass name to use for track making
74 std::string passName_{""};
75
76 // cluster channel nb centroid (will be content weighted)
77 float centroid_{0.};
78
79 // energy (edep), PE, or sth
80 float val_{0.};
81
82 // edep content, only; leave val_ for PE
83 float valE_{0.};
84
85 // book keep which channels have already been added to the cluster at hand
86 std::vector<unsigned int> v_addedIndices_;
87
88 // book keep which channels have already been added to any cluster
89 std::vector<unsigned int> v_usedIndices_;
90
91 // fraction of cluster energy deposition associated with beam electron sim
92 // hits
93 // -- could convert this to instead be a "cleanb frac"; fraction of cluster
94 // energy coming from clean hits
95 float beamE_{0.};
96
99 bool doCleanHits_{false};
100
101 // cluster time (energy weighted based on hit time)
102 float time_{0.};
103
104 // empty map container
105 std::map<int, int> hitChannelMap_;
106};
107
108} // namespace trigscint
109
110#endif /* TRIGSCINT_TESTBEAMCLUSTERPRODUCER_H */
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.
Class that stores full reconstructed (linearized) readout QIE sample from the TS.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class which represents the process under execution.
Definition Process.h:36
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
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.
bool doCleanHits_
boolean indicating whether we want to apply quality criteria from hit reconstruction
virtual void onProcessStart()
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
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