TrackFilterBFCalibFD Class Reference

#include <TrackFilterBFCalibFD.h>

Inheritance diagram for TrackFilterBFCalibFD:
TrackFilter

List of all members.

Public Member Functions

 TrackFilterBFCalibFD ()
 ~TrackFilterBFCalibFD ()
virtual Bool_t Pass (const TrackContext &) const
virtual void Config (const AlgConfig &)

Private Attributes

Int_t fNHitsInViewMin
Int_t fNPlanesMin
Double_t fZDistanceMin
Double_t fRadiusMin
Double_t fRadiusMax

Detailed Description

Filter that selects only tracks useful for calibrating FD b-field. Requires minimum number of planes, entire track goes through "partial coverage" area and ends in the detector.

Author:
Sergei avva@fnal.gov

Filter that selects only tracks useful for calibrating FD b-field. Requires minimum number of planes and contained track end.

Author:
Sergei avva@fnal.gov

Definition at line 19 of file TrackFilterBFCalibFD.h.


Constructor & Destructor Documentation

TrackFilterBFCalibFD::TrackFilterBFCalibFD (  ) 

ctor

Definition at line 41 of file TrackFilterBFCalibFD.cxx.

00041                                            :
00042     fNHitsInViewMin(4),
00043     fNPlanesMin(20),
00044     fZDistanceMin(0.5),
00045     fRadiusMin(0.5),
00046     fRadiusMax(3.5)
00047 {
00048     TracerSA trace("TrackFilterBFCalibFD::TrackFilterBFCalibFD()");
00049 }

TrackFilterBFCalibFD::~TrackFilterBFCalibFD (  ) 

dtor

Definition at line 54 of file TrackFilterBFCalibFD.cxx.

00055 {
00056     TracerSA trace("TrackFilterBFCalibFD::~TrackFilterBFCalibFD()");
00057 }


Member Function Documentation

void TrackFilterBFCalibFD::Config ( const AlgConfig ac  )  [virtual]

read configuration parameters from AlgConfig

Implements TrackFilter.

Definition at line 63 of file TrackFilterBFCalibFD.cxx.

References fNHitsInViewMin, fNPlanesMin, fRadiusMax, fRadiusMin, fZDistanceMin, Registry::GetDouble(), Registry::GetInt(), Registry::GetType(), and Registry::KeyExists().

00064 {
00065     TracerSA trace("TrackFilterBFCalibFD::Config(const AlgConfig&)");
00066 
00067     if ( ac.KeyExists("NHitsInViewMin") ) {
00068         fNHitsInViewMin = ac.GetInt("NHitsInViewMin");
00069     }
00070 
00071     if ( ac.KeyExists("FilterBFCalibFDNPlanesMin") &&
00072             ac.GetType("FilterBFCalibFDNPlanesMin") == typeid(Int_t) ) {
00073         fNPlanesMin = ac.GetInt("FilterBFCalibFDNPlanesMin");
00074     }
00075 
00076     if ( ac.KeyExists("FilterBFCalibFDZDistanceMin") &&
00077             ac.GetType("FilterBFCalibFDZDistanceMin") == typeid(Double_t) ) {
00078         fZDistanceMin = ac.GetDouble("FilterBFCalibFDZDistanceMin");
00079     }
00080 
00081     if ( ac.KeyExists("FilterBFCalibFDRadiusMin") &&
00082             ac.GetType("FilterBFCalibFDRadiusMin") == typeid(Double_t) ) {
00083         fRadiusMin = ac.GetDouble("FilterBFCalibFDRadiusMin");
00084     }
00085 
00086     if ( ac.KeyExists("FilterBFCalibFDRadiusMax") &&
00087             ac.GetType("FilterBFCalibFDRadiusMax") == typeid(Double_t) ) {
00088         fRadiusMax = ac.GetDouble("FilterBFCalibFDRadiusMax");
00089     }
00090 
00091 }

Bool_t TrackFilterBFCalibFD::Pass ( const TrackContext trackContext  )  const [virtual]

