StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UtilBeamLine3D.h
1 #ifndef UtilBeamLine3D_h
2 #define UtilBeamLine3D_h
3 
4 #include <TVector3.h>
5 #include <vector>
6 using namespace std; // for vector
7 class TObjArray;
8 class TH1;
9 enum{mxPar=4}; // # of beam line params
10 
11 
12 class TrackStump{
13  public:
14  TVector3 r,p ; // track parameters, direction versor |p|=1
15  float ery2,eryz,erz2; // squared error of track (only some)
16  int nFitP,eveId;
17  float chi2,z0;
18  float P,Pt; // momentum, not sure if relevant
19  int bad;// flag to discard bad tracks
20  void print() {
21  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);
22  }
23 };
24 
25 
27  enum {mxH=32};
28 
29  // QA params
30  float cut_maxRxy, cut_maxZ; // (cm) track QA
31  float cut_minChi2,cut_maxChi2; // track QA
32  float cut_minP; // (GeV/c) track momentum QA
33  int par_filter; // selecting subset of track, see .cxx for definition
34 
35  public:
36  int fcnMon1; // flag controling monitoring of fnc calculation
37  int fcnCount; // total calls of likelihood function
38  float cut_Dmax; // (cm) DCA cut-off for truncated likelihood, squeared
39  TH1 *hA[mxH];
40  vector<TrackStump> track;
41  void readTracks(const TString fnameT);
42  void initHisto( TObjArray * HList);
43  int qaTracks();
44  void scanChi2(double *par, int mode);
45  void evalSolution(double *par);
46  UtilBeamLine3D ();
47  void print(int k=5);
48 };
49 
50 extern UtilBeamLine3D util; // caries data & contrl to likelihood function
51 
52 
53 void beamLineLike3D(int &npar,double *grad,double &fcnval, double *inpPar,int iflag);
54 
55 #endif