SND@LHC Software
|
Classes | |
class | TTCluster |
CLASS OF TT AND HPT EVENTS ######################################################. More... | |
Variables | |
int | sipm_hor_pos = +1 |
GLOBAL VALUES AND PARAMETERS ############. | |
int | sipm_vert_pos = -1 |
bool | is_sipm_hor_reversed = True |
bool | is_sipm_vert_reversed = True |
float | hw = 13.06 / 2. |
float | pitch = 0.025 |
float | charr = 1.6 |
float | edge = 0.017 |
float | gap = 0.025 |
float | array = gap + 2.*charr |
float | biggap = 0.042 |
int | ch_max_num = 511 |
int | n_solid_sipms = 8 |
tuple | sipm_map |
dict | gaps_map |
float | ly_loss_params = 20.78, -0.26, 7.89, -3.06 |
float | ly_loss_sigma_params = 6.8482, -0.5757, 3.4458 |
float | cluster_width_mean_params = 0.6661, -0.006955, 2.163 |
float | cluster_width_sigma_params = 1.103, -0.0005751 |
float | random_width_persent = 0.01 |
float | ly_min = 4.5 |
int | ly_max = 104 |
float | chpos_min = -0.5 |
float | chpos_max = 511.5 |
int | cluster_width_min = 1 |
int | cluster_width_max = 10 |
float | energy_range = 0.18, 0.477 |
float | CDF_integral = 0.0185640424 |
float | ly_linear_params = 332.882, -58.7085 |
float | k_cdfs_corr = 0.993076766938 |
float | sigma_in_percent = 0.01 |
int | sigma_from_width = 1 / 4. |
dict | ly_CDF_params |
dict | ly_CDF_landau_params |
dict | CDF_ly_params |
dict | design2018 = {'dy': 10.,'dv': 6,'ds': 9,'nud': 3,'caloDesign': 3,'strawDesign': 10} |
LOAD THE TARGET TRACKER GEOMETRY #########. | |
dict | dy = design2018['dy'] |
dict | dv = design2018['dv'] |
dict | ds = design2018['ds'] |
dict | nud = design2018['nud'] |
dict | caloDesign = design2018['caloDesign'] |
dict | strawDesign = design2018['strawDesign'] |
geofile = None | |
ship_geo | |
n_hor_planes = ship_geo.NuTauTT.n_hor_planes | |
n_vert_planes = ship_geo.NuTauTT.n_vert_planes | |
scifimat_hor = ship_geo.NuTauTT.scifimat_hor | |
scifimat_vert = ship_geo.NuTauTT.scifimat_vert | |
scifimat_width = ship_geo.NuTauTT.scifimat_width | |
scifimat_z = ship_geo.NuTauTT.scifimat_z | |
n_tt_stations = ship_geo.NuTauTT.n | |
list | tt_points = [] |
EXAMPLE OF USING THE CLASS #######. | |
list | hpt_points = [] |
list | tt_raw = [] |
list | hpt_raw = [] |
muonfile = ROOT.TFile("$PWD/ship.conical.PG_13-TGeant4.root") | |
tree = muonfile.Get("cbmsim") | |
pnt = TTCluster(hit.GetDetectorID(), hit.GetX(), hit.GetY(), hit.GetEnergyLoss()) | |
fig | |
axs = plt.gca() | |
ly_bins = np.linspace(4,104,100) | |
bins | |
label | |
loc | |
int | nbins = 24 |
list | xz_points = [] |
list | yz_points = [] |
TTCluster.approx_function | ( | var, | |
approx_data | |||
) |
This universal function substitutes the parameters to the function. The parameters and the function are in the dictionary
Definition at line 385 of file TTCluster.py.
It converts a particle position measured channels to a position measured in cm. The SiPM map is used. The position is in the scifi modul frame.
Definition at line 228 of file TTCluster.py.
TTCluster.cluster_generator | ( | amplitude, | |
width, | |||
wmp, | |||
cluster_width_max = cluster_width_max , |
|||
chpos_min = chpos_min , |
|||
chpos_max = chpos_max |
|||
) |
It generates an event cluster with given weighted mean position in channels, width and amplitude. If right side of the cluster can be out of range, the maximum of the right side will be right channel. At first an array [0, 0, 0, ... ] is generated which corresponds to the channels. Next the cluster generated in the array. Final array will be like [0, 0, ..., 1, 2, 5, 1, 0, ...], [0, 17, 0, ...] or etc.
Definition at line 432 of file TTCluster.py.
TTCluster.cluster_width_mean | ( | distance, | |
params = cluster_width_mean_params |
|||
) |
It return a mean cluster width depending on the distance to SiPMs
Definition at line 347 of file TTCluster.py.
TTCluster.cluster_width_random | ( | distance, | |
ly, | |||
persent = random_width_persent , |
|||
cluster_width_min = cluster_width_min , |
|||
cluster_width_max = cluster_width_max |
|||
) |
It generates a cluster. The cluster have 'ly' photoelectrons. The cluster width depends on the distance to SiPM
Definition at line 365 of file TTCluster.py.
TTCluster.cluster_width_sigma | ( | distance, | |
params = cluster_width_sigma_params |
|||
) |
It return a standard deviation of the mean cluster width depending on the distance to SiPMs
Definition at line 356 of file TTCluster.py.
TTCluster.cm_to_channel | ( | locpos, | |
sipm_map = sipm_map , |
|||
gaps_map = gaps_map , |
|||
pitch = pitch , |
|||
charr = charr , |
|||
reverse = False , |
|||
ch_max_num = ch_max_num , |
|||
n_solid_sipms = n_solid_sipms |
|||
) |
FUNCTIONS FOR TTCLASS #####################################################.
It converts a particle position (an event) measured in cm to a position measured in channels. The SiPM map is used. The position is in the scifi modul frame.
Definition at line 203 of file TTCluster.py.
TTCluster.create_cluster | ( | amplitude, | |
width, | |||
wmp | |||
) |
The final function for creating a signal cluster
Definition at line 486 of file TTCluster.py.
TTCluster.edep_to_ly | ( | energy, | |
CDF_integral = CDF_integral , |
|||
energy_range = energy_range , |
|||
ly_linear_params = ly_linear_params , |
|||
k_cdfs_corr = k_cdfs_corr , |
|||
sigma_in_percent = sigma_in_percent , |
|||
ly_CDF_params = ly_CDF_params , |
|||
CDF_ly_params = CDF_ly_params , |
|||
ly_CDF_landau_params = ly_CDF_landau_params |
|||
) |
It returns the light yield calculated from the energy deposit. The calculations are based on the equality of the cumulative distribution functions (CDF) : energy => CDF(energy) => CDF(light yield) => ly The linear converting range 0.18 MeV < dE < 0.477 MeV corresponds 4.5 < LY < 104 ph.e. If energy more then 0.477 MeV the light yield calculated randomly (uniformly in the range) according to the distribution Also a little randomness is added to the CDF value with a normal distribution and standard deviation with 'sigma_in_percent' (in percent of the whole range 0 - max CDF)
Definition at line 397 of file TTCluster.py.
TTCluster.GetMatLength | ( | DetID | ) |
It returns a length of a scifi mat. The values 'scifimat_vert', 'scifimat_hor' are set in the FairShip geometry file.
Definition at line 269 of file TTCluster.py.
TTCluster.GetMatNum | ( | DetID | ) |
It returns an id (number) of a scifi module. In current version one plane have 7 vertical and 11 horisontal scifi assemblies.
Definition at line 260 of file TTCluster.py.
TTCluster.GetMatQty | ( | DetID | ) |
It returns a number of scifi mats in a plane. In current version it is 7 for vertical and 11 for horisontal scifi assemblies.
Definition at line 283 of file TTCluster.py.
TTCluster.GetMatType | ( | DetID | ) |
It returns a type of a scifi module. 1 - vertical scifi assembly 0 - horizontal scifi assembly
Definition at line 248 of file TTCluster.py.
TTCluster.GetStationNum | ( | DetID | ) |
It returns an id of a plane. In current the detector have 19 TT stations and 5 HPT stations.
Definition at line 297 of file TTCluster.py.
TTCluster.global_to_local | ( | DetID, | |
globalpos | |||
) |
It returns the local coordinates in one scifi assembly frame from global coordinates.
Definition at line 305 of file TTCluster.py.
TTCluster.is_realistic | ( | cluster, | |
width | |||
) |
It returns TRUE if cluster is realistic: it doesn't have a gap between numders, like [..., 0, 1, 2, 0, 0, 5, 6, ...], and it doens't have the light yield less then width.
Definition at line 471 of file TTCluster.py.
TTCluster.local_to_global | ( | DetID, | |
localpos | |||
) |
It returns the global coordinates from the local coordinates in one scifi assembly frame.
Definition at line 317 of file TTCluster.py.
TTCluster.ly_attenuation | ( | distance | ) |
It return the light yield losses in percent depending on the distance to SiPMs
Definition at line 338 of file TTCluster.py.
TTCluster.ly_loss_mean | ( | distance, | |
params = ly_loss_params |
|||
) |
It return the light yield depending on the distance to SiPMs
Definition at line 329 of file TTCluster.py.
TTCluster.weigthed_mean_pos | ( | cluster | ) |
Calculate the weighted mean position of the cluster
Definition at line 504 of file TTCluster.py.
Definition at line 38 of file TTCluster.py.
TTCluster.axs = plt.gca() |
Definition at line 727 of file TTCluster.py.
float TTCluster.biggap = 0.042 |
Definition at line 39 of file TTCluster.py.
TTCluster.bins |
Definition at line 731 of file TTCluster.py.
dict TTCluster.caloDesign = design2018['caloDesign'] |
Definition at line 183 of file TTCluster.py.
float TTCluster.CDF_integral = 0.0185640424 |
Definition at line 102 of file TTCluster.py.
dict TTCluster.CDF_ly_params |
Definition at line 154 of file TTCluster.py.
int TTCluster.ch_max_num = 511 |
Definition at line 40 of file TTCluster.py.
float TTCluster.charr = 1.6 |
Definition at line 35 of file TTCluster.py.
float TTCluster.chpos_max = 511.5 |
Definition at line 93 of file TTCluster.py.
float TTCluster.chpos_min = -0.5 |
Definition at line 92 of file TTCluster.py.
int TTCluster.cluster_width_max = 10 |
Definition at line 95 of file TTCluster.py.
float TTCluster.cluster_width_mean_params = 0.6661, -0.006955, 2.163 |
Definition at line 82 of file TTCluster.py.
int TTCluster.cluster_width_min = 1 |
Definition at line 94 of file TTCluster.py.
float TTCluster.cluster_width_sigma_params = 1.103, -0.0005751 |
Definition at line 83 of file TTCluster.py.
dict TTCluster.design2018 = {'dy': 10.,'dv': 6,'ds': 9,'nud': 3,'caloDesign': 3,'strawDesign': 10} |
LOAD THE TARGET TRACKER GEOMETRY #########.
Definition at line 178 of file TTCluster.py.
dict TTCluster.ds = design2018['ds'] |
Definition at line 181 of file TTCluster.py.
dict TTCluster.dv = design2018['dv'] |
Definition at line 180 of file TTCluster.py.
dict TTCluster.dy = design2018['dy'] |
Definition at line 179 of file TTCluster.py.
float TTCluster.edge = 0.017 |
Definition at line 36 of file TTCluster.py.
float TTCluster.energy_range = 0.18, 0.477 |
Definition at line 99 of file TTCluster.py.
TTCluster.fig |
Definition at line 727 of file TTCluster.py.
float TTCluster.gap = 0.025 |
Definition at line 37 of file TTCluster.py.
dict TTCluster.gaps_map |
Definition at line 66 of file TTCluster.py.
TTCluster.geofile = None |
Definition at line 185 of file TTCluster.py.
float TTCluster.hpt_points = [] |
Definition at line 632 of file TTCluster.py.
float TTCluster.hpt_raw = [] |
Definition at line 634 of file TTCluster.py.
float TTCluster.hw = 13.06 / 2. |
Definition at line 33 of file TTCluster.py.
bool TTCluster.is_sipm_hor_reversed = True |
Definition at line 23 of file TTCluster.py.
bool TTCluster.is_sipm_vert_reversed = True |
Definition at line 24 of file TTCluster.py.
float TTCluster.k_cdfs_corr = 0.993076766938 |
Definition at line 109 of file TTCluster.py.
TTCluster.label |
Definition at line 731 of file TTCluster.py.
TTCluster.loc |
Definition at line 734 of file TTCluster.py.
TTCluster.ly_bins = np.linspace(4,104,100) |
Definition at line 730 of file TTCluster.py.
dict TTCluster.ly_CDF_landau_params |
Definition at line 138 of file TTCluster.py.
dict TTCluster.ly_CDF_params |
Definition at line 124 of file TTCluster.py.
float TTCluster.ly_linear_params = 332.882, -58.7085 |
Definition at line 106 of file TTCluster.py.
float TTCluster.ly_loss_params = 20.78, -0.26, 7.89, -3.06 |
Definition at line 80 of file TTCluster.py.
float TTCluster.ly_loss_sigma_params = 6.8482, -0.5757, 3.4458 |
Definition at line 81 of file TTCluster.py.
int TTCluster.ly_max = 104 |
Definition at line 91 of file TTCluster.py.
float TTCluster.ly_min = 4.5 |
Definition at line 90 of file TTCluster.py.
TTCluster.muonfile = ROOT.TFile("$PWD/ship.conical.PG_13-TGeant4.root") |
Definition at line 637 of file TTCluster.py.
TTCluster.n_hor_planes = ship_geo.NuTauTT.n_hor_planes |
Definition at line 191 of file TTCluster.py.
int TTCluster.n_solid_sipms = 8 |
Definition at line 41 of file TTCluster.py.
TTCluster.n_tt_stations = ship_geo.NuTauTT.n |
Definition at line 197 of file TTCluster.py.
TTCluster.n_vert_planes = ship_geo.NuTauTT.n_vert_planes |
Definition at line 192 of file TTCluster.py.
TTCluster.nbins = 24 |
Definition at line 738 of file TTCluster.py.
dict TTCluster.nud = design2018['nud'] |
Definition at line 182 of file TTCluster.py.
float TTCluster.pitch = 0.025 |
Definition at line 34 of file TTCluster.py.
TTCluster.pnt = TTCluster(hit.GetDetectorID(), hit.GetX(), hit.GetY(), hit.GetEnergyLoss()) |
Definition at line 643 of file TTCluster.py.
float TTCluster.random_width_persent = 0.01 |
Definition at line 87 of file TTCluster.py.
TTCluster.scifimat_hor = ship_geo.NuTauTT.scifimat_hor |
Definition at line 193 of file TTCluster.py.
TTCluster.scifimat_vert = ship_geo.NuTauTT.scifimat_vert |
Definition at line 194 of file TTCluster.py.
TTCluster.scifimat_width = ship_geo.NuTauTT.scifimat_width |
Definition at line 195 of file TTCluster.py.
TTCluster.scifimat_z = ship_geo.NuTauTT.scifimat_z |
Definition at line 196 of file TTCluster.py.
TTCluster.ship_geo |
Definition at line 187 of file TTCluster.py.
int TTCluster.sigma_from_width = 1 / 4. |
Definition at line 116 of file TTCluster.py.
float TTCluster.sigma_in_percent = 0.01 |
Definition at line 113 of file TTCluster.py.
int TTCluster.sipm_hor_pos = +1 |
GLOBAL VALUES AND PARAMETERS ############.
Definition at line 18 of file TTCluster.py.
tuple TTCluster.sipm_map |
Definition at line 45 of file TTCluster.py.
int TTCluster.sipm_vert_pos = -1 |
Definition at line 19 of file TTCluster.py.
dict TTCluster.strawDesign = design2018['strawDesign'] |
Definition at line 184 of file TTCluster.py.
TTCluster.tree = muonfile.Get("cbmsim") |
Definition at line 638 of file TTCluster.py.
float TTCluster.tt_points = [] |
EXAMPLE OF USING THE CLASS #######.
Definition at line 631 of file TTCluster.py.
float TTCluster.tt_raw = [] |
Definition at line 633 of file TTCluster.py.
float TTCluster.xz_points = [] |
Definition at line 746 of file TTCluster.py.
float TTCluster.yz_points = [] |
Definition at line 747 of file TTCluster.py.