00001
00002
00003
00004
00005
00006
00008 #ifndef ALGTRACKCAM_H
00009 #define ALGTRACKCAM_H
00010
00011 #include "Algorithm/AlgBase.h"
00012 #include "CandTrackCam/CandTrackCamHandle.h"
00013 #include "RecoBase/CandStripHandle.h"
00014 #include "RecoBase/AlgReco.h"
00015 #include "RecoBase/AlgTrack.h"
00016 #include <vector>
00017
00018
00019 using std::vector;
00020
00021 class TrackCam;
00022 class HitCam;
00023 class UgliGeomHandle;
00024 class VldContext;
00025 typedef struct{
00026 double U;
00027 double V;
00028 double Z;
00029 double Q;
00030 double dS;
00031 double dSsteel;
00032 double Qm;
00033 double Qp;
00034 double CTm;
00035 double CTp;
00036 double Wm;
00037 double Wp;
00038 int plnvuw;
00039 int plnnum;
00040 }TrkPlaneInfo;
00041
00042 class AlgTrackCam : public AlgBase, public AlgReco, public AlgTrack
00043 {
00044
00045 public:
00046 AlgTrackCam();
00047 virtual ~AlgTrackCam();
00048
00049 virtual void RunAlg(AlgConfig &ac, CandHandle &ch, CandContext &cx);
00050 virtual void Trace(const char *c) const;
00051
00052
00053 private:
00054 vector <TrkPlaneInfo> fPlaneInfo;
00055 vector<HitCam*> fHitArr[500];
00056
00057 void CalculateTimingFits(double& dir, double& mytimeoffset, CandTrackHandle& cth);
00058 bool CalculateTrace(double* m, double* c, double* Coord, double* Trace);
00059 void DetectorSides(double* m, double* c, double* position, int side);
00060 void ExtractHitProperties(const TrackCam* trkc, const int& bpln, CandTrackHandle& cth);
00061 void InterpolateTrackPosition();
00062 void SetTrackCoordinates(const int& bpln, int& plnm, int& plnp);
00063 void SetupTimingInfo(UgliGeomHandle* ugh, const double& fFibreIndex);
00064 void SetVertexEndProperties( double* Coord, double* Dir, const int& end, const int& coordpln);
00065 void WeightsForTimingFits();
00066
00067 int ModuleType, MaxPlane, MinPlane;
00068 int begplane1, begplane2, endplane2, endplane1;
00069 double StripListTime;
00070
00071 bool BeamFlag, PassTrack;
00072
00073 ClassDef(AlgTrackCam,2)
00074 };
00075
00076 #endif // ALGTRACKCAM_H