Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 >:
JTRIGGER::JMatch< JHit_t > JLANG::JClonable< JClass_t >

Public Types

typedef JClass_t * clone_type
 Type definition of return value of method clone(). More...
 

Public Member Functions

 JMatch1D (const double roadWidth_m, const double Tmax_ns=0.0)
 Constructor. More...
 
JMatch< JHit_t > * clone () const
 Clone object. More...
 
virtual bool operator() (const JHit_t &first, const JHit_t &second) const
 Match operator. 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

template<class JClass_t>
typedef JClass_t* JLANG::JClonable< JClass_t >::clone_type
inherited

Type definition of return value of method clone().

Definition at line 25 of file JClonable.hh.

Constructor & Destructor Documentation

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  }
double TMaxExtra_ns
Definition: JMatch1D.hh:92
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:122

Member Function Documentation

template<class JHit_t>
JMatch<JHit_t>* JTRIGGER::JMatch1D< JHit_t >::clone ( ) const
inlinevirtual

Clone object.

Returns
match result

Implements JLANG::JClonable< JClass_t >.

Definition at line 55 of file JMatch1D.hh.

56  {
57  return new JMatch1D<JHit_t>(*this);
58  }
1D match criterion.
Definition: JMatch1D.hh:31
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

Implements JTRIGGER::JMatch< JHit_t >.

Definition at line 68 of file JMatch1D.hh.

69  {
70  z = first.getZ() - second.getZ();
71  t = fabs(first.getT() - second.getT() - z * getInverseSpeedOfLight());
72 
73  if (t > TMax_ns) {
74  return false;
75  }
76 
77  x = first.getX() - second.getX();
78  y = first.getY() - second.getY();
79  d = sqrt(x*x + y*y);
80 
81  if (d <= 0.5 * RMax_m)
83  else if (d <= RMax_m)
84  return t <= (RMax_m - d) * getTanThetaC() * getInverseSpeedOfLight() + TMaxExtra_ns;
85 
86  return false;
87  }
double TMaxExtra_ns
Definition: JMatch1D.hh:92
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:122

Member Data Documentation

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

Definition at line 90 of file JMatch1D.hh.

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

Definition at line 91 of file JMatch1D.hh.

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

Definition at line 92 of file JMatch1D.hh.

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

Definition at line 95 of file JMatch1D.hh.

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

Definition at line 96 of file JMatch1D.hh.

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

Definition at line 97 of file JMatch1D.hh.

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

Definition at line 98 of file JMatch1D.hh.

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

Definition at line 99 of file JMatch1D.hh.


The documentation for this class was generated from the following file: