File indexing completed on 2025-10-22 07:51:39
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/PdgParticle.hpp"
0012 #include "Acts/Definitions/Units.hpp"
0013 #include "Acts/EventData/Charge.hpp"
0014 #include "Acts/EventData/GenericParticleHypothesis.hpp"
0015
0016 namespace Acts {
0017
0018
0019
0020
0021
0022
0023
0024
0025 class SinglyChargedParticleHypothesis
0026 : public GenericParticleHypothesis<SinglyCharged> {
0027 public:
0028
0029
0030
0031 constexpr SinglyChargedParticleHypothesis(PdgParticle absPdg, float mass)
0032 : GenericParticleHypothesis(absPdg, mass, {}) {}
0033
0034
0035
0036 explicit SinglyChargedParticleHypothesis(PdgParticle absPdg)
0037 : GenericParticleHypothesis(absPdg) {}
0038
0039
0040
0041 template <typename other_charge_t>
0042 explicit constexpr SinglyChargedParticleHypothesis(
0043 const GenericParticleHypothesis<other_charge_t>& other)
0044 : GenericParticleHypothesis(other) {}
0045
0046
0047
0048 static SinglyChargedParticleHypothesis muon() {
0049 static const SinglyChargedParticleHypothesis cache(PdgParticle::eMuon);
0050 return cache;
0051 }
0052
0053
0054 static SinglyChargedParticleHypothesis pion() {
0055 static const SinglyChargedParticleHypothesis cache(PdgParticle::ePionPlus);
0056 return cache;
0057 }
0058
0059
0060 static SinglyChargedParticleHypothesis electron() {
0061 static const SinglyChargedParticleHypothesis cache(PdgParticle::eElectron);
0062 return cache;
0063 }
0064
0065
0066 static SinglyChargedParticleHypothesis kaon() {
0067 static const SinglyChargedParticleHypothesis cache(PdgParticle::eKaonPlus);
0068 return cache;
0069 }
0070
0071
0072 static SinglyChargedParticleHypothesis proton() {
0073 static const SinglyChargedParticleHypothesis cache(PdgParticle::eProton);
0074 return cache;
0075 }
0076
0077
0078
0079 static SinglyChargedParticleHypothesis chargedGeantino() {
0080 static const SinglyChargedParticleHypothesis cache(PdgParticle::eInvalid,
0081 0);
0082 return cache;
0083 }
0084 };
0085
0086
0087
0088
0089 class NeutralParticleHypothesis : public GenericParticleHypothesis<Neutral> {
0090 public:
0091
0092
0093
0094 constexpr NeutralParticleHypothesis(PdgParticle absPdg, float mass)
0095 : GenericParticleHypothesis(absPdg, mass, {}) {}
0096
0097
0098 explicit NeutralParticleHypothesis(PdgParticle absPdg)
0099 : GenericParticleHypothesis(absPdg) {}
0100
0101
0102
0103 template <typename other_charge_t>
0104 explicit constexpr NeutralParticleHypothesis(
0105 const GenericParticleHypothesis<other_charge_t>& other)
0106 : GenericParticleHypothesis(other) {}
0107
0108
0109
0110 static NeutralParticleHypothesis photon() {
0111 static const NeutralParticleHypothesis cache(PdgParticle::eGamma);
0112 return cache;
0113 }
0114
0115
0116 static NeutralParticleHypothesis pion0() {
0117 static const NeutralParticleHypothesis cache(PdgParticle::ePionZero);
0118 return cache;
0119 }
0120
0121
0122
0123 static NeutralParticleHypothesis geantino() {
0124 static const NeutralParticleHypothesis cache(PdgParticle::eInvalid, 0);
0125 return cache;
0126 }
0127 };
0128
0129
0130
0131
0132 class NonNeutralChargedParticleHypothesis
0133 : public GenericParticleHypothesis<NonNeutralCharge> {
0134 public:
0135
0136
0137
0138
0139 constexpr NonNeutralChargedParticleHypothesis(PdgParticle absPdg, float mass,
0140 NonNeutralCharge chargeType)
0141 : GenericParticleHypothesis(absPdg, mass, chargeType) {}
0142
0143
0144 explicit NonNeutralChargedParticleHypothesis(PdgParticle absPdg)
0145 : GenericParticleHypothesis(absPdg) {}
0146
0147
0148
0149 template <typename other_charge_t>
0150 explicit constexpr NonNeutralChargedParticleHypothesis(
0151 const GenericParticleHypothesis<other_charge_t>& other)
0152 : GenericParticleHypothesis(other) {}
0153
0154
0155
0156 static NonNeutralChargedParticleHypothesis muon() {
0157 return NonNeutralChargedParticleHypothesis{
0158 SinglyChargedParticleHypothesis::muon()};
0159 }
0160
0161
0162 static NonNeutralChargedParticleHypothesis pion() {
0163 return NonNeutralChargedParticleHypothesis{
0164 SinglyChargedParticleHypothesis::pion()};
0165 }
0166
0167
0168 static NonNeutralChargedParticleHypothesis electron() {
0169 return NonNeutralChargedParticleHypothesis{
0170 SinglyChargedParticleHypothesis::electron()};
0171 }
0172
0173
0174 static NonNeutralChargedParticleHypothesis kaon() {
0175 return NonNeutralChargedParticleHypothesis{
0176 SinglyChargedParticleHypothesis::kaon()};
0177 }
0178
0179
0180 static NonNeutralChargedParticleHypothesis proton() {
0181 return NonNeutralChargedParticleHypothesis{
0182 SinglyChargedParticleHypothesis::proton()};
0183 }
0184
0185
0186
0187
0188 static NonNeutralChargedParticleHypothesis pionLike(float absQ) {
0189 return NonNeutralChargedParticleHypothesis(
0190 pion().absolutePdg(), pion().mass(), NonNeutralCharge{absQ});
0191 }
0192
0193
0194
0195 static NonNeutralChargedParticleHypothesis chargedGeantino() {
0196 static const auto cache = chargedGeantino(Acts::UnitConstants::e);
0197 return cache;
0198 }
0199
0200
0201
0202 static NonNeutralChargedParticleHypothesis chargedGeantino(float absQ) {
0203 return NonNeutralChargedParticleHypothesis(PdgParticle::eInvalid, 0,
0204 NonNeutralCharge{absQ});
0205 }
0206 };
0207
0208
0209
0210
0211 class ParticleHypothesis : public GenericParticleHypothesis<AnyCharge> {
0212 public:
0213
0214
0215
0216
0217 constexpr ParticleHypothesis(PdgParticle absPdg, float mass,
0218 AnyCharge chargeType)
0219 : GenericParticleHypothesis(absPdg, mass, chargeType) {}
0220
0221
0222 explicit ParticleHypothesis(PdgParticle absPdg)
0223 : GenericParticleHypothesis(absPdg) {}
0224
0225
0226
0227 template <typename other_charge_t>
0228 explicit constexpr ParticleHypothesis(
0229 const GenericParticleHypothesis<other_charge_t>& other)
0230 : GenericParticleHypothesis(other) {}
0231
0232
0233
0234 static ParticleHypothesis muon() {
0235 return ParticleHypothesis{SinglyChargedParticleHypothesis::muon()};
0236 }
0237
0238
0239 static ParticleHypothesis pion() {
0240 return ParticleHypothesis{SinglyChargedParticleHypothesis::pion()};
0241 }
0242
0243
0244 static ParticleHypothesis electron() {
0245 return ParticleHypothesis{SinglyChargedParticleHypothesis::electron()};
0246 }
0247
0248
0249 static ParticleHypothesis kaon() {
0250 return ParticleHypothesis{SinglyChargedParticleHypothesis::kaon()};
0251 }
0252
0253
0254 static ParticleHypothesis proton() {
0255 return ParticleHypothesis{SinglyChargedParticleHypothesis::proton()};
0256 }
0257
0258
0259
0260 static ParticleHypothesis photon() {
0261 return ParticleHypothesis{NeutralParticleHypothesis::photon()};
0262 }
0263
0264
0265 static ParticleHypothesis pion0() {
0266 return ParticleHypothesis{NeutralParticleHypothesis::pion0()};
0267 }
0268
0269
0270
0271
0272 static ParticleHypothesis pionLike(float absQ) {
0273 return ParticleHypothesis(pion().absolutePdg(), pion().mass(),
0274 AnyCharge{absQ});
0275 }
0276
0277
0278
0279 static ParticleHypothesis geantino() {
0280 return ParticleHypothesis{NeutralParticleHypothesis::geantino()};
0281 }
0282
0283
0284 static ParticleHypothesis chargedGeantino() {
0285 static const auto cache = chargedGeantino(Acts::UnitConstants::e);
0286 return cache;
0287 }
0288
0289
0290
0291 static ParticleHypothesis chargedGeantino(float absQ) {
0292 return ParticleHypothesis(PdgParticle::eInvalid, 0, AnyCharge{absQ});
0293 }
0294 };
0295
0296 }