26 friend std::ostream& operator<<(std::ostream& o,
const PFCandidate& d);
29 return this->getEnergy() < rhs.getEnergy();
36 void setPID(
int x_) { pid_ = x_; }
39 void setPdgId(
int x_) { pdg_id_ = x_; }
40 void setCharge(
int x_) { charge_ = x_; }
42 void setDeDxMassSquared(
float x_) { dedx_mass2_ = x_; }
43 void setDeDxIh(
float x_) { dedx_ih_ = x_; }
44 void setDeDxNhits(
int x_) { dedx_nhits_ = x_; }
46 void setMass(
float x_) { mass_ = x_; }
47 void setEnergy(
float x_) { energy_ = x_; }
49 void setTargetPositionXYZ(
float x_,
float y_,
float z_) {
54 void setEcalPositionXYZ(
float x_,
float y_,
float z_) {
59 void setHcalPositionXYZ(
float x_,
float y_,
float z_) {
64 void setTrackPxPyPz(
float x_,
float y_,
float z_) {
70 void setTrackIndex(
int x) { track_idx_ = x; }
71 void setEcalIndex(
int x) { ecal_idx_ = x; }
72 void setHcalIndex(
int x) { hcal_idx_ = x; }
74 void setEcalEnergy(
float x_) { ecal_energy_ = x_; }
77 void clearEcalHits() {
78 ecal_hit_ids_.clear();
79 ecal_hit_energies_.clear();
81 void clearHcalHits() {
82 hcal_hit_ids_.clear();
83 hcal_hit_energies_.clear();
85 void addEcalHits(
const std::vector<unsigned int>& ids,
86 const std::vector<float>& energies) {
87 addHits(ecal_hit_ids_, ecal_hit_energies_, ids, energies);
89 void addHcalHits(
const std::vector<unsigned int>& ids,
90 const std::vector<float>& energies) {
91 addHits(hcal_hit_ids_, hcal_hit_energies_, ids, energies);
94 void setEcalDepth(
float x_) { ecal_depth_ = x_; }
96 void setEcalWidth(
float x_) { ecal_width_ = x_; }
97 void setEcalRawEnergy(
float x_) { ecal_raw_energy_ = x_; }
98 void setEcalClusterXYZ(
float x_,
float y_,
float z_) {
100 ecal_cluster_y_ = y_;
101 ecal_cluster_z_ = z_;
103 void setEcalClusterEXYZ(
float x_,
float y_,
float z_) {
104 ecal_cluster_ex_ = x_;
105 ecal_cluster_ey_ = y_;
106 ecal_cluster_ez_ = z_;
108 void setEcalClusterDXDZ(
float x_) { ecal_cluster_dxdz_ = x_; }
109 void setEcalClusterDYDZ(
float x_) { ecal_cluster_dydz_ = x_; }
110 void setEcalClusterEDXDZ(
float x_) { ecal_cluster_edxdz_ = x_; }
111 void setEcalClusterEDYDZ(
float x_) { ecal_cluster_edydz_ = x_; }
113 void setHcalEnergy(
float x_) { hcal_energy_ = x_; }
114 void setHcalRawEnergy(
float x_) { hcal_raw_energy_ = x_; }
115 void setHcalClusterXYZ(
float x_,
float y_,
float z_) {
116 hcal_cluster_x_ = x_;
117 hcal_cluster_y_ = y_;
118 hcal_cluster_z_ = z_;
120 void setHcalClusterEXYZ(
float x_,
float y_,
float z_) {
121 hcal_cluster_ex_ = x_;
122 hcal_cluster_ey_ = y_;
123 hcal_cluster_ez_ = z_;
125 void setHcalClusterDXDZ(
float x_) { hcal_cluster_dxdz_ = x_; }
126 void setHcalClusterDYDZ(
float x_) { hcal_cluster_dydz_ = x_; }
127 void setHcalClusterEDXDZ(
float x_) { hcal_cluster_edxdz_ = x_; }
128 void setHcalClusterEDYDZ(
float x_) { hcal_cluster_edydz_ = x_; }
130 void setTruthEcalXYZ(
double x_,
double y_,
double z_) {
135 void setTruthPxPyPz(
double x_,
double y_,
double z_) {
140 void setTruthMass(
double x_) { truth_mass_ = x_; }
141 void setTruthEnergy(
double x_) { truth_energy_ = x_; }
142 void setTruthPdgId(
int x_) { truth_pdg_id_ = x_; }
143 void setTruthTrackId(
int x_) { truth_track_id_ = x_; }
148 int getPID()
const {
return pid_; }
149 int getPdgId()
const {
return pdg_id_; }
150 int getCharge()
const {
return charge_; }
151 float getDeDxMassSquared()
const {
return dedx_mass2_; }
152 float getDeDxIh()
const {
return dedx_ih_; }
153 int getDeDxNhits()
const {
return dedx_nhits_; }
154 float getMass()
const {
return mass_; }
155 float getEnergy()
const {
return energy_; }
157 std::vector<float> getTargetPositionXYZ()
const {
158 return {pos_targ_x_, pos_targ_y_, pos_targ_z_};
160 std::vector<float> getEcalPositionXYZ()
const {
161 return {pos_ecal_x_, pos_ecal_y_, pos_ecal_z_};
163 std::vector<float> getHcalPositionXYZ()
const {
164 return {pos_hcal_x_, pos_hcal_y_, pos_hcal_z_};
167 int getTrackIndex()
const {
return track_idx_; }
168 int getEcalIndex()
const {
return ecal_idx_; }
169 int getHcalIndex()
const {
return hcal_idx_; }
171 std::vector<float> getTrackPxPyPz()
const {
172 return {track_px_, track_py_, track_pz_};
175 float getEcalEnergy()
const {
return ecal_energy_; }
176 const std::vector<unsigned int>& getEcalHitIds()
const {
177 return ecal_hit_ids_;
179 const std::vector<float>& getEcalHitEnergies()
const {
180 return ecal_hit_energies_;
182 const std::vector<unsigned int>& getHcalHitIds()
const {
183 return hcal_hit_ids_;
185 const std::vector<float>& getHcalHitEnergies()
const {
186 return hcal_hit_energies_;
188 float getEcalDepth()
const {
return ecal_depth_; }
189 float getEcalWidth()
const {
return ecal_width_; }
190 float getEcalRawEnergy()
const {
return ecal_raw_energy_; }
191 std::vector<float> getEcalClusterXYZ()
const {
192 return {ecal_cluster_x_, ecal_cluster_y_, ecal_cluster_z_};
194 std::vector<float> getEcalClusterEXYZ()
const {
195 return {ecal_cluster_ex_, ecal_cluster_ey_, ecal_cluster_ez_};
197 float getEcalClusterDXDZ()
const {
return ecal_cluster_dxdz_; }
198 float getEcalClusterDYDZ()
const {
return ecal_cluster_dydz_; }
199 float getEcalClusterEDXDZ()
const {
return ecal_cluster_edxdz_; }
200 float getEcalClusterEDYDZ()
const {
return ecal_cluster_edydz_; }
202 float getHcalEnergy()
const {
return hcal_energy_; }
203 float getHcalRawEnergy()
const {
return hcal_raw_energy_; }
204 std::vector<float> getHcalClusterXYZ()
const {
205 return {hcal_cluster_x_, hcal_cluster_y_, hcal_cluster_z_};
207 std::vector<float> getHcalClusterEXYZ()
const {
208 return {hcal_cluster_ex_, hcal_cluster_ey_, hcal_cluster_ez_};
210 float getHcalClusterDXDZ()
const {
return hcal_cluster_dxdz_; }
211 float getHcalClusterDYDZ()
const {
return hcal_cluster_dydz_; }
212 float getHcalClusterEDXDZ()
const {
return hcal_cluster_edxdz_; }
213 float getHcalClusterEDYDZ()
const {
return hcal_cluster_edydz_; }
215 std::vector<double>
const getTruthEcalXYZ() {
216 return {truth_ecal_x_, truth_ecal_y_, truth_ecal_z_};
218 std::vector<double>
const getTruthPxPyPz() {
219 return {truth_px_, truth_py_, truth_pz_};
221 double getTruthMass() {
return truth_mass_; }
222 double getTruthEnergy() {
return truth_energy_; }
223 int getTruthPdgId() {
return truth_pdg_id_; }
224 int getTruthTrackId()
const {
return truth_track_id_; }
233 float dedx_mass2_{0};
240 float pos_targ_x_{0};
241 float pos_targ_y_{0};
242 float pos_targ_z_{0};
244 float pos_ecal_x_{0};
245 float pos_ecal_y_{0};
246 float pos_ecal_z_{0};
248 float pos_hcal_x_{0};
249 float pos_hcal_y_{0};
250 float pos_hcal_z_{0};
258 float ecal_energy_{0};
259 float ecal_depth_{0};
261 std::vector<unsigned int> ecal_hit_ids_;
262 std::vector<float> ecal_hit_energies_;
263 std::vector<unsigned int> hcal_hit_ids_;
264 std::vector<float> hcal_hit_energies_;
267 static void addHits(std::vector<unsigned int>& ids, std::vector<float>& es,
268 const std::vector<unsigned int>& new_ids,
269 const std::vector<float>& new_es);
270 float ecal_width_{0};
271 float ecal_raw_energy_{0};
272 float ecal_cluster_x_{0};
273 float ecal_cluster_y_{0};
274 float ecal_cluster_z_{0};
275 float ecal_cluster_ex_{0};
276 float ecal_cluster_ey_{0};
277 float ecal_cluster_ez_{0};
278 float ecal_cluster_dxdz_{0};
279 float ecal_cluster_dydz_{0};
280 float ecal_cluster_edxdz_{0};
281 float ecal_cluster_edydz_{0};
284 float hcal_energy_{0};
285 float hcal_raw_energy_{0};
286 float hcal_cluster_x_{0};
287 float hcal_cluster_y_{0};
288 float hcal_cluster_z_{0};
289 float hcal_cluster_ex_{0};
290 float hcal_cluster_ey_{0};
291 float hcal_cluster_ez_{0};
292 float hcal_cluster_dxdz_{0};
293 float hcal_cluster_dydz_{0};
294 float hcal_cluster_edxdz_{0};
295 float hcal_cluster_edydz_{0};
298 double truth_ecal_x_{0};
299 double truth_ecal_y_{0};
300 double truth_ecal_z_{0};
304 double truth_mass_{0};
305 double truth_energy_{0};
306 int truth_pdg_id_{0};
307 int truth_track_id_{-1};