Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JORCAShowerReconstruction.hh
Go to the documentation of this file.
1#ifndef __JRECONSTRUCTION__JORCASHOWERRECONSTRUCTION__
2#define __JRECONSTRUCTION__JORCASHOWERRECONSTRUCTION__
3
4#include <string>
5#include <iomanip>
6
9
23
24
25#include "Jeep/JProperties.hh"
26
27/**
28 * \author mdejong
29 */
30
31namespace JRECONSTRUCTION {}
32namespace JPP { using namespace JRECONSTRUCTION; }
33
34namespace JRECONSTRUCTION {
35
36 /**
37 * ORCA shower reconstruction.
38 */
40 /**
41 * Parameters.
42 */
67
68
69 /**
70 * Storage for PDFs.
71 */
72 struct JStorage_t {
73 /**
74 * Constructor.
75 *
76 * \param fileDescriptor PDF file descriptor
77 * \param parameters parameters
78 */
79 JStorage_t(const std::string& fileDescriptor,
80 const JParameters_t& parameters) :
81 position (fileDescriptor, JTimeRange(parameters.position .TMin_ns, parameters.position .TMax_ns), parameters.position.TTS_ns),
82 direction(fileDescriptor, JTimeRange(parameters.direction.TMin_ns, parameters.direction.TMax_ns)),
83 fit (fileDescriptor, JTimeRange(parameters.fit .TMin_ns, parameters.fit .TMax_ns)),
84 features (fileDescriptor, JTimeRange(parameters.features .TMin_ns, parameters.features .TMax_ns))
85 {}
86
87 JShowerPositionFit ::storage_type position;
88 JShowerDirectionPrefit::storage_type direction;
89 JShowerFit ::storage_type fit;
90 JShowerFeatures ::storage_type features;
91 };
92
93
94 /**
95 * Input data type.
96 */
97 struct input_type :
98 public JDAQEventHeader
99 {
100 /**
101 * Default constructor.
102 */
104 {}
105
106
107 /**
108 * Constructor.
109 *
110 * \param header header
111 */
113 JDAQEventHeader(header)
114 {}
115
116 JShowerPrefit ::input_type prefit;
117 JShowerPointSimplex ::input_type simplex;
118 JShowerPositionFit ::input_type position;
120 JShowerFit ::input_type fit;
121 JShowerFeatures ::input_type features;
122
123 };
124
125
126 /**
127 * Constructor.
128 *
129 * \param parameters parameters
130 * \param storage storage
131 * \param pmtParameters PMT parameters
132 * \param correct energy correction
133 * \param debug debug
134 */
136 const JStorage_t& storage,
137 const JPMTParametersMap& pmtParameters,
138 const JEnergyCorrection& correct,
139 const int debug) :
140 prefit (parameters.prefit, debug),
141 simplex (parameters.simplex, debug),
142 position (parameters.position, storage.position, pmtParameters, debug),
143 direction(parameters.direction, storage.direction, pmtParameters, debug),
144 fit (parameters.fit, storage.fit, pmtParameters, correct, debug),
145 features (parameters.features, storage.features, pmtParameters, debug)
146 {}
147
148
149 /**
150 * Get input data.
151 *
152 * \param router module router
153 * \param summary summary data
154 * \param event event
155 * \param coverage coverage
156 * \return input data
157 */
159 const JSummaryRouter& summary,
160 const JDAQEvent& event,
161 const coverage_type& coverage) const
162 {
163 input_type input(event.getDAQEventHeader());
164
165 input.prefit = prefit .getInput(router, event, coverage);
166 input.simplex = simplex .getInput(router, event, JEvt(), coverage);
167 input.position = position .getInput(router, summary, event, JEvt(), coverage);
168 input.direction = direction.getInput(router, summary, event, JEvt(), coverage);
169 input.fit = fit .getInput(router, summary, event, JEvt(), coverage);
170 input.features = features .getInput(router, summary, event, JEvt(), coverage);
171
172 return input;
173 }
174
175
176 /**
177 * Fit function.
178 *
179 * \param input input data
180 * \return fit results
181 */
183 {
184 std::vector<int> apps;
185
186 input.simplex.in = prefit(input.prefit);
187
188 apps.push_back(JSHOWERPREFIT);
189
190 input.position.in = simplex(input.simplex);
191
192 apps.push_back(JSHOWERPOINTSIMPLEX);
193
194 input.direction.in = position(input.position);
195
196 apps.push_back(JSHOWERPOSITIONFIT);
197
198 input.fit.in = direction(input.direction);
199
200 apps.push_back(JSHOWERDIRECTIONPREFIT);
201
202 input.features.in = fit(input.fit);
203
204 apps.push_back(JSHOWERCOMPLETEFIT);
205
206 JEvt out = features(input.features);
207
208 apps.push_back(JSHOWERFEATURES);
209
210 for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
211 i->setStatus(i->getHistory().getStatus(apps) ? COMPLETE_CHAIN : INCOMPLETE_CHAIN);
212 }
213
214 return out;
215 }
216
217
224
225 };
226}
227
228#endif
int debug
debug level
Definition JSirene.cc:74
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.
Auxiliary class for map of PMT parameters.
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.
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
class to handle the direction fit of the shower reconstruction, mainly dedicated for ORCA
Definition JShowerFit.hh:68
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
class to handle the second position fit of the shower reconstruction, mainly dedicated for ORCA
input_type getInput(const JModuleRouter &router, const KM3NETDAQ::JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
class to handle the second position fit of the shower reconstruction, mainly dedicated for ORCA
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
class to handle first step of the shower reconstruction in ORCA: it reconstructs the shower vertex,...
input_type getInput(const JModuleRouter &router, const KM3NETDAQ::JDAQEvent &event, 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.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Data structure for coverage of detector by dynamical calibrations.
Definition JCoverage.hh:19
JStorage_t(const std::string &fileDescriptor, const JParameters_t &parameters)
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.
JORCAShowerReconstruction(const JParameters_t &parameters, const JStorage_t &storage, const JPMTParametersMap &pmtParameters, const JEnergyCorrection &correct, const int debug)
Constructor.
Wrapper class to add features after the final fit of shower.
input_type getInput(const JModuleRouter &router, const JSummaryRouter &summary, const JDAQEvent &event, const JEvt &in, const coverage_type &coverage) const
Get input data.
Data structure for fit parameters.