Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SimG4CMS/Calo/src/CaloSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ G4bool CaloSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
if (getFromLibrary(aStep)) {
// for parameterized showers the primary track should be killed
// secondary tracks should be killed if they are in the same volume
const_cast<G4Track*>(aStep->GetTrack())->SetTrackStatus(fStopAndKill);
(aStep->GetTrack())->SetTrackStatus(fStopAndKill);
if (0 < aStep->GetNumberOfSecondariesInCurrentStep()) {
auto tv = aStep->GetSecondaryInCurrentStep();
auto vol = aStep->GetPreStepPoint()->GetPhysicalVolume();
Expand Down Expand Up @@ -234,7 +234,7 @@ G4bool CaloSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
edepositHAD = energy;
}
#ifdef EDM_ML_DEBUG
G4TouchableHistory* touch = (G4TouchableHistory*)(theTrack->GetTouchable());
const G4TouchableHistory* touch = static_cast<const G4TouchableHistory*>(theTrack->GetTouchable());
edm::LogVerbatim("CaloSim") << "CaloSD::" << GetName() << " PV:" << touch->GetVolume(0)->GetName()
<< " PVid=" << touch->GetReplicaNumber(0) << " MVid=" << touch->GetReplicaNumber(1)
<< " Unit:" << std::hex << unitID << std::dec << " Edep=" << edepositEM << " "
Expand Down
2 changes: 1 addition & 1 deletion SimG4CMS/Calo/src/HFCherenkov.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ int HFCherenkov::computeNPE(const G4Step* aStep,
#endif
if (rand < prob_HF) { // survived in HF
wlatten.push_back(lambda);
rand = G4UniformRand();
double effHEM = computeHEMEff(lambda);
// compute number of bounces in air guide
rand = G4UniformRand();
Expand All @@ -166,6 +165,7 @@ int HFCherenkov::computeNPE(const G4Step* aStep,
double tang = sin_air / std::sqrt(1. - sin_air * sin_air);
int nbounce = length_lg / tlength * tang + 0.5;
double eff = pow(effHEM, nbounce);
rand = G4UniformRand();
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HFShower") << "HFCherenkov::computeNPE: w_ph " << w_ph << " effHEM " << effHEM << " eff "
<< eff << " Random " << rand << " Survive? " << (rand < eff);
Expand Down