[Halld-offline] vertex position from hit-based tracks
Craig Bookwalter
craigb at jlab.org
Tue Nov 3 11:37:16 EST 2009
Many thanks, this will keep me busy for a while!
David Lawrence wrote:
>
> Hi Craig,
>
> I just spoke with Simon and realized there was some confusion on
> how DReferenceTrajectory::DistToRT() works. It is set up to assume
> that the DCoordinateSystem object represents a wire and will find the
> point of closest approach (POCA) to that wire. This works OK for a
> plane when the track is more or less perpendicular to the plane, but
> will be less accurate as the angle to the plane increases.
>
> This needs to be fixed in the DReferenceTrajectory class and will
> be soon. There is another solution though that currently exists in the
> repository which uses DMagneticFieldStepper. Below is a snippet of
> code to give you the idea of what needs to be done assuming you have
> the JEventLoop and DTrack object pointers.
>
> // We must get a pointer to the magnetic field object so do a small
> backflip to get it using DApplication
> DApplication* dapp = dynamic_cast<DApplication*>(loop->GetJApplication());
>
> // Create a DMagenticFieldStepper object
> DMagneticFieldStepper stepper(dapp->GetBfield(), track->charge());
>
> // Swim to a plane defined by "origin" and "norm". "origin" is any
> point in the plane.
> double pathlen; // Holds pathlength from starting point to
> intersection with plane
> DVector3 pos = track->position(); // Holds starting position on entry
> and intersection point on output
> DVector3 mom = track->momentum(); // Holds starting momentum on entry
> and intersection point on output
> stepper.SwimToPlane(pos, mom, origin, norm, &pathlen);
>
> The DMagneticFieldStepper class also has a SwimToRadius method that
> can be used to find the intersection point with a cylinder centered on
> the beamline.
>
> I hope this helps.
>
> -David
>
>
> Simon Taylor wrote:
>> Hi, Craig.
>>
>> You can get the position of the closest approach to the beam line of the
>> track using the position() method; e.g. track->position();
>>
>> You can track to any plane using one of the methods of the
>> DReferenceTrajectory class ( a DReferenceTrajectory object is attached
>> to the wire-based track). Here's a code snippet:
>>
>> DReferenceTrajectory *rt=const_cast<DReferenceTrajectory *>(track->rt);
>> DCoordinateSystem st_plane; // plane parameters
>> double s; // path length
>> double doca=rt->DistToRT(&st_plane,&s); // Distance of closest
>> approach between plane // and track
>>
>> Simon
>>
>> Craig Bookwalter wrote:
>>
>>> Hi folks,
>>> I'm looking for a couple methods to help me determine the event
>>> start time, namely:
>>> - a method for getting the vertex position of a hit-based track in
>>> the CDC or FDC
>>> - a method for getting the path length along a hit-based track from,
>>> say, the start counter to the target (this would require some
>>> association between start counter hits and CDC/FDC tracks, which I'm not
>>> sure is happening yet)
>>>
>>> I've looked through the DOxygen docs and haven't seen anything that
>>> stuck out to me, but I certainly could have missed something. If these
>>> guys do not yet exist I would be happy to help implement them.
>>>
>>> Thanks in advance!
>>>
>>> --cb
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> Halld-offline mailing list
>> Halld-offline at jlab.org
>> https://mailman.jlab.org/mailman/listinfo/halld-offline
>>
>
> --
>
> ------------------------------------------------------------------------
> David Lawrence Ph.D.
> Staff Scientist Office: (757)269-5567 [[[ [ [ [
> Jefferson Lab Pager: (757)584-5567 [ [ [ [ [ [
> http://www.jlab.org/~davidl davidl at jlab.org [[[ [[ [[ [[[
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Halld-offline mailing list
> Halld-offline at jlab.org
> https://mailman.jlab.org/mailman/listinfo/halld-offline
--
-------------------------------------------------------------------------
Craig Bookwalter FSU Office: (850) 644 3808
Department of Physics JLab Office: (757) 269 5465
Florida State University craigb at hadron.physics.fsu.edu
Tallahasse, FL 32306 craigb at jlab.org
"One toke? You poor fool. Just wait till you see those (expletive) bats."
-------------------------------------------------------------------------
More information about the Halld-offline
mailing list