StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Xdcor.h
1 #include <stdlib.h>
2 #include "Riostream.h"
3 #include "TMath.h"
4 #include "TMatrixD.h"
5 #include "TVectorD.h"
6 #include "TDecompLU.h"
7 #include "TCanvas.h"
8 #include "TGraph.h"
9 #include "TH2F.h"
10 #include "TH1F.h"
11 
12 enum { NB = 3 };
13 
14 static const int LB[NB] = {8, 12, 16}; // number of ladders in a barrel
15 static const int WL[NB] = {4, 6, 7}; // number of wafers on a ladder
16 
17 //---- class defined as a "struct"
18 
19 struct SvtDriftVel_t {
20  enum { Pmax = 7,
21  nv = 10 };
22  SvtDriftVel_t(const double * array);
23  int GetHid() const;
24  double Coord ( double timeb );
25  void addStat( double timeb, double u, double uP );
26  void AddVal ( double * value, double next);
27  int Solve (FILE *pFile);
28  void PrintV(void) const;
29  void PrintM(void) const;
30  int type; // type = 0 average drift_velocity,
31  int idx; // row index; not used yet
32  int nrows; // total no. of real rows in the table;
33  int npar; // npar = 0;
34  int barrel;
35  int ladder;
36  int wafer;
37  int hybrid;
38  double t0;
39  double et0; // t0 fit error
40  double tmax;
41  double etmx; // tmax fit error
42  double d_length; // drift length
43  double v[nv]; // v[0] is average drift velocity = length*0.025/(tmax-t0) micron/ns
44  int hStat;
45  double coeff[Pmax];
46  double matrx[Pmax][Pmax];
47  double vectr[Pmax];
48  TH2F * duU;
49  TH2F * duUc;
50 };
51 
52 //------------class "hybrid collection" ----------------------------------------
53 
54 class Xdcor{
55 public:
56 enum { NH = 432,
57  hAlive = 293,
58  nArr = 23
59  };
60  Xdcor ();
61  ~Xdcor (){}
62  void CorrPlot ( int barrel, int ladder );
63  void solve ( void );
64  static double Poly ( const int L, double x );
65  void InitSptr ( void );
66  int GetHid (int barrel, int ladder, int wafer, int hybrid) const;
67 
68 //private:
69 
70  static const double dArr[hAlive][nArr];
71  static SvtDriftVel_t* Sptr[NH];
72  FILE * pFile; // = fopen (foName,"wt");
73 
74 };
Definition: Xdcor.h:54