CAVEAT: Basically, I'm just using these pages as a notepad. The idea is to make the doxygen generated commets reflect the stuff here eventually
Overiew
AcdReconAlg::reconstruct( const Event::AcdDigiCol& digiCol ) is the main function.
it calls
AcdPha2MipTool(const Event::AcdDigiCol& digiCol, Event::AcdHitCol& hits, AcdRecon::AcdHitMap& hitMap )
Which converts all the digis to calibrated AcdHits.
AcdReconAlg::trackDistances(...)
Which does all the geometrical computations in this order:
And then stores all of the cached AcdReconstruction data on the TDS
Geometrical Functions
These functions are defined in AcdRecon/AcdReconFuncs.h and implemented in src/AcdReconFuncs.cxx
pointPoca(const Track& track, const Point& point, arcLength, doca, Point& poca)
Gets the point of closest approach between a track projection and a space point.
Inputs:
track -> the track projectection data
point -> the point in question
Outputs:
arcLength -> distance along the track where the poca occurs => poca = track.m_point + arcLength * track.m_dir
doca -> distance of clostest approach == | point - poca |
poca -> the point of closest approach
crossesPlane(const Track& track, const Point& plane, int face, arcLength, localX,localY, Point& hitPoint)
Gets the point where a track projection crosses a plane. This assumes that the plane is oriented along a cartiesen axis
Inputs:
track -> the track projectection data
point -> point at the center of the plane
face -> enum which defines the orientation/ side of the LAT the plane is on (top=0, -Y, -X, +Y, +X, bottom)
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
localX -> position of the crossing point relative to the plane center
localY
hitPoint -> the point where the track projection crosses the plane
tilePlane(const Track& track, const Tile& tile, arcLength, localX, localY,activeX, activeY, active2D, Point& hitPoint)
Gets the point where a track projection crosses a tile
Inputs:
track -> the track projectection data
tile -> the geomertical informatio about the tile
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
localX -> position of the crossing point relative to the plane center
localY
activeX -> position of the crossing point relative to the edge of the active area ( >0 is in active area)
activeY
active2D -> the larger of activeX and activeY
hitPoint -> the point where the track projection crosses the plane (+x , +y, -x, -y edges in local frame)
tileEdgePoca(const Track& track, const Tile& tile,arcLength, dist, Point& poca, Vector& vector, int& region)
Gets the point where a track projection (that goes inside a tile) comes closest one of the edges of the tile
Inputs:
track -> the track projectection data
tile -> the geomertical informatio about the tile
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
dist -> the distance of closest approach between the track and the tile edge (in 3D)
poca -> the point of closest approach along the track to the tile edge
vector -> the vector from the poca to the closest point on the tile edge
region -> a code to show which edge of the tile was considered (+y,+x,-y,-x)
tileEdgeCornerPoca(const Track& track, const Tile& tile,arcLength, dist, Point& poca, Vector& vector, int& region)
Gets the point where a track projection (that goes outside a tile) comes closest one of the edges or corners of the tile
Inputs:
track -> the track projectection data
tile -> the geomertical informatio about the tile
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
dist -> the distance of closest approach between the track and the tile edge (in 3D)
poca -> the point of closest approach along the track to the tile edge
vector -> the vector from the poca to the closest point on the tile edge
region -> a code to show which edge of the tile was considered (y,+x,+y,-x edges, ++, +, --, -+ corners)
ribbonPlane(const Track& track, const Ribbon& ribbon, arcLength, dist, Point& hitPoint)
Gets the point where a track projection crosses a plane. This assumes that the plane is oriented along a cartiesen axis
Inputs:
track -> the track projectection data
ribbon -> the geomertical informatio about the tile
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
dist -> the distance of closest approach between the track and the ribbon
hitPoint -> the point where the track projection crosses the plane
ribbonPoca(const Track& track, const Ribbon& ribbon, arcLength, dist, Point& poca, Vector& vector, int& region)
Gets the point where a track projection crosses a plane. This assumes that the plane is oriented along a cartiesen axis
Inputs:
track -> the track projectection data
ribbon -> the geomertical informatio about the tile
Outputs:
arcLength -> distance along the track where the plane is crossed occurs => hitPoint = track.m_point + arcLength * track.m_dir
dist -> the distance of closest approach between the track and the ribbon
poca -> the point of closest approach along the track to the ribbon
vector -> the vector from the poca to the closest point on the ribbon
region -> a code to show which edge of the ribbon was considered (+,- in local coords)
Track Projection Functions
These functions are also defined int AcdRecon/AcdReconFuncs.h and implemented in src/AcdReconFuncs.cxx
errorAtXPlane(delta, const TkrTrackParams& track, HepMatrix& covAtPlane)
errorAtXPlane(delta, const TkrTrackParams& track, HepMatrix& covAtPlane)
errorAtXPlane(delta, const TkrTrackParams& track, HepMatrix& covAtPlane)
Projects the covarience martix onto a plane This assumes that the plane is oriented along a cartiesen axis
Inputs:
delta -> normal distance from end of track to plane
track -> the track parameters (esp. the cov. martix)
Outputs:
covAtPlane -> the covarience matrix projected to the plane, expressed in local coords (XX, XY / YX, YY)
projectErrorAtPoca(const TrackData& track, const TkrTrackParams& trackParams, const Point& poca, const Vector& pocaVector, pocaError)
Projects the covarience martix along the vector between the POCA and the edge of the tile of ribbon
Inputs:
track, trackParams -> the track data & track parameters (esp. the cov. martix)
poca -> the point of closest approach to the tile or ribbon edge
pocaVector -> the vector from the POCA to the closest edge
Outputs:
pocaError -> the projection of the covareince matrix along the pocaVector
Internal Data structures
These structures are defined in AcdRecon/AcdReconStruct.h
They are only for passing around information with the AcdRecon code. The structures that export code to the TDS and ROOT are defined in Event/Recon/AcdRecon
PocaData
this stores eveything we might want to know about where a track goes relative to a tile or ribbon
// stuff about the Tile or Ribbon
idents::AcdId m_id; // The AcdId of the hit element
// stuff about the DOCA to the center of the tile or ribbon
double m_arcLengthCenter; // Length along the track to the POCA to the center of the tile
double m_docaCenter; // The distance of closest aproach to the center of the tile
Point m_pocaCenter; // The POCA to the center of the tile
// stuff about the point the track projection crosses the tile or ribbon plane
double m_arcLengthPlane; // Length along the track to the plane of the detector
double m_activeX; // 2D active distance in local X and Y ( For the sides X is horizontal, Y is vertical (aka Z) )
double m_activeY
double m_active2D; // The distance of closest aproach to the relevent edge in 2D
Point m_inPlane; // 3D point that track crosses detector plane
double m_localX; // The local coordinates. For the sides X is horizontal, Y is vertical (aka Z)
double m_localY;
double m_localCovXX; // The local covarience terms. For the sides X is horizontal, Y is vertical (aka Z)
double m_localCovXY;
double m_localCovYY;
double m_cosTheta; // angle between track and plane normal
double m_path; // pathlength of track in the active material
// stuff about the POCA between the track projection and the closest edge or corner of the tile or ribbon
double m_arcLength; // Length along the track to the poca
double m_active3D; // The distance of closest aproach to the relevent edge in 3D
double m_active3DErr; // The error on distance of closest aproach to the relevent edge in 3D
Point m_poca; // Point of closest approach
Vector m_pocaVector; // Vector from Track to POCA
// stuff about where the POCA occurs relative to the tile or ribbon
int m_region; // One of the enums in "??"
TrackData
HepPoint3D m_point; // the start (or end) point of the track
HepVector3D m_dir; // the direction of the track
double m_energy; // the energy of the track at the start point
int m_index; // the index number of this track
bool m_upward; // which side of track