Jpp
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
JTRIGGER::JMatch1D< JHit_t > Class Template Reference

1D match criterion. More...

#include <JMatch1D.hh>

Inheritance diagram for JTRIGGER::JMatch1D< JHit_t >:
JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

 JMatch1D (const double roadWidth_m, const double Tmax_ns=0.0)
 Constructor. More...
 
virtual bool operator() (const JHit_t &first, const JHit_t &second) const
 Match operator. More...
 
virtual clone_type clone () const
 Get clone of this object. More...
 

Public Attributes

double RMax_m
 
double TMax_ns
 
double TMaxExtra_ns
 

Private Attributes

double x
 
double y
 
double z
 
double d
 
double t
 

Detailed Description

template<class JHit_t>
class JTRIGGER::JMatch1D< JHit_t >

1D match criterion.

This match algorithm is intented for muon signals. It is assumed that the muon direction is along the z-axis.

Definition at line 31 of file JMatch1D.hh.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t, class JDerived_t>
typedef JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Constructor & Destructor Documentation

◆ JMatch1D()

template<class JHit_t>
JTRIGGER::JMatch1D< JHit_t >::JMatch1D ( const double  roadWidth_m,
const double  Tmax_ns = 0.0 
)
inline

Constructor.

Parameters
roadWidth_mmaximal road width [m]
Tmax_nsmaximal extra time [ns]

Definition at line 41 of file JMatch1D.hh.

42  :
43  RMax_m (roadWidth_m),
44  TMaxExtra_ns(Tmax_ns)
45  {
47  }

Member Function Documentation

◆ operator()()

template<class JHit_t>
virtual bool JTRIGGER::JMatch1D< JHit_t >::operator() ( const JHit_t &  first,
const JHit_t &  second 
) const
inlinevirtual

Match operator.

Parameters
firsthit
secondhit
Returns
match result

Definition at line 57 of file JMatch1D.hh.

58  {
59  z = first.getZ() - second.getZ();
60  t = fabs(first.getT() - second.getT() - z * getInverseSpeedOfLight());
61 
62  if (t > TMax_ns) {
63  return false;
64  }
65 
66  x = first.getX() - second.getX();
67  y = first.getY() - second.getY();
68  d = sqrt(x*x + y*y);
69 
70  if (d <= 0.5 * RMax_m)
72  else if (d <= RMax_m)
73  return t <= (RMax_m - d) * getTanThetaC() * getInverseSpeedOfLight() + TMaxExtra_ns;
74 
75  return false;
76  }

◆ clone()

template<class JClonable_t, class JDerived_t>
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlinevirtualinherited

Member Data Documentation

◆ RMax_m

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::RMax_m

Definition at line 79 of file JMatch1D.hh.

◆ TMax_ns

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::TMax_ns

Definition at line 80 of file JMatch1D.hh.

◆ TMaxExtra_ns

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::TMaxExtra_ns

Definition at line 81 of file JMatch1D.hh.

◆ x

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::x
mutableprivate

Definition at line 84 of file JMatch1D.hh.

◆ y

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::y
mutableprivate

Definition at line 85 of file JMatch1D.hh.

◆ z

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::z
mutableprivate

Definition at line 86 of file JMatch1D.hh.

◆ d

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::d
mutableprivate

Definition at line 87 of file JMatch1D.hh.

◆ t

template<class JHit_t>
double JTRIGGER::JMatch1D< JHit_t >::t
mutableprivate

Definition at line 88 of file JMatch1D.hh.


The documentation for this class was generated from the following file:
JTRIGGER::JMatch1D::z
double z
Definition: JMatch1D.hh:86
JTRIGGER::JMatch1D::y
double y
Definition: JMatch1D.hh:85
JTOOLS::getInverseSpeedOfLight
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
JTRIGGER::JMatch1D::t
double t
Definition: JMatch1D.hh:88
JTOOLS::getTanThetaC
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
JTRIGGER::JMatch1D::d
double d
Definition: JMatch1D.hh:87
JTRIGGER::JMatch1D::TMax_ns
double TMax_ns
Definition: JMatch1D.hh:80
JTRIGGER::JMatch1D::TMaxExtra_ns
double TMaxExtra_ns
Definition: JMatch1D.hh:81
JTRIGGER::JMatch1D::RMax_m
double RMax_m
Definition: JMatch1D.hh:79
JTRIGGER::JMatch1D::x
double x
Definition: JMatch1D.hh:84