40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
import os
|
|
import numpy as np
|
|
from ROOT import *
|
|
from multiprocessing import Pool
|
|
from array import array
|
|
from scipy.stats import gennorm
|
|
import McGenerator
|
|
|
|
gROOT.SetBatch(True)
|
|
|
|
attenuationLengthDict = { ### https://henke.lbl.gov/optical_constants/atten2.html
|
|
'5keV': 18.0101, '10keV':133.706, '15keV':442.607, '15.3keV': 469.363, '20keV':1037.80, '25keV':1991.45,
|
|
}
|
|
element = '15.3keV'
|
|
mcConfig = {
|
|
'element': element,
|
|
'energy': 15300, ### eV
|
|
'attenuationLength': attenuationLengthDict[element],
|
|
'sensorCode': 'Moench040',
|
|
'nTotalIncident': 10_000_000,
|
|
'nThread': 16,
|
|
'Roi': [50, 350, 50, 350],
|
|
'clusterWidth': 5, ### pixel
|
|
'pixelSize': 25, ### um
|
|
'noiseEneFrame': np.ones((400, 400)) * 0,
|
|
'shotNoiseFactor': 0.0,
|
|
'calibrationNoise': 0.0,
|
|
'sensorThickness': 650, ### moench040: 650 um, 34.7 V
|
|
'T': 273 + 20.0 + 14.8,
|
|
'zBins': 128,
|
|
'hv': 150,
|
|
'depletionVoltage': 34.7,
|
|
'simulationMethod': 'simu2', ### 'simu1' (cpu) or 'simu2' (gpu)
|
|
'resultsPath': '/home/xie_x1/MLED/McSimulation/BatchResults',
|
|
'sampleOutputPath': '/home/xie_x1/MLXID/McGeneration/Samples'
|
|
}
|
|
|
|
McGenerator.init(mcConfig)
|
|
McGenerator.parameterization()
|
|
McGenerator.generateFromParameters() |