Linear Collider Forum



Home » Software Tools » Marlin et al » MarlinUtil Helix class (misleading doc in HelixClass header file)
MarlinUtil Helix class [message #2182] Fri, 29 July 2011 07:05
daniel_jeans
Messages: 6
Registered: April 2010
Dear all,

2 comments about HelixClass:

1) the doc for HelixClass.h claims that it's output is a float[3] (a 3d position), while it actually fills a float[6] (a pair of 3d positions at the 2 possible intersections in XY).
this can cause difficult to find segmentation faults when I pass it a float[3]...!

2) the description in the header file also claims that the getDistanceToPoint method "Return[s] distance of the closest approach of the helix to arbitrary 3D point in space".
This is not true. It finds the point of closest approach in 2d, then returns the 3d distance at this point (as well as the xy and z distances).

I think both of these points can easily be clarified in the documentation.

Thanks,
Daniel.

code snippet for feature (1):


v01-11/MarlinUtil/v01-03/include/HelixClass.h


/**
.
.
* Output : <br>
* point[3] - coordinates of intersection point. <br>
.
.
*/
float getPointOnCircle(float Radius, float * ref, float * point);

-------------------------

v01-11/MarlinUtil/v01-03/source/src/HelixClass.cc

float HelixClass::getPointOnCircle(float Radius, float * ref, float * point) {

.
.
.
float time2;
if (tt1 < tt2) {
point[0] = xx1;
point[1] = yy1;
point[3] = xx2;
point[4] = yy2;
time = tt1;
time2 = tt2;
}
else {
point[0] = xx2;
point[1] = yy2;
point[3] = xx1;
point[4] = yy1;
time = tt2;
time2 = tt1;
}

point[2] = ref[2]+time*_momentum[2];
point[5] = ref[2]+time2*_momentum[2];

.
.
}


 
Read Message
Previous Topic:new ilcsoft release v01-11
Next Topic:new ilcsoft release v01-12
Goto Forum:
  


Current Time: Tue Oct 15 11:31:51 Pacific Daylight Time 2019
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software