StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_svtHybridDriftVelocityC.h
1 #ifndef St_svtHybridDriftVelocityC_h
2 #define St_svtHybridDriftVelocityC_h
3 #include "TChair.h"
4 #include "TArrayI.h"
5 #include "tables/St_svtHybridDriftVelocity_Table.h"
6 
8  public:
9  St_svtHybridDriftVelocityC (St_svtHybridDriftVelocity *table=0);
10  virtual ~St_svtHybridDriftVelocityC() {fgsvtHybridDriftVelocityC = 0;}
11 
12  static St_svtHybridDriftVelocityC *instance() {return fgsvtHybridDriftVelocityC;}
13  void Init();
14  Double_t CalcTransLength(Double_t x) {return x*mAnodePitch;}
15  Double_t UnCalcTransLength(Double_t x) {return x/mAnodePitch;}
16  Double_t CalcDriftLength(Int_t barrel, Int_t ladder, Int_t wafer,
17  Int_t hybrid, Double_t timeBin, Double_t anode)
18  {return CalcDriftLength(p(barrel, ladder, wafer, hybrid),timeBin,anode);}
19  Double_t UnCalcDriftLength(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid,Double_t x)
20  {return UnCalcDriftLength(p(barrel, ladder, wafer, hybrid),x);}
21  Double_t CalcDriftLength(svtHybridDriftVelocity_st *p, Double_t timeBin, Double_t anode);
22  Double_t UnCalcDriftLength(svtHybridDriftVelocity_st *p,Double_t x);
23  Double_t DriftVelocity(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid)
24  {return DriftVelocity(p(barrel, ladder, wafer, hybrid));}
25  Double_t DriftVelocity(svtHybridDriftVelocity_st *p);
26  Double_t uHat(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid, Double_t timeBin)
27  {return uHat(p(barrel, ladder, wafer, hybrid),timeBin);}
28  Double_t uHat(svtHybridDriftVelocity_st *p, Double_t timeBin);
29  Double_t vHat(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid, Double_t anode)
30  {return vHat(p(barrel, ladder, wafer, hybrid),anode);}
31  Double_t vHat(svtHybridDriftVelocity_st *p, Double_t anode);
32  Double_t CalcU(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid, Double_t timeBin, Double_t anode);
33  Double_t CalcV(Int_t hybrid, Double_t x);
34  Double_t UnCalcU(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid, Double_t timeBin);
35  Double_t UnCalcV(Int_t hybrid, Double_t x);
36  svtHybridDriftVelocity_st *p(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid);
37  Bool_t IsValidDriftRegion(Int_t barrel, Int_t ladder, Int_t wafer, Int_t hybrid, Double_t timeBin);
38  static void SetAnodePitch(Double_t pitch = 0.0250) {mAnodePitch = pitch;}
39  static void SetWaferLength(Double_t length= 2.9928) {mWaferLength = length;}
40  static void SetWaferWidth(Double_t width = 3.0000) {mWaferWidth = width;}
41  static void SetSamplingFrequency(Double_t samplingFrequency = 25000000.0) {mSamplingFrequency = samplingFrequency;}
42 
43  static Double_t AnodePitch() {return mAnodePitch;}
44  static Double_t WaferLength() {return mWaferLength;}
45  static Double_t WaferWidth() {return mWaferWidth;}
46  static Double_t SamplingFrequency() {return mSamplingFrequency;}
47  static Double_t STcheb(Int_t N, Double_t *par, Double_t x);
48  private:
49  static St_svtHybridDriftVelocityC *fgsvtHybridDriftVelocityC;
50  static Double_t mAnodePitch;
51  static Double_t mWaferLength;
52  static Double_t mWaferWidth;
53  static Double_t mSamplingFrequency;
54  static Double_t mNoAnodes;
55  ClassDefChair(St_svtHybridDriftVelocity, svtHybridDriftVelocity_st )
56  ClassDef(St_svtHybridDriftVelocityC,1) //C++ TChair for svtHybridDriftVelocity table class
57 };
58 #endif
Definition: TChair.h:27