1 #ifndef __JTRIGGEREDEVENT__
2 #define __JTRIGGEREDEVENT__
23 namespace JPP {
using namespace JTRIGGER; }
108 const double t1 =
getTime(*
i, calibration);
110 if (!frame.testHighRateVeto(
i->getPMT()) &&
111 !frame.testFIFOStatus (
i->getPMT())) {
121 if (snapshot.is_valid()) {
126 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
128 if (!super_frame->empty()) {
130 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
142 const double t1 =
getTime(*
i, calibration);
167 const double TMaxLocal_ns,
182 for (JEvent::const_iterator hit = event.begin(); hit !=
event.end(); ++hit) {
195 const double t1 =
getTime(*
i, calibration);
217 if (static_cast<const JDAQKeyHit&>(*
i) ==
static_cast<const JDAQKeyHit&
>(*out))
218 out->addTriggerMask(*
i);
229 if (snapshot.is_valid()) {
232 event.rbegin()->getT1() + snapshot.getUpperLimit() +
TMaxLocal_ns);
234 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
236 if (!super_frame->empty()) {
238 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
248 const double t1 =
getTime(*
i, calibration);
const JDAQSuperFrame & getSuperFrame(const JDAQModuleIdentifier &module) const
Get super frame.
JTriggeredEvent()
Default constructor.
int getModuleID() const
Get module identifier.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
Time calibration (including definition of sign of time offset).
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JDAQKeyHit JDAQSnapshotHit
const_iterator begin() const
Router for direct addressing of module data in detector data structure.
JDAQFrameSubset getFrameSubset(const JDAQModuleIdentifier &module, const JTimeRange &timeRange) const
Get subset of frame given module identifier and range of hit times.
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration.
double getT1() const
Get leading edge of hit.
Data structure for time calibration.
double getTime(const Hit &hit)
Get true time of hit.
JTriggeredEvent(const JDAQChronometer &chronometer, const KM3NETDAQ::JTriggerMask_t &mask, const JHitR1 &hit, const JTimesliceRouter ×liceRouter, const JModuleRouter &moduleRouter, const double TMaxLocal_ns, const double DMax_m, const JTimeRange &snapshot=JTimeRange::DEFAULT_RANGE())
Constructor based on an L1 coincidence hit.
std::vector< JDAQTriggeredHit > triggeredHits
do JPlot2D f $WORKDIR canberra[${EMITTER}\] root
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
then for NAME in JDAQPreamble JDAQChronometer JDAQModuleIdentifier JDAQPMTIdentifier JDAQFrameStatus JDAQUTCExtended JDAQTimeslice JDAQTimesliceHeader JDAQSuperFrame JDAQSuperFrameHeader JDAQHit JDAQSummaryslice JDAQSummarysliceHeader JDAQSummaryFrame JDAQEvent JDAQEventHeader JDAQTriggerCounter JDAQTriggerMask JDAQKeyHit JDAQTriggeredHit
unsigned long long int JTriggerMask_t
Type definition of trigger mask.
JTriggeredEvent(const JEvent &event, const JTimesliceRouter ×liceRouter, const JModuleRouter &moduleRouter, const double TMaxLocal_ns, const JTimeRange &snapshot=JTimeRange::DEFAULT_RANGE())
Constructor.
const_iterator< T > begin() const
Get begin of data.
JTimeRange getTimeRange(const JTimeRange &timeRange, const JModule &module)
Get de-calibrated time range.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
Auxiliary class to build JDAQEvent for a triggered event.
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer.
const JPosition3D & getPosition() const
Get position.
const JPMT & getPMT(const int index) const
Get PMT.
Direct access to module in detector data structure.
bool testHighRateVeto() const
Test high-rate veto status.
Reduced data structure for L1 hit.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
bool hasModule(const JObjectID &id) const
Has module.
JTriggerMask_t trigger_mask
Reduced data structure for L1 hit.
const_iterator end() const
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
std::vector< JDAQSnapshotHit > snapshotHits
Data frame of one optical module.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
bool testFIFOStatus() const
Test FIFO status.