Commit in projects/slic/branches/v04-00-00-pre/src on MAIN | |||
TrackSummary.cc | +9 | -17 | 3128 -> 3129 |
Fix for SLIC-231. The code copied from Mokka was not checking for the correct status indicating the world boundary had been reached.
--- projects/slic/branches/v04-00-00-pre/src/TrackSummary.cc 2014-05-19 22:29:09 UTC (rev 3128) +++ projects/slic/branches/v04-00-00-pre/src/TrackSummary.cc 2014-05-19 23:17:26 UTC (rev 3129) @@ -40,6 +40,8 @@
void TrackSummary::update(const G4Track* track) {
+ //G4cout << "updating track " << this->_trackID << " from track " << track->GetTrackID() << G4endl; +
/* Set the vertex position. */ _vertex = track->GetVertexPosition();
@@ -62,17 +64,8 @@
/* Initialize sim status. */ _simstatus = 0;
- /* - * TODO: All settings after here in this function should be checked for correctness. - */ -
// Setting the simulator status as for LCIO, by the moment by hand // just adapting the beta LCIO code.
- // Remarks: - // - with Mokka BITVertexIsNotEndpointOfParent is always false - // because the endpoint is set always explicitly. - // endpoint always set explicitly by Mokka. - // What should this be set to???????? --JM
_simstatus[MCParticle::BITEndpoint] = 1; /*
@@ -91,13 +84,12 @@
/* Check if left detector. */ G4bool leftDetector = false;
- if (lastPostStepPoint) - /* - * A Track's last step point will not be in a geometric boundary - * unless it has left the world volume. - */ - if ((leftDetector = (lastPostStepPoint->GetStepStatus() == fGeomBoundary)))
+ if (lastPostStepPoint) { + /* Tracks with the last step on the world boundary are flagged as LeftDetector. */ + if ((leftDetector = (lastPostStepPoint->GetStepStatus() == fWorldBoundary))) {
_simstatus[MCParticle::BITLeftDetector] = 1;
+ } + }
// BITStopped if (track->GetKineticEnergy() <= 0.)
@@ -109,11 +101,11 @@
_simstatus[MCParticle::BITDecayedInTracker] = 1; // BITDecayedInCalorimeter
+ // FIXME: This should not be the default.
if (!insideTrackerRegion && !leftDetector) _simstatus[MCParticle::BITDecayedInCalorimeter] = 1; // BITVertexIsNotEndpointOfParent
- //
TrackSummary* myParent = findParent(); if (myParent) if (myParent->getEndPoint().isNear(getVertex()))
@@ -146,7 +138,7 @@
// I think this check for existing parent can probably be removed. --JM if (std::find(parents.begin(), parents.end(), theParentMCParticle) == parents.end()) {
- // fix B.Vormwald: only add parent if particlke created in simulation
+ // fix B.Vormwald: only add parent if particle created in simulation
if (_mcparticle->getGeneratorStatus() == 0) { _mcparticle->addParent(theParentMCParticle); }
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1