14 #ifndef CHEAT_PHOTONBACKTRACKER_H 15 #define CHEAT_PHOTONBACKTRACKER_H 19 #include <unordered_set> 35 class ParticleInventory;
49 class PhotonBackTracker {
54 fhicl::Comment(
"The delay time needed to correctly account for the optical simulation and " 55 "optical systems simulation. (The time between when a g4partcile was made, " 56 "and when the simulation write out says a signal was recorded)."),
61 "The label of the LArG4 module used to produce the art file we will be using."),
66 "The labels of the LArG4 modules used to produce the art file we will be using."),
70 fhicl::Comment(
"The default label for the module to use when grabbing OpHits"),
74 fhicl::Comment(
"The default label for the module to use when grabbing OpFlash"),
78 fhicl::Comment(
"The minimum contribution an energy deposit must make to a Hit to be " 79 "considered part of that hit."),
99 template <
typename Evt>
100 void PrepEvent(Evt
const&
evt);
103 template <
typename Evt>
104 const bool CanRun(Evt
const&
evt);
107 template <
typename Evt>
108 void PrepOpDetBTRs(Evt
const&
evt);
111 template <
typename Evt>
112 void PrepOpFlashToOpHits(Evt
const&
evt);
115 const std::vector<art::Ptr<recob::OpHit>> OpFlashToOpHits_Ps(
125 const double GetDelay();
131 const bool BTRsReady();
134 const bool OpFlashToOpHitsReady();
137 std::vector<art::Ptr<sim::OpDetBacktrackerRecord>>
const& OpDetBTRs();
140 const std::vector<const sim::SDP*> TrackIdToSimSDPs_Ps(
int const&
id);
143 const std::vector<const sim::SDP*> TrackIdToSimSDPs_Ps(
int const&
id,
geo::View_t const& view);
151 const std::vector<sim::TrackSDP> OpDetToTrackSDPs(
int const& OpDetNum,
152 double const& opHit_start_time,
153 double const& opHit_end_time)
const;
159 const std::vector<sim::TrackSDP> OpHitToTrackSDPs(
recob::OpHit const& opHit)
const;
162 const std::vector<int> OpHitToTrackIds(
recob::OpHit const& opHit)
const;
168 const std::vector<int> OpHitToEveTrackIds(
recob::OpHit const& opHit);
174 const std::vector<sim::TrackSDP> OpHitToEveTrackSDPs(
178 const std::vector<sim::TrackSDP> OpHitToEveTrackSDPs(
recob::OpHit const& opHit)
const;
181 const std::vector<art::Ptr<recob::OpHit>> TrackIdToOpHits_Ps(
186 const std::vector<std::vector<art::Ptr<recob::OpHit>>> TrackIdsToOpHits_Ps(
187 std::vector<int>
const& tkIds,
191 const std::vector<const sim::SDP*> OpHitToSimSDPs_Ps(
recob::OpHit const& opHit)
const;
194 const std::vector<const sim::SDP*> OpHitToSimSDPs_Ps(
200 const std::vector<const sim::SDP*> OpHitsToSimSDPs_Ps(
204 const std::vector<double> SimSDPsToXYZ(std::vector<sim::SDP>
const& sdps)
const&;
207 const std::vector<double> SimSDPsToXYZ(std::vector<const sim::SDP*>
const& sdps_Ps)
const&;
213 const std::vector<double> OpHitToXYZ(
recob::OpHit const& opHit);
216 const std::vector<double> OpHitsToXYZ(
220 const std::unordered_set<const sim::SDP*> OpHitToEveSimSDPs_Ps(
recob::OpHit const& opHit);
226 const std::set<int> GetSetOfEveIds()
const;
229 const std::set<int> GetSetOfTrackIds()
const;
235 const std::set<int> GetSetOfEveIds(std::vector<recob::OpHit>
const& opHits)
const;
241 const std::set<int> GetSetOfTrackIds(std::vector<recob::OpHit>
const& opHits)
const;
244 const double OpHitCollectionPurity(std::set<int>
const& tkIds,
248 const double OpHitLightCollectionPurity(std::set<int>
const& tkIds,
252 const double OpHitCollectionEfficiency(std::set<int>
const& tkIds,
257 const double OpHitCollectionEfficiency(std::set<int>
const& tkIds,
263 const double OpHitLightCollectionEfficiency(
264 std::set<int>
const& tkIds,
269 const double OpHitLightCollectionEfficiency(std::set<int>
const& tkIds,
const double fMinOpHitEnergyFraction
std::map< art::Ptr< recob::OpFlash >, std::vector< art::Ptr< recob::OpHit > > > priv_OpFlashToOpHits
const art::InputTag fG4ModuleLabel
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
const cheat::ParticleInventory * fPartInv
std::vector< art::Ptr< sim::OpDetBacktrackerRecord > > priv_OpDetBTRs
const geo::GeometryCore * fGeom
Description of geometry of one entire detector.
Definition of data types for geometry description.
const art::InputTag fOpFlashLabel
code to link reconstructed objects back to the MC truth information
const std::vector< art::InputTag > fG4ModuleLabels
const art::InputTag fOpHitLabel
Namespace collecting geometry-related classes utilities.