Skip to content

Commit

Permalink
Merge pull request #36122 from sbein/from-CMSSW_12_2_X_2021-11-14-0000
Browse files Browse the repository at this point in the history
Fix for FastSim decays of exotic-descendent SM particles decaying outside pipe
  • Loading branch information
cmsbuild authored Dec 1, 2021
2 parents 535625c + 2fe14d6 commit f0fde9d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ inline bool isExotic(int pdgid_) {
return ((pdgid >= 1000000 && pdgid < 4000000 && pdgid != 3000022) || // SUSY, R-hadron, and technicolor particles
pdgid == 17 || // 4th generation lepton
pdgid == 34 || // W-prime
pdgid == 37); // charged Higgs
pdgid == 37 || // charged Higgs
pdgid == 39); // bulk graviton
}

#endif
16 changes: 12 additions & 4 deletions FastSimulation/SimplifiedGeometryPropagator/src/ParticleManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,27 @@ std::unique_ptr<fastsim::Particle> fastsim::ParticleManager::nextGenParticle() {
}
// particles which do not descend from exotics must be produced within the beampipe
int exoticRelativeId = 0;
if (productionVertex->position().perp2() * lengthUnitConversionFactor2_ > beamPipeRadius2_) //
{
const bool producedWithinBeamPipe =
productionVertex->position().perp2() * lengthUnitConversionFactor2_ < beamPipeRadius2_;
if (producedWithinBeamPipe) {
exoticRelativesChecker(productionVertex, exoticRelativeId, 0);
if (!isExotic(exoticRelativeId)) {
continue;
}
}

// particle must not decay before it reaches the beam pipe
if (endVertex && endVertex->position().perp2() * lengthUnitConversionFactor2_ < beamPipeRadius2_) {
// FastSim will not make hits out of particles that decay before reaching the beam pipe
const bool decayedWithinBeamPipe =
endVertex && endVertex->position().perp2() * lengthUnitConversionFactor2_ < beamPipeRadius2_;
if (decayedWithinBeamPipe) {
continue;
}

// SM particles that descend from exotics and cross the beam pipe radius should make hits but not be decayed
if (producedWithinBeamPipe && !decayedWithinBeamPipe) {
exoticRelativesChecker(productionVertex, exoticRelativeId, 0);
}

// make the particle
std::unique_ptr<Particle> newParticle(
new Particle(particle.pdg_id(),
Expand Down

0 comments on commit f0fde9d

Please sign in to comment.