Pass method checks if the track passes cuts used to select good stopping tracks to claibrate FD B-field. If any of the cuts fail this method "short circuits" and returns false

Implements TrackFilter.

Definition at line 99 of file TrackFilterBFCalibFD.cxx.

References fNHitsInViewMin, fNPlanesMin, fRadiusMax, fZDistanceMin, TrackContext::GetBegPlane(), TrackContext::GetEndPlane(), CandRecoHandle::GetEndU(), CandRecoHandle::GetEndV(), CandRecoHandle::GetEndZ(), TrackContext::GetNTrackPlaneU(), TrackContext::GetNTrackPlaneV(), TrackContext::GetTrackHandle(), and TrackContext::GetVldContext().

00100 {
00101     TracerSA trace("TrackFilterBFCalibFD::Pass(const TrackContext&)");
00102 
00103 
00104     // set Z extent
00105     // doing it every event makes filter slow, so
00106     // instead do it once and save in static variables
00107     static Bool_t   zExtentSet  = kFALSE;
00108     static Double_t zMinSM1     = 0.;
00109     static Double_t zMaxSM1     = 0.;
00110     static Double_t zMinSM2     = 0.;
00111     static Double_t zMaxSM2     = 0.;
00112 
00113     // due to some bizarro convention id of SM1 is "0"
00114     // and id of SM2 is "1"
00115     static const Int_t Sm1 = 0;
00116     static const Int_t Sm2 = 1;
00117 
00118     if ( ! zExtentSet ) {
00119         UgliGeomHandle ugh(trackContext.GetVldContext());
00120 
00121         ugh.GetZExtent(zMinSM1, zMaxSM1, Sm1);
00122         ugh.GetZExtent(zMinSM2, zMaxSM2, Sm2);
00123 
00124         zExtentSet = kTRUE;
00125     }
00126 
00127     // check if passes #hits cut in both views
00128     if ( trackContext.GetNTrackPlaneU() < fNHitsInViewMin ) return kFALSE;
00129     if ( trackContext.GetNTrackPlaneV() < fNHitsInViewMin ) return kFALSE;
00130 
00131     Int_t beg = trackContext.GetBegPlane();
00132     Int_t end = trackContext.GetEndPlane();
00133 
00134     // track length cut
00135     if ( abs(end-beg)+1 < fNPlanesMin ) return kFALSE;
00136 
00137     // get track end coord's
00138     const CandTrackHandle*  pcth = trackContext.GetTrackHandle();
00139     Double_t endu = pcth->GetEndU();
00140     Double_t endv = pcth->GetEndV();
00141     Double_t endz = pcth->GetEndZ();
00142 
00143     // endtrack position along Z axis should be at least
00144     // fMinZDistance from the closest supermodule boundary
00145     if ( endz<(zMinSM1+fZDistanceMin) ||
00146         ( endz>(zMaxSM1-fZDistanceMin) && endz<(zMinSM2+fZDistanceMin) ) ||
00147         endz>(zMaxSM2-fZDistanceMin) ) return kFALSE;
00148 
00149     // check that fMinRadius < radius < fMaxRadius
00150     Double_t radius = sqrt(endu*endu + endv*endv);
00151     if ( radius<fRadiusMin || radius>fRadiusMax ) return kFALSE;
00152 
00153     return kTRUE;
00154 }


Member Data Documentation

min # of hit planes per view

Definition at line 37 of file TrackFilterBFCalibFD.h.

Referenced by Config(), and Pass().

min acceptable track length in planes

Definition at line 42 of file TrackFilterBFCalibFD.h.

Referenced by Config(), and Pass().

max distance from z-axis

Definition at line 59 of file TrackFilterBFCalibFD.h.

Referenced by Config(), and Pass().

min distance from z-axis

Definition at line 54 of file TrackFilterBFCalibFD.h.

Referenced by Config().

Min distance from front/end face or supermodule boundary along Z axis

Definition at line 49 of file TrackFilterBFCalibFD.h.

Referenced by Config(), and Pass().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1