73 JLimit_t& numberOfEvents = inputFile.getLimit();
86 JParser<> zap(
"Main program to trigger events in acoustic data.");
98 zap[
'p'] =
make_field(precision,
"precision time-of-arrival") = 1.0e-6;
103 catch(
const exception &error) {
122 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
129 if (i->getFloor() == 0) {
136 catch(
const exception&) {
141 receivers[i->getID()] =
JReceiver(i->getID(),
142 i->getPosition() + pos,
143 i->getT0() * 1.0e-9);
147 for (tripods_container::const_iterator i = tripods.begin(); i != tripods.end(); ++i) {
149 i->getUTMPosition() -
detector.getUTMPosition());
152 for (transmitters_container::const_iterator i = transmitters.begin(); i != transmitters.end(); ++i) {
155 i->getPosition() +
detector.getModule(i->getLocation()).getPosition());
157 catch(
const exception&) {
174 public map<int, JStats>
176 long long int sum()
const
178 long long int count = 0;
180 for (const_iterator i = this->begin(); i != this->end(); ++i) {
181 count += i->second.getCount();
188 map_type number_of_entries;
200 while (inputFile.hasNext()) {
202 if (inputFile.getCounter()%10000 == 0) {
206 JToA* parameters = inputFile.next();
216 number_of_entries[parameters->
WAVEFORMID].put(1);
220 if (receivers.has(parameters->
DOMID)) {
231 catch(
const exception&) {
237 for (map_type::const_iterator i = number_of_entries.begin(); i != number_of_entries.end(); ++i) {
238 STATUS(
"number of entries: " <<
setw(3) << i->first <<
' ' <<
setw(8) << i->second.getCount() <<
endl);
242 STATUS(
"number of aliens: " <<
setw(3) << i->first <<
' ' <<
setw(8) << i->second.getCount() <<
endl);
246 STATUS(
"number of misses: " <<
setw(3) << i->first <<
' ' <<
setw(8) << i->second.getCount() <<
endl);
265 for (buffer_type::const_iterator p = receiver->second.begin(); p != __end; ++p) {
266 if (p->getQ() >= parameters.
Q * (parameters.
Q <= 1.0 ? p->getW() : 1.0)) {
267 buffer.push_back(*p);
272 sort(buffer.begin(), buffer.end());
277 for (buffer_type::const_iterator p = buffer.begin(); p != buffer.end(); ++p) {
279 buffer_type::const_iterator q = p;
283 while (++q != buffer.end() && q->getToE() - p->getToE() <= parameters.
TMax_s) {}
299 }
else if (match(out, event)) {
321 STATUS(
"number of toes: " <<
setw(3) << i->first <<
' ' <<
setw(8) << buffer.size());
332 STATUS(
"number of triggers: " <<
setw(3) << i->first <<
' ' <<
setw(8) << i->second.getCount() <<
endl);
336 STATUS(
"number of events: " <<
setw(3) << i->first <<
' ' <<
setw(8) << i->second.getCount() <<
' ' <<
FIXED(7,3) << i->second.getMean() <<
endl);
int main(int argc, char **argv)
ROOT TTree parameter settings.
Acoustic trigger parameters.
Data structure for detector geometry and calibration.
Recording of objects on file according a format that follows from the file name extension.
General purpose class for hash map of unique elements.
Data structure for hydrophone.
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Auxiliary class to define a range between two values.
Data structure for transmitter.
Data structure for tripod.
int getString() const
Get string number.
Data structure for position in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
static const int HYDROPHONE_DISABLE
Enable (disable) use of hydrophone if this status bit is 0 (1);.
static const int PIEZO_DISABLE
Enable (disable) use of piezo if this status bit is 0 (1);.
JPosition3D getPosition(const Vec &pos)
Get position.
static JEmitterID getEmitterID
Function object for emitter identification.
JContainer< std::vector< JTripod > > tripods_container
JContainer< std::vector< JTransmitter > > transmitters_container
JContainer< std::vector< JHydrophone > > hydrophones_container
static const JSoundVelocity getSoundVelocity(1541.0, -17.0e-3, -2000.0)
Function object for velocity of sound.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
JPosition3D getPiezoPosition()
Get relative position of piezo in optical module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< JHitW0 > buffer_type
hits
Auxiliary data structure for floating point format specification.
Match of two events considering overlap in time and position.
void merge(const JEvent &event)
Merge event.
int getID() const
Get emitter identifier.
Implementation for depth dependend velocity of sound.
JSoundVelocity & set(const double z0)
Set depth.
Time-of-arrival data from acoustic piezo sensor or hydrophone.
uint32_t DOMID
DAQ run number.
int32_t WAVEFORMID
DOM unique identifeir.
Auxiliary class to compare transmissions.
Auxiliary class to compare transmissions.
double Q
minimal quality if larger than one; else minimal normalised quality
double TMax_s
maximal difference between times of emission [s]
int numberOfHits
minimal number of hits to trigger event
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.