1 #ifndef __JTRIGGEREDEVENT__
2 #define __JTRIGGEREDEVENT__
22 namespace JPP {
using namespace JTRIGGER; }
106 const double t1 =
getTime(*
i, calibration);
108 if (!frame.testHighRateVeto(
i->getPMT()) &&
109 !frame.testFIFOStatus (
i->getPMT())) {
119 if (snapshot.is_valid()) {
124 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
126 if (!super_frame->empty()) {
128 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
140 const double t1 =
getTime(*
i, calibration);
165 const double TMaxLocal_ns,
180 for (JEvent::const_iterator hit = event.begin(); hit !=
event.end(); ++hit) {
193 const double t1 =
getTime(*
i, calibration);
215 if (static_cast<const JDAQKeyHit&>(*
i) ==
static_cast<const JDAQKeyHit&
>(*out))
216 out->addTriggerMask(*
i);
227 if (snapshot.is_valid()) {
230 event.rbegin()->getT1() + snapshot.getUpperLimit() +
TMaxLocal_ns);
232 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
234 if (!super_frame->empty()) {
236 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
246 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...
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
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.
do JPlot2D f $WORKDIR detector root
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.