15 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
22 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
30 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
38 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
47 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
55 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
64 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
69 return 0.5 * (cluster_charge_f + cluster_charge_b);
75 if (hit ==
nullptr || sts_clu_array ==
nullptr) {
80 return (cluster_charge_f - cluster_charge_b) / (cluster_charge_f + cluster_charge_b);
84std::pair<cbm_sts_utils::HBinning, cbm_sts_utils::HBinning>
87 assert((max_clu_size > 0) &&
"Maximum cluster size must be greater than 0");
91 double n_side_q_thr =
par_asic[0].GetThreshold();
92 double n_side_q_dyn =
par_asic[0].GetDynRange();
93 double p_side_q_thr =
par_asic[8].GetThreshold();
94 double p_side_q_dyn =
par_asic[8].GetDynRange();
96 for (
int asic_idx = 0; asic_idx < 16; asic_idx++) {
99 n_side_q_thr = std::min(n_side_q_thr, asic.GetThreshold());
100 n_side_q_dyn = std::max(n_side_q_dyn, asic.GetDynRange());
103 p_side_q_thr = std::min(p_side_q_thr, asic.GetThreshold());
104 p_side_q_dyn = std::max(p_side_q_dyn, asic.GetDynRange());
108 double n_side_q_bin = n_side_q_dyn / 31;
109 double p_side_q_bin = p_side_q_dyn / 31;
111 double n_side_q_min = n_side_q_thr;
112 double p_side_q_min = p_side_q_thr;
114 double n_side_q_max = (n_side_q_dyn * (31.5 / 31) + 0.5 * n_side_q_bin) * max_clu_size + n_side_q_min;
115 double p_side_q_max = (p_side_q_dyn * (31.5 / 31) + 0.5 * p_side_q_bin) * max_clu_size + p_side_q_min;
117 uint32_t n_side_n_bin = 32 * max_clu_size;
118 uint32_t p_side_n_bin = 32 * max_clu_size;
128 for (int32_t address : addresses) {
136 std::vector<int32_t> unit_modules;
137 for (int32_t address : addresses) {
139 unit_modules.push_back(address);
Data class for STS clusters.
static const CbmStsParAsic par_asic(128, 31, 75000, 3000, 5, 800, 0, 0)
Data class for STS clusters.
data class for a reconstructed 3-d hit in the STS
int32_t GetFrontClusterId() const
int32_t GetBackClusterId() const
Parameters for one STS module.
const std::vector< CbmStsParAsic > & GetAsicParams() const
All ASIC parameters.
uint32_t GetElementId(int32_t address, int32_t level)
Get the index of an element.
int32_t GetHitCluSizeB(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the cluster size of a hit from the back side.
double GetHitChargeAsy(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge asymmetry of a hit.
double GetHitChargeF(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit from the front side.
double GetHitTimeB(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit from the back side.
std::pair< HBinning, HBinning > ChargeBinning(const CbmStsParModule &par_module, const uint32_t max_clu_size=1)
Generate the charge binning from module config obj.
double GetHitChargeB(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit from the back side.
std::set< int > GetUnits(const std::vector< int32_t > addresses)
Return the STS units from a list of addresses.
double GetHitCharge(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit as the average of front and back cluster charges.
double GetHitTimeF(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit from the front side.
std::vector< int32_t > GetUnitModules(const std::vector< int32_t > addresses, const uint32_t unit)
From a list of module address, return those that belong to a selected unit.
int32_t GetHitCluSizeF(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the cluster size of a hit from the front side.
Structure to hold the binning for 1D histogram.