Skip to content

Commit

Permalink
cleanup some compile warnings and fix failing Hcal and Run_SimCore_ba…
Browse files Browse the repository at this point in the history
…sic tests
  • Loading branch information
wesketchum committed Oct 22, 2024
1 parent cbc689a commit d5757c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SimCore/include/SimCore/Event/HepMC3GenEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ldmx {

class HepMC3GenEvent : public HepMC3::GenEventData {
public:
// HepMC3GenEvent() : HepMC3::GenEventData() {}
// ~HepMC3GenEvent() {}
// HepMC3GenEvent(const HepMC3::GenEvent& event) : HepMC3::GenEvent(event) {}

void Clear();
Expand Down
2 changes: 2 additions & 0 deletions SimCore/include/SimCore/Reweight/GenieReweightProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class GenieReweightProducer : public framework::Producer {
return genie::rew::EGSyst::kINukeTwkDial_FrPiProd_N;
case ldmx::EventWeights::VariationType ::kGENIE_HadrNuclTwkDial_FormZone:
return genie::rew::EGSyst::kHadrNuclTwkDial_FormZone;
default:
return genie::rew::EGSyst::kNullSystematic;
}
return genie::rew::EGSyst::kNullSystematic;
}
Expand Down
1 change: 1 addition & 0 deletions SimCore/src/SimCore/G4User/PrimaryGeneratorAction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* event) {
// Make our information container and give it to geant4
// G4Event owns the event information and will delete it
auto event_info = new UserEventInformation;
event->SetUserInformation(event_info);

PrimaryGenerator::Factory::get().apply([event](const auto& generator) {
generator->GeneratePrimaryVertex(event);
Expand Down
6 changes: 3 additions & 3 deletions SimCore/src/SimCore/Generators/GenieGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bool GenieGenerator::validateConfig() {
std::cout << "Will renormalize abundances to unity!" << std::endl;
}

for (size_t i_a; i_a < abundances_.size(); ++i_a) {
for (size_t i_a=0; i_a < abundances_.size(); ++i_a) {
abundances_[i_a] = abundances_[i_a] / abundance_sum;

if (verbosity_ > 0)
Expand All @@ -164,7 +164,7 @@ bool GenieGenerator::validateConfig() {
<< direction_[2] << ")" << std::endl;
ret = false;
}
for (size_t i_d; i_d < direction_.size(); ++i_d)
for (size_t i_d=0; i_d < direction_.size(); ++i_d)
direction_[i_d] = direction_[i_d] / std::sqrt(dir_total_sq);

xsec_by_target_.resize(targets_.size(), -999.);
Expand Down Expand Up @@ -330,7 +330,7 @@ void GenieGenerator::GeneratePrimaryVertex(G4Event* event) {
initial_e.SetPdgCode(11);
double elec_i_p =
std::sqrt(energy_ * energy_ -
(double)initial_e.GetMass() * (double)initial_e.GetMass());
initial_e.GetMass() * initial_e.GetMass());
initial_e.SetMomentum(elec_i_p * direction_[0], elec_i_p * direction_[1],
elec_i_p * direction_[2], energy_);
TLorentzVector e_p4;
Expand Down

0 comments on commit d5757c0

Please sign in to comment.