CbmRoot
Loading...
Searching...
No Matches
CbmStsUtils.h
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dario Ramirez [committer] */
4
5#ifndef CBMSTSUTILS_H
6#define CBMSTSUTILS_H
7
8#include "CbmStsHit.h"
9#include "TClonesArray.h"
10
11#include <set>
12
13class CbmStsParModule;
14
18namespace cbm_sts_utils
19{
20 static const double kStsClock = 3.125;
21 static const double kStsDx = 6. / 1024;
22 static const double kStsDy = kStsDx / std::tan(7.5 * TMath::Pi() / 180);
23 static const double kStsErrX = kStsDx / sqrt(12);
24 static const double kStsErrY = kStsDy / sqrt(12);
25
31 int32_t GetHitCluSizeF(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
32
38 int32_t GetHitCluSizeB(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
39
45 double GetHitCharge(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
46
52 double GetHitChargeB(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
53
59 double GetHitChargeF(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
60
66 double GetHitTimeB(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
67
73 double GetHitTimeF(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
74
80 double GetHitSizeAsy(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
81
87 double GetHitChargeAsy(CbmStsHit* hit = nullptr, TClonesArray* clusters = nullptr);
88
92 struct HBinning {
93 uint32_t n_of_bins{0};
94 double x_min{0};
95 double x_max{0};
96 };
97
103 std::pair<HBinning, HBinning> ChargeBinning(const CbmStsParModule& par_module, const uint32_t max_clu_size = 1);
104
109 std::set<int> GetUnits(const std::vector<int32_t> addresses);
110
116 std::vector<int32_t> GetUnitModules(const std::vector<int32_t> addresses, const uint32_t unit);
117}; // namespace cbm_sts_utils
118#endif
Data class for a reconstructed hit in the STS.
friend fvec sqrt(const fvec &a)
data class for a reconstructed 3-d hit in the STS
Definition CbmStsHit.h:35
Parameters for one STS module.
Namespace containing utility functions for STS detector.
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.
static const double kStsDy
Definition CbmStsUtils.h:22
double GetHitChargeF(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the charge of a hit from the front side.
static const double kStsErrX
Definition CbmStsUtils.h:23
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 GetHitSizeAsy(CbmStsHit *hit=nullptr, TClonesArray *clusters=nullptr)
Get the size asymmetry of a hit.
static const double kStsClock
Definition CbmStsUtils.h:20
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.
static const double kStsDx
Definition CbmStsUtils.h:21
static const double kStsErrY
Definition CbmStsUtils.h:24
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.
Definition CbmStsUtils.h:92