00001 #ifndef GL3LMTVERTEXFINDER
00002 #define GL3LMTVERTEXFINDER
00003
00004 #define MAXSLATS 240
00005 #define MAXTRACK 5000
00006
00007 #include "gl3Histo.h"
00008 #include "FtfBaseHit.h"
00009 #include "gl3Track.h"
00010
00011 class gl3Event;
00012
00013 class gl3LMVertexFinder {
00014
00015 public:
00016 gl3LMVertexFinder(int _minHitsOnTrack = 15,
00017 int _minCTBadc = 3,
00018 float _maxZdca = 100.,
00019 float _zMargin = 10.,
00020 float _phiMargin = 3.0,
00021 float _delVertMax = 3.0);
00022 ~gl3LMVertexFinder();
00023
00024 int setParameters(int _minHitsOnTrack,
00025 int _minCTBadc,
00026 float _maxZdca,
00027 float _zMargin,
00028 float _phiMargin,
00029 float _delVertMax);
00030 int setParameters(const char *filename);
00031
00032 int registerHistos();
00033
00034 int makeVertex(gl3Event *event);
00035 Ftf3DHit& getVertex()
00036 { return myVert; };
00037
00038 private:
00039 int init();
00040
00041
00042 gl3Event *event;
00043
00044 int totInpEve;
00045 static const float C_PI;
00046 struct JctbHit {float phi,adc,z; int slatIndex;} ctbH[MAXSLATS];
00047 int NctbH;
00048 int getCtbHits (gl3Event *);
00049 void setCtbMap();
00050 int ctbMap[120][2];
00051 float zSlats[2][2] ;
00052 int matchTrack2Ctb( Ftf3DHit *);
00053 int ppLMV4b( Ftf3DHit *);
00054
00055 gl3Track *trackL[MAXTRACK];
00056 float ZdcaHitL[MAXTRACK];
00057 float XdcaHitL[MAXTRACK];
00058 float YdcaHitL[MAXTRACK];
00059 int NtrackL;
00060
00061 float CtbRadius;
00062 float CtbLen2;
00063
00064 Ftf3DHit myVert;
00065
00066
00067 int minHitsOnTrack;
00068 float maxZdca;
00069 int minCTBadc;
00070 float MatchCtbMaxZ;
00071 float MatchCtbMaxPhi;
00072 float DelVertMax;
00073
00074 gl3Histo* hjan[32] ;
00075 int nhjan;
00076
00077 gl3Histo* heve[16] ;
00078 int neve;
00079
00080 gl3Histo* htime[2];
00081
00082 };
00083 #endif
00084
00085