55{
59
61 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
65
68 JLimit_t& numberOfEvents = inputFile.getLimit();
71 double Tmax_s;
75
76 try {
77
79
80 JParser<> zap(
"Program to perform compass calibration using reconstructed muon trajectories.");
81
91
93 }
94 catch(const exception& error) {
96 }
97
98
101 }
102
104
105 try {
107 }
110 }
111
113
115
116 try {
117
119
121 }
122 catch(const exception& error) {
124 }
125 }
126
128
130
132
134
137
139
142
144
145 while (inputFile.hasNext()) {
146
148
149 multi_pointer_type ps = inputFile.next();
150
153
154 summary.update(*
tev);
155
158 }
159
161
163
165
166 for (JFIT::JEvt::const_iterator
track = in->begin();
track != in->end(); ++
track) {
167
171
174 }
175
177
178
179
181
182 for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
183
185
187
190 }
191 }
192
194
195 for (
auto& i :
data) {
196
197 const JModule&
module = router.getModule(i.first);
198
199
200
202
204
206
207 const double x = router.getIndex(i.first);
208 const double y = h2.GetYaxis()->GetBinCenter(
iy);
209
211
212 double chi2 = 0.0;
213
214 for (JDataW0_t::const_iterator p = i.second.begin(); p != __end; ++p) {
215
217
219
223
225
226 chi2 += fit(
ta,
hit);
227 }
228
229 h2.Fill(x, y, chi2);
230 }
231 }
232 }
233 }
235
237
239
240 out << h2;
241
242 out.Write();
243 out.Close();
244}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
Data structure for set of track fit results.
void select(const JSelector_t &selector)
Select fits.
Data structure for fit of straight line paralel to z-axis.
Data structure for fit of straight line in positive z-direction.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Auxiliary class for a hit with background rate value.
File router for fast addressing of summary data.
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
JDirection3D getDirection(const Vec &dir)
Get direction.
JPosition3D getPosition(const Vec &pos)
Get position.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
JTOOLS::JRange< double > JZRange
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
const char *const h2_t
Name of histogram with results from JMuonCompass.cc.
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
static const JModuleCounter getNumberOfModules
Function object to count unique modules.
KM3NeT DAQ data structures and auxiliaries.
Dynamic detector calibration.
Auxiliary class to match data points with given model.
Auxiliary class for recursive type list generation.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Data structure for fit parameters.
double TTS_ns
transition-time spread [ns]
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double roadWidth_m
road width [m]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
double ZMax_m
maximal z-positon [m]
double ZMin_m
minimal z-positon [m]
double R_Hz
default rate [Hz]
size_t numberOfPrefits
number of prefits
Wrapper class to make final fit of muon trajectory.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for sorting of hits.