Skip to content

Commit 6703635

Browse files
committed
fix read rules
1 parent eb45085 commit 6703635

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

SimDataFormats/Track/src/classes_def.xml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@
99
<version ClassVersion="12" checksum="3470347245"/>
1010
<version ClassVersion="11" checksum="1785575744"/>
1111
<version ClassVersion="10" checksum="1430205451"/>
12-
<ioread sourceClass = "SimTrack" version="[-12]" targetClass="SimTrack" source="" target="">
12+
<ioread sourceClass = "SimTrack" version="[-12]" targetClass="SimTrack" source="bool crossedBoundary_; int idAtBoundary_; math::XYZTLorentzVectorF positionAtBoundary_; math::XYZTLorentzVectorF momentumAtBoundary_; int igenpart" target="trackInfo_, idAtBoundary_, positionAtBoundary_, momentumAtBoundary_">
1313
<![CDATA[
14-
SimTrack tmp(newObj->type(), newObj->momentum(), newObj->vertIndex(), newObj->genpartIndex(), newObj->trackerSurfacePosition(), newObj->trackerSurfaceMomentum());
15-
tmp.setTrackId(newObj->trackId());
16-
tmp.setEventId(newObj->eventId());
17-
tmp.setCrossedBoundaryVars(
18-
newObj->crossedBoundary(), newObj->getIDAtBoundary(), newObj->getPositionAtBoundary(), newObj->getMomentumAtBoundary());
19-
if (newObj->isFromBackScattering()) {
20-
tmp.setFromBackScattering();
21-
}
22-
if (newObj->genpartIndex() != -1) {
23-
tmp.setIsPrimary();
24-
}
25-
*newObj=tmp;
14+
// set crossedBoundary infos
15+
newObj->setCrossedBoundaryVars(onfile.crossedBoundary_, onfile.idAtBoundary_, onfile.positionAtBoundary_, onfile.momentumAtBoundary_);
16+
// set isPrimary info of trackInfo_
17+
if (onfile.igenpart != -1)
18+
newObj->setIsPrimary();
19+
// it's not possible to set the isFromBackScattering info for old simTracks
2620
]]>
2721
</ioread>
2822
</class>

0 commit comments

Comments
 (0)