#include <GeometryHelper.h>
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 |
Definition at line 21 of file GeometryHelper.h.
|
|
Definition at line 31 of file GeometryHelper.cxx. 00031 : 00032 fVldc(vldc), fUgh(vldc) 00033 { 00034 TracerSA trace("GeometryHelper::GeometryHelper(const VldContext& vldc)"); 00035 }
|
|
|
Definition at line 40 of file GeometryHelper.cxx. References tc. 00040 : 00041 fVldc(tc.GetVldContext()), fUgh(tc.GetVldContext()) 00042 { 00043 TracerSA trace("GeometryHelper::GeometryHelper(const VldContext& vldc)"); 00044 }
|
|
|
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 }
|
|
||||||||||||
|
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, and Reco::Strip_t. 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 }
|
|
||||||||||||
|
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(), 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 }
|
|
|
Definition at line 50 of file GeometryHelper.h. 00051 { return fUgh.GetScintPlnHandle(planeid);};
|
|
|
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(), and UgliGeomHandle::GetSteelPlnHandle(). 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 }
|
|
|
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 }
|
|
||||||||||||
|
z-position of the track vertex 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 }
|
|
||||||||||||||||||||
|
Definition at line 65 of file GeometryHelper.h.
|
|
||||||||||||||||||||
|
Definition at line 59 of file GeometryHelper.h. Referenced by DataFT::SwimAsSwimmer().
|
|
||||||||||||||||||||
|
Definition at line 62 of file GeometryHelper.h.
|
|
||||||||||||||||||||
|
UV <-> XY conversion functions Definition at line 56 of file GeometryHelper.h. Referenced by DataFT::SwimAsSwimmer().
|
|
|
Definition at line 82 of file GeometryHelper.h. Referenced by GetdZSteel(), GetRotationCorrectedTPos(), GetX0(), GetZ(), and GetZVtx(). |
|
|
Definition at line 81 of file GeometryHelper.h. |
1.3.9.1