Timeslice with Monte Carlo event.
More...
#include <JEventTimeslice.hh>
|
| JEventTimeslice (const JDAQChronometer &chronometer, const JDetectorSimulator &simbad, const Evt &event, const JTimeRange &period=JTimeRange::DEFAULT_RANGE) |
| Constructor. More...
|
|
void | applyHighRateVeto (const JPMTDefaultSimulatorInterface &pmtSimulator) |
| Apply high-rate veto. More...
|
|
| ClassDef (JDAQTimesliceL0, 1) |
|
| ClassDef (JDAQTimeslice, 4) |
|
| ClassDef (JDAQPreamble, 1) |
|
| ClassDef (JDAQTimesliceHeader, 2) |
|
| ClassDef (JDAQHeader, 2) |
|
| ClassDef (JDAQChronometer, 3) |
|
void | clear () |
| Clear data. More...
|
|
JDAQTimeslice & | add (const JDAQTimeslice ×lice) |
| Add another timeslice. More...
|
|
std::ostream & | print (std::ostream &out, const bool lpr=false) const |
| Print DAQ Timeslice. More...
|
|
int | getLength () const |
| Get length. More...
|
|
int | getDataType () const |
| Get data type. More...
|
|
| ClassDefNV (JDAQAbstractPreamble, 1) |
|
const JDAQTimesliceHeader & | getDAQTimesliceHeader () const |
| Get DAQ time slice header. More...
|
|
const JDAQHeader & | getDAQHeader () const |
| Get DAQ header. More...
|
|
void | setDAQHeader (const JDAQHeader &header) |
| Set DAQ header. More...
|
|
const JDAQChronometer & | getDAQChronometer () const |
| Get DAQ chronometer. More...
|
|
void | setDAQChronometer (const JDAQChronometer &chronometer) |
| Set DAQ chronometer. More...
|
|
int | getDetectorID () const |
| Get detector identifier. More...
|
|
int | getRunNumber () const |
| Get run number. More...
|
|
int | getFrameIndex () const |
| Get frame index. More...
|
|
JDAQUTCExtended | getTimesliceStart () const |
| Get start of timeslice. More...
|
|
void | setRunNumber (const int run) |
| Set run number. More...
|
|
void | setFrameIndex (const int frame_index) |
| Set frame index. More...
|
|
void | setTimesliceStart (const JDAQUTCExtended ×lice_start) |
| Set timeslice start time. More...
|
|
Timeslice with Monte Carlo event.
Definition at line 33 of file JEventTimeslice.hh.
◆ JEventTimeslice()
Constructor.
This constructor converts the Monte Carlo event to a DAQ timeslice. In this, both the PMT and CLB simulations are applied. If the K40 simulator is available and the given time window is valid, the K40 background is generated and added to the time slice data. N.B. The given time window extends the time range of hits in the event, if any.
- Parameters
-
chronometer | chronometer |
simbad | detector simulator |
event | Monte Carlo event |
period | time window [ns] |
Definition at line 51 of file JEventTimeslice.hh.
75 if (simbad.
hasPMT(hit->pmt_id)) {
94 for (JMap_t::const_iterator i = data.begin(); i != data.end(); ++i) {
98 time_range.add(period);
103 for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
108 JMap_t::iterator i = data.find(
distance(simbad->begin(),module));
111 buffer.swap(i->second);
113 buffer.
reset(module->size());
122 simbad(*module, buffer, *(this->rbegin()));
127 for (JMap_t::iterator i = data.begin(); i != data.end(); ++i) {
133 simbad(module, i->second, *(this->rbegin()));
141 catch(
const std::exception& error) {};
◆ applyHighRateVeto()
Apply high-rate veto.
- Parameters
-
pmtSimulator | PMT simulator |
Definition at line 40 of file JTimesliceL0.hh.
44 for (
iterator frame = this->begin(); frame != this->end(); ++frame) {
52 frame->setHighRateVeto(pmt, !status);
◆ ClassDef() [1/6]
◆ ClassDef() [2/6]
◆ ClassDef() [3/6]
◆ ClassDef() [4/6]
◆ ClassDef() [5/6]
KM3NETDAQ::JDAQHeader::ClassDef |
( |
JDAQHeader |
, |
|
|
2 |
|
|
) |
| |
|
inherited |
◆ ClassDef() [6/6]
◆ clear()
void KM3NETDAQ::JDAQTimeslice::clear |
( |
| ) |
|
|
inlineinherited |
◆ add()
Add another timeslice.
- Parameters
-
- Returns
- this timeslice
Definition at line 133 of file JDAQTimeslice.hh.
139 for (const_iterator i = this->begin(); i != this->end(); ++i) {
140 buffer[i->getModuleIdentifier()] =
distance(static_cast<const JDAQTimeslice&>(*this).begin(),i);
143 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
147 if (p != buffer.end()) {
◆ print()
std::ostream& KM3NETDAQ::JDAQTimeslice::print |
( |
std::ostream & |
out, |
|
|
const bool |
lpr = false |
|
) |
| const |
|
inlineinherited |
Print DAQ Timeslice.
- Parameters
-
out | output stream |
lpr | long print |
- Returns
- output stream
Definition at line 172 of file JDAQTimeslice.hh.
176 out << this->ClassName() << endl;
177 out << dynamic_cast<const JDAQPreamble&> (*
this) << endl;
178 out << dynamic_cast<const JDAQChronometer&>(*
this) << endl;
180 for (JDAQTimeslice::const_iterator frame = this->begin(); frame != this->end(); ++frame) {
182 out <<
' ' << setw(10) << frame->getModuleID();
183 out <<
' ' << setw(6) << frame->getLength();
184 out <<
' ' << setw(6) << frame->getDataType();
185 out <<
' ' << setw(6) << frame->getTimesliceStart();
186 out <<
' ' << setw(8) << setfill(
'0') << hex << frame->getStatus() << dec << setfill(
' ');
187 out <<
'|' << setw(8) << setfill(
'0') << hex << frame->getFIFOStatus() << dec << setfill(
' ');
188 out <<
' ' << setw(6) << frame->size();
192 if (!frame->empty()) {
194 out <<
' ' << setw(10) << frame-> begin()->getT();
196 out <<
' ' << setw(10) << frame->rbegin()->getT();
208 out << setw(2) << (int) hit->getPMT() <<
' ' << setw(8) << hit->getT() << (
n%10 == 0 ?
'\n' :
' ');
◆ getDAQPreamble()
template<class T >
static JDAQPreamble KM3NETDAQ::JDAQPreamble::getDAQPreamble |
( |
const T & |
object | ) |
|
|
inlinestaticinherited |
Get DAQ preamble.
This method should be used for binary I/O to get the actual data for the given object.
To this end, the following method should be overloaded for the corresponding data type.
size_t getSizeof(const T&);
- Parameters
-
- Returns
- preamble
Definition at line 76 of file JDAQPreamble.hh.
81 preamble.
type = KM3NETDAQ::getDataType<T>();
◆ getLength()
int KM3NETDAQ::JDAQAbstractPreamble::getLength |
( |
| ) |
const |
|
inlineinherited |
◆ getDataType()
int KM3NETDAQ::JDAQAbstractPreamble::getDataType |
( |
| ) |
const |
|
inlineinherited |
◆ ClassDefNV()
◆ getDAQTimesliceHeader()
Get DAQ time slice header.
- Returns
- DAQ time slice header
Definition at line 43 of file JDAQTimesliceHeader.hh.
45 return static_cast<const JDAQTimesliceHeader&>(*
this);
◆ getDAQHeader()
const JDAQHeader& KM3NETDAQ::JDAQHeader::getDAQHeader |
( |
| ) |
const |
|
inlineinherited |
Get DAQ header.
- Returns
- DAQ header
Definition at line 49 of file JDAQHeader.hh.
51 return static_cast<const JDAQHeader&>(*
this);
◆ setDAQHeader()
void KM3NETDAQ::JDAQHeader::setDAQHeader |
( |
const JDAQHeader & |
header | ) |
|
|
inlineinherited |
Set DAQ header.
- Parameters
-
Definition at line 60 of file JDAQHeader.hh.
62 static_cast<JDAQHeader&>(*
this) = header;
◆ getDAQChronometer()
const JDAQChronometer& KM3NETDAQ::JDAQChronometer::getDAQChronometer |
( |
| ) |
const |
|
inlineinherited |
Get DAQ chronometer.
- Returns
- DAQ chronometer
Definition at line 88 of file JDAQChronometer.hh.
90 return static_cast<const JDAQChronometer&>(*
this);
◆ setDAQChronometer()
void KM3NETDAQ::JDAQChronometer::setDAQChronometer |
( |
const JDAQChronometer & |
chronometer | ) |
|
|
inlineinherited |
Set DAQ chronometer.
- Parameters
-
chronometer | DAQ chronometer |
Definition at line 99 of file JDAQChronometer.hh.
101 static_cast<JDAQChronometer&>(*
this) = chronometer;
◆ getDetectorID()
int KM3NETDAQ::JDAQChronometer::getDetectorID |
( |
| ) |
const |
|
inlineinherited |
◆ getRunNumber()
int KM3NETDAQ::JDAQChronometer::getRunNumber |
( |
| ) |
const |
|
inlineinherited |
◆ getFrameIndex()
int KM3NETDAQ::JDAQChronometer::getFrameIndex |
( |
| ) |
const |
|
inlineinherited |
◆ getTimesliceStart()
◆ setRunNumber()
void KM3NETDAQ::JDAQChronometer::setRunNumber |
( |
const int |
run | ) |
|
|
inlineinherited |
◆ setFrameIndex()
void KM3NETDAQ::JDAQChronometer::setFrameIndex |
( |
const int |
frame_index | ) |
|
|
inlineinherited |
◆ setTimesliceStart()
void KM3NETDAQ::JDAQChronometer::setTimesliceStart |
( |
const JDAQUTCExtended & |
timeslice_start | ) |
|
|
inlineinherited |
Set timeslice start time.
- Parameters
-
timeslice_start | timeslice start time |
Definition at line 177 of file JDAQChronometer.hh.
◆ length
int KM3NETDAQ::JDAQAbstractPreamble::length |
|
protectedinherited |
◆ type
int KM3NETDAQ::JDAQAbstractPreamble::type |
|
protectedinherited |
◆ detector_id
int KM3NETDAQ::JDAQChronometer::detector_id |
|
protectedinherited |
◆ run
int KM3NETDAQ::JDAQChronometer::run |
|
protectedinherited |
◆ frame_index
int KM3NETDAQ::JDAQChronometer::frame_index |
|
protectedinherited |
◆ timeslice_start
The documentation for this struct was generated from the following file:
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer.
int first
index of module in detector data structure
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e.
JDAQUTCExtended timeslice_start
Data structure for PMT data corresponding to a detector module.
double getNPE(const Hit &hit)
Get true charge of hit.
bool hasPMT(const JObjectID &id) const
Has PMT.
Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool hasPMTSimulator() const
Check availability of PMT simulator.
int getID() const
Get identifier.
Address of module in detector data structure.
double getTime(const Hit &hit)
Get true time of hit.
Data structure for a composite optical module.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.
Address of PMT in detector data structure.
JDAQSuperFrame & add(const JDAQSuperFrame &super_frame)
Add data from same optical module.
void applyHighRateVeto(const JPMTDefaultSimulatorInterface &pmtSimulator)
Apply high-rate veto.
Data frame of one optical module.
bool hasK40Simulator() const
Check availability of K40 simulator.
const JPMTSimulator & getPMTSimulator() const
Get PMT simulator.
Data structure for PMT analogue signal.
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const
Generate hits.
void reset(size_t size)
Reset buffers.
const typedef JDAQHit * const_iterator
std::vector< Hit > mc_hits
MC: list of MC truth hits.
const_iterator begin() const
virtual bool getPMTstatus(const JPMTIdentifier &id) const
Get PMT status.
friend size_t getSizeof()
Definition of method to get size of data type.
bool hasCLBSimulator() const
Check availability of CLB simulator.
const JModule & getModule(const JModuleAddress &address) const
Get module.
const_iterator end() const
int second
index of PMT in module data structure.