Vertex locator.
More...
|
| JVelo (const JAbstractSoundVelocity &V, const JVector3D ¢er, const double RMax_m, const double Xv_m, const double factor=1.0) |
| Constructor.
|
|
template<class T > |
int | operator() (const JVertex3D &vx, T __begin, T __end) const |
| Check vertex.
|
|
template<class T > |
vertex_type | operator() (const JPosition3D &position, const hit_type &root, T __begin, T __end) const |
| Update vertex at given position.
|
|
template<class T > |
vertex_type | operator() (const hit_type &root, T __begin, T __end, const int numberOfHits=0) const |
| Locate vertex.
|
|
Vertex locator.
Definition at line 273 of file JAcousticsTriggerProcessor.cc.
◆ JVelo()
Constructor.
- Parameters
-
V | sound velocity |
center | center for generation of vertices |
RMax_m | radius for generation of vertices [m] |
Xv_m | step size for generation of vertices [m] |
factor | multiplication factor for corresponding time window |
Definition at line 285 of file JAcousticsTriggerProcessor.cc.
289 :
292 {
293 this->push_back(center);
294
295 if (RMax_m > 0.0 && Xv_m > 0.0) {
296 for (
double x = 0.5*Xv_m;
x <= RMax_m;
x += Xv_m) {
297 for (
double y = 0.5*Xv_m;
y <= RMax_m;
y += Xv_m) {
298 if (x*x + y*y <= RMax_m*RMax_m) {
303 }
304 }
305 }
306 }
307 }
Data structure for vector in three dimensions.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
const JAbstractSoundVelocity & V
◆ operator()() [1/3]
template<class T >
int JACOUSTICS::JVelo::operator() |
( |
const JVertex3D & | vx, |
|
|
T | __begin, |
|
|
T | __end ) const |
|
inline |
Check vertex.
- Parameters
-
vx | vertex |
__begin | begin of data |
__end | end of data |
- Returns
- number of hits
Definition at line 319 of file JAcousticsTriggerProcessor.cc.
320 {
322 const double t0 = vx.
getT();
323
324 int n0 = 0;
325 double q0 = 0.0;
326
327 for (T p = __begin; p != __end; ++p) {
328
330
331 if (fabs(t1 - t0) <=
Tmax_s) {
332 n0 += 1;
333 q0 += p->getQ();
334 }
335 }
336
337 return n0;
338 }
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Get position.
double getDistance(const JVector3D &pos) const
Get distance to point.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
virtual double getTime(const double D_m, const double z1, const double z2) const =0
Get propagation time of sound.
◆ operator()() [2/3]
Update vertex at given position.
- Parameters
-
position | position |
root | root hit |
__begin | begin of data |
__end | end of data |
- Returns
- vertex
Definition at line 351 of file JAcousticsTriggerProcessor.cc.
352 {
355
356 int n0 = 1;
357 double q0 =
root.getQ();
358
359 for (T p = __begin; p != __end; ++p) {
360
362
363 if (fabs(t1 - t0) <=
Tmax_s) {
364 n0 += 1;
365 q0 += p->getQ();
366 }
367 }
368
370 }
◆ operator()() [3/3]
template<class T >
vertex_type JACOUSTICS::JVelo::operator() |
( |
const hit_type & | root, |
|
|
T | __begin, |
|
|
T | __end, |
|
|
const int | numberOfHits = 0 ) const |
|
inline |
Locate vertex.
- Parameters
-
root | root hit |
__begin | begin of data |
__end | end of data |
numberOfHits | number of hits |
- Returns
- vertex
Definition at line 383 of file JAcousticsTriggerProcessor.cc.
384 {
386
387 for (const_iterator i = this->cbegin(); i != this->cend(); ++i) {
388
391
392 int n0 = 1;
393 double q0 =
root.getQ();
394
395 for (T p = __begin; p != __end && n0 +
distance(p, __end) >= numberOfHits && n0 +
distance(p, __end) >= vertex.
N; ++p) {
396
398
399 if (fabs(t1 - t0) <=
Tmax_s) {
400 n0 += 1;
401 q0 += p->getQ();
402 }
403 }
404
407 }
408 }
409
410 return vertex;
411 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
◆ Tmax_s
const double JACOUSTICS::JVelo::Tmax_s |
The documentation for this struct was generated from the following file: