Classes | Namespaces | Modules
Detector User Interface
Collaboration diagram for Detector User Interface:

Classes

class  det::ComponentGroup< P, C, Creator, ManagerProvider >
 Base class for group of detector components. More...
 
class  det::Detector
 Top of the hierarchy of the detector description interface. More...
 
class  det::DetectorComponent< C, ManagerProvider >
 Base class for detector components. More...
 
class  fwk::CoordinateSystemRegistry::InvalidCoordinateSystemException
 Base class for exceptions in the CoordinateSystemRegistry. More...
 
class  fwk::RandomEngineRegistry::InvalidRandomEngineException
 Base class for exceptions in the RandomEngineRegistry. More...
 
class  det::MPositionable< Config >
 Mixin class to be inherited from objects that have a position. More...
 
class  fwk::RandomEngineRegistry
 Collection of pre-defined random engines. More...
 
class  sdet::StationTriggerAlgorithm
 Local station hardware (PLD) and software (T2) trigger algorithm. More...
 

Namespaces

 fwk::CoordinateSystemRegistry
 Collection of useful pre-defined coordinate systems.
 

Modules

 Fluorescence Detector User Interface
 
 Surface Detector User Interface
 
 Atmosphere User Interface
 

Detailed Description

Introduction

The Detector User Interface allows you to request information about the configuration and performance of the detector at a particular time.This interface is designed to:

Basics of using the detector interface

The Detector interface is a collection of classes organized with the hierarchy one normally associates with the Auger detector instruments. To retrieve information from the detector, you first get an instance of the det::Detector object, which sits at the top of the detector hierarchy:

const det::Detector& detector = det::Detector::GetInstance();

You may wonder why this is done using a static method (called GetInstance()), rather than by simply creating a Detector object on the heap or stack in the usual way. The reason is that the Detector is implemented as a utl::Singleton, which is simply a trick to ensure that only one instance of it ever exists. The GetInstance() method then takes care of creating the det::Detector if it does not exist yet, or just returning a reference to it in case it has already exists.From the det::Detector, you can then navigate to the detector component you are interested in. For example:

const sdet::Station& station221 = detector.GetSDetector().GetStation(221);

It is important to notice that on the left-hand side of the expression, station221 is retrieved as a const reference. This is done to guarantee that only one instance of this detector component exists, and that you cannot alter it. A detector component is always created by its parent component, not by the user. In this way, each component is automatically created with all of the information needed to uniquely identify it so that it can locate the correct detector description data pertaining to it. In fact, the detector interface is implemented in such a way that you cannot violate these rules, even if you want to. For instance, the following code won't compile:

// The left-hand side of this expression attempts to create a copy of the sdet::Station. It won't compile.
sdet::Station station221 = detector.GetSDetector().GetStation(221);
Once you have the component of interest, you can retrieve information about it from its accessors (or 'getters'):

// Get the position of station 221
utl::Point = station221.GetPosition();
// Get the water absorption length (eg. for simulation) vs wavelength
// Get a pointer to the station's local coordinate system

Note that the left-hand sides of the expressions using these data accessors need not be references, as in the previous example. You are allowed to make copies of the actual detector data, just not the detector components which are responsible for retrieving that data.There are some shortcuts built into the detector interface to make it easier to get the detector components you want. For instance, if you have an sevt::Station, you can use it to get the corresponding sdet::Station:

sevt::SEvent& sevent = theEvent.GetSEvent(); // theEvent is an evt::Event
for (SEvent::ConstStationIterator sIt = sevent.StationsBegin();
sIt != sevent.StationsEnd() ; ++sIt) {
const sdet::Station& detStation =
det::Detector::GetInstance().GetSDetector().GetStation(*sIt);
// do something with the detector station
}

Upating the Detector time

The Detector interface is designed to retrieve time-dependent information about the detector configuration and performance. There is a method det::Detector::Update for setting the time:

Of course, someone has to invoke this Update method. When reading real data, the detector time is normally set for you by the EventFileReaderOG::EventFileReader module. When running simulations, the EventGeneratorOG::EventGenerator module sets the detector time according to instructions in its configuration file. If you try to run an application in which for some reason the time is not set, it will default to 0. In such a case, you may see an error message like this when trying to retrieve data:

SDetector::SDetector.cc::111: GetStation: Station with Id = 221 is not commissioned at 
detector time = 00:00:00 06 Jan 1980 (UTC), 0 (GPS sec), 0 (GPS nsec)

6 January 1980 is just the beginning of the GPS epoch, or GPS second = 0.

How data are stored and retrieved

In the section above, you will see from the examples that when retrieving information from the detector interface, you do not have to worry about where or how the data are stored. The detector interface takes care of this by relaying requests to a collection of so-called managers, which know how to retrieve the requested data. See the documentation on managers for more details.Generally detector data are stored either in XML files or in MySQL databases. The XML files with detector data are located in:

path-to-offline-install/share/auger-offline/config

For information on Offline databases, see the Non-event database pages.

Atmosphere data

The atm::Atmosphere part of the det::Detector implements some functionality not found in other parts of the detector description like sdet::SDetector and fdet::FDetector. For more information on the atmosphere, see the Atmosphere User Interface.

, generated on Tue Sep 26 2023.