50{
54
58 JLimit_t& numberOfEvents = inputFile.getLimit();
59 double margin;
60 string detectorFile;
61 double Tmax_s;
63
64 try {
65
66
67 JParser<> zap(
"Program to produce analysis variables in offline files. The variable definition is given in JAnalysisSummary class.");
68
77
78 zap(argc, argv);
79 }
80 catch(const exception& error) {
81 FATAL(error.what() << endl);
82 }
83
85
86 try {
88 }
91 }
92
94 can.addMargin(margin);
95
97
98 unique_ptr<JDynamics> dynamics;
99
100 try {
101
103
104 dynamics->load(calibrationFile);
105 }
106 catch(const exception& error) {
107 if (!calibrationFile.empty()) {
109 }
110 }
111
113
115
118
120
121 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
122
124
125 Evt* evt = in.next();
126
127
129 track->clearusr();
130 }
131
133
137 0.0);
139 }
140
145
146
148
149 for (
const Hit& hit : evt->
hits) {
150 bool valid = true;
151 if(router.hasModule(hit.
dom_id)){
152
155
159 !module.getPMT(hit.channel_id).has(PMT_DISABLE));
160
161 }
162 if(valid){
164
166 }
167
168 }
169
170 for (
const auto& [
dom_id, pmt_set] : snapshot) {
172
175
176 }
177 }
178
181
184
185 }
186 }
187
188
189
190 if (dynamics) {
191 dynamics->update(evt->
t.GetSec());
192 }
193
195
198
200
201 for (
const auto& module : (dynamics ? dynamics->getDetector() :
detector)) {
202
204
206
207 if (D < analysis.
Dmin) {
208
211
212 }
213 }
214 }
215 }
216 }
218 }
219
221
225
226}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const JLocation & getLocation() const
Get location.
int getFloor() const
Get floor number.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
const JPosition3D & getPosition() const
Get position.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
Object reading from a list of files.
File router for fast addressing of summary data.
Template definition for direct access of elements in ROOT TChain.
Data storage class for rate measurements of all PMTs in one module.
Data structure for UTC time.
bool has_primary(const Evt &evt)
Auxiliary function to check if an event contains a primary track.
JTrack3E getTrack(const Trk &track)
Get track.
bool has_leading_lepton(const Evt &event)
Auxiliary function to check if an event contains the leading lepton of a neutrino interaction.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getVisibleEnergyLeadingLepton(const Trk &, const JCylinder3D &)
double getVisibleEnergy(const Trk &, const JCylinder3D &)
Get the visible energy of a track.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
int frame_index
from the raw data
int run_id
DAQ run identifier.
std::vector< Hit > hits
list of hits
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
int det_id
detector identifier from DAQ
TTimeStamp t
UTC time of the timeslice, or the event_time for MC. (default: 01 Jan 1970 00:00:00)
int dom_id
module identifier from the data (unique in the detector).
ULong64_t trig
non-zero if the hit is a trigger hit.
unsigned int channel_id
PMT channel id {0,1, .., 30} local to moduke.
The cylinder used for photon tracking.
Dynamic detector calibration.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Struct for storing analysis variables.
double visible_energy_lepton
size_t nMaxPMT_snapshot
maximum number of PMT with at least one hit in any DOM
double visible_energy_total
double visible_energy_hadron
double Dmin
Minimum distance from reconstructed shower vertex to any DOM [m].
size_t nMaxPMT_trigger
maximum number of PMT with at least one triggered hit in any DOM
int nMaxPMT_snapshot_ModuleID
DOM ID with maximum number of PMT hits in the snapshot.
int nMaxPMT_trigger_ModuleID
DOM ID with maximum number of PMT triggered.
int Dmin_ModuleID
DOM ID corresponding to the DOM at Dmin_DOM.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int status
MC or reconstruction status code, see km3net-dataformat/definitions/trkmembers.csv for values.
static const int TRK_ST_UNDEFINED
MC or reco status was not defined for this track.