1 #ifndef __JTRIGGEREDEVENT__
2 #define __JTRIGGEREDEVENT__
21 namespace JPP {
using namespace JTRIGGER; }
101 const double t1 =
getTime(*i, calibration);
103 if (!frame.testHighRateVeto(i->getPMT()) &&
104 !frame.testFIFOStatus (i->getPMT())) {
114 if (snapshot.is_valid()) {
119 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
121 if (!super_frame->empty()) {
123 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
127 if (
root.getDistance(hit) < DMax_m) {
135 const double t1 =
getTime(*i, calibration);
175 for (JEvent::const_iterator hit = event.begin(); hit !=
event.end(); ++hit) {
188 const double t1 =
getTime(*i, calibration);
210 if (static_cast<const JDAQKeyHit&>(*i) ==
static_cast<const JDAQKeyHit&
>(*out))
211 out->addTriggerMask(*i);
222 if (snapshot.is_valid()) {
225 event.rbegin()->getT1() + snapshot.getUpperLimit() +
TMaxLocal_ns);
227 for (JDAQTimeslice::const_iterator super_frame = timesliceRouter->begin(); super_frame != timesliceRouter->end(); ++super_frame) {
229 if (!super_frame->empty()) {
231 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
241 const double t1 =
getTime(*i, calibration);
JTriggeredEvent()
Default constructor.
const JDAQSuperFrame & getSuperFrame(const JDAQModuleIdentifier &module) const
Get super frame.
int getModuleID() const
Get module identifier.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
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< 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
then JPlot1D f $WORKDIR postfit[prefit\] root
Router for direct addressing of module data in detector data structure.
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 PMT calibration.
double getTime(const Hit &hit)
Get true time of hit.
std::vector< JDAQTriggeredHit > triggeredHits
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.
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
JDAQFrameSubset getFrameSubset(const JDAQModuleIdentifier &module, const JTimeRange &timeRange) const
Get subset of frame given module identifier and range of hit times.
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 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.
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.
bool testFIFOStatus() const
Test FIFO status.