LDMX Software
TrigScintClusterProducer.h
Go to the documentation of this file.
1
7#ifndef TRIGSCINT_TRIGSCINTCLUSTERPRODUCER_H
8#define TRIGSCINT_TRIGSCINTCLUSTERPRODUCER_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#include "TrigScint/Event/TrigScintHit.h"
17
18namespace trigscint {
19
25 public:
26 TrigScintClusterProducer(const std::string& name, framework::Process& process)
27 : Producer(name, process) {}
28
30
31 void produce(framework::Event& event) override;
32
36 virtual void addHit(uint idx, ldmx::TrigScintHit hit);
37
38 void onProcessStart() override;
39
40 void onProcessEnd() override;
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 // specific verbosity of this producer
56 int verbose_{0};
57
58 // expected arrival time of hits in the pad [ns]
59 double padTime_{0.};
60
61 // maximum allowed delay for hits to be considered for clustering
62 double timeTolerance_{0.};
63
64 // input collection (hits)
65 std::string input_collection_;
66
67 // output collection (clusters)
68 std::string output_collection_;
69
70 // specific pass name to use for track making
71 std::string passName_{""};
72
73 // vertical bar start index
74 int vertBarStartIdx_{52};
75
76 // cluster channel nb centroid (will be content weighted)
77 float centroid_{0.};
78
79 // cluster channel nb horizontal centroid (will be content weighted)
80 float centroidX_{-1};
81
82 // cluster channel nb vertical centroid (will be content weighted)
83 float centroidY_{-1};
84
85 // energy (edep), PE, or sth
86 float val_{0.};
87
88 // edep content, only; leave val_ for PE
89 float valE_{0.};
90
91 // book keep which channels have already been added to the cluster at hand
92 std::vector<unsigned int> v_addedIndices_;
93
94 // book keep which channels have already been added to any cluster
95 std::vector<unsigned int> v_usedIndices_;
96
97 // fraction of cluster energy deposition associated with beam electron sim
98 // hits
99 float beamE_{0.};
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_TRIGSCINTCLUSTERPRODUCER_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.
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
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
void produce(framework::Event &event) override
Process the event and put new data products into it.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
virtual void addHit(uint idx, ldmx::TrigScintHit hit)
add a hit at index idx to a cluster
void configure(framework::config::Parameters &ps) override
Callback for the EventProcessor to configure itself from the given set of parameters.