diff --git a/src/GlueXPrimaryGenerator.cc b/src/GlueXPrimaryGenerator.cc index 9981185..f02e12c 100644 --- a/src/GlueXPrimaryGenerator.cc +++ b/src/GlueXPrimaryGenerator.cc @@ -140,13 +140,13 @@ void GlueXPrimaryGenerator::GeneratePrimaryVertex(G4Event *event) double Etot = momentum.getE() * GeV; G4PrimaryParticle *pp = new G4PrimaryParticle(part, px, py, pz, Etot); hddm_s::PolarizationList polars = it_product->getPolarizations(); - if (polars.size() > 0) { - hddm_s::PolarizationList::iterator polar = polars.begin(); + if (polars.size() > 0) { + hddm_s::PolarizationList::iterator polar = polars.begin(); pp->SetPolarization(polar->getPx(), polar->getPy(), polar->getPz()); - } - else { + } + else { pp->SetPolarization(0, 0, 0); - } + } vertex->SetPrimary(pp); event_info->SetGlueXTrackID(++Nprimaries, trackId); double mass = part->GetPDGMass();