00001 #ifndef UtilBeamLine3D_h
00002 #define UtilBeamLine3D_h
00003
00004 #include <TVector3.h>
00005 #include <vector>
00006 using namespace std;
00007 class TObjArray;
00008 class TH1;
00009 enum{mxPar=4};
00010
00011
00012 class TrackStump{
00013 public:
00014 TVector3 r,p ;
00015 float ery2,eryz,erz2;
00016 int nFitP,eveId;
00017 float chi2,z0;
00018 float P,Pt;
00019 int bad;
00020 void print() {
00021 printf("r=%.2f %.2f %.2f pu=%.3f %.3f %.3f ery2=%.3f eryz=%.3f erz2=%.3f nfp=%d chi=%.2f zV=%.1f eveId=%d P=%.1f Pt=%.1f bad=%d\n",r.x(),r.y(),r.z(),p.x(),p.y(),p.z(),ery2,eryz,erz2,nFitP,chi2,z0,eveId,P,Pt,bad);
00022 }
00023 };
00024
00025
00026 class UtilBeamLine3D {
00027 enum {mxH=32};
00028
00029
00030 float cut_maxRxy, cut_maxZ;
00031 float cut_minChi2,cut_maxChi2;
00032 float cut_minP;
00033 int par_filter;
00034
00035 public:
00036 int fcnMon1;
00037 int fcnCount;
00038 float cut_Dmax;
00039 TH1 *hA[mxH];
00040 vector<TrackStump> track;
00041 void readTracks(const TString fnameT);
00042 void initHisto( TObjArray * HList);
00043 void qaTracks();
00044 void scanChi2(double *par, int mode);
00045 void evalSolution(double *par);
00046 UtilBeamLine3D ();
00047 void print(int k=5);
00048 };
00049
00050 extern UtilBeamLine3D util;
00051
00052
00053 void beamLineLike3D(int &npar,double *grad,double &fcnval, double *inpPar,int iflag);
00054
00055 #endif