Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
Interface for PMT simulation.
virtual void processHits(const JPMTIdentifier &id, const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const
Process hits.
virtual bool getPMTstatus(const JPMTIdentifier &id) const
Get PMT status.
Data structure for PMT calibration.
virtual const JPMTSignalProcessorInterface & getPMTSignalProcessor(const JPMTIdentifier &pmt) const
Get PMT signal processor.
Template data structure for PMT I/O.