Skip to content

Commit

Permalink
Merge pull request #41 from kjvbrt/warnings
Browse files Browse the repository at this point in the history
Resolving few warnings
  • Loading branch information
kjvbrt authored Aug 17, 2023
2 parents e6b2f0f + 1113ccc commit c635177
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion SimG4Common/src/EventInformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@ void EventInformation::addParticle(const G4Track* aSecondary) {
});
edmParticle.setTime(aSecondary->GetGlobalTime() * sim::g42edm::length);

size_t motherID = aSecondary->GetParentID();
auto g4StartPos = aSecondary->GetVertexPosition();
edmParticle.setVertex({
g4StartPos.x() * sim::g42edm::length,
g4StartPos.y() * sim::g42edm::length,
g4StartPos.z() * sim::g42edm::length,
});

// todo: no time at endpoint
// parents relations
// daughter relations

// size_t motherID = aSecondary->GetParentID();
}

} //namespace sim
2 changes: 1 addition & 1 deletion SimG4Fast/src/components/SimG4FastSimCalorimeterRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ StatusCode SimG4FastSimCalorimeterRegion::create() {
G4LogicalVolume* world =
(*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume();
for (const auto& calorimeterName : m_volumeNames) {
for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
if (world->GetDaughter(iter_region)->GetName().find(calorimeterName) != std::string::npos) {
/// all G4Region objects are deleted by the G4RegionStore
m_g4regions.emplace_back(
Expand Down
2 changes: 1 addition & 1 deletion SimG4Fast/src/components/SimG4FastSimTrackerRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ StatusCode SimG4FastSimTrackerRegion::create() {
G4LogicalVolume* world =
(*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume();
for (const auto& trackerName : m_volumeNames) {
for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
if (world->GetDaughter(iter_region)->GetName().find(trackerName) != std::string::npos) {
/// all G4Region objects are deleted by the G4RegionStore
m_g4regions.emplace_back(
Expand Down
2 changes: 1 addition & 1 deletion SimG4Fast/src/components/SimG4GflashHomoCalo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ std::unique_ptr<GVFlashShowerParameterisation> SimG4GflashHomoCalo::parametrisat
// m_parametrisation = std::unique_ptr<GFlashSamplingShowerParameterisation>(new GFlashSamplingShowerParameterisation(
// nist->FindOrBuildMaterial("G4_lAr"), nist->FindOrBuildMaterial("G4_Pb"), 6, 2));

return std::move(parametrisation);
return parametrisation;
}
2 changes: 1 addition & 1 deletion SimG4Fast/src/components/SimG4GflashSamplingCalo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ std::unique_ptr<GVFlashShowerParameterisation> SimG4GflashSamplingCalo::parametr
std::unique_ptr<GFlashSamplingShowerParameterisation>(new GFlashSamplingShowerParameterisation(
nist->FindOrBuildMaterial(m_materialActive.value()), nist->FindOrBuildMaterial(m_materialPassive.value()),
m_thicknessActive.value(), m_thicknessPassive.value()));
return std::move(parametrisation);
return parametrisation;
}
2 changes: 1 addition & 1 deletion SimG4Full/src/components/SimG4FullSimDCHRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ StatusCode SimG4FullSimDCHRegion::create() {
G4LogicalVolume* world =
(*G4TransportationManager::GetTransportationManager()->GetWorldsIterator())->GetLogicalVolume();
for (const auto& trackerName : m_volumeNames) {
for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
if (world->GetDaughter(iter_region)->GetName().find(trackerName) != std::string::npos) {

/// all G4Region objects are deleted by the G4RegionStore
Expand Down
2 changes: 1 addition & 1 deletion SimG4Full/src/components/SimG4UserLimitRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ StatusCode SimG4UserLimitRegion::create() {
// (b) if individiual volumenames are specified, try to find them and set limits for them.
} else {
for (const auto& volumeName : m_volumeNames) {
for (int iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
for (size_t iter_region = 0; iter_region < world->GetNoDaughters(); ++iter_region) {
if (world->GetDaughter(iter_region)->GetName().find(volumeName) != std::string::npos) {
/// all G4Region objects are deleted by the G4RegionStore
m_g4regions.emplace_back(
Expand Down

0 comments on commit c635177

Please sign in to comment.