File indexing completed on 2025-08-06 08:13:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef SCORRELATORUTILITIES_CSTINFO_H
0012 #define SCORRELATORUTILITIES_CSTINFO_H
0013
0014
0015 #include <cmath>
0016 #include <limits>
0017 #include <string>
0018 #include <vector>
0019 #include <cassert>
0020 #include <utility>
0021 #include <optional>
0022
0023 #include <Rtypes.h>
0024 #include <Math/Vector3D.h>
0025 #include <Math/Vector4D.h>
0026
0027 #include <fastjet/PseudoJet.hh>
0028
0029 #include <phool/PHCompositeNode.h>
0030
0031 #include <g4main/PHG4Particle.h>
0032
0033 #include <calobase/RawTower.h>
0034 #include <calobase/TowerInfo.h>
0035 #include <calobase/RawCluster.h>
0036
0037 #include <trackbase_historic/SvtxTrack.h>
0038
0039 #include <particleflowreco/ParticleFlowElement.h>
0040
0041 #include <jetbase/Jet.h>
0042 #include <jetbase/JetContainer.h>
0043
0044 #include "JetInfo.h"
0045 #include "TwrTools.h"
0046 #include "Constants.h"
0047 #include "ClustTools.h"
0048 #include "CstInterfaces.h"
0049
0050
0051 using namespace std;
0052
0053
0054
0055 namespace SColdQcdCorrelatorAnalysis {
0056 namespace Types {
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 class CstInfo {
0067
0068 private:
0069
0070
0071 int type = numeric_limits<int>::max();
0072 int cstID = numeric_limits<int>::max();
0073 int jetID = numeric_limits<int>::max();
0074 int embedID = numeric_limits<int>::max();
0075 int pid = numeric_limits<int>::max();
0076 double z = numeric_limits<double>::max();
0077 double dr = numeric_limits<double>::max();
0078 double jt = numeric_limits<double>::max();
0079 double ene = numeric_limits<double>::max();
0080 double px = numeric_limits<double>::max();
0081 double py = numeric_limits<double>::max();
0082 double pz = numeric_limits<double>::max();
0083 double pt = numeric_limits<double>::max();
0084 double eta = numeric_limits<double>::max();
0085 double phi = numeric_limits<double>::max();
0086
0087
0088 void Minimize();
0089 void Maximize();
0090
0091 public:
0092
0093
0094 int GetType() const {return type;}
0095 int GetCstID() const {return cstID;}
0096 int GetJetID() const {return jetID;}
0097 int GetEmbedID() const {return embedID;}
0098 int GetPID() const {return pid;}
0099 double GetZ() const {return z;}
0100 double GetDR() const {return dr;}
0101 double GetJT() const {return jt;}
0102 double GetEne() const {return ene;}
0103 double GetPX() const {return px;}
0104 double GetPY() const {return py;}
0105 double GetPZ() const {return pz;}
0106 double GetPT() const {return pt;}
0107 double GetEta() const {return eta;}
0108 double GetPhi() const {return phi;}
0109
0110
0111 void SetType(const int arg_type) {type = arg_type;}
0112 void SetCstID(const int arg_cstID) {cstID = arg_cstID;}
0113 void SetJetID(const int arg_jetID) {jetID = arg_jetID;}
0114 void SetEmbedID(const int arg_embedID) {embedID = arg_embedID;}
0115 void SetPID(const int arg_pid) {pid = arg_pid;}
0116 void SetZ(const double arg_z) {z = arg_z;}
0117 void SetDR(const double arg_dr) {dr = arg_dr;}
0118 void SetJT(const double arg_jt) {jt = arg_jt;}
0119 void SetEne(const double arg_ene) {ene = arg_ene;}
0120 void SetPX(const double arg_px) {px = arg_px;}
0121 void SetPY(const double arg_py) {py = arg_py;}
0122 void SetPZ(const double arg_pz) {pz = arg_pz;}
0123 void SetPT(const double arg_pt) {pt = arg_pt;}
0124 void SetEta(const double arg_eta) {eta = arg_eta;}
0125 void SetPhi(const double arg_phi) {phi = arg_phi;}
0126
0127
0128 void Reset();
0129 void SetInfo(fastjet::PseudoJet& pseudojet);
0130 void SetInfo(SvtxTrack* track);
0131 void SetInfo(const ParticleFlowElement* flow);
0132 void SetInfo(const int sys, RawTower* tower, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt);
0133 void SetInfo(const int sys, const int chan, TowerInfo* info, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt);
0134 void SetInfo(const RawCluster* cluster, optional<ROOT::Math::XYZVector> vtx = nullopt);
0135 void SetInfo(PHG4Particle* particle, const int event);
0136 void SetInfo(const pair<Jet::SRC, unsigned int>& itCst, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt, optional<int> event = nullopt);
0137 void SetJetInfo(const int id, const Types::JetInfo& jet);
0138 bool IsInAcceptance(const CstInfo& minimum, const CstInfo& maximum) const;
0139 bool IsInAcceptance(const pair<CstInfo, CstInfo>& range) const;
0140
0141
0142 static vector<string> GetListOfMembers();
0143
0144
0145 friend bool operator <(const CstInfo& lhs, const CstInfo& rhs);
0146 friend bool operator >(const CstInfo& lhs, const CstInfo& rhs);
0147 friend bool operator <=(const CstInfo& lhs, const CstInfo& rhs);
0148 friend bool operator >=(const CstInfo& lhs, const CstInfo& rhs);
0149
0150
0151 CstInfo();
0152 ~CstInfo();
0153
0154
0155 CstInfo(const Const::Init init);
0156 CstInfo(fastjet::PseudoJet& pseudojet);
0157 CstInfo(SvtxTrack* track);
0158 CstInfo(const ParticleFlowElement* flow);
0159 CstInfo(const int sys, RawTower* tower, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt);
0160 CstInfo(const int sys, const int chan, TowerInfo* info, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt);
0161 CstInfo(const RawCluster* cluster, optional<ROOT::Math::XYZVector> vtx = nullopt);
0162 CstInfo(PHG4Particle* particle, const int event);
0163 CstInfo(const pair<Jet::SRC, unsigned int>& itCst, PHCompositeNode* topNode, optional<ROOT::Math::XYZVector> vtx = nullopt, optional<int> event = nullopt);
0164
0165
0166 ClassDefNV(CstInfo, 1)
0167
0168 };
0169
0170
0171
0172
0173
0174 bool operator <(const CstInfo& lhs, const CstInfo& rhs);
0175 bool operator >(const CstInfo& lhs, const CstInfo& rhs);
0176 bool operator <=(const CstInfo& lhs, const CstInfo& rhs);
0177 bool operator >=(const CstInfo& lhs, const CstInfo& rhs);
0178
0179 }
0180 }
0181
0182 #endif
0183
0184