Jpp 20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
JFIT::JModel< JLine1Z > Struct Reference

Template specialisation of class JModel to match hit with muon trajectory along z-axis. More...

#include <JModel.hh>

Inheritance diagram for JFIT::JModel< JLine1Z >:
JFIT::JLine1Z

Public Types

typedef double JLine1Z::* parameter_type
 

Public Member Functions

 JModel (const JLine1Z &tz, const double Rmax_m, const JTimeRange &compare, const JZRange &z_m=JZRange())
 Constructor.
 
template<class JHit_t >
bool operator() (const JHit_t &hit) const
 Test compatibility of given hit with track.
 
void move (const double step, const double velocity)
 Move vertex along this line with given velocity.
 
void setZ (const double z, const double velocity)
 Set z-position of vertex.
 
double getDistanceSquared (const JVector3D &pos) const
 Get distance squared.
 
double getDistance (const JVector3D &pos) const
 Get distance.
 
double getT (const JVector3D &pos) const
 Get arrival time of Cherenkov light at given position.
 
double getZ (const JPosition3D &pos) const
 Get point of emission of Cherenkov light along muon path.
 
JVersor3D getDirection (const JVector3D &pos) const
 Get photon direction of Cherenkov light on PMT.
 
double getDot (const JAxis3D &axis) const
 Get cosine angle of impact of Cherenkov light on PMT.
 

Static Public Member Functions

static parameter_type pX ()
 
static parameter_type pY ()
 
static parameter_type pT ()
 

Protected Attributes

double Rmax_m
 
JTimeRange compare
 
JZRange z_m
 

Detailed Description

Template specialisation of class JModel to match hit with muon trajectory along z-axis.

Definition at line 34 of file JFit/JModel.hh.

Member Typedef Documentation

◆ parameter_type

typedef double JLine1Z::* JFIT::JLine1Z::parameter_type
inherited

Definition at line 178 of file JLine1Z.hh.

Constructor & Destructor Documentation

◆ JModel()

JFIT::JModel< JLine1Z >::JModel ( const JLine1Z & tz,
const double Rmax_m,
const JTimeRange & compare,
const JZRange & z_m = JZRange() )
inline

Constructor.

Parameters
tzmuon along z-axis
Rmax_mmaximal distance of approach [m]
comparetime window [ns]
z_mz-range of muon [m]

Definition at line 45 of file JFit/JModel.hh.

48 :
49 JLine1Z(tz)
50 {
51 this->Rmax_m = Rmax_m;
52 this->compare = compare;
53 this->z_m = z_m;
54 }
JLine1Z()
Default constructor.
Definition JLine1Z.hh:39

Member Function Documentation

◆ operator()()

template<class JHit_t >
bool JFIT::JModel< JLine1Z >::operator() ( const JHit_t & hit) const
inline

Test compatibility of given hit with track.

Parameters
hithit
Returns
true if compatible; else false

Definition at line 64 of file JFit/JModel.hh.

65 {
66 using namespace std;
67 using namespace JPP;
68
69 if (this->getDistance(hit) <= Rmax_m) {
70 if (hit.getZ() - this->getZ() >= z_m.getLowerLimit() &&
71 hit.getZ() - this->getDistance(hit)/getTanThetaC() - this->getZ() <= z_m.getUpperLimit()) {
72 return compare(hit.getT() - this->getT(hit));
73 } else {
74 return false;
75 }
76 }
77 return false;
78 }
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Definition JLine1Z.hh:134
double getDistance(const JVector3D &pos) const
Get distance.
Definition JLine1Z.hh:102

◆ move()

void JFIT::JLine1Z::move ( const double step,
const double velocity )
inlineinherited

Move vertex along this line with given velocity.

Parameters
stepstep
velocityvelocity

Definition at line 62 of file JLine1Z.hh.

63 {
64 __z += step;
65 __t += step / velocity;
66 }

◆ setZ()

void JFIT::JLine1Z::setZ ( const double z,
const double velocity )
inlineinherited

Set z-position of vertex.

Parameters
zz-position
velocityvelocity

Definition at line 75 of file JLine1Z.hh.

