46{
49
51
53 JLimit_t& numberOfEvents = inputFile.getLimit();
58
59 try {
60
61 JParser<> zap(
"Example program to verify Monte Carlo data.");
62
69
71 }
72 catch(const exception &error) {
74 }
75
76
78
80
81 try {
83 }
86 }
87 }
88
90
93
94 NOTICE(
"Apply detector offset " << offset <<
endl);
95
97
99
101
102 for ( ;
x < -10.0;
x += 5.0) { X.push_back(x); }
103 for ( ;
x < +20.0;
x += 1.0) { X.push_back(x); }
104 for ( ;
x < +50.0;
x += 2.0) { X.push_back(x); }
105 for ( ;
x < +100.0;
x += 5.0) { X.push_back(x); }
106 for ( ;
x < +250.0;
x += 10.0) { X.push_back(x); }
107 for ( ;
x < +500.0;
x += 25.0) { X.push_back(x); }
108 for ( ;
x < +900.0;
x += 50.0) { X.push_back(x); }
109
111
113
114 while (inputFile.hasNext()) {
115
117
118 const Evt*
event = inputFile.next();
119
121
125 }
126 }
127
129 continue;
130 }
131
133
135
137
139 event->mc_trks.end(),
141
142 if (
trk != event->mc_trks.end()) {
143
144 if (router.hasPMT(
hit->pmt_id)) {
145
146 const JPMT& pmt = router.getPMT(
hit->pmt_id);
148
151
153
156
158
159 } else {
160
161 continue;
162 }
163
165
166 H1->Fill(t1 - t0,
hit->a);
167 }
168 }
169 }
170 }
172
173 if (inputFile.getCounter() != 0) {
174
175 const double W = 1.0 / (
double) inputFile.getCounter();
176
178
181 }
182 }
183
185
186 cout <<
"photon-electron statistics" <<
endl;
187
188 for (const auto& i : npe) {
190 }
191 }
192
194
196
197 out.Write();
198 out.Close();
199}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of PMT data in detector data structure.
Data structure for PMT geometry, calibration and status.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
int getID() const
Get identifier.
Template definition of a multi-dimensional oscillation probability interpolation table.
JTrack3E getTrack(const Trk &track)
Get track.
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
JShower3E getShower(const Trk &shower)
Get shower.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Vec getOffset(const JHead &header)
Get offset.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.
bool is_tau(const Trk &track)
Test whether given track is a (anti-)tau.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
void convertToPDF(TH1 &h1, const std::string &option="NW", const double factor=1.0)
Convert 1D histogram to PDF.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
const char * getTime()
Get current local time conform ISO-8601 standard.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Type definition of range.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Vec class is a straightforward 3-d vector, which also works in pyroot.