Skip to content

Commit af83811

Browse files
amorschsawenzel
authored andcommitted
Fix of test for trackable primaries
1 parent 20adf7c commit af83811

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Generators/src/GeneratorFromFile.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,16 @@ Bool_t GeneratorFromFile::ReadEvent(FairPrimaryGenerator* primGen)
107107
// filter the particles from Kinematics.root originally put by a generator
108108
// and which are trackable
109109
auto isFirstTrackableDescendant = [](TParticle const& p) {
110-
const int kDoneBit = 4;
110+
const int kTransportBit = BIT(14);
111111
// The particle should have not set kDone bit and its status should not exceed 1
112-
if (p.GetStatusCode() > 1 || p.TestBit(kDoneBit)) {
112+
if (p.GetUniqueID() > 0 || !p.TestBit(kTransportBit)) {
113113
return false;
114114
}
115115
return true;
116116
};
117117

118118
for (int i = 0; i < branch->GetEntries(); ++i) {
119119
auto& p = particles[i];
120-
121120
if (!isFirstTrackableDescendant(p)) {
122121
continue;
123122
}

0 commit comments

Comments
 (0)