Project
Loading...
Searching...
No Matches
ExternalDetector.h File Reference

Sensitive detector built from an externally provided (CAD-derived) geometry. More...

#include "DetectorsBase/Detector.h"
#include "DetectorsCommonDataFormats/DetID.h"
#include "ExternalDetectors/Hit.h"
#include "Rtypes.h"
#include "TLorentzVector.h"
#include <functional>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>

Go to the source code of this file.

Classes

struct  o2::ext::ExternalDetectorOptions
 Configuration of a single sensitive external detector. More...
 
class  o2::ext::ExternalDetector
 
struct  o2::ext::ExternalDetector::TrackData
 dense sensor index per sensitive MC volume ID More...
 

Namespaces

namespace  o2
 a couple of static helper functions to create timestamp values for CCDB queries or override obsolete objects
 
namespace  o2::ext
 

Detailed Description

Sensitive detector built from an externally provided (CAD-derived) geometry.

ExternalDetector is the sensitive counterpart of o2::passive::ExternalModule. It injects a CAD-derived TGeo geometry (produced by scripts/geometry/O2_CADtoTGeo.py) and turns a configurable set of its volumes (selected by medium or volume name) into sensitive volumes which produce hits. It derives from o2::base::DetImpl, so it transparently participates in the full o2-sim hit forwarding/merging machinery (FairMQ serialization, sub-event merging, ...).

All instances share one generic hit type (o2::ext::Hit) so that an arbitrary number of external detectors can coexist (each tied to a different o2::detectors::DetID) without the hit merger needing to know more than this single wire format.

The sensitive action itself is configurable: by default a generic entrance/exit hit is produced, but a user can instead provide a ROOT macro (loaded at runtime via o2::conf::GetFromMacro, the same mechanism used for generator/stepping hooks) whose function receives the detector instance and may query the TVirtualMC singleton and call addHit(...) to implement an arbitrary sensitive action – without recompiling O2.

Definition in file ExternalDetector.h.