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

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

#include <JLine3EZ.hh>

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

Public Types

typedef double JLine3Z::* parameter_type
 
typedef double JEnergy::* parameter_type
 

Public Member Functions

 JLine3EZ ()
 Default constructor.
 
 JLine3EZ (const JLine3Z &line, const JEnergy &x)
 Constructor.
 
JLine3EZnegate ()
 Prefix unary minus.
 
JLine3EZadd (const JLine3EZ &value)
 Addition operator.
 
JLine3EZsub (const JLine3EZ &value)
 Subtraction operator.
 
JLine3EZmul (const double value)
 Multiplication operator.
 
JLine3EZdiv (const double value)
 Division operator.
 
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.
 
JLine3Zadd (const JLine3Z &value)
 Addition operator.
 
JLine3Zsub (const JLine3Z &value)
 Subtraction 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.
 
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 getZ (const JPosition3D &pos) const
 Get point of emission of Cherenkov light along muon path.
 
const JEnergygetEnergy () const
 Get Energy.
 
void setEnergy (const JEnergy &energy)
 Set Energy.
 
bool less (const JEnergy &X) const
 Less than method.
 
JEnergyadd (const JEnergy &value)
 Addition operator.
 
JEnergysub (const JEnergy &value)
 Subtraction operator.
 
double getlog10E () const
 Get energy.
 
double getE () const
 Get energy.
 
void putE (const double E)
 Put energy.
 
double getDE () const
 Get derivative of energy.
 

Static Public Member Functions

static parameter_type pDX ()
 
static parameter_type pDY ()
 
static parameter_type pX ()
 
static parameter_type pY ()
 
static parameter_type pT ()
 
static JEnergy min ()
 Get minimum possible value.
 
static JEnergy max ()
 Get maximum possible value.
 
static parameter_type pE ()
 

Protected Attributes

double __X
 

Friends

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

Detailed Description

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

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

Definition at line 28 of file JLine3EZ.hh.

Member Typedef Documentation

◆ parameter_type [1/2]

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

Definition at line 317 of file JLine3Z.hh.

◆ parameter_type [2/2]

typedef double JEnergy::* JFIT::JEnergy::parameter_type
inherited

Definition at line 261 of file JEnergy.hh.

Constructor & Destructor Documentation

◆ JLine3EZ() [1/2]

JFIT::JLine3EZ::JLine3EZ ( )
inline

Default constructor.

Definition at line 38 of file JLine3EZ.hh.

38 :
39 JLine3Z(),
40 JEnergy()
41 {}
JEnergy()
Default constructor.
Definition JEnergy.hh:36
JLine3Z()
Default constructor.
Definition JLine3Z.hh:54

◆ JLine3EZ() [2/2]

JFIT::JLine3EZ::JLine3EZ ( const JLine3Z & line,
const JEnergy & x )
inline

Constructor.

Parameters
lineline
xenergy

Definition at line 50 of file JLine3EZ.hh.

50 :
51 JLine3Z(line),
52 JEnergy(x)
53 {}

Member Function Documentation

◆ negate()

JLine3EZ & JFIT::JLine3EZ::negate ( )
inline

Prefix unary minus.

Returns
line

Definition at line 61 of file JLine3EZ.hh.

62 {
65
66 return *this;
67 }
JEnergy & negate()
Prefix unary minus.
Definition JEnergy.hh:90
JLine3Z & negate()
Prefix unary minus.
Definition JLine3Z.hh:116

◆ add() [1/3]

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

Addition operator.

Parameters
valueline
Returns
line

Definition at line 76 of file JLine3EZ.hh.

77 {
78 JLine3Z::add(value);
79 JEnergy::add(value);
80
81 return *this;
82 }
JEnergy & add(const JEnergy &value)
Addition operator.
Definition JEnergy.hh:104
JLine3Z & add(const JLine3Z &value)
Addition operator.
Definition JLine3Z.hh:131

◆ sub() [1/3]

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

Subtraction operator.

Parameters
valueline
Returns
line

Definition at line 91 of file JLine3EZ.hh.

92 {
93 JLine3Z::sub(value);
94 JEnergy::sub(value);
95
96 return *this;
97 }
JEnergy & sub(const JEnergy &value)
Subtraction operator.
Definition JEnergy.hh:118
JLine3Z & sub(const JLine3Z &value)
Subtraction operator.
Definition JLine3Z.hh:146

◆ mul()

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

Multiplication operator.

Parameters
valuemultiplication factor
Returns
line

Definition at line 106 of file JLine3EZ.hh.

107 {
108 JLine3Z::mul(value);
109 JEnergy::mul(value);
110
111 return *this;
112 }
JEnergy & mul(const double value)
Multiplication operator.
Definition JEnergy.hh:132
JLine3Z & mul(const double value)
Multiplication operator.
Definition JLine3Z.hh:161

◆ div()

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

Division operator.

Parameters
valuemultiplication factor
Returns
line

