Jpp 19.3.0-rc.4
the software that should make you happy
Loading...
Searching...
No Matches
JARCAMuonReconstruction.hh
Go to the documentation of this file.
1#ifndef __JRECONSTRUCTION__JARCAMUONRECONSTRUCTION__
2#define __JRECONSTRUCTION__JARCAMUONRECONSTRUCTION__
3
4#include <string>
5#include <iomanip>
6
9
23
24#include "Jeep/JProperties.hh"
25
26
27/**
28 * \author mdejong
29 */
30
31namespace JRECONSTRUCTION {}
32namespace JPP { using namespace JRECONSTRUCTION; }
33
34namespace JRECONSTRUCTION {
35
36 /**
37 * ARCA muon reconstruction.
38 */
40 /**
41 * Parameters.
42 */
65
66
67 /**
68 * Storage for PDFs.
69 */
70 struct JStorage_t {
71 /**
72 * Constructor.
73 *
74 * \param fileDescriptor PDF file descriptor
75 * \param parameters parameters
76 */
77 JStorage_t(const std::string& fileDescriptor,
78 const JParameters_t& parameters) :
79 gandalf(fileDescriptor, JTimeRange(parameters.gandalf.TMin_ns, parameters.gandalf.TMax_ns), parameters.gandalf.TTS_ns),
80 start (fileDescriptor, JTimeRange(parameters.start .TMin_ns, parameters.start .TMax_ns)),
81 energy (fileDescriptor, JTimeRange(parameters.energy .TMin_ns, parameters.energy .TMax_ns))
82 {}
83
84 JMuonGandalf::storage_type gandalf;
85 JMuonStart ::storage_type start;
86 JMuonEnergy ::storage_type energy;
87 };
88
89
90 /**
91 * Input data type.
92 */
93 struct input_type :
94 public JDAQEventHeader
95 {
96 /**
97 * Default constructor.
98 */
100 {}
101
102
103 /**
104 * Constructor.
105 *
106 * \param header header
107 */
109 JDAQEventHeader(header)
110 {}
111
112 JMuonPrefit ::input_type prefit;
113 JMuonSimplex ::input_type simplex;
114 JMuonGandalf ::input_type gandalf;
115 JMuonStart ::input_type start;
116 JMuonEnergy ::input_type energy;
118 };
119
120
121 /**
122 * Constructor.
123 *
124 * \param parameters parameters
125 * \param storage storage
126 * \param rates_Hz K40 rates [Hz]
127 * \param correct energy correction
128 * \param debug debug
129 */
131 const JStorage_t& storage,
132 const JK40Rates& rates_Hz,
133 const JEnergyCorrection& correct,
134 const int debug) :
135 prefit (parameters.prefit, debug),
136 simplex (parameters.simplex, debug),
137 gandalf (parameters.gandalf, storage.gandalf, debug),
138 start (parameters.start, storage.start, rates_Hz, debug),
139 energy (parameters.energy, storage.energy, correct, debug),
140 features(parameters.gandalf, storage.gandalf, debug)
141 {}
142
143
144 /**
145 * Get input data.
146 *
147 * \param router module router
148 * \param summary summary data
149 * \param event event
150 * \param coverage coverage
151 * \return input data
152 */
154 const JSummaryRouter& summary,
155 const JDAQEvent& event,
156 const coverage_type& coverage) const
157 {
158 input_type input(event.getDAQEventHeader());
159
160 input.prefit = prefit .getInput(router, event, coverage);
161 input.simplex = simplex .getInput(router, event, JEvt(), coverage);
162 input.gandalf = gandalf .getInput(router, summary, event, JEvt(), coverage);
163 input.start = start .getInput(router, summary, event, JEvt(), coverage);
164 input.energy = energy .getInput(router, summary, event, JEvt(), coverage);
165 input.features = features.getInput(router, summary, event, JEvt(), coverage);
166
167 return input;
168 }
169
170
171 /**
172 * Fit function.
173 *
174 * \param input input data
175 * \return fit results
176 */
178 {
179 std::vector<int> apps;
180
181 input.simplex.in = prefit(input.prefit);
182
183 apps.push_back(JMUONPREFIT);
184
185 input.gandalf.in = simplex(input.simplex);
186
187 apps.push_back(JMUONSIMPLEX);
188
189 input.start.in = gandalf(input.gandalf);
190
191 apps.push_back(JMUONGANDALF);
192
193 input.energy.in = start(input.start);
194
195 apps.push_back(JMUONSTART);
196
197 input.features.in= energy(input.energy);
198
199 apps.push_back(JMUONENERGY);
200
201 JEvt out = features(input.features);
202
203 apps.push_back(JMUONFEATURES);
204
205 for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
206 i->setStatus(i->getHistory().getStatus(apps) ? COMPLETE_CHAIN : INCOMPLETE_CHAIN);
207 }
208
209 return out;
210 }
211
218 };
219}
220
221#endif
int debug
debug level
Definition JSirene.cc:72
Utility class to parse parameter values.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Router for direct addressing of module data in detector data structure.
Utility class to parse parameter values.
Data structure for set of track fit results.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Auxiliary class for correction of energy determined by JEnergy.cc.
Auxiliary class to to determine muon energy.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Auxiliary class to determine start and end position of muon trajectory.
Definition JMuonStart.hh:76
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
const JDAQEventHeader & getDAQEventHeader() const
Get DAQ event header.
static const int JMUONFEATURES
static const int JMUONGANDALF
static const int JMUONPREFIT
static const int JMUONENERGY
static const int JMUONSIMPLEX
static const int JMUONSTART
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Model fits to data.
Data structure for coverage of detector by dynamical calibrations.
Definition JCoverage.hh:19
Auxiliary class for K40 rates.
Definition JK40Rates.hh:41
JStorage_t(const std::string &fileDescriptor, const JParameters_t &parameters)
Constructor.
input_type(const JDAQEventHeader &header)
Constructor.
JEvt operator()(input_type &input)
Fit function.
JARCAMuonReconstruction(const JParameters_t &parameters, const JStorage_t &storage, const JK40Rates &rates_Hz, const JEnergyCorrection &correct, const int debug)
Constructor.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const coverage_type &coverage) const
Get input data.
Wrapper class to add features after the final fit of muon trajectory.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Wrapper class to make final fit of muon trajectory.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Wrapper class to make pre-fit of muon trajectory.
input_type getInput(const JModuleRouter &router, const JDAQEvent &event, const coverage_type &coverage) const
Get input data.
Wrapper class to make intermediate fit of muon trajectory.
input_type getInput(const JModuleRouter &router, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Data structure for fit parameters.