LDMX Software
TrigScintFirmwareTracker.h
Go to the documentation of this file.
1
8#ifndef TRIGSCINT_TRIGSCINTFIRMWARETRACKER_H
9#define TRIGSCINT_TRIGSCINTFIRMWARETRACKER_H
10
11// LDMX Framework
12#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
13#include "Framework/Event.h"
14#include "Framework/EventProcessor.h" //Needed to declare processor
16#include "TrigScint/Event/TrigScintHit.h"
17#include "TrigScint/Event/TrigScintTrack.h"
18#include "TrigScint/Firmware/objdef.h"
20
21namespace trigscint {
22
28 public:
29 TrigScintFirmwareTracker(const std::string& name, framework::Process& process)
30 : Producer(name, process) {}
31
33
34 void produce(framework::Event& event) override;
35
36 ldmx::TrigScintTrack makeTrack(Track outTrk);
37
42 private:
43 // min threshold for adding a hit to a cluster
44 double minThr_{0.};
45
46 // max number of neighboring hits to combine when forming a cluster
47 int maxWidth_{2};
48
49 // specific verbosity of this producer
50 int verbose_{0};
51
52 // expected arrival time of hits in the pad [ns]
53 double padTime_{0.};
54
55 // maximum allowed delay for hits to be considered for clustering
56 double timeTolerance_{0.};
57
58 // output collection (clusters)
59 std::string output_collection_;
60
61 // input collection (hits)
62 std::string digis1_collection_;
63 std::string digis2_collection_;
64 std::string digis3_collection_;
65
66 std::vector<ldmx::TrigScintTrack> tracks_;
67
68 // specific pass name to use for track making
69 std::string passName_{""};
70
71 // vertical bar start index
72 int vertBarStartIdx_{52};
73
74 // cluster channel nb centroid (will be content weighted)
75 float centroid_{0.};
76
77 // cluster channel nb horizontal centroid (will be content weighted)
78 float centroidX_{-1};
79
80 // cluster channel nb vertical centroid (will be content weighted)
81 float centroidY_{-1};
82
83 // energy (edep), PE, or sth
84 float val_{0.};
85
86 // edep content, only; leave val_ for PE
87 float valE_{0.};
88
89 // book keep which channels have already been added to the cluster at hand
90 std::vector<unsigned int> v_addedIndices_;
91
92 // book keep which channels have already been added to any cluster
93 std::vector<unsigned int> v_usedIndices_;
94
95 // fraction of cluster energy deposition associated with beam electron sim
96 // hits
97 float beamE_{0.};
98
99 // cluster time (energy weighted based on hit time)
100 float time_{0.};
101
102 // empty map container
103 std::map<int, int> hitChannelMap_;
104};
105
106} // namespace trigscint
107
108#endif /* TRIGSCINT_TRIGSCINTFIRMWARETRACKER_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.
Tracker made to emulate and stage real firmware, emulates existing ldmx software but has LUT structur...
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
Represents a track of trigger scintillator clusters.
void produce(framework::Event &event) override
Process the event and put new data products into it.
double minThr_
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.