Detector simulation.
More...
#include <JDetectorSimulator.hh>
|
| | JDetectorSimulator (const JDetector &detector) |
| | Constructor.
|
| |
| bool | hasK40Simulator () const |
| | Check availability of K40 simulator.
|
| |
| bool | hasPMTSimulator () const |
| | Check availability of PMT simulator.
|
| |
| bool | hasCLBSimulator () const |
| | Check availability of CLB simulator.
|
| |
| const JK40Simulator & | getK40Simulator () const |
| | Get K40 simulator.
|
| |
| const JPMTSimulator & | getPMTSimulator () const |
| | Get PMT simulator.
|
| |
| const JCLBSimulator & | getCLBSimulator () const |
| | Get CLB simulator.
|
| |
| void | reset (JK40Simulator *k40Simulator) |
| | Reset K40 simulator.
|
| |
| void | reset (JPMTSimulator *pmtSimulator) |
| | Reset PMT simulator.
|
| |
| void | reset (JCLBSimulator *clbSimulator) |
| | Reset CLB simulator.
|
| |
| virtual void | generateHits (const JModule &module, const JTimeRange &period, JModuleData &output) const override |
| | Generate hits.
|
| |
| virtual void | generateHits (const module_pair &input, const JTimeRange &period, const module_data &output) const override |
| | Generate mixed-L1/L0 hits.
|
| |
| virtual void | processHits (const JPMTIdentifier &ID, const JCalibration &calibration, const JStatus &status, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const override |
| | Process hits.
|
| |
| virtual void | processData (const JModuleIdentifier &id, const JCLBInput &input, JDAQSuperFrame &output) const override |
| | Process data.
|
| |
| virtual void | operator() (const JModule &module, JModuleData &input, JDAQSuperFrame &output) const |
| | Process module data in one step.
|
| |
| const JPMTRouter & | getPMTRouter () const |
| | Get PMT router.
|
| |
| const JPMTAddress & | getAddress (const JObjectID &id) const |
| | Get address of PMT.
|
| |
| const JPMT & | getPMT (const JPMTAddress &address) const |
| | Get PMT.
|
| |
| const JPMT & | getPMT (const JObjectID &id) const |
| | Get PMT.
|
| |
| bool | hasPMT (const JObjectID &id) const |
| | Has PMT.
|
| |
| JPMTIdentifier | getIdentifier (const JPMTAddress &address) const |
| | Get identifier of PMT.
|
| |
| JPMTIdentifier | getIdentifier (const JObjectID &id) const |
| | Get identifier of PMT.
|
| |
| const JModule & | getModule (const JModuleAddress &address) const |
| | Get module.
|
| |
| const JModule & | getParentModule (const JObjectID &id) const |
| | Get parent module.
|
| |
| int | getParentModuleID (const JObjectID &id) const |
| | Get parent module identifier.
|
| |
| JPMTChannel | getPMTChannel (const JPMTAddress &address) const |
| | Get PMT channel.
|
| |
| JPMTChannel | getPMTChannel (const JObjectID &id) const |
| | Get PMT channel.
|
| |
| JUTMPosition | getUTMPosition (const JObjectID &id) const |
| | Get UTM position of given PMT identifier.
|
| |
| const JClass_t & | getReference () const |
| | Get reference to object.
|
| |
| JClass_t & | getReference () |
| | Get reference to object.
|
| |
| bool | is_valid () const |
| | Check validity of reference.
|
| |
| const JClass_t * | operator-> () const |
| | Smart pointer.
|
| |
| JClass_t * | operator-> () |
| | Smart pointer.
|
| |
| const JClass_t & | operator* () const |
| | Dereference operator.
|
| |
| JClass_t & | operator* () |
| | Dereference operator.
|
| |
| virtual bool | hasCLB (const JModuleIdentifier &id) const |
| | Check if CLB exist.
|
| |
Detector simulation.
This class implements the JK40Simulator, JPMTSimulator and JCLBSimulator interfaces. The implementations of these interfaces should be provided via pointers to corresponding objects.
N.B: This class owns the objects pointed to using class JLANG::JSinglePointer.
Definition at line 34 of file JDetectorSimulator.hh.
◆ JReference_t
◆ const_iterator
◆ JDetectorSimulator() [1/2]
Make copy constructor inaccesible.
◆ JDetectorSimulator() [2/2]
| JDETECTOR::JDetectorSimulator::JDetectorSimulator |
( |
const JDetector & | detector | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 59 of file JDetectorSimulator.hh.
59 :
61 {}
Router for direct addressing of PMT data in detector data structure.
◆ operator=()
Make assignment operator inaccesible.
◆ hasK40Simulator()
| bool JDETECTOR::JDetectorSimulator::hasK40Simulator |
( |
| ) |
const |
|
inline |
Check availability of K40 simulator.
- Returns
- true if simulator available; else false
Definition at line 69 of file JDetectorSimulator.hh.
70 {
72 }
std::unique_ptr< JK40Simulator > k40Simulator
◆ hasPMTSimulator()
| bool JDETECTOR::JDetectorSimulator::hasPMTSimulator |
( |
| ) |
const |
|
inline |
Check availability of PMT simulator.
- Returns
- true if simulator available; else false
Definition at line 81 of file JDetectorSimulator.hh.
82 {
84 }
std::unique_ptr< JPMTSimulator > pmtSimulator
◆ hasCLBSimulator()
| bool JDETECTOR::JDetectorSimulator::hasCLBSimulator |
( |
| ) |
const |
|
inline |
Check availability of CLB simulator.
- Returns
- true if simulator available; else false
Definition at line 92 of file JDetectorSimulator.hh.
93 {
95 }
std::unique_ptr< JCLBSimulator > clbSimulator
◆ getK40Simulator()
| const JK40Simulator & JDETECTOR::JDetectorSimulator::getK40Simulator |
( |
| ) |
const |
|
inline |
Get K40 simulator.
- Returns
- K40 simulator
Definition at line 103 of file JDetectorSimulator.hh.
104 {
107 else
109 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool hasK40Simulator() const
Check availability of K40 simulator.
Exception for accessing an invalid pointer.
◆ getPMTSimulator()
| const JPMTSimulator & JDETECTOR::JDetectorSimulator::getPMTSimulator |
( |
| ) |
const |
|
inline |
Get PMT simulator.
- Returns
- PMT simulator
Definition at line 117 of file JDetectorSimulator.hh.
118 {
121 else
123 }
bool hasPMTSimulator() const
Check availability of PMT simulator.
◆ getCLBSimulator()
| const JCLBSimulator & JDETECTOR::JDetectorSimulator::getCLBSimulator |
( |
| ) |
const |
|
inline |
Get CLB simulator.
- Returns
- CLB simulator
Definition at line 131 of file JDetectorSimulator.hh.
132 {
135 else
137 }
bool hasCLBSimulator() const
Check availability of CLB simulator.
◆ reset() [1/3]
| void JDETECTOR::JDetectorSimulator::reset |
( |
JK40Simulator * | k40Simulator | ) |
|
|
inline |
◆ reset() [2/3]
| void JDETECTOR::JDetectorSimulator::reset |
( |
JPMTSimulator * | pmtSimulator | ) |
|
|
inline |
◆ reset() [3/3]
| void JDETECTOR::JDetectorSimulator::reset |
( |
JCLBSimulator * | clbSimulator | ) |
|
|
inline |
◆ generateHits() [1/2]
Generate hits.
- Parameters
-
| module | module |
| period | time window [ns] |
| output | background data |
Implements JDETECTOR::JK40Simulator.
Definition at line 181 of file JDetectorSimulator.hh.
184 {
186 }
const JK40Simulator & getK40Simulator() const
Get K40 simulator.
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const =0
Generate hits.
◆ generateHits() [2/2]
◆ processHits()
Process hits.
- Parameters
-
| ID | PMT identifier |
| calibration | PMT calibration |
| status | PMT status |
| input | PMT signals |
| output | PMT hits |
Implements JDETECTOR::JPMTSimulator.
Definition at line 213 of file JDetectorSimulator.hh.
218 {
220 }
const JPMTSimulator & getPMTSimulator() const
Get PMT simulator.
virtual void processHits(const JPMTIdentifier &id, const JCalibration &calibration, const JStatus &status, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const =0
Process hits.
◆ processData()
Process data.
- Parameters
-
| id | module identifier |
| input | PMT data |
| output | CLB data |
Implements JDETECTOR::JCLBSimulator.
Definition at line 230 of file JDetectorSimulator.hh.
231 {
233 }
virtual void processData(const JModuleIdentifier &id, const JCLBInput &input, JDAQSuperFrame &output) const =0
Process data.
const JCLBSimulator & getCLBSimulator() const
Get CLB simulator.
◆ operator()()
Process module data in one step.
- Parameters
-
| module | module |
| input | PMT signals |
| output | CLB data |
Definition at line 243 of file JDetectorSimulator.hh.
246 {
247
248
250
251 for (unsigned int i = 0; i != input.size(); ++i) {
252
253 input[i].sort();
254
255 const JPMT& pmt =
module.getPMT(i);
256
260 input [i],
261 buffer[i]);
262 }
263
264
265
267 }
const JCalibration & getCalibration() const
Get calibration.
virtual void processData(const JModuleIdentifier &id, const JCLBInput &input, JDAQSuperFrame &output) const override
Process data.
virtual void processHits(const JPMTIdentifier &ID, const JCalibration &calibration, const JStatus &status, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const override
Process hits.
Data structure for PMT geometry, calibration and status.
int getID() const
Get identifier.
status_type getStatus(const JType< status_type > &type) const
Get status.
◆ getPMTRouter()
| const JPMTRouter & JDETECTOR::JPMTRouter::getPMTRouter |
( |
| ) |
const |
|
inlineinherited |
Get PMT router.
- Returns
- PMT router
Definition at line 68 of file JPMTRouter.hh.
69 {
71 }
JPMTRouter(const JDetector &detector)
Constructor.
◆ getAddress()
Get address of PMT.
- Parameters
-
- Returns
- address
Definition at line 80 of file JPMTRouter.hh.
81 {
82 return router.get(
id.getID());
83 }
JTOOLS::JRouter< JPMTAddress > router
◆ getPMT() [1/2]
| const JPMT & JDETECTOR::JPMTRouter::getPMT |
( |
const JPMTAddress & | address | ) |
const |
|
inlineinherited |
Get PMT.
- Parameters
-
- Returns
- PMT
Definition at line 92 of file JPMTRouter.hh.
93 {
95 }
const JClass_t & getReference() const
Get reference to object.
◆ getPMT() [2/2]
| const JPMT & JDETECTOR::JPMTRouter::getPMT |
( |
const JObjectID & | id | ) |
const |
|
inlineinherited |
Get PMT.
- Parameters
-
- Returns
- PMT
Definition at line 104 of file JPMTRouter.hh.
105 {
107 }
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.
◆ hasPMT()
| bool JDETECTOR::JPMTRouter::hasPMT |
( |
const JObjectID & | id | ) |
const |
|
inlineinherited |
Has PMT.
- Parameters
-
- Returns
- true if PMT present; else false
Definition at line 116 of file JPMTRouter.hh.
117 {
118 return router.has(
id.getID());
119 }
◆ getIdentifier() [1/2]
Get identifier of PMT.
- Parameters
-
- Returns
- address
Definition at line 128 of file JPMTRouter.hh.
129 {
130 return JPMTIdentifier(
getModule(address), address.second);
131 }
const JModule & getModule(const JModuleAddress &address) const
Get module.
◆ getIdentifier() [2/2]
Get identifier of PMT.
- Parameters
-
- Returns
- address
Definition at line 140 of file JPMTRouter.hh.
141 {
143 }
JPMTIdentifier getIdentifier(const JPMTAddress &address) const
Get identifier of PMT.
◆ getModule()
Get module.
- Parameters
-
- Returns
- module
Definition at line 152 of file JPMTRouter.hh.
◆ getParentModule()
| const JModule & JDETECTOR::JPMTRouter::getParentModule |
( |
const JObjectID & | id | ) |
const |
|
inlineinherited |
Get parent module.
- Parameters
-
- Returns
- module
Definition at line 164 of file JPMTRouter.hh.
◆ getParentModuleID()
| int JDETECTOR::JPMTRouter::getParentModuleID |
( |
const JObjectID & | id | ) |
const |
|
inlineinherited |
Get parent module identifier.
- Parameters
-
- Returns
- module identifier
Definition at line 176 of file JPMTRouter.hh.
177 {
179 }
const JModule & getParentModule(const JObjectID &id) const
Get parent module.
◆ getPMTChannel() [1/2]
Get PMT channel.
- Parameters
-
- Returns
- PMT channel
Definition at line 188 of file JPMTRouter.hh.
189 {
190 return JPMTChannel(
getModule(address).getLocation(), address.second);
191 }
◆ getPMTChannel() [2/2]
Get PMT channel.
- Parameters
-
- Returns
- PMT channel
Definition at line 200 of file JPMTRouter.hh.
201 {
203 }
JPMTChannel getPMTChannel(const JPMTAddress &address) const
Get PMT channel.
◆ getUTMPosition()
Get UTM position of given PMT identifier.
- Parameters
-
- Returns
- UTM position
Definition at line 212 of file JPMTRouter.hh.
213 {
215 }
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT.
JPosition3D getPosition(const JModule &first, const JModule &second)
Get position to go from first to second module.
◆ getReference() [1/2]
template<class JClass_t >
Get reference to object.
- Returns
- reference to object
Definition at line 38 of file JReference.hh.
◆ getReference() [2/2]
template<class JClass_t >
Get reference to object.
- Returns
- reference to object
Definition at line 49 of file JReference.hh.
◆ is_valid()
template<class JClass_t >
Check validity of reference.
- Returns
- true
Definition at line 60 of file JReference.hh.
61 {
62 return true;
63 }
◆ operator->() [1/2]
template<class JClass_t >
Smart pointer.
- Returns
- pointer to object
Definition at line 71 of file JReference.hh.
◆ operator->() [2/2]
template<class JClass_t >
Smart pointer.
- Returns
- pointer to object
Definition at line 82 of file JReference.hh.
◆ operator*() [1/2]
template<class JClass_t >
Dereference operator.
- Returns
- reference to object
Definition at line 93 of file JReference.hh.
◆ operator*() [2/2]
template<class JClass_t >
Dereference operator.
- Returns
- reference to object
Definition at line 104 of file JReference.hh.
◆ hasCLB()
◆ k40Simulator
| std::unique_ptr<JK40Simulator> JDETECTOR::JDetectorSimulator::k40Simulator |
|
protected |
◆ pmtSimulator
| std::unique_ptr<JPMTSimulator> JDETECTOR::JDetectorSimulator::pmtSimulator |
|
protected |
◆ clbSimulator
| std::unique_ptr<JCLBSimulator> JDETECTOR::JDetectorSimulator::clbSimulator |
|
protected |
◆ router
◆ __object
template<class JClass_t >
The documentation for this class was generated from the following file: