The base class with all static methods to use.
Definition at line 17 of file harvester.py.
◆ calculate_charges_and_path_lengths_for_one_type()
def calculate_charges_and_path_lengths_for_one_type |
( |
|
clusters, |
|
|
|
mc_particle |
|
) |
| |
|
static |
Return lists of charges and path lengths for the clusters associated with an MCParticle
Definition at line 33 of file harvester.py.
33 def calculate_charges_and_path_lengths_for_one_type(clusters, mc_particle):
34 """Return lists of charges and path lengths for the clusters associated with an MCParticle"""
40 momentum = mc_particle.getMomentum()
41 position = mc_particle.getProductionVertex()
42 charge = mc_particle.getCharge()
44 helix =
Belle2.Helix(position, momentum, charge, b_field)
46 for cluster
in clusters:
48 calibrated_charge = tools.getCalibratedCharge(cluster)
49 path_length = tools.getPathLength(cluster, helix)
51 charge_list.append(calibrated_charge)
52 path_length_list.append(path_length)
54 return charge_list, path_length_list, list(np.divide(charge_list, path_length_list))
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
◆ do_for_each_hit_type()
def do_for_each_hit_type |
( |
|
cluster, |
|
|
|
svd_function, |
|
|
|
pxd_function |
|
) |
| |
|
static |
Apply a PXD selection to a PXDCluster or an SVD selection to an SVDCluster
Definition at line 22 of file harvester.py.
◆ generate_truncated()
def generate_truncated |
( |
|
charge_list | ) |
|
|
static |
Sort then truncate a list to all but the last 2 entries or the first 4 entries or the first 6 entries
Definition at line 57 of file harvester.py.
The documentation for this class was generated from the following file: