Go to the documentation of this file.    1 #ifndef __JDETECTOR__JCLBDEFAULTSIMULATOR__ 
    2 #define __JDETECTOR__JCLBDEFAULTSIMULATOR__ 
   31   template<
class JAbscissa_t, 
class JOrdinate_t>
 
   34                                      JTOOLS::JElement2D<JAbscissa_t, JOrdinate_t>,
 
   35                                      JTOOLS::JGridCollection,
 
   63     void set(
const int         nx,
 
   64              const JAbscissa_t Xmin,
 
   65              const JAbscissa_t Xmax,
 
   75       for (T i = __begin; i != __end; ++i) {
 
   79       for (
int i = 0, 
j = 1; 
j != N; ++i, ++
j) {
 
   83       for (
int i = 0; i != N; ++i) {
 
   94         while (
j != N && Xmin + X[
j] * (Xmax - Xmin) < i->getX()) { 
 
   98         i->getY() = (JOrdinate_t) (Xmin  +  
j * (Xmax - Xmin) / N);
 
  101       JFunction1D_t::compile();
 
  113       const long long int n  = (
long long int) (x / (this->getXmax() - this->getXmin()));
 
  114       const JAbscissa_t   x1 = x  -  
n * (this->getXmax() - this->getXmin());
 
  116       return (JOrdinate_t) (x - x1)  +  JFunction1D_t::operator()(x1);
 
  156         const double Tmin_ns = 0.0;
 
  157         const double Tmax_ns = 4.0;
 
  159         const double W[] = { 0.2413,
 
  164         getTDC.
set(4000, Tmin_ns, Tmax_ns, W, W + 
sizeof(W)/
sizeof(W[0]));
 
  178                               const JTOT_t tot_ns)
 const 
 
Interface to mimic hit ordering effects due to state machine inside CLB.
 
JTDC()
Default constructor.
 
JPMT_t getPMT() const
Get PMT.
 
virtual JDAQHit makeHit(const JPMT_t pmt, const double t_ns, const JTOT_t tot_ns) const
Make DAQ hit.
 
JTOOLS::JPolintFunction1D< 0, JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >, JTOOLS::JGridCollection, JOrdinate_t > JFunction1D_t
 
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).
 
Auxiliary class for a non-linear transfer function of TDC inside FPGA.
 
JTDC_t getT() const
Get time.
 
JTransferFunction1D< double, JTDC_t > getTDC
TDC non-linearity function.
 
virtual bool maybeSwapped(const JDAQHit &first, const JDAQHit &second) const
Test whether two consecutive hits may be swapped.
 
JTransferFunction1D()
Default constructor.
 
JOrdinate_t operator()(const JAbscissa_t x) const
Get the function value including non-linearity.
 
unsigned int JTDC_t
leading edge [ns]
 
Implementation of non-linearity of TDC.
 
JStateMachine(const JDAQHit::JTDC_t Tmax)
Constructor.
 
Auxiliary classes and methods for detector calibration.
 
void set(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax, T __begin, T __end)
Set the non-linearity function.
 
Auxiliary class to mimic hit ordering effects due to state machine inside CLB.
 
JCLBDefaultSimulator(const JDAQHit::JTDC_t Tmax=0)
Constructor.