1 #ifndef St_spaceChargeCorC_h
2 #define St_spaceChargeCorC_h
5 #include "tables/St_spaceChargeCor_Table.h"
6 #include "StDetectorDbMagnet.h"
7 #include "StChain/StChain.h"
11 spaceChargeCor_st *Struct(Int_t i = 0) {
return ((St_spaceChargeCor*) Table())->GetTable()+i;}
12 UInt_t getNumRows() {
return GetNRows();}
13 Double_t fullFieldB(Int_t i = 0) {
return Struct(i)->fullFieldB;}
14 Double_t halfFieldB(Int_t i = 0) {
return Struct(i)->halfFieldB;}
15 Double_t zeroField(Int_t i = 0) {
return Struct(i)->zeroField;}
16 Double_t halfFieldA(Int_t i = 0) {
return Struct(i)->halfFieldA;}
17 Double_t fullFieldA(Int_t i = 0) {
return Struct(i)->fullFieldA;}
18 Double_t satRate(Int_t i = 0) {
return Struct(i)->satRate;}
19 Float_t factor(Int_t i = 0) {
return Struct(i)->factor;}
20 Float_t detector(Int_t i = 0) {
return Struct(i)->detector;}
21 Float_t offset(Int_t i = 0) {
return Struct(i)->offset;}
22 Float_t getEWRatio(Int_t i = 0) {
return Struct(i)->ewratio;}
23 Double_t getSpaceChargeCorrection(Double_t scaleFactor, Int_t i = 0){
25 if(scaleFactor < -.75 && scaleFactor > -1.25) value = fullFieldB(i);
26 else if(scaleFactor < -0.25) value = halfFieldB(i);
27 else if(scaleFactor < .25) value = zeroField(i);
28 else if(scaleFactor < 0.75) value = halfFieldA(i);
29 else if(scaleFactor < 1.25) value = fullFieldA(i);
32 Double_t getSpaceChargeCorrection(){
return getSpaceChargeCorrection(StDetectorDbMagnet::instance()->getScaleFactor());}
33 Double_t getSpaceChargeCoulombs(Double_t scaleFactor);
34 Double_t getSpaceChargeCoulombs(){
return getSpaceChargeCoulombs(StDetectorDbMagnet::instance()->getScaleFactor());}
35 Double_t getSpaceChargeSatRate(Int_t i = 0) {
return satRate(i);}
36 Float_t getSpaceChargeFactor(Int_t i = 0) {
return factor(i);}
37 Float_t getSpaceChargeDetector(Int_t i = 0){
return detector(i);}
38 Float_t getSpaceChargeOffset(Int_t i = 0) {
return offset(i);}
39 TString getSpaceChargeString(Double_t scaleFactor);
40 TString getSpaceChargeString(){
return getSpaceChargeString(StDetectorDbMagnet::instance()->getScaleFactor());}
46 ClassDefChair(St_spaceChargeCor, spaceChargeCor_st )