1 #ifndef STAR_ST_TRS_MAKER_HH
2 #define STAR_ST_TRS_MAKER_HH
12 #ifndef HEP_SYSTEM_OF_UNITS_H
13 #include "SystemOfUnits.h"
15 #ifndef ST_NO_NAMESPACES
16 using namespace units;
18 #include "StTpcRawData.h"
22 #include "StTpcDb/StTpcDb.h"
48 enum {kPadMax = 32, kTimeBacketMax = 64, kRowMax = 72};
51 virtual Int_t InitRun(
int runnumber);
53 virtual Int_t Finish();
54 TF1F *GetShaperResponse(Int_t io = 0, Int_t sector = 1) {
return (
TF1F *) mShaperResponses[io][sector-1];}
55 TF1F *GetChargeFraction(Int_t io = 0, Int_t sector = 20) {
return (
TF1F *) mChargeFraction[io][sector-1];}
56 TF1F *GetPadResponseFunction(Int_t io = 0, Int_t sector = 20){
return (
TF1F *) mPadResponseFunction[io][sector-1];}
57 TF1F *GetPolya(Int_t io = 0) {
return (
TF1F *) mPolya[io];}
58 TF1 *GetTimeShape0(Int_t io = 0) {
return fgTimeShape0[io];}
59 TF1 *GetTimeShape3(Int_t io = 0) {
return fgTimeShape3[io];}
60 TF1 *GetHeed() {
return mHeed;}
61 virtual void Print(Option_t *option=
"")
const;
63 void SetLaserScale(Double_t m=1) {mLaserScale = m;}
64 static Int_t AsicThresholds();
65 static Int_t SearchT(
const void *elem1,
const void **elem2);
66 static Int_t CompareT(
const void **elem1,
const void **elem2);
67 static Double_t shapeEI(Double_t *x, Double_t *par=0);
68 static Double_t shapeEI_I(Double_t *x, Double_t *par=0);
69 static Double_t shapeEI3(Double_t *x, Double_t *par=0);
70 static Double_t shapeEI3_I(Double_t *x, Double_t *par=0);
71 static Double_t fei(Double_t t, Double_t t0, Double_t T);
72 static Double_t feiFunc(Double_t *x, Double_t *par) {
return fei(x[0],par[0],par[1]);}
74 static Double_t polya(Double_t *x, Double_t *par);
77 void SettauIntegrationX(Double_t p = 74.6e-9, Int_t io=0) {mtauIntegrationX[io] = p;}
78 void SettauCX(Double_t p = 1000.0e-9, Int_t io=0) {mtauCX[io] = p;}
79 void SetCutEle(Double_t p = 1e-4) {mCutEle = p;}
80 static Double_t Ec(Double_t *x, Double_t *p);
81 static TF1 *fEc(Double_t w = 26.2);
83 static Double_t ShaperFunc(Double_t *x, Double_t *p);
84 static Double_t PadResponseFunc(Double_t *x, Double_t *p);
85 static Double_t Gatti(Double_t *x, Double_t *p);
86 static Double_t InducedCharge(Double_t s, Double_t h, Double_t ra, Double_t Va, Double_t &t0);
87 static Float_t GetCutEle();
89 Bool_t TrackSegment2Propagate(g2t_tpc_hit_st *tpc_hitC, g2t_vertex_st *gver,
HitPoint_t *TrackSegmentHits);
90 void GenerateSignal(
HitPoint_t *TrackSegmentHits,Int_t sector, Int_t rowMin, Int_t rowMax, Double_t sigmaJitterT, Double_t sigmaJitterX);
91 Double_t dEdxCorrection(
HitPoint_t *TrackSegmentHits);
93 Bool_t TrackSegment2Propagate(g2t_tpc_hit_st *tpc_hitC, g2t_vertex_st *gver,
HitPoint_t &TrackSegmentHits);
94 void GenerateSignal(
HitPoint_t &TrackSegmentHits, Int_t sector, Int_t rowMin, Int_t rowMax, Double_t sigmaJitterT, Double_t sigmaJitterX);
95 Double_t dEdxCorrection(
HitPoint_t &TrackSegmentHits);
97 static TF1 *fgTimeShape3[2];
98 static TF1 *fgTimeShape0[2];
102 TF1F *mShaperResponses[2][24];
103 TF1F *mChargeFraction[2][24];
104 TF1F *mPadResponseFunction[2][24];
108 Double_t InnerAlphaVariation[24];
109 Double_t OuterAlphaVariation[24];
110 Altro *mAltro[2][24];
112 Int_t numberOfSectors;
114 Int_t numberOfTimeBins;
115 Int_t numberOfInnerSectorAnodeWires;
116 Double_t firstInnerSectorAnodeWire;
117 Double_t lastInnerSectorAnodeWire;
118 Int_t numberOfOuterSectorAnodeWires;
119 Double_t firstOuterSectorAnodeWire;
120 Double_t lastOuterSectorAnodeWire;
121 Double_t anodeWirePitch;
122 Double_t numberOfElectronsPerADCcount;
123 Double_t anodeWireRadius;
124 Double_t innerSectorAnodeVoltage[24];
125 Double_t outerSectorAnodeVoltage[24];
126 Double_t mtauIntegrationX[2];
128 Double_t mLocalYDirectionCoupling[2][24][7];
129 Double_t msMin, msMax;
130 TArrayI mNoTpcHitsAll;
131 TArrayI mNoTpcHitsReal;
132 Int_t mNSplittedHits;
133 Double_t xOnWire, yOnWire, zOnWire;
136 Double_t TotalSignal;
139 Double_t TotalSignalInCluster;
140 Double_t padsdE[kPadMax];
141 Double_t tbksdE[kTimeBacketMax];
142 Double_t rowsdEH[kRowMax];
143 Double_t rowsdE[kRowMax];
145 Double_t mLaserScale;
146 const Double_t minSignal;
147 const Double_t ElectronRange;
148 const Double_t ElectronRangeEnergy;
149 const Double_t ElectronRangePower;
150 const Int_t NoOfSectors;
152 const Int_t NoOfTimeBins;
154 static Short_t mADCs[__MaxNumberOfTimeBins__];
156 virtual const char *GetCVS()
const {
157 static const char cvs[]=
158 "Tag $Name: $ $Id: StTpcRSMaker.h,v 1.33 2018/12/09 23:22:59 fisyak Exp $ built " __DATE__
" " __TIME__ ;