File indexing completed on 2025-08-06 08:13:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef SCORRELATORUTILITIES_CLUSTINFO_H
0012 #define SCORRELATORUTILITIES_CLUSTINFO_H
0013
0014
0015 #include <limits>
0016 #include <string>
0017 #include <vector>
0018 #include <utility>
0019 #include <optional>
0020
0021 #include <Rtypes.h>
0022 #include <Math/Vector3D.h>
0023 #include <Math/Vector4D.h>
0024
0025 #include <calobase/RawCluster.h>
0026
0027 #include "Constants.h"
0028 #include "ClustTools.h"
0029
0030
0031 using namespace std;
0032
0033
0034
0035 namespace SColdQcdCorrelatorAnalysis {
0036 namespace Types {
0037
0038
0039
0040
0041
0042
0043
0044 class ClustInfo {
0045
0046 private:
0047
0048
0049 int system = numeric_limits<int>::max();
0050 int id = numeric_limits<int>::max();
0051 int64_t nTwr = numeric_limits<int64_t>::max();
0052 double ene = numeric_limits<double>::max();
0053 double rho = numeric_limits<double>::max();
0054 double eta = numeric_limits<double>::max();
0055 double phi = numeric_limits<double>::max();
0056 double px = numeric_limits<double>::max();
0057 double py = numeric_limits<double>::max();
0058 double pz = numeric_limits<double>::max();
0059 double rx = numeric_limits<double>::max();
0060 double ry = numeric_limits<double>::max();
0061 double rz = numeric_limits<double>::max();
0062
0063
0064 void Minimize();
0065 void Maximize();
0066
0067 public:
0068
0069
0070 int GetSystem() const {return system;}
0071 int GetID() const {return id;}
0072 int64_t GetNTwr() const {return nTwr;}
0073 double GetEne() const {return ene;}
0074 double GetRho() const {return rho;}
0075 double GetEta() const {return eta;}
0076 double GetPhi() const {return phi;}
0077 double GetPX() const {return px;}
0078 double GetPY() const {return py;}
0079 double GetPZ() const {return pz;}
0080 double GetRX() const {return rx;}
0081 double GetRY() const {return ry;}
0082 double GetRZ() const {return rz;}
0083
0084
0085 void SetSystem(const int arg_sys) {system = arg_sys;}
0086 void SetID(const int arg_id) {id = arg_id;}
0087 void SetNTwr(const int64_t arg_nTwr) {nTwr = arg_nTwr;}
0088 void SetEne(const double arg_ene) {ene = arg_ene;}
0089 void SetRho(const double arg_rho) {rho = arg_rho;}
0090 void SetEta(const double arg_eta) {eta = arg_eta;}
0091 void SetPhi(const double arg_phi) {phi = arg_phi;}
0092 void SetPX(const double arg_px) {px = arg_px;}
0093 void SetPY(const double arg_py) {py = arg_py;}
0094 void SetPZ(const double arg_pz) {pz = arg_pz;}
0095 void SetRX(const double arg_rx) {rx = arg_rx;}
0096 void SetRY(const double arg_ry) {ry = arg_ry;}
0097 void SetRZ(const double arg_rz) {rz = arg_rz;}
0098
0099
0100 void Reset();
0101 void SetInfo(const RawCluster* clust, optional<ROOT::Math::XYZVector> vtx = nullopt, optional<int> sys = nullopt);
0102 bool IsInAcceptance(const ClustInfo& minimum, const ClustInfo& maximum) const;
0103 bool IsInAcceptance(const pair<ClustInfo, ClustInfo>& range) const;
0104
0105
0106 static vector<string> GetListOfMembers();
0107
0108
0109 friend bool operator <(const ClustInfo& lhs, const ClustInfo& rhs);
0110 friend bool operator >(const ClustInfo& lhs, const ClustInfo& rhs);
0111 friend bool operator <=(const ClustInfo& lhs, const ClustInfo& rhs);
0112 friend bool operator >=(const ClustInfo& lhs, const ClustInfo& rhs);
0113
0114
0115 ClustInfo();
0116 ~ClustInfo();
0117
0118
0119 ClustInfo(const Const::Init init);
0120 ClustInfo(const RawCluster* clust, optional<ROOT::Math::XYZVector> vtx = nullopt, optional<int> sys = nullopt);
0121
0122
0123 ClassDefNV(ClustInfo, 1)
0124
0125 };
0126
0127
0128
0129
0130
0131 bool operator <(const ClustInfo& lhs, const ClustInfo& rhs);
0132 bool operator >(const ClustInfo& lhs, const ClustInfo& rhs);
0133 bool operator <=(const ClustInfo& lhs, const ClustInfo& rhs);
0134 bool operator >=(const ClustInfo& lhs, const ClustInfo& rhs);
0135
0136 }
0137 }
0138
0139 #endif
0140
0141