Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlgTrackSRList.h

Go to the documentation of this file.
00001 
00002 // $Id: AlgTrackSRList.h,v 1.34 2005/12/13 15:59:46 rhatcher Exp $
00003 //
00004 // AlgTrackSRList.h
00005 //
00006 // AlgTrackSRList is a concrete TrackSRList Algorithm class.
00007 //
00008 // Author:  R. Lee 2001.02.26
00009 // Revised: B. Rebel 2003.06.23
00010 //
00012 
00013 #ifndef ALGTRACKSRLIST_H
00014 #define ALGTRACKSRLIST_H
00015 
00016 #include "Algorithm/AlgBase.h"
00017 #include<vector>
00018 #include<map>
00019 #include "Conventions/Detector.h"
00020 #include "UgliGeometry/UgliGeomHandle.h"
00021 #include "CandDigit/CandDigitListHandle.h"
00022 #include "RecoBase/CandStripListHandle.h"
00023 #include "RecoBase/CandStripListHandle.h"
00024 #include "RecoBase/CandSliceListHandle.h"
00025 #include "Conventions/PlaneView.h"
00026 #include "Conventions/SimFlag.h"
00027 #include "Validity/VldContext.h"
00028 #include "DataUtil/PlaneOutline.h"
00029 
00030 class CandStripHandleItr;
00031 class TrackClusterSRItr;
00032 class TrackClusterSR;
00033 class Track2DSR;
00034 class Track2DSRItr;
00035 class CandTrackSRHandleItr;
00036 class CandTrackSRListHandle;
00037 class TObjArray;
00038 class CandSliceHandle;
00039 
00040 class AlgTrackSRList : public AlgBase
00041 {
00042 
00043 public:
00044   AlgTrackSRList();
00045   virtual ~AlgTrackSRList();
00046   virtual void RunAlg(AlgConfig &ac, CandHandle &ch, CandContext &cx);
00047   virtual void Trace(const char *c) const;
00048 
00049 private:
00050 
00051   void AddBestPlaneClusterToTrack(TrackClusterSR *besttc, Track2DSR *track);
00052   Int_t AddClustersToTracks(Track2DSRItr &trackItr,  
00053                             TrackClusterSRItr &planeClusterItr,
00054                             Int_t direction, Int_t iterate, std::vector<Int_t>&hitPlanes, Int_t trk2dmin);
00055   Bool_t CheckForBadClusters(TrackClusterSR *besttc, Track2DSR *track, Int_t &planesBefore, 
00056                              Int_t direction, Int_t trk2dmin);
00057   void CleanUp(TObjArray *trackList, TObjArray *clusterList);
00058   void DeleteTwinTracks(CandTrackSRHandleItr &candTracks1, CandTrackSRHandleItr &candTracks2,
00059                         TObjArray *candTracks, Int_t uMaxTrack, Int_t vMaxTrack, 
00060                         Int_t nmax3dtrk, CandHandle &ch);
00061   void FillInGaps(Track2DSRItr &trackItr, TrackClusterSRItr &clusterItr, Int_t direction);
00062   Int_t FillTrackList(TrackClusterSRItr &clusterItr, TObjArray *trackList, TObjArray *seedClusters,
00063                       Double_t houghSlope, Double_t houghIntercept,
00064                       Int_t direction, Int_t iterate, Int_t &begPlane);
00065   void Find2DTrackEndPoints(CandStripHandleItr &stripItr, Int_t &vtxPlane, 
00066                             Int_t &endPlane, Int_t &numPlanes);
00067   Bool_t PlaneIsActive(Int_t plane, Float_t u, Float_t v, Float_t tol);
00068   Int_t FindNumSkippedPlanes(Int_t currentPlane, Int_t prevPlane, 
00069                              std::vector<Int_t>& hitPlanes, 
00070                              Int_t direction);
00071   Int_t FindNumSkippedPlanes(Int_t currentPlane, Int_t prevPlane, Float_t prevTPos, 
00072                              Float_t prevZPos, Double_t trackSlope, 
00073                              Int_t direction, PlaneView::PlaneView_t view);                                                                          
00074   Int_t FindNumSkippedPlanes(Int_t currentPlane, Int_t prevPlane,
00075                            Float_t PrevUPos, Float_t PrevVPos, 
00076                            Float_t prevZPos,
00077                            Double_t trackSlopeU, 
00078                            Double_t trackSlopeV,
00079                            Int_t direction,
00080                            PlaneView::PlaneView_t view);
00081   Int_t FindTimingDirection(CandStripHandleItr &allStripItr, Float_t uTrackSlope, 
00082                             Float_t uTrackIntercept, Float_t vTrackSlope,
00083                             Float_t vTrackIntercept);
00084   Int_t FindTimingDirection(TrackClusterSRItr &clusterItr);
00085   void FormCandTrackSR(Track2DSRItr &uTrackItr, Track2DSRItr &vTrackItr, 
00086                        TObjArray *candTracks, CandHandle &ch, 
00087                        CandSliceHandle *slice, AlgHandle ah, CandContext cxx, 
00088                        Int_t direction);
00089   Int_t IdentifyBadTracks(Track2DSRItr &trackItr, Int_t iterate, Int_t trk2dmin);
00090   Bool_t IsBestClusterInPlane(TrackClusterSR *planeCluster,
00091                               TrackClusterSR *prevCluster, 
00092                               Int_t numSkippedHit, Int_t nHit, 
00093                               Int_t planesBefore, 
00094                               Double_t trackSlope, Track2DSR *track, 
00095                               Double_t *residParams, Int_t dplane,Bool_t isSpectrometerPlane);
00096   Int_t LookForBadClusters(TrackClusterSRItr &clusterItr, TObjArray *trackList,
00097                            Int_t direction);
00098   void MakeTrackClusters(TObjArray *trackClusterList,
00099                          CandStripHandleItr &stripItr, 
00100                          CandTrackSRListHandle &cth, 
00101                          Int_t expectedStrips, Int_t direction);
00102   void MarkUsedClusters(Track2DSRItr &trackItr, TrackClusterSRItr &clusterItr, 
00103                         Int_t iterate, Int_t nmaxtrack, Double_t houghSlope, 
00104                         Double_t houghIntercept);
00105   Int_t RemoveTrackSubsets(Track2DSRItr &trackItr1, Track2DSRItr &trackItr2,  
00106                           TObjArray *trackList);
00107 
00108   void SpectrometerTracking(TObjArray * trackList, CandTrackSRListHandle &cth, 
00109                             CandSliceHandle *slice,   CandSliceHandle  *dupSlice, 
00110                             CandContext cx);
00111   void MergeTracks(TObjArray * tracklist, Int_t direction);
00112 void RemoveUnusedSpectStrips(CandTrackSRListHandle & cth, 
00113                              CandStripListHandle *striplist);
00114  void RemoveStripsInSlice(CandTrackSRListHandle & cth, 
00115                           CandSliceListHandle *slicelist);
00116 
00117   Detector::Detector_t fDetector;
00118   SimFlag::SimFlag_t fSimFlag;
00119   Int_t fMapIsWide[1000];
00120   Int_t fSliceVtxUPlane;
00121   Int_t fSliceVtxVPlane;
00122   Int_t fSliceEndUPlane;
00123   Int_t fSliceEndVPlane;
00124   Int_t fSliceVtxPlane;
00125   Int_t fSliceEndPlane;
00126   Int_t fSliceNUPlanes;
00127   Int_t fSliceNVPlanes;
00128   Int_t fSliceNPlanes;
00129   Double_t fSliceDzDs;
00130   VldContext fVldc;
00131   PlaneOutline fPL;
00132 
00133   Int_t fParmMaxNStrip; //Maximum number of strips allowed in a cluster
00134   Int_t fParmMaxNExtraStrip; //Fudge factor for max # of strips allowed
00135   Int_t fParmTrk2DPlnEnd; 
00136   Double_t fParmTrk2DWin0; //spread allowed in tpos
00137   Double_t fParmHitNTime; //time variable to see if digits in time
00138   Double_t fParmHitTime; //time variable to see if digits in time
00139   Int_t fParmTrk2DNSkip; //number of planes allowed between clusters same track
00140   Int_t fParmTrk2DNSkipHit; //number of planes allowed between clusters same track
00141   Double_t fParmTrk2DAlpha; //weighting factor for determining slope from one cluste rto the next
00142   Double_t fParmTrk2DMaxResid;
00143   Int_t fParmTrk2DNSkipRemove; 
00144   Int_t fParmTrkNPlaneGoodDir; //# of planes needed for good timing direction
00145   Double_t fParmTrk2DDirCosNSigma; //factor to determine allowed angle between clusters
00146   Double_t fParmTrk2DDirCosError2; 
00147   Int_t fParmTrk2DEndPlaneDiff;  //allowed # of planes diff between removed 
00148                                  //cluster and end of event
00149 
00150   Int_t fParmMinSingleHit; //min # of hits for single hit
00151   Int_t fParmSingleHitDef; //# of hits allowed for single hit
00152 
00153   Int_t fParmTrk2DNHough0; //max # of hits in a short track
00154   Double_t fParmTrk2DLinA0; //min max residual for lin fit to short track
00155   Double_t fParmTrk2DLinB0; //factor to increase max resid for short track based on #
00156                             // of skipped planes
00157   Int_t fParmTrk2DNHough; //max size of window when considering upstream info
00158   Double_t fParmTrk2DLinA; //min max residual when considering upstream info
00159   Double_t fParmTrk2DLinB; //factor to increase max resid when considering upstream info
00160   Double_t fParmTrk2DNSigmaA; //number of sigma allowed when on the seed cluster
00161   Int_t fParmTrk2DNSeed; //minimum # of planes needed to form a track
00162   Int_t fParmTrk2DNContiguous; //# of contiguous planes needed in a 2d track
00163   Double_t fParmTrk2DHitFraction; //min fraction of hit planes needed of total in view
00164   Double_t fParmTrk2DTwinMatchFraction; //fraction of matching clusters in tracks to 
00165                                         //determine if tracks are the same
00166   Int_t fParmTrk2DSubsetNHit; //max # of hits allowed to be shared by multiple tracks
00167   Int_t fParmTrk2DSubsetDHit; //parameter to check which track has the most hits
00168 
00169   Int_t fParmDiffViewBegPlaneMatch; //allowed # of planes between vtx in each view
00170   Int_t fParmDiffViewEndPlaneMatch; //allowed # of planes between end in each view
00171   Double_t fParmDiffViewPlaneOverlap; //used to check for 2d tracks belonging to a 3d track
00172   Double_t fParmDiffViewTimeMatch; //check if 2d tracks occur in time with each other
00173 
00174   Double_t fParmTrk3DTwinFrac; //check for copies of same 3d track
00175 
00176   Int_t fParmTrkClsNSkip; //number of strips you can skip and still be in same cluster
00177   Int_t fParmTrk3DTrackMax; //max # of 3d tracks allowed
00178   Int_t fParmIsCosmic; //is this a cosmic ray file?
00179   Double_t fParmMinStripPulseHeight; //minimum pulse height allowed for a strip to be used
00180   Double_t fParmMinClusterPulseHeight; //min pulse height allowed for a cluster to be used
00181   Int_t fParmUseWideClusters; //use clusters with more than expected # of strips
00182   Int_t fParmUseShowerLikePlanes; //use clusters from showerlike planes
00183   Double_t fParmMaxTimingResid; //max allowed timing residual for direction determination
00184   Double_t fParmMisalignmentError; //error due to strip misalignments
00185   //these are variables for HoughViewSR objects.  See that class for
00186   //their definitions
00187   Int_t fParmHoughMinBin; 
00188   Double_t fParmHoughMinFrac;
00189   Double_t fParmHoughMinFracZoom;
00190   Double_t fParmHoughMinInterBinSize;
00191   Double_t fParmExtrapError;
00192   CandDigitListHandle *fCDLHnew;
00193   CandStripListHandle *fCSLHnew;
00194   CandSliceListHandle *fCSlcLHnew;
00195 
00196   Float_t fHoughUSlope;
00197   Float_t fHoughVSlope;
00198   Float_t fHoughUIntercept;
00199   Float_t fHoughVIntercept;
00200 
00201 
00202 ClassDef(AlgTrackSRList,3)                    // TrackSRList Algorithm Class
00203 
00204 
00205 };
00206 
00207 #endif                                                 // ALGTRACKSRLIST_H

Generated on Mon Feb 15 11:06:20 2010 for loon by  doxygen 1.3.9.1