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 275 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 287 of file JAcousticsTriggerProcessor.cc.
291 :
294 {
295 this->push_back(center);
296
297 if (RMax_m > 0.0 && Xv_m > 0.0) {
298 for (
double x = 0.5*Xv_m;
x <= RMax_m;
x += Xv_m) {
299 for (
double y = 0.5*Xv_m;
y <= RMax_m;
y += Xv_m) {
300 if (x*x + y*y <= RMax_m*RMax_m) {
305 }
306 }
307 }
308 }
309 }
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 321 of file JAcousticsTriggerProcessor.cc.
322 {
324 const double t0 = vx.
getT();
325
326 int n0 = 0;
327 double q0 = 0.0;
328
329 for (T p = __begin; p != __end; ++p) {
330
332
333 if (fabs(t1 - t0) <=
Tmax_s) {
334 n0 += 1;
335 q0 += p->getQ();
336 }
337 }
338
339 return n0;
340 }
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 353 of file JAcousticsTriggerProcessor.cc.
354 {
357
358 int n0 = 1;
359 double q0 =
root.getQ();
360
361 for (T p = __begin; p != __end; ++p) {
362
364
365 if (fabs(t1 - t0) <=
Tmax_s) {
366 n0 += 1;
367 q0 += p->getQ();
368 }
369 }
370
372 }
◆ 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 385 of file JAcousticsTriggerProcessor.cc.
386 {
388
389 for (const_iterator i = this->cbegin(); i != this->cend(); ++i) {
390
393
394 int n0 = 1;
395 double q0 =
root.getQ();
396
397 for (T p = __begin; p != __end && n0 +
distance(p, __end) >= numberOfHits && n0 +
distance(p, __end) >= vertex.
N; ++p) {
398
400
401 if (fabs(t1 - t0) <=
Tmax_s) {
402 n0 += 1;
403 q0 += p->getQ();
404 }
405 }
406
409 }
410 }
411
412 return vertex;
413 }
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: