Skip to content

Commit

Permalink
Merge pull request #99 from JeffersonLab/fix_lightguide_pulse_timing_rtj
Browse files Browse the repository at this point in the history
* last small tweak to fcal shower response to match yields in hdgeant…
  • Loading branch information
T-Britton authored Mar 22, 2019
2 parents 5d1846d + 0a837e4 commit 02f6a22
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/GlueXSensitiveDetectorFCAL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ G4bool GlueXSensitiveDetectorFCAL::ProcessHits(G4Step* step,
// Apply effective response corrections, depending on particle type
int pmass = track->GetDynamicParticle()->GetMass();
if (pmass < 1 * MeV) { // must be one of e+,e-,gamma
dEcorr *= 0.977;
dEcorr *= 0.976;
}
else {
double gamma = Ein / pmass; // nothing massless here
Expand Down Expand Up @@ -263,11 +263,10 @@ G4bool GlueXSensitiveDetectorFCAL::ProcessHits(G4Step* step,
}
}
if (merge_hit) {
// Use the time from the earlier hit but add the energy deposition
hiter->t_lightguide_ns =
(hiter->t_lightguide_ns * hiter->dE_lightguide_GeV +
t/ns * dEsum/GeV) / (hiter->dE_lightguide_GeV + dEsum/GeV);
hiter->dE_lightguide_GeV += dEsum/GeV;
if (hiter->t_lightguide_ns*ns > t || hiter->t_lightguide_ns == 0) {
hiter->t_lightguide_ns = t/ns;
}
}
else if ((int)block->hits.size() < MAX_HITS) {
// create new hit
Expand Down

0 comments on commit 02f6a22

Please sign in to comment.