icebrk¶
B-physics analysis classes.
icebrk.common¶
icebrk.cutstats¶
- apply_cuts(d, evt_index, cutflow)[source]¶
Selection cuts function.
- Parameters:
d
evt_index
cutflow
- Returns:
True or False
- collect_info_stats(d, evt_index, infostats)[source]¶
Collect event information.
- Parameters:
d
evt_index
infostats
- collect_mcinfo_stats(d, evt_index, y, qsets, MAXT3, mcinfostats)[source]¶
Collect MC only information.
Args:
Returns:
icebrk.fasthistos¶
icebrk.features¶
icebrk.histos¶
- calc_MC_observables(evt_index, d, l1_p4, l2_p4, k_p4, sets, MAXT3)[source]¶
MC ONLY observables.
- Parameters:
evt_index
d
l1_p4
l2_p4
k_p4
sets
MAXT3
- Returns:
Observables
- Return type:
x
- calc_batch_MC_observables(d, l1_p4, l2_p4, k_p4)[source]¶
MC ONLY batch observables.
- Parameters:
d
l1_p4
l2_p4
k_p4
- Returns:
x
- calc_batch_observables(l1_p4, l2_p4, k_p4)[source]¶
JAGGED + VECTORIZED (operates on event batch) observables.
- Parameters:
l1_p4
l2_p4
k_p4
- Returns:
Observables
- Return type:
x
icebrk.loop¶
- hdf5_append(datasets, key, chunk)[source]¶
Append chunk of data to HDF5 file.
- Parameters:
datasets
key
chunk
- Returns:
datasets
- Return type:
f
- hdf5_write_handles(filename, N_weights, rwmode='w')[source]¶
Create HDF5 file handles.
- Parameters:
filename
N_weights
rwmode
- Returns:
datasets
- Return type:
f
- hist_flush(reco, hobj, h5datasets=None)[source]¶
Histogram observables with accumulation of previous histograms, and flush buffer arrays
- Parameters:
reco
hobj
h5datasets
- Return type:
w
- initarrays(BUFFER, func_predict, isMC)[source]¶
Init histogramming arrays and objects
- Parameters:
BUFFER
func_predict
isMC
- Returns:
hobj:
- Return type:
reco
- poweranalysis(evt_index, batch_obs, obs, func_predict, x, y, qsets, MAXT3, MAXN, isMC, reco, BMAT, WNORM)[source]¶
Powerset analysis of the event N.B.this is already CONDITIONED that we select a maximum MAXT3 triplets!
- Parameters:
evt_index
batch_obs
obs
func_predict
x
y
qsets
MAXT3
MAXN
isMC
reco
BMAT
WNORM
- Return type:
w
icebrk.PDG¶
icebrk.tools¶
- construct_MC_truth(d)[source]¶
Set MC signal truth into a new branch @[JAGGED].
- Parameters:
d
Returns:
- construct_input_vec(evt_index, d, l1_p4, l2_p4, k_p4, qsets, MAXT3)[source]¶
Construct MVA input vector x.
feature 1 for all triplets 0 <possible zeros> .. 0 0, feature 2 for all triplets 0 <possible zeros> .. 0 0,
feature D for all triplets 0 <possible zeros> .. 0 0] where zeros are padded after each feature if no enough triplets are found
Args: Returns:
- construct_kinematics(d, l1_p4, l2_p4, k_p4)[source]¶
Construct kinematics of the triplet @[JAGGED].
- Parameters:
d
l1_p4
l2_p4
k_p4
Returns:
- construct_output_vec(evt_index, d, qsets, MAXT3)[source]¶
Construct MVA output vector y (binary with multilabel).
Args: Returns:
- deltar_3(eta1, eta2, eta3, phi1, phi2, phi3, dR_MATCH)[source]¶
Match vector triplets by their DeltaR.
Args: Returns:
- find_connected_triplets(evt_index, l1_p4, l2_p4, k_p4, dR_MATCH=0.01)[source]¶
Find all qsets of triplets connected together via DeltaR matching of their vectors.
Args: Returns:
- get_first_indices(qsets, MAXT3)[source]¶
Get the first evt_index from a list of list, where sublists encode e.g. different reconstruction chains of triplets.
Args: Returns:
- index_of_first_signal(evt_index, d, qsets, MAXT3)[source]¶
Check the evt_index of the last signal triplet (MC truth).
Args: Returns: