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 | Friends | List of all members
JFIT::JLine3Z Class Reference

Data structure for fit of straight line in positive z-direction. More...

#include <JLine3Z.hh>

Inheritance diagram for JFIT::JLine3Z:
JFIT::JLine1Z JFIT::JLine3EZ

Public Types

typedef double JLine3Z::* parameter_type
 

Public Member Functions

 JLine3Z ()
 Default constructor.
 
 JLine3Z (const JLine1Z &line)
 Constructor.
 
 JLine3Z (const JLine1Z &line, const JVersor3Z &dir)
 Constructor.
 
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.
 
JLine3Znegate ()
 Prefix unary minus.
 
JLine3Zadd (const JLine3Z &value)
 Addition operator.
 
JLine3Zsub (const JLine3Z &value)
 Subtraction operator.
 
JLine3Zmul (const double value)
 Multiplication operator.
 
JLine3Zdiv (const double value)
 Division operator.
 
 operator JTrack3D () const
 Type conversion.
 
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.
 
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.
 
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.
 

Static Public Member Functions

static parameter_type pDX ()
 
static parameter_type pDY ()
 
static parameter_type pX ()
 
static parameter_type pY ()
 
static parameter_type pT ()
 

Friends

std::istream & operator>> (std::istream &in, JLine3Z &object)
 Read object from input.
 
std::ostream & operator<< (std::ostream &out, const JLine3Z &object)
 Write object to output.
 

Detailed Description

Data structure for fit of straight line in positive z-direction.

Note that the position coordinates are defined with respect to the given direction.

Definition at line 36 of file JLine3Z.hh.

Member Typedef Documentation

◆ parameter_type

typedef double JLine3Z::* JFIT::JLine3Z::parameter_type

Definition at line 317 of file JLine3Z.hh.

Constructor & Destructor Documentation

◆ JLine3Z() [1/3]

JFIT::JLine3Z::JLine3Z ( )
inline

Default constructor.

Definition at line 54 of file JLine3Z.hh.

54 :
55 JLine1Z(),
56 JVersor3Z()
57 {}
JLine1Z()
Default constructor.
Definition JLine1Z.hh:39

◆ JLine3Z() [2/3]

JFIT::JLine3Z::JLine3Z ( const JLine1Z & line)
inline

Constructor.

Parameters
lineline

Definition at line 65 of file JLine3Z.hh.

65 :
66 JLine1Z(line),
67 JVersor3Z()
68 {}

◆ JLine3Z() [3/3]

JFIT::JLine3Z::JLine3Z ( const JLine1Z & line,
const JVersor3Z & dir )
inline

Constructor.

Parameters
lineline
dirdirection

Definition at line 77 of file JLine3Z.hh.

78 :
79 JLine1Z(line),
80 JVersor3Z(dir)
81 {}

Member Function Documentation

◆ move()

void JFIT::JLine3Z::move ( const double step,
const double velocity )
inline

Move vertex along this line with given velocity.

Parameters
stepstep
velocityvelocity

Definition at line 90 of file JLine3Z.hh.

91 {
92 __x += step * getDX();
93 __y += step * getDY();
94 __z += step * getDZ();
95 __t += step / velocity;
96 }

◆ setZ()

void JFIT::JLine3Z::setZ ( const double z,
const double velocity )
inline

Set z-position.

Parameters
zz-position
velocityvelocity

Definition at line 105 of file JLine3Z.hh.

106 {
107 move((z - getZ()) / getDZ(), velocity);
108 }
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Definition JLine1Z.hh:134
void move(const double step, const double velocity)
Move vertex along this line with given velocity.
Definition JLine3Z.hh:90

◆ negate()

JLine3Z & JFIT::JLine3Z::negate ( )
inline

Prefix unary minus.

Returns
line

Definition at line 116 of file JLine3Z.hh.

117 {
118 JLine1Z ::negate();
119 JVersor3Z::negate();
120
121 return *this;
122 }

◆ add()

JLine3Z & JFIT::JLine3Z::add ( const JLine3Z & value)
inline

Addition operator.

Parameters
valueline
Returns
line

Definition at line 131 of file JLine3Z.hh.

132 {
133 JLine1Z ::add(value);
134 JVersor3Z::add(value);
135
136 return *this;
137 }

◆ sub()

JLine3Z & JFIT::JLine3Z::sub ( const JLine3Z & value)
inline

Subtraction operator.

Parameters
valueline
Returns
line

Definition at line 146 of file JLine3Z.hh.

147 {
148 JLine1Z ::sub(value);
149 JVersor3Z::sub(value);
150
151 return *this;
152 }

◆ mul()

JLine3Z & JFIT::JLine3Z::mul ( const double value)
inline

Multiplication operator.

