Fit function.
147 {
150
152
155
157
158 JDataL0_t dataL0;
159
161
162 for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
163
167
169
171
172 for (JDataL0_t::const_iterator i = dataL0.begin(); i !=dataL0.end(); ++i) {
173
175
176 hit.rotate(R);
177
178 if (match(hit)) {
179 top.insert(i->getPMTIdentifier());
180 }
181 }
182
184
187 }
188
190
191 for (JDetector::const_iterator module = subdetector.begin(); module != subdetector.end(); ++module) {
192
194
196
197 for (size_t i = 0; i != module->size(); ++i) {
198
203
205
207 const size_t count = top.count(id);
208
210 }
211 }
212 }
213 }
214
216
217 if( NDF >= 0 ) {
218
219
220
221 const int N = 5;
222
224
225 for (int i = 0; i != N; ++i) {
227 }
228
230
231 do {
232
234
235 for (int i = 0; i != N; ++i) {
236
238
240 const double chi2 = (*this)(
x,
data.begin(),
data.end());
241
243 buffer[chi2] =
x.getE();
244 }
245
248 }
249 }
250
251
252 for (int i = 0; i != N; ++i) {
254 }
256
257
258
260
261 case 0:
265 break;
266
267 case 1:
270 break;
271
272 case 2:
275 break;
276
277 case 3:
280 break;
281
282 case 4:
286 break;
287 }
288
291
293
294
296
299
300 }
301
302 const double chi2 =
result[2].chi2;
303 const double E =
result[2].x.getE();
304
305
306
307 double Emin = numeric_limits<double>::max();
308 double Emax = numeric_limits<double>::lowest();
309
311 if (i->second < Emin) { Emin = i->second; }
312 if (i->second > Emax) { Emax = i->second; }
313 }
314
315 const double mu_range =
gWater(E);
316
317 double noise_likelihood = 0.0;
318 int number_of_hits = 0;
319
320 for (vector<JNPEHit>::const_iterator i =
data.begin(); i !=
data.end(); ++i) {
321 noise_likelihood += log10(
getP(i->getY0(), i->getN()));
322 number_of_hits += i->getN();
323 }
324
326
327 out.rbegin()->setE(E);
328
329 out.rbegin()->setW(track->getW());
338 }
339 }
340
341 return out;
342 }
#define DEBUG(A)
Message macros.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Detector subset without binary search functionality.
Data structure for fit of energy.
JFit & add(const int type)
Add event to history.
Data structure for fit of straight line paralel to z-axis.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
const JClass_t & getReference() const
Get reference to object.
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
double getRate() const
Get default rate.
const JDAQSummaryFrame & getSummaryFrame() const
Get default summary frame.
Reduced data structure for L1 hit.
Data storage class for rate measurements of all PMTs in one module.
static const int JMUONENERGY
static const int JENERGY_NDF
number of degrees of freedom from JEnergy.cc
static const int JENERGY_ENERGY
uncorrected energy [GeV] from JEnergy.cc
static const int JENERGY_NOISE_LIKELIHOOD
log likelihood of every hit being K40 from JEnergy.cc
static const int JENERGY_CHI2
chi2 from JEnergy.cc
static const int JENERGY_MUON_RANGE_METRES
range of a muon with the reconstructed energy [m] from JEnergy.cc
static const int JENERGY_NUMBER_OF_HITS
number of hits from JEnergy.cc
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
static const int JENERGY_MINIMAL_ENERGY
minimal energy [GeV] from JEnergy.cc
static const int JENERGY_MAXIMAL_ENERGY
maximal energy [GeV] from JEnergy.cc
double getNPE(const Hit &hit)
Get true charge of hit.
double getP(const double expval, bool hit)
Get Poisson probability to observe a hit or not for given expectation value for the number of hits.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
JPosition3D getPosition(const JFit &fit)
Get position.
JAxis3D getAxis(const JFit &fit)
Get axis.
JDirection3D getDirection(const JFit &fit)
Get direction.
bool is_valid(const json &js)
Check validity of JSon data.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
static const int PMT_DISABLE
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
Auxiliary data structure for floating point format specification.
Auxiliary class to match data points with given model.
Auxiliary class for simultaneously handling light yields and response of PMT.
double resolution
energy resolution [log10(GeV)]
double EMin_log
minimal energy [log10(GeV)]
double ZMin_m
minimal z-position [m]
double EMax_log
maximal energy [log10(GeV)]