Skip to content

Commit c68927c

Browse files
ggfdsa10SEUNGHWAN LEE
and
SEUNGHWAN LEE
authoredDec 13, 2024··
Calibrated BBC simulation (star-bnl#718)
BBC simulation has been calibrated with a 2017 p+p run. There is added the calibrated factors for all BBC channels. It was also discussed with Akio. Thanks --------- Co-authored-by: SEUNGHWAN LEE <[email protected]>
1 parent 640288b commit c68927c

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed
 

‎StRoot/StBbcSimulationMaker/StBbcSimulationMaker.cxx

+30-7
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,31 @@ const float SinglePhotoElectronResolution = 0.3; // according to Les Bland
5252
/* Numbering: the real PMT numbering (used in the map) starts from 1.
5353
ALL OTHERS start from 0 !
5454
*/
55+
56+
57+
// Note: BBC new factors are calibrated by 2017 p+p runs
58+
const short ADCBin = 4096;
59+
60+
const float LightFactor[NPMT2] = {1., 1., 0.95, 0.92, 1., 1., 1., 1., 0.9, 0.96, 0.95, 1., 0.95, 0.97, 1., 1., // East small
61+
0.33, 0.298, 0.25, 0.26, 0.22, 0.4, 0.24, 0.26, // East large
62+
1.2, 0.9, 1., 0.6, 1., 1., 1.2, 1.2, 1.25, 0.4, 1., 1., 0.95, 0.95, 0.94, 0.95, // West small
63+
0., 0.243, 0., 0.2, 0.24, 0.18, 0.19, 0.2}; // West large
64+
65+
const float TileResolution[NPMT2] = {0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, // East small
66+
0.6, 0.6, 0.4, 0.5, 0.5, 0.6, 0.4, 0.5, // East large
67+
0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.5, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, // West small
68+
0., 0.5, 0., 0.5, 0.6, 0.6, 0.4, 0.65}; // West large
69+
70+
const float pC_per_ADCBins[NPMT2] = {0.03, 0.03, 0.033, 0.033, 0.03, 0.03, 0.022, 0.03, 0.021, 0.022, 0.024, 0.03, 0.024, 0.024, 0.025, 0.027, // East small
71+
0.0226, 0.028, 0.021, 0.023, 0.014, 0.0125, 0.012, 0.0125, // East large
72+
0.031, 0.03, 0.03, 0.018, 0.03, 0.03, 0.023, 0.024, 0.028, 0.005, 0.03, 0.03, 0.028, 0.023, 0.022, 0.028, // West small
73+
0., 0.027, 0., 0.06, 0.013, 0.014, 0.0129, 0.02}; // West large
74+
75+
const int shift_ADC0[NPMT2] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // East small
76+
0, 0, 0, 0, -15, 0, -15, 0, // East large
77+
0, 0, 0, 0, 0, 0, 0, 0, 0, -60, 0, 0, 0, 0, 0, 0, // West small
78+
0, 0, 0, 0, -10, -7, -15, -10}; // West large
79+
5580
//____________________________________________________________________________
5681

5782
bool IsSmall(short iPMT)
@@ -118,27 +143,25 @@ the response based on that + noise.
118143
~BbcDE(){};
119144
void AddDE(uint16_t ipmt, float de)
120145
{
121-
if (!IsSmall(ipmt)) {de *= OuterFactor;}
146+
de *= LightFactor[ipmt];
122147
dE[ipmt] += de;
123148
}
124149
float GetDE(uint16_t ipmt)
125150
{
126151
/// returns DE in pC of PMT signal
127-
128152
float PoissonMean = dE[ipmt]/dE_1MIP*NPhotoelectrons_1MIP;
129153
short NPhotoelectrons = BbcRndm.Poisson(PoissonMean);
130154
float Q = pC_per_Photoelectron*
131-
(1+BbcRndm.Gaus(0.,SinglePhotoElectronResolution))*
132-
NPhotoelectrons;
155+
(1+BbcRndm.Gaus(0.,TileResolution[ipmt]))*NPhotoelectrons;
133156
return Q;
134157
}
135158
short GetADC(uint16_t ipmt)
136159
{
137160
/// returns digitized (ADC) amplitude
138161
float A = this->GetDE(ipmt);
139-
if (A<ADC0) {return 0;}
140-
short N = (short)((A-ADC0)/pC_perADCbin);
141-
if (N>=NADCbins) {return NADCbins-1;}
162+
short N = (short)(A/pC_per_ADCBins[ipmt] + shift_ADC0[ipmt]);
163+
if (N>=ADCBin) {return ADCBin-1;}
164+
if (N<0){return 0;}
142165
return N;
143166
}
144167
};

0 commit comments

Comments
 (0)
Please sign in to comment.