13 #include "art/Framework/Services/Registry/ActivityRegistry.h"
14 #include "art/Framework/Principal/Event.h"
15 #include "messagefacility/MessageLogger/MessageLogger.h"
16 #include "fhiclcpp/ParameterSet.h"
28 pSet.
get<fhicl::ParameterSet>(
"PhotonBackTracker"),
40 config.PhotonBackTrackerTable(),
79 throw cet::exception(
"PhotonBackTrackerService")
80 <<
"The called Prep Fucntion failed. This is most likely due "
81 <<
"to a PhotonBackTracker fucntion being used on a file that "
91 catch(cet::exception
const&){
92 mf::LogWarning(
"PhotonBackTrackerService")
93 <<
"Rebuild failed to get the OpDetBTRs. This is expected when "
94 <<
"running on a generation or simulation step.";}
102 catch(cet::exception
const&){
103 mf::LogWarning(
"PhotonBackTrackerService")
104 <<
"Rebuild failed to get the OpFlashToOpHits. This is expected when "
105 <<
"running on a generation or simulation stage.";
150 double const& opHit_start_time,
151 double const& opHit_end_time)
304 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps)
311 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps)
319 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps,
320 std::vector< art::Ptr<recob::OpHit> >
const& opHitsIn_Ps,
323 throw cet::exception(
"PhotonBackTrackerService")<<
"This function is not supported. OpHits do not have type View.\n";
328 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps,
329 std::vector< art::Ptr<recob::OpHit> >
const& opHitsIn_Ps)
336 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps,
337 std::vector< art::Ptr<recob::OpHit> >
const& opHitsIn_Ps,
340 throw cet::exception(
"PhotonBackTrackerService")<<
"This function is not supported. OpHits do not have type View.\n";
345 std::vector< art::Ptr<recob::OpHit> >
const& opHits_Ps,
346 std::vector< art::Ptr<recob::OpHit> >
const& opHitsIn_Ps)
const std::unordered_set< const sim::SDP * > OpHitToEveSimSDPs_Ps(recob::OpHit const &opHit)
const art::Ptr< sim::OpDetBacktrackerRecord > FindOpDetBTR(int const &opDetNum) const
const std::set< int > GetSetOfEveIds()
art::Ptr< sim::OpDetBacktrackerRecord > FindOpDetBTR(int const &opDetNum)
Utilities related to art service access.
const std::vector< art::Ptr< recob::OpHit > > OpFlashToOpHits_Ps(art::Ptr< recob::OpFlash > &flash_P)
std::vector< double > OpHitToXYZ(art::Ptr< recob::OpHit > const &hit)
const double OpHitLightCollectionPurity(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits_Ps)
const std::vector< const sim::SDP * > OpHitToSimSDPs_Ps(recob::OpHit const &opHit)
const bool CanRun(Evt const &evt)
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
T::provider_type const * providerFrom()
Returns a constant pointer to the provider of specified service.
const std::unordered_set< const sim::SDP * > OpHitToEveSimSDPs_Ps(recob::OpHit const &opHit)
const std::vector< double > SimSDPsToXYZ(std::vector< sim::SDP > const &sdps) const &
const std::vector< art::Ptr< recob::OpHit > > TrackIdToOpHits_Ps(int const &tkId, std::vector< art::Ptr< recob::OpHit >> const &hitsIn)
std::vector< double > SimSDPsToXYZ(std::vector< sim::SDP > const &sdps)
void PrepOpFlashToOpHits(Evt const &evt)
const std::vector< int > OpHitToEveTrackIds(recob::OpHit const &opHit)
bool priv_CanRun(art::Event const &evt)
const std::vector< art::Ptr< recob::OpHit > > OpFlashToOpHits_Ps(art::Ptr< recob::OpFlash > &flash_P) const
const std::vector< std::vector< art::Ptr< recob::OpHit > > > TrackIdsToOpHits_Ps(std::vector< int > const &tkIds, std::vector< art::Ptr< recob::OpHit >> const &hitsIn)
double OpHitCollectionPurity(std::set< int > trackIDs, std::vector< art::Ptr< recob::OpHit > > const &hits)
const double OpHitCollectionPurity(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits_Ps)
void priv_PrepOpDetBTRs(art::Event const &evt)
const std::vector< double > OpHitToXYZ(recob::OpHit const &opHit)
const std::set< int > OpFlashToTrackIds(art::Ptr< recob::OpFlash > &flash_P) const
const std::vector< const sim::SDP * > TrackIdToSimSDPs_Ps(int const &id)
const std::vector< const sim::SDP * > OpHitToSimSDPs_Ps(recob::OpHit const &opHit) const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
const std::vector< art::Ptr< sim::OpDetBacktrackerRecord > > & OpDetBTRs()
void PrepOpDetBTRs(Evt const &evt)
bool priv_OpFlashToOpHitsReady()
const std::set< int > GetSetOfEveIds() const
void Rebuild(art::Event const &evt)
const double OpHitLightCollectionEfficiency(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits, std::vector< art::Ptr< recob::OpHit > > const &opHitsIn)
std::vector< sim::TrackSDP > OpHitToTrackSDPs(art::Ptr< recob::OpHit > const &opHit_P)
double OpHitCollectionEfficiency(std::set< int > trackIDs, std::vector< art::Ptr< recob::OpHit > > const &hits, std::vector< art::Ptr< recob::OpHit > > const &allhits)
const std::set< int > GetSetOfTrackIds() const
const std::vector< sim::TrackSDP > OpHitToEveTrackSDPs(art::Ptr< recob::OpHit > const &opHit_P) const
const std::vector< const sim::SDP * > TrackIdToSimSDPs_Ps(int const &id)
const double OpHitLightCollectionPurity(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits)
const std::vector< double > OpFlashToXYZ(art::Ptr< recob::OpFlash > &flash_P) const
const std::vector< sim::TrackSDP > OpDetToTrackSDPs(int const &OpDetNum, double const &opHit_start_time, double const &opHit_end_time)
const double OpHitLightCollectionEfficiency(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits_Ps, std::vector< art::Ptr< recob::OpHit > > const &opHitsIn_Ps, geo::View_t const &view)
const std::vector< int > OpHitToEveTrackIds(recob::OpHit const &opHit)
const std::vector< double > OpFlashToXYZ(art::Ptr< recob::OpFlash > &flash_P)
const double OpHitCollectionEfficiency(std::set< int > const &tkIds, std::vector< art::Ptr< recob::OpHit > > const &opHits_Ps, std::vector< art::Ptr< recob::OpHit > > const &opHitsIn_Ps, geo::View_t const &view)
std::vector< sim::TrackSDP > OpHitToTrackSDPs(art::Ptr< recob::OpHit > const &hit)
std::vector< art::Ptr< sim::OpDetBacktrackerRecord > > const & OpDetBTRs()
const std::vector< int > OpHitToTrackIds(recob::OpHit const &opHit) const
PhotonBackTrackerService(fhicl::ParameterSet const &pSet, art::ActivityRegistry ®)
bool priv_OpDetBTRsReady()
const std::vector< art::Ptr< recob::OpHit > > TrackIdToOpHits_Ps(int const &tkId, std::vector< art::Ptr< recob::OpHit >> const &hitsIn)
void priv_PrepEvent(art::Event const &evt, art::ScheduleContext)
const std::vector< int > OpHitToTrackIds(recob::OpHit const &opHit)
const std::set< int > OpFlashToTrackIds(art::Ptr< recob::OpFlash > &flash_P) const
std::vector< sim::TrackSDP > OpHitToEveTrackSDPs(art::Ptr< recob::OpHit > const &opHit_P)
const std::set< int > GetSetOfTrackIds()
const std::vector< std::vector< art::Ptr< recob::OpHit > > > TrackIdsToOpHits_Ps(std::vector< int > const &tkIds, std::vector< art::Ptr< recob::OpHit >> const &hitsIn)
const std::vector< sim::TrackSDP > OpDetToTrackSDPs(int const &OpDetNum, double const &opHit_start_time, double const &opHit_end_time) const
art framework interface to geometry description
void priv_PrepOpFlashToOpHits(art::Event const &evt)