Definition at line 121 of file JLine3EZ.hh.

122 {
123 JLine3Z::div(value);
124 JEnergy::div(value);
125
126 return *this;
127 }
JEnergy & div(const double value)
Division operator.
Definition JEnergy.hh:146
JLine3Z & div(const double value)
Division operator.
Definition JLine3Z.hh:176

◆ move()

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

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 )
inlineinherited

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

◆ add() [2/3]

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

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() [2/3]

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

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 }

◆ operator JTrack3D()

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

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
inlineinherited

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
inlineinherited

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
inlineinherited

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 }

◆ getT() [2/2]

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 }

◆ getDirection()

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

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
inlineinherited

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 ( )
inlinestaticinherited

Definition at line 319 of file JLine3Z.hh.

319{ return &JLine3Z::__dx; }

◆ pDY()

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

Definition at line 320 of file JLine3Z.hh.

320{ return &JLine3Z::__dy; }

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

◆ getEnergy()

const JEnergy & JFIT::JEnergy::getEnergy ( ) const
inlineinherited

Get Energy.

Returns
Energy

Definition at line 56 of file JEnergy.hh.

57 {
58 return static_cast<const JEnergy&>(*this);
59 }

◆ setEnergy()

void JFIT::JEnergy::setEnergy ( const JEnergy & energy)
inlineinherited

Set Energy.

Parameters
energyEnergy

Definition at line 67 of file JEnergy.hh.

68 {
69 static_cast<JEnergy&>(*this) = energy;
70 }

◆ less()

bool JFIT::JEnergy::less ( const JEnergy & X) const
inlineinherited

Less than method.

Parameters
XEnergy [log(E/GeV)]
Returns
true if this energy less than given energy; else false

Definition at line 79 of file JEnergy.hh.

80 {
81 return __X < X.__X;
82 }

◆ add() [3/3]

JEnergy & JFIT::JEnergy::add ( const JEnergy & value)
inlineinherited

Addition operator.

Parameters
valueEnergy
Returns
Energy

Definition at line 104 of file JEnergy.hh.

105 {
106 __X += value.__X;
107
108 return *this;
109 }

◆ sub() [3/3]

JEnergy & JFIT::JEnergy::sub ( const JEnergy & value)
inlineinherited

Subtraction operator.

Parameters
valueEnergy
Returns
Energy

Definition at line 118 of file JEnergy.hh.

119 {
120 __X -= value.__X;
121
122 return *this;
123 }

◆ getlog10E()

double JFIT::JEnergy::getlog10E ( ) const
inlineinherited

Get energy.

Returns
Energy [log(E/GeV)]

Definition at line 159 of file JEnergy.hh.

160 {
161 return __X;
162 }

◆ getE()

double JFIT::JEnergy::getE ( ) const
inlineinherited

Get energy.

Returns
Energy [GeV]

Definition at line 170 of file JEnergy.hh.

171 {
172 return pow(10.0, __X);
173 }

◆ putE()

void JFIT::JEnergy::putE ( const double E)
inlineinherited

Put energy.

Parameters
EEnergy [GeV]

Definition at line 181 of file JEnergy.hh.

182 {
183 __X = log10(E);
184 }

◆ getDE()

double JFIT::JEnergy::getDE ( ) const
inlineinherited

Get derivative of energy.

Returns
dE/dx [GeV]

Definition at line 192 of file JEnergy.hh.

193 {
194 return getE() * log(10.0);
195 }
double getE() const
Get energy.
Definition JEnergy.hh:170

◆ min()

static JEnergy JFIT::JEnergy::min ( )
inlinestaticinherited

Get minimum possible value.

Returns
minimum possible value

Definition at line 214 of file JEnergy.hh.

215 {
216 return JEnergy(std::numeric_limits<double>::lowest());
217 }

◆ max()

static JEnergy JFIT::JEnergy::max ( )
inlinestaticinherited

Get maximum possible value.

Returns
maximum possible value

Definition at line 225 of file JEnergy.hh.

226 {
227 return JEnergy(std::numeric_limits<double>::max());
228 }

◆ pE()

static parameter_type JFIT::JEnergy::pE ( )
inlinestaticinherited

Definition at line 263 of file JEnergy.hh.

263{ return &JEnergy::__X; }

Friends And Related Symbol Documentation

◆ operator>>

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

Read object from input.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 137 of file JLine3EZ.hh.

138 {
139 in >> static_cast<JLine3Z&>(object);
140 in >> static_cast<JEnergy&>(object);
141
142 return in;
143 }

◆ operator<<

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

Write object to output.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 153 of file JLine3EZ.hh.

154 {
155 out << static_cast<const JLine3Z&>(object);
156 out << static_cast<const JEnergy&>(object);
157
158 return out;
159 }

Member Data Documentation

◆ __X

double JFIT::JEnergy::__X
protectedinherited

Definition at line 266 of file JEnergy.hh.


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