1 #ifndef St_tpcSlewingC_h
2 #define St_tpcSlewingC_h
5 #include "tables/St_tpcSlewing_Table.h"
6 #include "St_tpcPadConfigC.h"
11 tpcSlewing_st *Struct(Int_t i = 0)
const {
return ((St_tpcSlewing*) Table())->GetTable()+i;}
12 UInt_t getNumRows()
const {
return GetNRows();}
13 Int_t type(Int_t i = 0)
const {
return Struct(i)->type;}
14 Int_t npar(Int_t i = 0)
const {
return Struct(i)->npar;}
15 Double_t minT(Int_t i = 0)
const {
return Struct(i)->min;}
16 Double_t a(Int_t i = 0, Int_t n = 0)
const {
return Struct(i)->a[n];}
17 Double_t slewing(Int_t sector, Int_t i = 0, Double_t q = 0) {
18 if (St_tpcPadConfigC::instance()->iTpc(sector))
return 0;
20 case 1001 : {
return func1001(q,a(i,0),a(i,1),a(i,2),a(i,3)); }
26 Double_t correctedT(Int_t sector, Int_t padrow, Double_t q, Double_t T) {
27 if (St_tpcPadConfigC::instance()->iTpc(sector))
return T;
28 Int_t inout = (St_tpcPadConfigC::instance()->IsRowInner(sector,padrow) ? 0 : 1);
29 return T - (T > minT(inout) ? slewing(sector,inout,q) : 0);
34 Double_t func1001(Double_t q, Double_t p0, Double_t p1, Double_t p2, Double_t p3) {
36 if (q <= 0.0)
return 0;
37 return p0 * TMath::Exp(-p1*TMath::Power(q,-0.5*p3)) + p2;
41 ClassDefChair(St_tpcSlewing, tpcSlewing_st )