84 auto sce = lar::providerFrom<spacecharge::SpaceChargeService>();
85 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(
e);
87 auto const& inEdepVec = *
e.getValidHandle<std::vector<sim::SimEnergyDeposit>>(
fEDepTag);
89 auto outEdepVecPtr = std::make_unique<std::vector<sim::SimEnergyDeposit>>();
90 auto& outEdepVec = *outEdepVecPtr;
91 outEdepVec.reserve(inEdepVec.size());
95 for (
auto const& edep : inEdepVec) {
96 if (sce->EnableSimSpatialSCE()) {
97 posOffsetsStart = sce->GetPosOffsets({edep.StartX(), edep.StartY(), edep.StartZ()});
98 posOffsetsEnd = sce->GetPosOffsets({edep.EndX(), edep.EndY(), edep.EndZ()});
105 outEdepVec.emplace_back(
110 geo::Point_t{(float)(edep.StartX() - posOffsetsStart.X()),
111 (
float)(edep.StartY() + posOffsetsStart.Y()),
112 (
float)(edep.StartZ() + posOffsetsStart.Z())},
114 (
float)(edep.EndY() + posOffsetsEnd.Y()),
115 (
float)(edep.EndZ() + posOffsetsEnd.Z())},
127 outEdepVec.back().X(),
128 outEdepVec.back().Y(),
129 outEdepVec.back().Z(),
130 outEdepVec.back().NumElectrons(),
131 outEdepVec.back().NumPhotons());
134 e.put(std::move(outEdepVecPtr));
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
bool out_of_bounds(geo::Vector_t const &offset)
ISCalcData CalcIonAndScint(detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) override
larg4::ISCalcSeparate fISAlg
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.