Jpp test-rotations-old-57-g407471f53
the software that should make you happy
Loading...
Searching...
No Matches
JORCAMuonReconstruction.hh
Go to the documentation of this file.
1#ifndef __JRECONSTRUCTION__JORCAMUONRECONSTRUCTION__
2#define __JRECONSTRUCTION__JORCAMUONRECONSTRUCTION__
3
4#include <string>
5#include <iomanip>
6
9
23
24#include "Jeep/JProperties.hh"
25
26/**
27 * \author mdejong
28 */
29
30namespace JRECONSTRUCTION {}
31namespace JPP { using namespace JRECONSTRUCTION; }
32
33namespace JRECONSTRUCTION {
34
35 /**
36 * ORCA muon reconstruction.
37 */
39 /**
40 * Parameters.
41 */
68
69
70 /**
71 * Storage for PDFs.
72 */
73 struct JStorage_t {
74 /**
75 * Constructor.
76 *
77 * \param fileDescriptor PDF file descriptor
78 * \param parameters parameters
79 */
80 JStorage_t(const std::string& fileDescriptor,
81 const JParameters_t& parameters) :
82 gandalf(fileDescriptor, JTimeRange(parameters.gandalf.TMin_ns, parameters.gandalf.TMax_ns), parameters.gandalf.TTS_ns),
83 start (fileDescriptor, JTimeRange(parameters.start .TMin_ns, parameters.start .TMax_ns)),
84 energy (fileDescriptor, JTimeRange(parameters.energy .TMin_ns, parameters.energy .TMax_ns)),
85 start2 (fileDescriptor, JTimeRange(parameters.start2 .TMin_ns, parameters.start2 .TMax_ns)),
86 features(fileDescriptor, JTimeRange(parameters.features.TMin_ns, parameters.features.TMax_ns), parameters.features.TTS_ns)
87 {}
88
89 JMuonGandalf::storage_type gandalf;
90 JMuonStart ::storage_type start;
91 JMuonEnergy ::storage_type energy;
92 JMuonStart ::storage_type start2;
93 JMuonGandalf::storage_type features;
94 };
95
96
97 /**
98 * Input data type.
99 */
100 struct input_type :
101 public JDAQEventHeader
102 {
103 /**
104 * Default constructor.
105 */
107 {}
108
109
110 /**
111 * Constructor.
112 *
113 * \param header header
114 */
116 JDAQEventHeader(header)
117 {}
118
119 JMuonPrefit ::input_type prefit;
121 JMuonStart ::input_type start;
123 JMuonStart ::input_type start2;
124 JMuonEnergy ::input_type energy;
126 };
127
128
129 /**
130 * Constructor.
131 *
132 * \param parameters parameters
133 * \param storage storage
134 * \param rates_Hz K40 rates [Hz]
135 * \param correct energy correction
136 * \param debug debug
137 */
139 const JStorage_t& storage,
140 const JK40Rates& rates_Hz,
141 const JEnergyCorrection& correct,
142 const int debug) :
143 prefit (parameters.prefit, debug),
144 simplex(parameters.simplex, debug),
145 start (parameters.start, storage.start, rates_Hz, debug),
146 gandalf(parameters.gandalf, storage.gandalf, debug),
147 start2 (parameters.start2, storage.start2, rates_Hz, debug),
148 energy (parameters.energy, storage.energy, correct, debug),
149 features(parameters.features, storage.features, debug)
150 {}
151
152
153 /**
154 * Get input data.
155 *
156 * \param router module router
157 * \param summary summary data
158 * \param event event
159 * \param coverage coverage
160 * \return input data
161 */
163 const JSummaryRouter& summary,
164 const JDAQEvent& event,
165 const coverage_type& coverage) const
166 {
167 input_type input(event.getDAQEventHeader());
168
169 input.prefit = prefit .getInput(router, event, coverage);
170 input.simplex = simplex.getInput(router, event, JEvt(), coverage);
171 input.start = start .getInput(router, summary, event, JEvt(), coverage);
172 input.gandalf = gandalf.getInput(router, summary, event, JEvt(), coverage);
173 input.start2 = start2 .getInput(router, summary, event, JEvt(), coverage);
174 input.energy = energy .getInput(router, summary, event, JEvt(), coverage);
175 input.features = features.getInput(router, summary, event, JEvt(), coverage);
176
177 return input;
178 }
179
180
181 /**
182 * Fit function.
183 *
184 * \param input input data
185 * \return fit results
186 */
188 {
189 std::vector<int> apps;
190
191 input.simplex.in = prefit(input.prefit);
192
193 apps.push_back(JMUONPREFIT);
194
195 input.start.in = simplex(input.simplex);
196
197 apps.push_back(JMUONSIMPLEX);
198
199 input.gandalf.in = start(input.start);
200
201 apps.push_back(JMUONSTART);
202
203 input.start2.in = gandalf(input.gandalf);
204
205 apps.push_back(JMUONGANDALF);
206
207 input.energy.in = start(input.start2);
208
209 apps.push_back(JMUONSTART);
210
211 input.features.in= energy(input.energy);
212
213 apps.push_back(JMUONENERGY);
214
215 JEvt out = features(input.features);
216
217 apps.push_back(JMUONFEATURES);
218
219 for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
220 i->setStatus(i->getHistory().getStatus(apps) ? COMPLETE_CHAIN : INCOMPLETE_CHAIN);
221 }
222
223 return out;
224 }
225
233 };
234}
235
236#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
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.
JStorage_t(const std::string &fileDescriptor, const JParameters_t &parameters)
Constructor.
input_type(const JDAQEventHeader &header)
Constructor.
JORCAMuonReconstruction(const JParameters_t &parameters, const JStorage_t &storage, const JK40Rates &rates_Hz, const JEnergyCorrection &correct, const int debug)
Constructor.
JEvt operator()(input_type &input)
Fit function.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const coverage_type &coverage) const
Get input data.