34 Info(
"Constructor",
"Use default Noise %g",fNoise);
40 Info(
"Constructor",
"Use default ZeroSuppr %i",fZeroSuppr);
42 fZeroSuppr = zeroSuppr;
46 Info(
"Constructor",
"Use default Tau %g",fTau);
52 Info(
"Constructor",
"Use default GammaPower %d",fGammaPower);
54 fGammaPower = gammaPower;
56 Double_t samplingFreq;
58 Info(
"Constructor",
"Use default SamplingFreq %g",fSamplingFreq);
60 fSamplingFreq = samplingFreq;
64 Info(
"Constructor",
"Use default TimeRange %i",fTimeRange);
66 fTimeRange = timeRange;
70 Info(
"Constructor",
"Use default TimeOffset %g",fTimeOffset);
72 fTimeOffset = timeOffset;
76 Info(
"Constructor",
"Use default ThrSat %g",fThrSat);
82 Info(
"Constructor",
"Use default ThrSatCh %g",fThrSatCh);
88 Info(
"Constructor",
"Use default AmpSatCh %g",fAmpSatCh);
94 Info(
"Constructor",
"Use default XtalkSatCh %g",fXtalkSatCh);
96 fXtalkSatCh = xtalkSatCh;
99 fPedestals[
XDCC]->SetMean(0.);
100 fPedestals[
XDCC]->SetSigma(fNoise);
102 fPedestals[
YDCC]->SetMean(0.);
103 fPedestals[
YDCC]->SetSigma(fNoise);
109 fDccMapX->SetPedestals(fPedestals[
XDCC]);
110 fDccMapX->SetPedestals(fPedestals[
YDCC]);
137 if(channel<0)
return -1;
138 if(channel>=288)
return -1;
140 if(
gHarpoDebug>2) Info(
"AddCharge",
"ch = %d, t = %.1g, Q = %.1g",channel,time,charge);
141 Double_t minCharge = 0.01;
145 Double_t chargeSum = 0;
151 Bool_t signal = kFALSE;
152 Int_t tmin = Int_t(time*fSamplingFreq);
155 Double_t cellCharge = 0;
159 case 4: cellCharge = charge/(3.0/128.0*tautmp)*TMath::Power(t1,4)*TMath::Exp(-4*t1);
break;
160 case 3: cellCharge = charge/(2.0/27.0*tautmp)*TMath::Power(t1,3)*TMath::Exp(-3*t1);
break;
161 case -3: cellCharge = charge/(2.0/27.0*tautmp)*TMath::Power(t1,3)*TMath::Exp(-3*t1)*TMath::Sin(t1)/0.7776;
break;
162 case 2: cellCharge = charge/(1.0/4.0*tautmp)*TMath::Power(t1,2)*TMath::Exp(-2*t1);
break;
163 default: cellCharge = charge/(3.0/128.0*tautmp)*TMath::Power(t1,4)*TMath::Exp(-4*t1);
166 if(data <= 0) data = cellCharge;
167 else data += cellCharge;
168 if(data<minCharge && signal)
break;
169 if(data<minCharge && !signal)
continue;
172 if(
gHarpoDebug>4) Info(
"AddCharge",
"map(%d,%d) = %g",channel,t,data);
175 chargeSum += cellCharge;
178 if(
gHarpoDebug>3) Info(
"AddCharge",
"*** In: %.3g, OUT: %.3g => %.3g",charge, chargeSum, chargeSum/charge);
196 for(Int_t ch = 0; ch<
NCHAN;ch++){
197 for(Int_t t = 0; t<
NADC;t++){
200 data += gRandom->Gaus(0,
fNoise);
210 Bool_t isSat = kTRUE;
211 for(Int_t ch = 0; ch<
NCHAN;ch++){
212 Double_t qtot = 0, qreadold = 0;
213 Bool_t isPrevSat = isSat;
215 for(Int_t t = 0; t<
NADC;t++){
220 data = qread - qreadold;
224 if(!isPrevSat && ch>0){
260 Double_t thr = 40000;
261 if(qreal<thr)
return qreal;
263 Double_t thr2 = 60000;
264 Double_t thr2real = thr+(thr2-thr)/A;
265 if(qreal<thr2real)
return thr + (qreal-thr)*A;
267 Double_t thr3 = 100000;
268 Double_t thr3real = thr2real+(thr3-thr2)/A2;
269 if(qreal<thr3real)
return thr2 + (qreal-thr2real)*A2;
271 return thr3 + (qreal-thr3real)*A3;
282 for(Int_t ch = 0; ch<304;ch++){
283 for(Int_t t = 0; t<511;t++){
285 Double_t data = dccMap->
GetData(ch,t);
286 if(data>4096) data = 4096;
void Saturation(HarpoDccMap *map)
Int_t AddCharge(HarpoDccMap *map, Int_t channel, Double_t time, Double_t charge)
HarpoPedestal * GetPedestals()
HarpoPedestal * fPedestals[2]
Double_t GetRawData(Int_t i, Int_t j)
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
void SetData(Int_t i, Int_t j, Double_t val)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
void SetPedestals(HarpoPedestal *obj)
Ste/Get Pedstal object.
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
Double_t ChannelSat(Double_t qreal)
void SetRawData(Int_t i, Int_t j, Double_t val)