Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 19, 2025
1 parent 82b317e commit 5f9c526
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions DRsim/DRsimG4Full/src/lib/SimG4DRcaloSteppingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,11 @@ void SimG4DRcaloSteppingAction::accumulate(unsigned int &prev, dd4hep::DDSegment
static_cast<float>(pos.z()*CLHEP::millimeter/dd4hep::millimeter) } );
prev = m_Edeps->size();
thePtr = &simEdep;

auto edepPrev = thePtr->getEnergy();
thePtr->setEnergy( edepPrev + edep );
}

auto edepPrev = thePtr->getEnergy();
thePtr->setEnergy( edepPrev + edep );
}

bool SimG4DRcaloSteppingAction::checkId(edm4hep::SimCalorimeterHit edep, dd4hep::DDSegmentation::CellID& id64) {
Expand Down
2 changes: 1 addition & 1 deletion analysis/analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) {
float leakage = 0.;

for (unsigned int iLeak = 0; iLeak < leakages->size(); iLeak++) {
auto& momentum = (*leakages)[iLeak].getMomentum();
auto momentum = (*leakages)[iLeak].getMomentum();
ROOT::Math::XYZVectorF vec(momentum.x, momentum.y, momentum.z);
leakage += std::sqrt(vec.Mag2());
}
Expand Down

0 comments on commit 5f9c526

Please sign in to comment.