40{
44
46 JLimit_t& numberOfEvents = inputFile.getLimit();
53 bool slewing;
55
56 try {
57
58 JParser<> zap(
"Auxiliary program to determine time slewing from K40 data.");
59
70
72 }
73 catch(const exception &error) {
75 }
76
77
79
80 if (!multiplicity.is_valid()) {
FATAL(
"Invalid multiplicity " << multiplicity <<
endl); }
81 if ( multiplicity.getLowerLimit() < 2) {
FATAL(
"Invalid multiplicity " << multiplicity <<
endl); }
83
85
87
88 try {
90 }
93 }
94
97 }
98
100
101
103
104 TH1D h0(
"h0",
NULL, 41, -TMax_ns, +TMax_ns);
105 TH1D h1(
"h1",
NULL, 50, -0.5, 49.5);
106 TProfile2D hx(
"hx",
NULL, 50, -0.5, 49.5, 50, -0.5, 49.5, -2*TMax_ns, +2*TMax_ns);
107 TProfile h2(
"h2",
NULL, 100, 0.5, 100.5, -2*TMax_ns, +2*TMax_ns);
108
109 h0.Sumw2();
110 h1.Sumw2();
111
114
116
117 while (inputFile.hasNext()) {
118
120
122
124
126
127 const JModule&
module = router.getModule(super_frame->getModuleID());
128
129
130
132
134
137 ++out;
138 }
139
140 sort(buffer.begin(), buffer.end());
141
143
145
146 while (++q != buffer.end() && q->getT() - p->getT() <= TMax_ns ) {}
147
149
151
154
157
158 if (ct(dot)) {
159
160 h0.Fill(
__q->getT() - __p->getT());
161 h1.Fill(
__q->getToT());
162 hx.Fill(__p->getToT(),
__q->getToT(),
__q->getT() - __p->getT());
163
165 h2.Fill(
__q->getToT(),
__q->getT() - __p->getT());
166 }
167 }
168 }
169 }
170
171 sort(p,q);
172 }
173
174 p = q;
175 }
176 }
177 }
178 }
180
181
182
183
184 TF1 f1("f1", "[0]*exp([1]*sqrt(x) + [2]*x) + [3]");
185
186 f1.SetParameter(0, h2.GetMaximum());
187 f1.SetParameter(1, -0.01);
188 f1.SetParameter(2, -0.05);
189 f1.SetParameter(3, h2.GetMinimum());
190
191 h2.ProjectionX()->Fit(&f1, "", "same");
192
193 for (int i = 0; i != f1.GetNpar(); ++i) {
194 cout <<
"\tstatic double p" << i <<
"() { return " <<
setw(9) <<
setprecision(5) << f1.GetParameter(i) <<
"; }" <<
endl;
195 }
196
197
198 out.Write();
199 out.Close();
200}
#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.
Template definition of a multi-dimensional oscillation probability interpolation table.
Reduced data structure for L0 hit.
static void setSlewing(const bool slewing)
Set slewing option.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool is_valid(const json &js)
Check validity of JSon data.
KM3NeT DAQ data structures and auxiliaries.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.