Parameters
valuemultiplication factor
Returns
line

Definition at line 161 of file JLine3Z.hh.

162 {
163 JLine1Z ::mul(value);
164 JVersor3Z::mul(value);
165
166 return *this;
167 }

◆ div()

JLine3Z & JFIT::JLine3Z::div ( const double value)
inline

Division operator.

Parameters
valuemultiplication factor
Returns
line

Definition at line 176 of file JLine3Z.hh.

177 {
178 JLine1Z ::div(value);
179 JVersor3Z::div(value);
180
181 return *this;
182 }

◆ operator JTrack3D()

JFIT::JLine3Z::operator JTrack3D ( ) const
inline

Type conversion.

Returns
track

Definition at line 190 of file JLine3Z.hh.

191 {
192 return JTrack3D(JAxis3D(this->getPosition(),
193 this->getDirection()),
194 this->getT());
195 }
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
Definition JLine3Z.hh:255
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JLine3Z.hh:234
JVector3D getPosition(T __begin, T __end, const JPredicate< JTypename_t, JComparator_t > &predicate)
Get position from element in data which corresponds to given predicate.

◆ getDistanceSquared()

double JFIT::JLine3Z::getDistanceSquared ( const JVector3D & pos) const
inline

Get distance squared.

Parameters
posposition
Returns
square of distance

Definition at line 204 of file JLine3Z.hh.

205 {
206 JPosition3D D(pos);
207
208 D.sub(this->getPosition());
209
210 const double dz = D.getDot(this->getDirection());
211
212 return D.getLengthSquared() - dz*dz;
213 }

◆ getDistance()

double JFIT::JLine3Z::getDistance ( const JVector3D & pos) const
inline

Get distance.

Parameters
posposition
Returns
distance

Definition at line 222 of file JLine3Z.hh.

223 {
224 return sqrt(this->getDistanceSquared(pos));
225 }
double getDistanceSquared(const JVector3D &pos) const
Get distance squared.
Definition JLine3Z.hh:204

◆ getT() [1/2]

double JFIT::JLine3Z::getT ( const JVector3D & pos) const
inline

Get arrival time of Cherenkov light at given position.

Parameters
posposition [m]
Returns
time [ns]

Definition at line 234 of file JLine3Z.hh.

235 {
236 using namespace JPP;
237
238 JPosition3D D(pos);
239
240 D.sub(this->getPosition());
241
242 const double dz = D.getDot(this->getDirection());
243 const double R = sqrt(D.getLengthSquared() - dz*dz);
244
245 return this->getT() + (dz + R * getKappaC()) * getInverseSpeedOfLight();
246 }

◆ getDirection()

JVersor3D JFIT::JLine3Z::getDirection ( const JVector3D & pos) const
inline

Get photon direction of Cherenkov light on PMT.

Parameters
posPMT position
Returns
direction

Definition at line 255 of file JLine3Z.hh.

256 {
257 using namespace JPP;
258
259 JPosition3D D(pos);
260
261 D.sub(this->getPosition());
262
263 const double dz = D.getDot(this->getDirection());
264 const double R = sqrt(D.getLengthSquared() - dz*dz);
265
266 D.sub(JPosition3D(this->getDirection()) * (dz - R/getTanThetaC()));
267
268 return JDirection3D(D);
269 }

◆ getDot()

double JFIT::JLine3Z::getDot ( const JAxis3D & axis) const
inline

Get cosine angle of impact of Cherenkov light on PMT.

Parameters
axisPMT axis
Returns
cosine angle of impact

Definition at line 278 of file JLine3Z.hh.

279 {
280 return getDirection(axis.getPosition()).getDot(axis.getDirection());
281 }

◆ pDX()

static parameter_type JFIT::JLine3Z::pDX ( )
inlinestatic

Definition at line 319 of file JLine3Z.hh.

319{ return &JLine3Z::__dx; }

◆ pDY()

static parameter_type JFIT::JLine3Z::pDY ( )
inlinestatic

Definition at line 320 of file JLine3Z.hh.

320{ return &JLine3Z::__dy; }

◆ getT() [2/2]

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

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 }

◆ 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 }
double getDistance(const JVector3D &pos) const
Get distance.
Definition JLine1Z.hh:102

◆ 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; }

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JLine3Z & object )
friend

Read object from input.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 291 of file JLine3Z.hh.

292 {
293 in >> static_cast<JLine1Z&> (object);
294 in >> static_cast<JVersor3Z&>(object);
295
296 return in;
297 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JLine3Z & object )
friend

Write object to output.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 307 of file JLine3Z.hh.

308 {
309 out << static_cast<const JLine1Z&> (object);
310 out << ' ';
311 out << static_cast<const JVersor3Z&>(object);
312
313 return out;
314 }

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