File indexing completed on 2024-09-28 07:02:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef INCLUDE_EICSMEAR_HADRONIC_PARTICLEMC_H_
0011 #define INCLUDE_EICSMEAR_HADRONIC_PARTICLEMC_H_
0012
0013 #include <iostream>
0014
0015 #include <TLorentzVector.h>
0016 #include <TVector3.h>
0017
0018 #include "eicsmear/erhic/Pid.h"
0019 #include "eicsmear/erhic/VirtualParticle.h"
0020
0021 class TMCParticle;
0022
0023 namespace erhic {
0024 namespace hadronic {
0025
0026
0027
0028
0029
0030 class ParticleMC : public erhic::VirtualParticle {
0031 public:
0032
0033
0034
0035 virtual ~ParticleMC() { }
0036
0037
0038
0039
0040 ParticleMC();
0041
0042
0043
0044
0045 explicit ParticleMC(const TMCParticle&);
0046
0047
0048
0049
0050
0051 ParticleMC(const TLorentzVector&, const TVector3&, int, int, int);
0052
0053
0054
0055
0056 virtual erhic::Pid Id() const;
0057
0058
0059
0060
0061 virtual TLorentzVector Get4Vector() const;
0062
0063
0064
0065
0066 virtual Double_t GetPx() const;
0067
0068
0069
0070
0071 virtual Double_t GetPy() const;
0072
0073
0074
0075
0076 virtual Double_t GetPz() const;
0077
0078
0079
0080
0081 virtual Double_t GetE() const;
0082
0083
0084
0085
0086 virtual Double_t GetP() const;
0087
0088
0089
0090
0091 virtual Double_t GetM() const;
0092
0093
0094
0095
0096 virtual Double_t GetPt() const;
0097
0098
0099
0100
0101 virtual Double_t GetTheta() const;
0102
0103
0104
0105
0106 virtual Double_t GetPhi() const;
0107
0108
0109
0110
0111 virtual Double_t GetRapidity() const;
0112
0113
0114
0115
0116 virtual Double_t GetEta() const;
0117
0118
0119
0120
0121
0122 virtual TVector3 GetVertex() const;
0123
0124
0125
0126
0127
0128 virtual UShort_t GetStatus() const;
0129
0130
0131
0132
0133
0134 virtual UShort_t GetParentIndex() const;
0135
0136
0137
0138
0139
0140 virtual Double_t GetXFeynman() const;
0141
0142
0143
0144
0145 virtual void SetStatus(UShort_t);
0146
0147
0148
0149
0150
0151 virtual void SetParentIndex(UShort_t);
0152
0153
0154
0155
0156 virtual void SetXFeynman(double xf);
0157
0158
0159
0160
0161
0162 virtual void Set4Vector(const TLorentzVector&);
0163
0164
0165
0166
0167 virtual void SetVertex(const TVector3&);
0168
0169 protected:
0170 UShort_t KS;
0171 UShort_t orig;
0172 Int_t id;
0173 Double32_t px;
0174 Double32_t py;
0175 Double32_t pz;
0176 Double32_t E;
0177 Double32_t p;
0178 Double32_t m;
0179 Double32_t pt;
0180 Double32_t theta;
0181 Double32_t phi;
0182 Double32_t rapidity;
0183 Double32_t eta;
0184 Double32_t xFeynman;
0185 Double32_t xv;
0186 Double32_t yv;
0187 Double32_t zv;
0188
0189 ClassDef(erhic::hadronic::ParticleMC, 1)
0190 };
0191
0192 inline Pid ParticleMC::Id() const {
0193 return Pid(id);
0194 }
0195
0196 inline TLorentzVector ParticleMC::Get4Vector() const {
0197 return TLorentzVector(GetPx(), GetPy(), GetPz(), GetE());
0198 }
0199
0200 inline Double_t ParticleMC::GetPx() const {
0201 return px;
0202 }
0203
0204 inline Double_t ParticleMC::GetPy() const {
0205 return py;
0206 }
0207
0208 inline Double_t ParticleMC::GetPz() const {
0209 return pz;
0210 }
0211
0212 inline Double_t ParticleMC::GetE() const {
0213 return E;
0214 }
0215
0216 inline Double_t ParticleMC::GetP() const {
0217 return p;
0218 }
0219
0220 inline Double_t ParticleMC::GetM() const {
0221 return m;
0222 }
0223
0224 inline Double_t ParticleMC::GetPt() const {
0225 return pt;
0226 }
0227
0228 inline Double_t ParticleMC::GetTheta() const {
0229 return theta;
0230 }
0231
0232 inline Double_t ParticleMC::GetPhi() const {
0233 return phi;
0234 }
0235
0236 inline Double_t ParticleMC::GetRapidity() const {
0237 return rapidity;
0238 }
0239
0240 inline Double_t ParticleMC::GetEta() const {
0241 return eta;
0242 }
0243
0244 inline TVector3 ParticleMC::GetVertex() const {
0245 return TVector3(xv, yv, zv);
0246 }
0247
0248 inline UShort_t ParticleMC::GetStatus() const {
0249 return KS;
0250 }
0251
0252 inline UShort_t ParticleMC::GetParentIndex() const {
0253 return orig;
0254 }
0255
0256 inline Double_t ParticleMC::GetXFeynman() const {
0257 return xFeynman;
0258 }
0259
0260 inline void ParticleMC::SetStatus(UShort_t i) {
0261 KS = i;
0262 }
0263
0264 inline void ParticleMC::SetXFeynman(double xf) {
0265 xFeynman = xf;
0266 }
0267
0268 inline void ParticleMC::SetVertex(const TVector3& v) {
0269 xv = v.x();
0270 yv = v.y();
0271 zv = v.z();
0272 }
0273
0274 }
0275 }
0276
0277 #endif