#include <TrackFilterBFCalibND.h>
Inheritance diagram for TrackFilterBFCalibND:

Public Member Functions | |
| TrackFilterBFCalibND () | |
| ~TrackFilterBFCalibND () | |
| virtual Bool_t | Pass (const TrackContext &) const |
| virtual void | Config (const AlgConfig &) |
Private Member Functions | |
| Bool_t | IsInCoverage (const TrackContext &trackContext) const |
Private Attributes | |
| Int_t | fNHitsInViewMin |
| Int_t | fEndPlaneMax |
| Int_t | fNPlanesMin |
| Float_t | fEdgeDistanceMin |
| PlaneOutline | fOutline |
Definition at line 22 of file TrackFilterBFCalibND.h.
|
|
ctor Definition at line 41 of file TrackFilterBFCalibND.cxx. 00041 : 00042 fNHitsInViewMin(5), 00043 fEndPlaneMax(115), 00044 fNPlanesMin(20), 00045 fEdgeDistanceMin(0.25), 00046 fOutline() 00047 { 00048 TracerSA trace("TrackFilterBFCalibND::TrackFilterBFCalibND()"); 00049 }
|
|
|
dtor Definition at line 54 of file TrackFilterBFCalibND.cxx. 00055 {
00056 TracerSA trace("TrackFilterBFCalibND::~TrackFilterBFCalibND()");
00057 }
|
|
|
read configuration parameters from AlgConfig Implements TrackFilter. Definition at line 140 of file TrackFilterBFCalibND.cxx. References fEdgeDistanceMin, fEndPlaneMax, fNHitsInViewMin, fNPlanesMin, Registry::GetDouble(), Registry::GetInt(), and Registry::KeyExists(). 00141 {
00142 TracerSA trace("TrackFilterBFCalibND::Config(const AlgConfig&)");
00143
00144 if ( ac.KeyExists("NHitsInViewMin") ) {
00145 fNHitsInViewMin = ac.GetInt("NHitsInViewMin");
00146 }
00147
00148 if ( ac.KeyExists("FilterBFCalibNDEndPlaneMax") ) {
00149 fEndPlaneMax = ac.GetInt("FilterBFCalibNDEndPlaneMax");
00150 }
00151
00152 if ( ac.KeyExists("FilterBFCalibNDNPlanesMin") ) {
00153 fNPlanesMin = ac.GetInt("FilterBFCalibNDNPlanesMin");
00154 }
00155
00156 if ( ac.KeyExists("FilterBFCalibNDEdgeDistanceMin") ) {
00157 fEdgeDistanceMin = ac.GetDouble("FilterBFCalibNDEdgeDistanceMin");
00158 }
00159 }
|
|
|
part of TrackFilterBFCalibND::Pass implementation Definition at line 96 of file TrackFilterBFCalibND.cxx. References PlaneOutline::DistanceToEdge(), fOutline, TrackContext::GetBegPlane(), VldContext::GetDetector(), TrackContext::GetEndPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), TrackContext::GetU(), TrackContext::GetV(), TrackContext::GetVldContext(), PlaneOutline::IsInside(), and UgliGeomHandle::uv2xy(). Referenced by Pass(). 00097 {
00098 TracerSA trace("TrackFilterBFCalibND::IsInCoverage(const TrackContext&)");
00099
00100 Int_t beg = trackContext.GetBegPlane();
00101 Int_t end = trackContext.GetEndPlane();
00102
00103 VldContext vldc = trackContext.GetVldContext();
00104 Detector::Detector_t detector = vldc.GetDetector();
00105
00106 UgliGeomHandle ugh(vldc);
00107
00108 Float_t x(0.), y(0.);
00109 Float_t u(0.), v(0.);
00110 Float_t distance(0.), xdistance(0.), ydistance(0.);
00111
00112 for ( Int_t i = beg; i <= end; ++i) {
00113 PlexPlaneId planeId(detector, i);
00114
00115 u = trackContext.GetU(i);
00116 v = trackContext.GetV(i);
00117
00118 // skip test if u or v have not been set by the tracker/fitter
00119 // (their default values then are -99999) or if look obviously
00120 // wrong
00121 if ( fabs(u) > 10. || fabs(v) > 10. ) continue;
00122
00123 ugh.uv2xy(u, v, x, y);
00124 // fail if track position is outside of "PartialCoverage" area
00125 if ( ! fOutline.IsInside(x, y, planeId.GetPlaneView(),
00126 PlaneCoverage::kNearPartial) ) return kFALSE;
00127 // fail if distance to edge is less than allowed
00128 fOutline.DistanceToEdge(x, y, planeId.GetPlaneView(),
00129 planeId.GetPlaneCoverage(),
00130 distance, xdistance, ydistance);
00131 if ( distance < fEdgeDistanceMin ) return kFALSE;
00132 }
00133
00134 return kTRUE;
00135 }
|
|
|
Pass method checks if the track passes cuts used to select good stopping tracks to claibrate ND B-field. If any of the cuts fail this method "short circuits" and returns false Implements TrackFilter. Definition at line 64 of file TrackFilterBFCalibND.cxx. References TrackContext::GetBegPlane(), TrackContext::GetEndPlane(), TrackContext::GetNTrackPlaneU(), TrackContext::GetNTrackPlaneV(), and IsInCoverage(). 00065 {
00066 TracerSA trace("TrackFilterBFCalibND::Pass(const TrackContext&)");
00067
00068 // check if passes #hits cut in both views
00069 if ( trackContext.GetNTrackPlaneU() < fNHitsInViewMin ) return kFALSE;
00070 if ( trackContext.GetNTrackPlaneV() < fNHitsInViewMin ) return kFALSE;
00071
00072 Int_t beg = trackContext.GetBegPlane();
00073 Int_t end = trackContext.GetEndPlane();
00074
00075 // beam track cut
00076 if ( beg > end ) return kFALSE;
00077
00078 // EndPlane cut
00079 if ( end > fEndPlaneMax ) return kFALSE;
00080
00081 // track length cut
00082 if ( (end-beg+1) < fNPlanesMin ) return kFALSE;
00083
00084 // track is within partial coverage area in the ND
00085 // (over its whole length)
00086 if ( ! IsInCoverage(trackContext) ) return kFALSE;
00087
00088 return kTRUE;
00089 }
|
|
|
min distance to the edge of ND partial coverage area (as given by PlaneOutline) Definition at line 61 of file TrackFilterBFCalibND.h. Referenced by Config(). |
|
|
max end plane (to select stopping tracks) Definition at line 50 of file TrackFilterBFCalibND.h. Referenced by Config(). |
|
|
min # of hit planes per view Definition at line 45 of file TrackFilterBFCalibND.h. Referenced by Config(). |
|
|
min acceptable track length in #planes Definition at line 55 of file TrackFilterBFCalibND.h. Referenced by Config(). |
|
|
PlaneOutline calculates distance from a given point to the detector edges Definition at line 67 of file TrackFilterBFCalibND.h. Referenced by IsInCoverage(). |
1.3.9.1