14 #include "art_root_io/TFileService.h" 64 produces<std::vector<sim::SimEnergyDeposit>>();
74 "Edep PosDiff Ana Ntuple",
75 "energy:orig_x:orig_y:orig_z:orig_el:orig_ph:shift_x:shift_y:shift_z:shift_el:shift_ph");
82 auto sce = lar::providerFrom<spacecharge::SpaceChargeService>();
87 auto outEdepVecPtr = std::make_unique<std::vector<sim::SimEnergyDeposit>>();
88 auto& outEdepVec = *outEdepVecPtr;
89 outEdepVec.reserve(inEdepVec.size());
93 for (
auto const& edep : inEdepVec) {
94 if (
sce->EnableSimSpatialSCE()) {
95 posOffsetsStart =
sce->GetPosOffsets({edep.StartX(), edep.StartY(), edep.StartZ()});
96 posOffsetsEnd =
sce->GetPosOffsets({edep.EndX(), edep.EndY(), edep.EndZ()});
103 outEdepVec.emplace_back(
109 (
float)(edep.StartY() + posOffsetsStart.Y()),
110 (
float)(edep.StartZ() + posOffsetsStart.Z())},
112 (
float)(edep.EndY() + posOffsetsEnd.Y()),
113 (
float)(edep.EndZ() + posOffsetsEnd.Z())},
125 outEdepVec.back().X(),
126 outEdepVec.back().Y(),
127 outEdepVec.back().Z(),
128 outEdepVec.back().NumElectrons(),
129 outEdepVec.back().NumPhotons());
void produce(art::Event &e) override
bool out_of_bounds(geo::Vector_t const &offset)
EDProducer(fhicl::ParameterSet const &pset)
ShiftEdepSCE(fhicl::ParameterSet const &p)
ISCalcData CalcIonAndScint(detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
ShiftEdepSCE & operator=(ShiftEdepSCE const &)=delete
#define DEFINE_ART_MODULE(klass)
Utility function for testing if Space Charge offsets are out of bounds.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
larg4::ISCalcSeparate fISAlg
contains information for a single step in the detector simulation