Jpp 20.0.0-195-g190c9e876
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, JTimeRange(parameters.position .TMin_ns, parameters.position .TMax_ns), parameters.position.TTS_ns),
78 direction(fileDescriptor, JTimeRange(parameters.direction.TMin_ns, parameters.direction.TMax_ns)),
79 fit (fileDescriptor, JTimeRange(parameters.fit .TMin_ns, parameters.fit .TMax_ns))
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 pmtParameters PMT parameters
124 * \param correct energy correction
125 * \param debug debug
126 */
128 const JStorage_t& storage,
129 const JPMTParametersMap& pmtParameters,
130 const JEnergyCorrection& correct,
131 const int debug) :
132 prefit (parameters.prefit, debug),
133 simplex (parameters.simplex, debug),
134 position (parameters.position, storage.position, pmtParameters, debug),
135 direction(parameters.direction, storage.direction, pmtParameters, debug),
136 fit (parameters.fit, storage.fit, pmtParameters, correct, debug)
137 {}
138
139
140 /**
141 * Get input data.
142 *
143 * \param router module router
144 * \param summary summary data
145 * \param event event
146 * \param coverage coverage
147 * \return input data
148 */
150 const JSummaryRouter& summary,
151 const JDAQEvent& event,
152 const coverage_type& coverage) const
153 {
154 input_type input(event.getDAQEventHeader());
155
156 input.prefit = prefit .getInput(router, event, coverage);
157 input.simplex = simplex .getInput(router, event, JEvt(), coverage);
158 input.position = position .getInput(router, summary, event, JEvt(), coverage);
159 input.direction = direction.getInput(router, summary, event, JEvt(), coverage);
160 input.fit = fit .getInput(router, summary, event, JEvt(), coverage);
161
162 return input;
163 }
164
165
166 /**
167 * Fit function.
168 *
169 * \param input input data
170 * \return fit results
171 */
173 {
174 std::vector<int> apps;
175
176 input.simplex.in = prefit(input.prefit);
177
178 apps.push_back(JSHOWERPREFIT);
179
180 input.position.in = simplex(input.simplex);
181
182 apps.push_back(JSHOWERPOINTSIMPLEX);
183
184 input.direction.in = position(input.position);
185
186 apps.push_back(JSHOWERPOSITIONFIT);
187
188 input.fit.in = direction(input.direction);
189
190 apps.push_back(JSHOWERDIRECTIONPREFIT);
191
192 JEvt out = fit(input.fit);
193
194 apps.push_back(JSHOWERCOMPLETEFIT);
195
196 for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
197 i->setStatus(i->getHistory().getStatus(apps) ? COMPLETE_CHAIN : INCOMPLETE_CHAIN);
198 }
199
200 return out;
201 }
202
203
209 };
210}
211
212#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:65
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.
Data structure for fit parameters.