GeometryHelper Class Reference

#include <GeometryHelper.h>

List of all members.

Public Member Functions

 GeometryHelper (const VldContext &vldc)
 GeometryHelper (const TrackContext &)
Double_t GetZ (PlexPlaneId id)
Double_t GetZVtx (PlexPlaneId id, Int_t idir)
Double_t GetX0 (PlexPlaneId id)
Double_t GetdZSteel (PlexPlaneId id)
UgliScintPlnHandle GetScintPlnHandle (const PlexPlaneId &planeid)
void xy2uv (Float_t x, Float_t y, Float_t &u, Float_t &v) const
void uv2xy (Float_t u, Float_t v, Float_t &x, Float_t &y) const
void xy2uv (Double_t x, Double_t y, Double_t &u, Double_t &v) const
void uv2xy (Double_t u, Double_t v, Double_t &x, Double_t &y) const
Float_t GetRotationCorrectedTPos (const CandStripHandle *csh, const CandTrackHandle *cth)
Float_t GetRotationCorrectedTPos (const Reco::Strip_t strip, const CandTrackHandle *cth)

Private Attributes

VldContext fVldc
UgliGeomHandle fUgh

Detailed Description

Utility class provides methods to access geometry data used by the fitter.

Author:
Sergei avva@fnal.gov

Definition at line 21 of file GeometryHelper.h.


Constructor & Destructor Documentation

GeometryHelper::GeometryHelper ( const VldContext vldc  ) 

Definition at line 31 of file GeometryHelper.cxx.

00031                                                      :
00032     fVldc(vldc), fUgh(vldc)
00033 {
00034     TracerSA trace("GeometryHelper::GeometryHelper(const VldContext& vldc)");
00035 }

GeometryHelper::GeometryHelper ( const TrackContext tc  ) 

Definition at line 40 of file GeometryHelper.cxx.

00040                                                      :
00041     fVldc(tc.GetVldContext()), fUgh(tc.GetVldContext())
00042 {
00043     TracerSA trace("GeometryHelper::GeometryHelper(const VldContext& vldc)");
00044 }


Member Function Documentation

Double_t GeometryHelper::GetdZSteel ( PlexPlaneId  id  ) 

steel thickness

Definition at line 116 of file GeometryHelper.cxx.

References fUgh, UgliSteelPlnHandle::GetHalfThickness(), and UgliGeomHandle::GetSteelPlnHandle().

Referenced by DataFT::Init().

00117 {
00118     // Steel thickness
00119     Double_t dZSteel=0.;    
00120     
00121     // 
00122     id.SetIsSteel(kTRUE);
00123     if ( id.IsValid() ) {
00124         UgliSteelPlnHandle ustph = fUgh.GetSteelPlnHandle(id);
00125         dZSteel += 2.*ustph.GetHalfThickness();
00126     }
00127     
00128     return dZSteel;
00129 }

Float_t GeometryHelper::GetRotationCorrectedTPos ( const Reco::Strip_t  strip,
const CandTrackHandle cth 
)

get position of the strip corrected for plane rotations

Definition at line 161 of file GeometryHelper.cxx.

References fUgh, UgliGeomHandle::GetStripHandle(), UgliStripHandle::GetTPos(), CandTrackHandle::GetU(), CandTrackHandle::GetV(), Msg::kDebug, PlaneView::kU, PlaneView::kV, and MSG.

00163 {
00164     Int_t plane = strip->GetPlane();
00165     Float_t lpos(0.);
00166     // get lpos from the track (calculated by the tracker or fitter)
00167     if ( strip->GetPlaneView() == PlaneView::kU ) {
00168         lpos = cth->GetV(plane);
00169     } else if ( strip->GetPlaneView() == PlaneView::kV ) {
00170         lpos = cth->GetU(plane);
00171     }
00172 
00173     // check that lpos value looks valid
00174     if ( fabs(lpos) > 5 ) {
00175         MSG("FitTrackSA", Msg::kDebug) << "lpos = " << lpos  
00176         << " is either bad fit or hasn't been calculated, setting it to 0." 
00177         << endl;
00178         lpos = 0.;
00179     }
00180     
00181     UgliStripHandle ush = fUgh.GetStripHandle(strip->GetStripEndId());
00182     return ush.GetTPos(lpos);
00183 }

Float_t GeometryHelper::GetRotationCorrectedTPos ( const CandStripHandle csh,
const CandTrackHandle cth 
)

get position of the strip corrected for plane rotations

Definition at line 134 of file GeometryHelper.cxx.

References fUgh, CandStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), CandStripHandle::GetStripEndId(), UgliGeomHandle::GetStripHandle(), UgliStripHandle::GetTPos(), CandTrackHandle::GetU(), CandTrackHandle::GetV(), Msg::kDebug, PlaneView::kU, PlaneView::kV, and MSG.

Referenced by DataFT::OneStripPlane(), and DataFT::TwoStripPlane().

00136 {
00137     Int_t plane = csh->GetPlane();
00138     Float_t lpos(0.);
00139     // get lpos from the track (calculated by the tracker or fitter)
00140     if ( csh->GetPlaneView() == PlaneView::kU ) {
00141         lpos = cth->GetV(plane);
00142     } else if ( csh->GetPlaneView() == PlaneView::kV ) {
00143         lpos = cth->GetU(plane);
00144     }
00145 
00146     // check that lpos value looks valid
00147     if ( fabs(lpos) > 5 ) {
00148         MSG("FitTrackSA", Msg::kDebug) << "lpos = " << lpos  
00149         << " is either bad fit or hasn't been calculated, setting it to 0." 
00150         << endl;
00151         lpos = 0.;
00152     }
00153     
00154     UgliStripHandle ush = fUgh.GetStripHandle(csh->GetStripEndId());
00155     return ush.GetTPos(lpos);
00156 }

