LDMX Software
TrigScintTrackProducer.h
1
2#ifndef TRIGSCINT_TRIGSCINTTRACKPRODUCER_H
3#define TRIGSCINT_TRIGSCINTTRACKPRODUCER_H
4
5// LDMX Framework
6#include "Framework/Configure/Parameters.h" // Needed to import parameters from configuration file
7#include "Framework/Event.h"
8#include "Framework/EventProcessor.h" //Needed to declare processor
10#include "TrigScint/Event/TrigScintCluster.h"
11#include "TrigScint/Event/TrigScintTrack.h"
12
13namespace trigscint {
14
20 public:
21 TrigScintTrackProducer(const std::string &name, framework::Process &process)
22 : Producer(name, process) {}
23
25
26 void produce(framework::Event &event) override;
27
28 void onProcessStart() override;
29 void onProcessEnd() override;
30
31 private:
32 // collection of produced tracks
33 std::vector<ldmx::TrigScintTrack> tracks_;
34
35 // add a cluster to a track
36 ldmx::TrigScintTrack makeTrack(std::vector<ldmx::TrigScintCluster> clusters);
37
38 // match x, y tracks and set their x,y spatial coordinates
39 void matchXYTracks(std::vector<ldmx::TrigScintTrack> &tracks);
40 // std::vector<ldmx::TrigScintTrack> matchXYTracks(
41 // std::vector<ldmx::TrigScintTrack> &tracks);
42
43 // maximum difference (in channel number space) between track seed and cluster
44 // in the next pad tolerated to form a track
45 double maxDelta_{0.};
46
47 // producer specific verbosity
48 int verbose_{0};
49
50 // collection used to seed the tracks
51 std::string seeding_collection_;
52
53 // other cluster collections used in track making
54 std::vector<std::string> input_collections_;
55
56 // output collection (tracks)
57 std::string output_collection_;
58
59 // specific pass name to use for track making
60 std::string passName_{""};
61
62 // allow forming tracks without match in the last collection
63 bool skipLast_{false};
64
65 // vertical bar start index
66 int vertBarStartIdx_{52};
67
68 // number of horizontal bars (one layer) in geometry
69 int nBarsY_{16};
70
71 // number of vertical bars (one row) in geometry
72 int nBarsX_{8};
73
74 // track centroid in units of channel nb (will not be content weighted)
75 // float centroid_{0.};
76
77 // track horizontal centroid in units of channel nb (will not be content
78 // weighted)
79 // float centroidX_{-1};
80
81 // track vertical centroid in units of channel nb (will not be content
82 // weighted)
83 // float centroidY_{-1};
84
85 // track residual in units of channel nb (will not be content weighted)
86 // float residual_{0.};
87
88 float barWidth_y_{3.}; // mm
89 float barGap_y_{2.1}; // mm
90 float barWidth_x_{3.}; // mm
91 float barGap_x_{0.1}; // mm
92
93 float xConvFactor_; // geometry conversion factors
94 float xStart_;
95 float yConvFactor_;
96 float yStart_;
97};
98
99} // namespace trigscint
100
101#endif // TRIGSCINT_TRIGSCINTTRACKPRODUCER_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
Represents a track of trigger scintillator clusters.
making tracks from trigger scintillator clusters
void configure(framework::config::Parameters &ps) override
Callback for the EventProcessor to configure itself from the given set of parameters.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void produce(framework::Event &event) override
Process the event and put new data products into it.
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...