Jpp 19.3.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
22
23#include "Jeep/JProperties.hh"
24
25/**
26 * \author mdejong
27 */
28
29namespace JRECONSTRUCTION {}
30namespace JPP { using namespace JRECONSTRUCTION; }
31
32namespace JRECONSTRUCTION {
33
34 /**
35 * ORCA shower reconstruction.
36 */
38 /**
39 * Parameters.
40 */
63
64
65 /**
66 * Storage for PDFs.
67 */
68 struct JStorage_t {
69 /**
70 * Constructor.
71 *
72 * \param fileDescriptor PDF file descriptor
73 * \param parameters parameters
74 */
75 JStorage_t(const std::string& fileDescriptor,
76 const JParameters_t& parameters) :
77 position (fileDescriptor, parameters.position.TTS_ns),
78 direction(fileDescriptor),
79 fit (fileDescriptor)
80 {}
81
82 JShowerPositionFit ::storage_type position;
83 JShowerDirectionPrefit::storage_type direction;
84 JShowerFit ::storage_type fit;
85 };
86
87
88 /**
89 * Input data type.
90 */
91 struct input_type :
92 public JDAQEventHeader
93 {
94 /**
95 * Default constructor.
96 */
98 {}
99
100
101 /**
102 * Constructor.
103 *
104 * \param header header
105 */
107 JDAQEventHeader(header)
108 {}
109
110 JShowerPrefit ::input_type prefit;
111 JShowerPointSimplex ::input_type simplex;
112 JShowerPositionFit ::input_type position;
114 JShowerFit ::input_type fit;
115 };
116
117
118 /**
119 * Constructor.
120 *
121 * \param parameters parameters
122 * \param storage storage
123 * \param correct energy correction
124 * \param debug debug
125 */
127 const JStorage_t& storage,
128 const JShowerEnergyCorrection& correct,
129 const int debug) :
130 prefit (parameters.prefit, debug),
131 simplex (parameters.simplex, debug),
132 position (parameters.position, storage.position, debug),
133 direction(parameters.direction, storage.direction, debug),
134 fit (parameters.fit, storage.fit, correct, debug)
135 {}
136
137
138 /**
139 * Get input data.
140 *
141 * \param router module router
142 * \param summary summary data
143 * \param event event
144 * \param coverage coverage
145 * \return input data
146 */
148 const JSummaryRouter& summary,
149 const JDAQEvent& event,
150 const coverage_type& coverage) const
151 {
152 input_type input(event.getDAQEventHeader());
153
154 input.prefit = prefit .getInput(router, event, coverage);
155 input.simplex = simplex .getInput(router, event, JEvt(), coverage);
156 input.position = position .getInput(router, summary, event, JEvt(), coverage);
157 input.direction = direction.getInput(router, summary, event, JEvt(), coverage);
158 input.fit = fit .getInput(router, summary, event, JEvt(), coverage);
159
160 return input;
161 }
162
163
164 /**
165 * Fit function.
166 *
167 * \param input input data
168 * \return fit results
169 */
171 {
172 std::vector<int> apps;
173
174 JEvt out;
175
176 {
177 out = prefit(input.prefit);
178
179 apps.push_back(JSHOWERPREFIT);
180 }
181 {
182 input.simplex.in = out;
183
184 out = simplex(input.simplex);
185
186 apps.push_back(JSHOWERPOINTSIMPLEX);
187 }
188 {
189 input.position.in = out;
190
191 out = position(input.position);
192
193 apps.push_back(JSHOWERPOSITIONFIT);
194 }
195 {
196 input.direction.in = out;
197
198 out = direction(input.direction);
199
200 apps.push_back(JSHOWERDIRECTIONPREFIT);
201 }
202 {
203 input.fit.in = out;
204
205 out = fit(input.fit);
206
207 apps.push_back(JSHOWERCOMPLETEFIT);
208 }
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
215 return out;
216 }
217
218
224 };
225}
226
227#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.
Auxiliary class for correction of energy determined by JShowerEnergy.cc.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
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:81
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.
static const int JSHOWERPOSITIONFIT
static const int JSHOWERDIRECTIONPREFIT
static const int JSHOWERPOINTSIMPLEX
static const int JSHOWERCOMPLETEFIT
static const int JSHOWERPREFIT
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
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 JShowerEnergyCorrection &correct, const int debug)
Constructor.
Data structure for fit parameters.