76 {
77 move(z - getZ(), velocity);
78 }
void move(const double step, const double velocity)
Move vertex along this line with given velocity.
Definition JLine1Z.hh:62

◆ getDistanceSquared()

double JFIT::JLine1Z::getDistanceSquared ( const JVector3D & pos) const
inlineinherited

Get distance squared.

Parameters
posposition
Returns
square of distance

Definition at line 87 of file JLine1Z.hh.

88 {
89 const double dx = pos.getX() - this->getX();
90 const double dy = pos.getY() - this->getY();
91
92 return dx*dx + dy*dy;
93 }

◆ getDistance()

double JFIT::JLine1Z::getDistance ( const JVector3D & pos) const
inlineinherited

Get distance.

Parameters
posposition
Returns
distance

Definition at line 102 of file JLine1Z.hh.

103 {
104 return sqrt(this->getDistanceSquared(pos));
105 }
double getDistanceSquared(const JVector3D &pos) const
Get distance squared.
Definition JLine1Z.hh:87

◆ getT()

double JFIT::JLine1Z::getT ( const JVector3D & pos) const
inlineinherited

Get arrival time of Cherenkov light at given position.

Parameters
posposition [m]
Returns
time [ns]

Definition at line 114 of file JLine1Z.hh.

115 {
116 using namespace JPP;
117
118 const double dx = pos.getX() - this->getX();
119 const double dy = pos.getY() - this->getY();
120 const double dz = pos.getZ() - this->getZ();
121
122 const double R = sqrt(dx*dx + dy*dy);
123
124 return this->getT() + (dz + R * getKappaC()) * getInverseSpeedOfLight();
125 }
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JLine1Z.hh:114

◆ getZ()

double JFIT::JLine1Z::getZ ( const JPosition3D & pos) const
inlineinherited

Get point of emission of Cherenkov light along muon path.

Parameters
posposition
Returns
position along muon path

Definition at line 134 of file JLine1Z.hh.

135 {
136 using namespace JPP;
137
138 return pos.getZ() - this->getDistance(pos) / getTanThetaC();
139 }

◆ getDirection()

JVersor3D JFIT::JLine1Z::getDirection ( const JVector3D & pos) const
inlineinherited

Get photon direction of Cherenkov light on PMT.

Parameters
posPMT position
Returns
direction

Definition at line 148 of file JLine1Z.hh.

149 {
150 using namespace JPP;
151
152 double dx = pos.getX() - this->getX();
153 double dy = pos.getY() - this->getY();
154
155 const double R = sqrt(dx*dx + dy*dy);
156
157 dx *= getSinThetaC() / R;
158 dy *= getSinThetaC() / R;
159
160 const double dz = getCosThetaC();
161
162 return JVersor3D(dx,dy,dz);
163 }

◆ getDot()

double JFIT::JLine1Z::getDot ( const JAxis3D & axis) const
inlineinherited

Get cosine angle of impact of Cherenkov light on PMT.

Parameters
axisPMT axis
Returns
cosine angle of impact

Definition at line 172 of file JLine1Z.hh.

173 {
174 return getDirection(axis.getPosition()).getDot(axis.getDirection());
175 }
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
Definition JLine1Z.hh:148

◆ pX()

static parameter_type JFIT::JLine1Z::pX ( )
inlinestaticinherited

Definition at line 180 of file JLine1Z.hh.

180{ return &JLine1Z::__x; }

◆ pY()

static parameter_type JFIT::JLine1Z::pY ( )
inlinestaticinherited

Definition at line 181 of file JLine1Z.hh.

181{ return &JLine1Z::__y; }

◆ pT()

static parameter_type JFIT::JLine1Z::pT ( )
inlinestaticinherited

Definition at line 182 of file JLine1Z.hh.

182{ return &JLine1Z::__t; }

Member Data Documentation

◆ Rmax_m

double JFIT::JModel< JLine1Z >::Rmax_m
protected

Definition at line 81 of file JFit/JModel.hh.

◆ compare

JTimeRange JFIT::JModel< JLine1Z >::compare
protected

Definition at line 82 of file JFit/JModel.hh.

◆ z_m

JZRange JFIT::JModel< JLine1Z >::z_m
protected

Definition at line 83 of file JFit/JModel.hh.


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