14 #ifndef CHEAT_PHOTONBACKTRACKER_H 15 #define CHEAT_PHOTONBACKTRACKER_H 19 #include <unordered_set> 37 class ParticleInventory;
45 class PhotonBackTracker {
50 fhicl::Comment(
"The delay time needed to correctly account for the optical simulation and " 51 "optical systems simulation. (The time between when a g4partcile was made, " 52 "and when the simulation write out says a signal was recorded)."),
57 "The label of the LArG4 module used to produce the art file we will be using."),
62 "The labels of the LArG4 modules used to produce the art file we will be using."),
69 fhicl::Comment(
"The default label for the module to use when grabbing OpHits"),
76 fhicl::Comment(
"The default label for the module to use when grabbing OpFlash"),
80 fhicl::Comment(
"The minimum contribution an energy deposit must make to a Hit to be " 81 "considered part of that hit."),
99 template <
typename Evt>
100 void PrepEvent(Evt
const&
evt);
103 template <
typename Evt>
104 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);
123 double GetDelay()
const;
125 bool BTRsReady()
const;
126 bool OpFlashToOpHitsReady()
const;
128 std::vector<art::Ptr<sim::OpDetBacktrackerRecord>>
const& OpDetBTRs()
const;
129 std::vector<const sim::SDP*> TrackIdToSimSDPs_Ps(
int id)
const;
134 std::vector<sim::TrackSDP> OpDetToTrackSDPs(
int OpDetNum,
135 double opHit_start_time,
136 double opHit_end_time)
const;
138 std::vector<sim::TrackSDP> OpHitToTrackSDPs(
recob::OpHit const& opHit)
const;
139 std::vector<int> OpHitToTrackIds(
recob::OpHit const& opHit)
const;
141 std::vector<int> OpHitToEveTrackIds(
recob::OpHit const& opHit);
144 std::vector<sim::TrackSDP> OpHitToEveTrackSDPs(
recob::OpHit const& opHit)
const;
147 std::vector<art::Ptr<recob::OpHit>> TrackIdToOpHits_Ps(
150 std::vector<std::vector<art::Ptr<recob::OpHit>>> TrackIdsToOpHits_Ps(
151 std::vector<int>
const& tkIds,
155 std::vector<const sim::SDP*> OpHitToSimSDPs_Ps(
recob::OpHit const& opHit)
const;
157 std::vector<const sim::SDP*> OpHitsToSimSDPs_Ps(
161 std::vector<double> SimSDPsToXYZ(std::vector<sim::SDP>
const& sdps)
const&;
162 std::vector<double> SimSDPsToXYZ(std::vector<const sim::SDP*>
const& sdps_Ps)
const&;
166 std::vector<double> OpHitToXYZ(
recob::OpHit const& opHit);
170 std::unordered_set<const sim::SDP*> OpHitToEveSimSDPs_Ps(
recob::OpHit const& opHit);
174 std::set<int> GetSetOfEveIds()
const;
175 std::set<int> GetSetOfTrackIds()
const;
177 std::set<int> GetSetOfEveIds(std::vector<recob::OpHit>
const& opHits)
const;
179 std::set<int> GetSetOfTrackIds(std::vector<recob::OpHit>
const& opHits)
const;
182 double OpHitCollectionPurity(std::set<int>
const& tkIds,
184 double OpHitLightCollectionPurity(std::set<int>
const& tkIds,
186 double OpHitCollectionEfficiency(std::set<int>
const& tkIds,
189 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
const geo::WireReadoutGeom * fWireReadoutGeom
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
Interface for a class providing readout channel mapping to geometry.
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