StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcParamReader.hh
1 // $Id: StFtpcParamReader.hh,v 1.28 2007/01/15 07:49:22 jcs Exp $
2 //
3 // $Log: StFtpcParamReader.hh,v $
4 // Revision 1.28 2007/01/15 07:49:22 jcs
5 // replace printf, cout and gMesMgr with Logger
6 //
7 // Revision 1.27 2006/03/13 19:26:59 jcs
8 // add constructor StFtpcCalibMaker
9 //
10 // Revision 1.26 2003/10/10 12:37:14 jcs
11 // remove parameters used to calculate the FTPC geant volume id using the obsolete method
12 //
13 // Revision 1.25 2003/06/11 11:10:15 jcs
14 // remove inner cathode and cluster geometry parameters from ftpcClusterPars
15 //
16 // Revision 1.24 2003/06/10 13:11:51 jcs
17 // min,max gas temperature and pressure limits removed from ftpcClusterPars
18 //
19 // Revision 1.23 2003/05/07 15:10:46 putschke
20 // improvements for cathode offset corretions
21 //
22 // Revision 1.22 2003/04/15 11:36:22 putschke
23 // Include corrections for inner cathode offset and move some parameter to database
24 //
25 // Revision 1.21 2002/04/05 16:46:02 oldi
26 // Small code clean ups, to be sure that this part is recompiled. It relies
27 // on StFtpcTracker/StFtpcPoint.* which were changed.
28 //
29 // Revision 1.20 2002/03/01 14:22:21 jcs
30 // add additional histograms to monitor cluster finding
31 //
32 // Revision 1.18 2002/01/21 22:14:56 jcs
33 // added values for temperature/pressure calculations to ftpcClusterPars
34 //
35 // Revision 1.17 2001/07/11 21:19:33 jcs
36 // remove obsolete entries in tables
37 //
38 // Revision 1.16 2001/04/24 07:11:45 oldi
39 // Float_t mSlowSimPressure introduced to replace mNormalizedNowPressure in
40 // StFtpcSlowSimMaker.
41 //
42 // Revision 1.15 2001/04/02 12:10:28 jcs
43 // get FTPC calibrations,geometry from MySQL database and code parameters
44 // from StarDb/ftpc
45 //
46 // Revision 1.14 2001/03/19 15:52:48 jcs
47 // use ftpcDimensions from database
48 //
49 // Revision 1.13 2001/03/06 23:34:16 jcs
50 // use database instead of params
51 //
52 // Revision 1.12 2001/01/27 20:07:47 jcs
53 // change name of parameter
54 //
55 // Revision 1.11 2001/01/15 16:08:52 jcs
56 // get phiOrigin and phiPerSector fro ftpcDimensions
57 //
58 // Revision 1.10 2001/01/08 17:07:17 jcs
59 // move remaining constants from code to database
60 //
61 // Revision 1.9 2000/12/11 16:39:11 jcs
62 // move FTPC geant volume id and cluster flags from code to parameter reader
63 //
64 // Revision 1.8 2000/11/27 14:09:26 hummler
65 // implement tzero and lorentz angle correction factor
66 //
67 // Revision 1.7 2000/11/14 13:08:30 hummler
68 // add charge step calculation, minor cleanup
69 //
70 // Revision 1.6 2000/11/06 13:42:57 hummler
71 // include latest changes in second constructor as well
72 //
73 // Revision 1.3 2000/10/31 09:52:19 hummler
74 // add parameters for slow simulator
75 //
76 // Revision 1.2 2000/09/18 14:26:51 hummler
77 // expand StFtpcParamReader to supply data for slow simulator as well
78 // introduce StFtpcGeantReader to separate g2t tables from simulator code
79 
80 // implement StFtpcGeantReader in StFtpcFastSimu
81 //
82 // Revision 1.1 2000/08/03 14:39:01 hummler
83 // Create param reader to keep parameter tables away from cluster finder and
84 // fast simulator. StFtpcClusterFinder now knows nothing about tables anymore!
85 //
86 
87 #ifndef STAR_StFtpcParamReader
88 #define STAR_StFtpcParamReader
89 
90 #include "StMaker.h"
91 
92 #include "TObject.h"
93 
94 #include "tables/St_ftpcClusterPars_Table.h"
95 #include "tables/St_ftpcSlowSimGas_Table.h"
96 #include "tables/St_ftpcSlowSimPars_Table.h"
97 #include "tables/St_ftpcFastSimGas_Table.h"
98 #include "tables/St_ftpcFastSimPars_Table.h"
99 
100 class StFtpcParamReader : public TObject
101 {
102 
103 protected:
104 
105  // table pointer stored for writing back in destructor
106  ftpcClusterPars_st *mClusterParsTable;
107 
108  //ClusterFinder parameters (also used by other classes)
109  Int_t mGaussFittingFlags;
110  Int_t mMinimumClusterMaxADC;
111  Int_t mNumberOfDriftSteps;
112  Float_t mStandardPressure;
113  Float_t mNormalizedNowPressure;
114  Float_t mAdjustedAirPressureWest;
115  Float_t mAdjustedAirPressureEast;
116  Float_t mGasTemperatureWest;
117  Float_t mGasTemperatureEast;
118  Float_t mLorentzAngleFactor;
119  Int_t mOrderOfDiffusionErrors;
120  Float_t *mPadDiffusionErrors;
121  Float_t *mTimeDiffusionErrors;
122  Float_t mPadBadFitError;
123  Float_t mTimeBadFitError;
124  Float_t mPadUnfoldError;
125  Float_t mTimeUnfoldError;
126  Float_t mPadFailedFitError;
127  Float_t mTimeFailedFitError;
128  Float_t mPadCutoffClusterError;
129  Float_t mTimeCutoffClusterError;
130  Float_t mPadSaturatedClusterError;
131  Float_t mTimeSaturatedClusterError;
132  Float_t m2PadWeightedError;
133  Float_t m2PadGaussError;
134  Float_t m3PadWeightedError;
135  Float_t m3PadGaussError;
136  Float_t mZDirectionError;
137  //FastSimulator parameters
138  Int_t mOrderOfFastEstimates;
139  Float_t *mVDriftEstimates;
140  Float_t *mTDriftEstimates;
141  Float_t *mSigmaRadialEstimates;
142  Float_t *mSigmaAzimuthalEstimates;
143  Float_t *mErrorRadialEstimates;
144  Float_t *mErrorAzimuthalEstimates;
145  Int_t mUnfoldedClusterFlag;
146  Int_t mBadShapeClusterFlag;
147  Int_t mMergedClusterFlag;
148  Int_t mNumberOfPadsDedxSmearing;
149  Int_t mNumberOfBinsDedxSmearing;
150  Float_t mRadiusTolerance;
151  Float_t mSigmaSpacingFactor;
152  Float_t mAdcConversionFactor;
153  Float_t mClusterChargeConversionFactor;
154  //SlowSimulator parameters
155  Int_t mNumberOfFssGasValues;
156  Float_t *mFssGasEField;
157  Float_t *mFssGasVDrift;
158  Float_t *mFssGasDiffusionX;
159  Float_t *mFssGasDiffusionY;
160  Float_t *mFssGasDiffusionZ;
161  Float_t *mFssGasLorentzAngle;
162  Int_t mRandomNumberGenerator;
163  Int_t mZeroSuppressThreshold;
164  Int_t mNumSlowSimGridPoints;
165  Int_t mMaxAdc;
166  Int_t mGaussIntegrationSteps;
167  Int_t mDiffusionCoarseness;
168  Float_t mAdcConversion;
169  Float_t mChamberCathodeVoltage;
170  Float_t mSigmaPadResponseFuntion;
171  Float_t mReadoutShaperTime;
172  Float_t mSlowSimPressure;
173  Int_t mMaxNumSequences;
174  Int_t mMaxNumSeqPeaks;
175  Int_t mMaxNumPeaks;
176  Int_t mMaxNumCUC;
177  Int_t mMaxLoops;
178  Int_t mMaxFastLoops;
179  Float_t mUnfoldLimit;
180  Float_t mUnfoldFailedLimit;
181 
182 private:
183 
184 Int_t FtpcClusterPars(St_ftpcClusterPars *det);
185 Int_t FtpcFastSimGas(St_ftpcFastSimGas *gaspar);
186 Int_t FtpcFastSimPars(St_ftpcFastSimPars *param);
187 Int_t FtpcSlowSimGas(St_ftpcSlowSimGas *gas);
188 Int_t FtpcSlowSimPars(St_ftpcSlowSimPars *param);
189 
190 public:
191  // constructor used by StFtpcClusterMaker:
192  StFtpcParamReader(St_ftpcClusterPars *det,
193  St_ftpcFastSimGas *gaspar,
194  St_ftpcFastSimPars *param);
195  // constructor used by StFtpcSlowSimMaker:
196  StFtpcParamReader(St_ftpcClusterPars *det,
197  St_ftpcSlowSimGas *gas,
198  St_ftpcSlowSimPars *param);
199  // constructor used by StFtpcCalibMaker:
200  StFtpcParamReader(St_ftpcClusterPars *det);
201 
203 
204  Int_t returnCode;
205 
206  Float_t padDiffusionErrors(Int_t i);
207  Float_t timeDiffusionErrors(Int_t i);
208  Float_t vDriftEstimates(Int_t i);
209  Float_t tDriftEstimates(Int_t i);
210  Float_t sigmaRadialEstimates(Int_t i);
211  Float_t sigmaAzimuthalEstimates(Int_t i);
212  Float_t errorRadialEstimates(Int_t i);
213  Float_t errorAzimuthalEstimates(Int_t i);
214  Float_t fssGasEField(Int_t i);
215  Float_t fssGasVDrift(Int_t i);
216  Float_t fssGasDiffusionX(Int_t i);
217  Float_t fssGasDiffusionY(Int_t i);
218  Float_t fssGasDiffusionZ(Int_t i);
219  Float_t fssGasLorentzAngle(Int_t i);
220  // parameter set functions
221  Int_t setNormalizedNowPressure(Float_t f) {mNormalizedNowPressure=f; return 1;}
222  Int_t setAdjustedAirPressureWest(Float_t f) {mAdjustedAirPressureWest=f;return 0;}
223  Int_t setAdjustedAirPressureEast(Float_t f) {mAdjustedAirPressureEast=f;return 0;}
224  Int_t setGasTemperatureWest(Float_t f) {mGasTemperatureWest = f;return 0;}
225  Int_t setGasTemperatureEast(Float_t f) {mGasTemperatureEast = f;return 0;}
226 
227  // inline get functions
228  Int_t gaussFittingFlags() {return mGaussFittingFlags;}
229  Int_t minimumClusterMaxADC() {return mMinimumClusterMaxADC;}
230  Int_t numberOfDriftSteps() {return mNumberOfDriftSteps;}
231  Float_t standardPressure() {return mStandardPressure;}
232  Float_t normalizedNowPressure() {return mNormalizedNowPressure;}
233  Float_t adjustedAirPressureWest() {return mAdjustedAirPressureWest;}
234  Float_t adjustedAirPressureEast() {return mAdjustedAirPressureEast;}
235  Float_t gasTemperatureEast() {return mGasTemperatureEast;}
236  Float_t gasTemperatureWest() {return mGasTemperatureWest;}
237  Float_t lorentzAngleFactor() {return mLorentzAngleFactor;}
238  Float_t padBadFitError() {return mPadBadFitError;}
239  Float_t timeBadFitError() {return mTimeBadFitError;}
240  Float_t padUnfoldError() {return mPadUnfoldError;}
241  Float_t timeUnfoldError() {return mTimeUnfoldError;}
242  Float_t padFailedFitError() {return mPadFailedFitError;}
243  Float_t timeFailedFitError() {return mTimeFailedFitError;}
244  Float_t padCutoffClusterError() {return mPadCutoffClusterError;}
245  Float_t timeCutoffClusterError() {return mTimeCutoffClusterError;}
246  Float_t padSaturatedClusterError() {return mPadSaturatedClusterError;}
247  Float_t timeSaturatedClusterError() {return mTimeSaturatedClusterError;}
248  Float_t twoPadWeightedError() {return m2PadWeightedError;}
249  Float_t twoPadGaussError() {return m2PadGaussError;}
250  Float_t threePadWeightedError() {return m3PadWeightedError;}
251  Float_t threePadGaussError() {return m3PadGaussError;}
252  Float_t zDirectionError() {return mZDirectionError;}
253  Int_t unfoldedClusterFlag() {return mUnfoldedClusterFlag;}
254  Int_t badShapeClusterFlag() {return mBadShapeClusterFlag;}
255  Int_t mergedClusterFlag() {return mMergedClusterFlag;}
256  Int_t numberOfPadsDedxSmearing() {return mNumberOfPadsDedxSmearing;}
257  Int_t numberOfBinsDedxSmearing() {return mNumberOfBinsDedxSmearing;}
258  Float_t radiusTolerance() {return mRadiusTolerance;}
259  Float_t sigmaSpacingFactor() {return mSigmaSpacingFactor;}
260  Float_t adcConversionFactor() {return mAdcConversionFactor;}
261  Float_t clusterChargeConversionFactor() {return mClusterChargeConversionFactor;}
262  Int_t numberOfFssGasValues() {return mNumberOfFssGasValues;}
263  Int_t randomNumberGenerator() {return mRandomNumberGenerator;}
264  Int_t zeroSuppressThreshold() {return mZeroSuppressThreshold;}
265  Int_t numSlowSimGridPoints() {return mNumSlowSimGridPoints;}
266  Int_t maxAdc() {return mMaxAdc;}
267  Int_t gaussIntegrationSteps() {return mGaussIntegrationSteps;}
268  Int_t diffusionCoarseness() {return mDiffusionCoarseness;}
269  Float_t adcConversion() {return mAdcConversion;}
270  Float_t chamberCathodeVoltage() {return mChamberCathodeVoltage;}
271  Float_t sigmaPadResponseFuntion() {return mSigmaPadResponseFuntion;}
272  Float_t readoutShaperTime() {return mReadoutShaperTime;}
273  Float_t slowSimPressure() {return mSlowSimPressure;}
274  Int_t maxNumSequences() {return mMaxNumSequences;}
275  Int_t maxNumSeqPeaks() {return mMaxNumSeqPeaks;}
276  Int_t maxNumPeaks() {return mMaxNumPeaks;}
277  Int_t maxNumCUC() {return mMaxNumCUC;}
278  Int_t maxLoops() {return mMaxLoops;}
279  Int_t maxFastLoops() {return mMaxFastLoops;}
280  Float_t unfoldLimit() {return mUnfoldLimit;}
281  Float_t unfoldFailedLimit() {return mUnfoldFailedLimit;}
282 
283 };
284 
285 #endif
286