Skip to content

Commit e8e52e6

Browse files
authored
Set default values for candidate structures
Initialized member variables in KaonCand, ProxyCand, and ProtonCand structures to default values.
1 parent 13a9d18 commit e8e52e6

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

‎PWGLF/Tasks/Resonances/lambdastarproxy.cxx‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,26 +207,26 @@ struct Lambdastarproxy {
207207
};
208208

209209
struct KaonCand {
210-
float px, py, pz;
211-
int charge;
212-
int tid;
210+
float px = 0.f, py = 0.f, pz = 0.f;
211+
int charge = 0;
212+
int tid = -1;
213213
TruthInfo truth;
214214
};
215215
// PID flags describe detector compatibility, not truth-level purity.
216216
struct ProxyCand {
217-
float px, py, pz;
218-
float pxFull, pyFull, pzFull;
219-
bool protonLike;
220-
bool hasTOF;
221-
bool protonTPCCompatible;
222-
int charge;
223-
int tid;
217+
float px = 0.f, py = 0.f, pz = 0.f;
218+
float pxFull = 0.f, pyFull = 0.f, pzFull = 0.f;
219+
bool protonLike = false;
220+
bool hasTOF = false;
221+
bool protonTPCCompatible = false;
222+
int charge = 0;
223+
int tid = -1;
224224
TruthInfo truth;
225225
};
226226
struct ProtonCand {
227-
float px, py, pz;
228-
int charge;
229-
int tid;
227+
float px = 0.f, py = 0.f, pz = 0.f;
228+
int charge = 0;
229+
int tid = -1;
230230
TruthInfo truth;
231231
};
232232

0 commit comments

Comments
 (0)