Jpp
JPMTDefaultSimulatorInterface.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JPMTDEFAULTSIMULATORINTERFACE__
2 #define __JDETECTOR__JPMTDEFAULTSIMULATORINTERFACE__
3 
6 
7 
8 /**
9  * \author mdejong
10  */
11 
12 namespace JDETECTOR {}
13 namespace JPP { using namespace JDETECTOR; }
14 
15 namespace JDETECTOR {
16 
17 
18  /**
19  * Default PMT simulation interface.
20  *
21  * This class implements the JPMTSimulator interface by transferring
22  * the PMT simulation to the PMT signal processor interface.
23  */
25  public JPMTSimulator
26  {
27  public:
28  /**
29  * Process hits.
30  *
31  * \param id PMT identifier
32  * \param calibration PMT calibration
33  * \param input PMT signals
34  * \param output PMT hits
35  */
36  virtual void processHits(const JPMTIdentifier& id,
37  const JCalibration& calibration,
38  const JPMTData<JPMTSignal>& input,
39  JPMTData<JPMTPulse>& output) const
40  {
41  if (getPMTstatus(id)) {
42 
44 
45  cpu(calibration, input, output);
46  }
47  }
48 
49 
50  /**
51  * Get PMT status.
52  * If PMT status is false, the method processHits does not produce any hits.
53  *
54  * \param id PMT identifier
55  * \return true
56  */
57  virtual bool getPMTstatus(const JPMTIdentifier& id) const
58  {
59  return true;
60  }
61 
62 
63  /**
64  * Get PMT signal processor.
65  *
66  * \param pmt PMT identifier
67  * \return PMT signal processor
68  */
70  {
71  static const JPMTSignalProcessorInterface cpu;
72 
73  return cpu;
74  }
75  };
76 }
77 
78 #endif
JPMTSimulator.hh
JPMTSignalProcessorInterface.hh
JDETECTOR::JCalibration
Data structure for PMT calibration.
Definition: JDetector/JCalibration.hh:35
JDETECTOR::JPMTDefaultSimulatorInterface::processHits
virtual void processHits(const JPMTIdentifier &id, const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const
Process hits.
Definition: JPMTDefaultSimulatorInterface.hh:36
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDETECTOR::JPMTDefaultSimulatorInterface::getPMTSignalProcessor
virtual const JPMTSignalProcessorInterface & getPMTSignalProcessor(const JPMTIdentifier &pmt) const
Get PMT signal processor.
Definition: JPMTDefaultSimulatorInterface.hh:69
JDETECTOR::JPMTSignalProcessorInterface
PMT signal processor interface.
Definition: JPMTSignalProcessorInterface.hh:69
JDETECTOR::JPMTIdentifier
PMT identifier.
Definition: JPMTIdentifier.hh:30
JDETECTOR::JPMTData
Template data structure for PMT I/O.
Definition: JPMTSimulator.hh:165
JDETECTOR::JPMTDefaultSimulatorInterface
Default PMT simulation interface.
Definition: JPMTDefaultSimulatorInterface.hh:24
JDETECTOR::JPMTSimulator
Interface for PMT simulation.
Definition: JPMTSimulator.hh:244
JDETECTOR::JPMTDefaultSimulatorInterface::getPMTstatus
virtual bool getPMTstatus(const JPMTIdentifier &id) const
Get PMT status.
Definition: JPMTDefaultSimulatorInterface.hh:57
JDETECTOR
Auxiliary classes and methods for detector calibration.
Definition: JAnchor.hh:12