LDMX Software
CascadeStep.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_EVENT_CASCADESTEP_H
8#define SIMCORE_EVENT_CASCADESTEP_H
9
10#include <vector>
11
12#include "TObject.h"
13
14namespace ldmx {
15
20enum class CascadeStage : int {
21 UNKNOWN = 0,
22 INCIDENT = 1,
23 PRIMARY = 2,
24 CASCADE = 3,
25 PREEQUILIBRIUM = 4,
26 ABSORBED = 5,
27 SPECTATOR = 6,
29 7
30};
31
40 public:
41 CascadeStep() = default;
42 virtual ~CascadeStep() = default;
43
44 void clear();
45
46 void setHistoryId(int id) { history_id_ = id; }
47 void setParentId(int id) { parent_id_ = id; }
48 void setPdgId(int id) { pdg_id_ = id; }
49 void setMomentum(double px, double py, double pz, double e) {
50 px_ = px;
51 py_ = py;
52 pz_ = pz;
53 energy_ = e;
54 }
55 void setPosition(double x, double y, double z) {
56 x_ = x;
57 y_ = y;
58 z_ = z;
59 }
60 void setGeneration(int gen) { generation_ = gen; }
61 void setZone(int zone) { zone_ = zone; }
62 void setDaughterIds(const std::vector<int>& ids) { daughter_ids_ = ids; }
63 void addDaughterId(int id) { daughter_ids_.push_back(id); }
64 void setTargetPdgId(int id) { target_pdg_id_ = id; }
65 void setInteracted(bool interacted) { interacted_ = interacted; }
66 void setEscaped(bool escaped) { escaped_ = escaped; }
67 void setStage(CascadeStage stage) { stage_ = stage; }
68 void setStage(int stage) { stage_ = static_cast<CascadeStage>(stage); }
69
70 int getHistoryId() const { return history_id_; }
71 int getParentId() const { return parent_id_; }
72 int getPdgId() const { return pdg_id_; }
73 double getPx() const { return px_; }
74 double getPy() const { return py_; }
75 double getPz() const { return pz_; }
76 double getEnergy() const { return energy_; }
77 double getX() const { return x_; }
78 double getY() const { return y_; }
79 double getZ() const { return z_; }
80 int getGeneration() const { return generation_; }
81 int getZone() const { return zone_; }
82 const std::vector<int>& getDaughterIds() const { return daughter_ids_; }
83 int getNumDaughters() const { return static_cast<int>(daughter_ids_.size()); }
84 int getTargetPdgId() const { return target_pdg_id_; }
85 bool didInteract() const { return interacted_; }
86 bool didEscape() const { return escaped_; }
87 CascadeStage getStage() const { return stage_; }
88 int getStageInt() const { return static_cast<int>(stage_); }
89
90 double getKineticEnergy() const;
91 double getMass() const;
92
93 private:
94 int history_id_{-1};
95 int parent_id_{-1};
96 int pdg_id_{0};
97
98 double px_{0};
99 double py_{0};
100 double pz_{0};
101 double energy_{0};
102
103 double x_{0};
104 double y_{0};
105 double z_{0};
106
107 int generation_{0};
108 int zone_{0};
109
110 std::vector<int> daughter_ids_;
111 int target_pdg_id_{0};
112
113 bool interacted_{false};
114 bool escaped_{false};
115
116 CascadeStage stage_{CascadeStage::UNKNOWN};
117
118 ClassDef(CascadeStep, 1);
119};
120
121} // namespace ldmx
122
123#endif // SIMCORE_EVENT_CASCADESTEP_H
CascadeStage
Classification of cascade particle stages.
Definition CascadeStep.h:20
@ PREEQUILIBRIUM
Fast particles escaping before equilibration.
@ PRIMARY
Direct products of initial photon-nucleon interaction.
@ UNKNOWN
Unclassified.
@ DEEXCITATION
Products from nuclear de-excitation (evaporation, gamma)
@ INCIDENT
The incident particle (generation 0)
@ SPECTATOR
Knocked-out nucleons from quasi-deuteron breakup.
@ CASCADE
Products of subsequent intranuclear scattering.
@ ABSORBED
Particles absorbed by the nucleus.
Single particle state in the Bertini intranuclear cascade.
Definition CascadeStep.h:39