UgliScintPlnHandle GeometryHelper::GetScintPlnHandle ( const PlexPlaneId planeid  )  [inline]

Definition at line 50 of file GeometryHelper.h.

References fUgh, and UgliGeomHandle::GetScintPlnHandle().

00051                             { return fUgh.GetScintPlnHandle(planeid);};

Double_t GeometryHelper::GetX0 ( PlexPlaneId  id  ) 

radiation lengths in the i-th plane (both steel and scint)

Definition at line 95 of file GeometryHelper.cxx.

References fUgh, UgliSteelPlnHandle::GetHalfThickness(), UgliPlnHandle::GetHalfThickness(), UgliGeomHandle::GetScintPlnHandle(), UgliGeomHandle::GetSteelPlnHandle(), ConstFT::X0_Scint, and ConstFT::X0_Steel.

Referenced by DataFT::Init().

00096 {
00097     // Amount of material in units of radiation length
00098     Double_t x0=0.;
00099     // add X0 of scint        
00100     if ( id.IsValid() ) {
00101         UgliScintPlnHandle uscph = fUgh.GetScintPlnHandle(id);
00102         x0 += 2.*uscph.GetHalfThickness()/X0_Scint;
00103     }
00104     // add X0 of steel
00105     id.SetIsSteel(kTRUE);
00106     if ( id.IsValid() ) {
00107         UgliSteelPlnHandle ustph = fUgh.GetSteelPlnHandle(id);
00108         x0 += 2.*ustph.GetHalfThickness()/X0_Steel;
00109     }
00110     return x0;
00111 }

Double_t GeometryHelper::GetZ ( PlexPlaneId  id  ) 

z-position of the i-th plane

Definition at line 50 of file GeometryHelper.cxx.

References fUgh, UgliGeomHandle::GetScintPlnHandle(), UgliGeomHandle::GetSteelPlnHandle(), UgliSteelPlnHandle::GetZ0(), and UgliPlnHandle::GetZ0().

Referenced by GetZVtx(), and DataFT::Init().

00051 {
00052     // Return z-position of the i-th scint plane (or the i-th steel 
00053     // plane in case there is no scintillator)
00054     if ( id.IsValid() ) {
00055         UgliScintPlnHandle usph = fUgh.GetScintPlnHandle(id);
00056         return usph.GetZ0();
00057     }
00058 
00059     // not valid === no scint plane here - use Z of steel     
00060     id.SetIsSteel(kTRUE);
00061     if ( id.IsValid() ) {
00062         UgliSteelPlnHandle usph = fUgh.GetSteelPlnHandle(id);
00063         return usph.GetZ0();
00064     }
00065     
00066     // should never get here
00067     assert(!"Neither scint, not steel are valid here");
00068     return 0.;
00069 }

Double_t GeometryHelper::GetZVtx ( PlexPlaneId  begin,
Int_t  idir 
)

z-position of the track vertex

Return z position of the track vertex, given begin plane and track direction. Vertex position is defined to be in the middle of the previous (ie against track direction) steel plane if it exists, or just 0.03m "upstream" of begplane

Definition at line 77 of file GeometryHelper.cxx.

References fUgh, PlexPlaneId::GetAdjoinSteel(), UgliGeomHandle::GetSteelPlnHandle(), GetZ(), UgliSteelPlnHandle::GetZ0(), and PlexPlaneId::IsValid().

Referenced by DataFT::Init().

00078 {
00079     // get the adjoin steel plane; note direction '-idir' - 
00080     // we want a "previous" plane
00081     PlexPlaneId prevSteel = begin.GetAdjoinSteel(-idir);
00082     if ( prevSteel.IsValid() ) {
00083         // have a steel plane
00084         UgliSteelPlnHandle usph = fUgh.GetSteelPlnHandle(prevSteel);
00085         return usph.GetZ0();
00086     } else {
00087         // no steel plane - just go 0.03m "upstream" of beg plane
00088         return GetZ(begin) - idir*0.03;                
00089     }
00090 }

void GeometryHelper::uv2xy ( Double_t  u,
Double_t  v,
Double_t &  x,
Double_t &  y 
) const [inline]

Definition at line 65 of file GeometryHelper.h.

References fUgh, and UgliGeomHandle::uv2xy().

00066                     { fUgh.uv2xy(u, v, x, y); };

void GeometryHelper::uv2xy ( Float_t  u,
Float_t  v,
Float_t &  x,
Float_t &  y 
) const [inline]

Definition at line 59 of file GeometryHelper.h.

References fUgh, and UgliGeomHandle::uv2xy().

Referenced by DataFT::SwimAsSwimmer().

00060                     { fUgh.uv2xy(u, v, x, y); };

void GeometryHelper::xy2uv ( Double_t  x,
Double_t  y,
Double_t &  u,
Double_t &  v 
) const [inline]

Definition at line 62 of file GeometryHelper.h.

References fUgh, and UgliGeomHandle::xy2uv().

00063                     { fUgh.xy2uv(x, y, u, v); };

void GeometryHelper::xy2uv ( Float_t  x,
Float_t  y,
Float_t &  u,
Float_t &  v 
) const [inline]

UV <-> XY conversion functions

Definition at line 56 of file GeometryHelper.h.

References fUgh, and UgliGeomHandle::xy2uv().

Referenced by DataFT::SwimAsSwimmer().

00057                     { fUgh.xy2uv(x, y, u, v); };


Member Data Documentation

Definition at line 81 of file GeometryHelper.h.


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1