11 #ifndef CHEAT_BACKTRACKER_H
12 #define CHEAT_BACKTRACKER_H
16 #include "fhiclcpp/types/Atom.h"
28 class DetectorClocksData;
45 fhicl::Comment(
"The label of the LArG4 module used to produce the "
46 "art file we will be using."),
50 fhicl::Comment(
"The label of the module containing the sim::SimChannel product."),
55 fhicl::Comment(
"The label of the module used to produce the hits in the art file "
56 "we will default to when no hitlist is provided."),
60 fhicl::Comment(
"The minimum contribution an energy deposit must "
61 "make to a Hit to be considered part of that hit."),
65 fhicl::Comment(
"Option when overlaying simulation on real data, to tell the "
66 "backtracker to continue even if event looks like data."),
70 fhicl::Comment(
"The number of RMS units to move away"
71 "from a Hit peak time for searching IDE."),
85 template <
typename Evt>
88 template <
typename Evt>
92 template <
typename Evt>
100 template <
typename Evt>
101 std::vector<art::Ptr<recob::Hit>>
SpacePointToHits_Ps(art::Ptr<recob::SpacePoint>
const& spt,
102 const Evt&
evt)
const;
105 template <
typename Evt>
107 art::Ptr<recob::SpacePoint>
const& spt,
108 const Evt&
evt)
const;
119 const std::vector<art::Ptr<sim::SimChannel>>&
153 const double hit_start_time,
154 const double hit_end_time)
const;
160 std::vector<sim::TrackIDE>
162 art::Ptr<recob::Hit>
const&
hit)
const
174 std::vector<sim::TrackIDE>
176 art::Ptr<recob::Hit>
const&
hit)
const
186 std::vector<art::Ptr<recob::Hit>>
const& hitsIn)
const;
190 std::vector<int>
const& tkIds,
191 std::vector<art::Ptr<recob::Hit>>
const& hitsIn)
const;
195 std::vector<sim::IDE>
197 art::Ptr<recob::Hit>
const&
hit)
const
204 std::vector<const sim::IDE*>
206 art::Ptr<recob::Hit>
const&
hit)
const
211 std::vector<double>
SimIDEsToXYZ(std::vector<sim::IDE>
const& ides)
const;
212 std::vector<double>
SimIDEsToXYZ(std::vector<const sim::IDE*>
const& ide_Ps)
const;
219 return this->
HitToXYZ(clockData, *hit);
223 std::set<int>
const& trackIds,
224 std::vector<art::Ptr<recob::Hit>>
const& hits)
const;
226 std::set<int>
const& trackIds,
227 std::vector<art::Ptr<recob::Hit>>
const& hits)
const;
230 std::set<int>
const& trackIds,
236 std::set<int>
const& trackIds,
253 std::vector<art::Ptr<recob::Hit>>
const& hits)
const;
255 std::vector<art::Ptr<recob::Hit>>
const& hits)
const;
259 std::vector<art::Ptr<recob::Hit>>
const& hits)
const;
277 #include "BackTracker.tcc"
279 #endif // CHEAT_BACKTRACKER_H
fhicl::Atom< bool > OverrideRealData
const art::InputTag fHitLabel
const geo::GeometryCore * fGeom
void PrepSimChannels(const Evt &evt)
std::vector< art::Ptr< sim::SimChannel > > fSimChannels
fhicl::Atom< double > MinHitEnergyFraction
std::vector< std::vector< art::Ptr< recob::Hit > > > TrackIdsToHits_Ps(detinfo::DetectorClocksData const &clockData, std::vector< int > const &tkIds, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
art::Ptr< sim::SimChannel > FindSimChannelPtr(raw::ChannelID_t channel) const
Returns the cached sim::SimChannel on the specified channel.
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
BackTracker(const fhiclConfig &config, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom)
std::vector< double > SpacePointToXYZ(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
Declaration of signal hit object.
const art::InputTag fSimChannelModuleLabel
fhicl::Atom< double > HitTimeRMS
const double fMinHitEnergyFraction
fhicl::Atom< art::InputTag > SimChannelModuleLabel
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
std::vector< art::Ptr< recob::Hit > > SpacePointToHits_Ps(art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
bool CanRun(const Evt &evt)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
bool SimChannelsReady() const
art::Ptr< sim::SimChannel > FindSimChannel(raw::ChannelID_t channel) const
Returns the cached sim::SimChannel on the specified channel.
std::vector< art::Ptr< recob::Hit > > TrackIdToHits_Ps(detinfo::DetectorClocksData const &clockData, int tkId, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
std::set< int > GetSetOfTrackIds() const
double HitCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
std::set< int > GetSetOfTrackIds() const
const cheat::ParticleInventory * fPartInv
BEGIN_PROLOG vertical distance to the surface Name
std::set< int > GetSetOfEveIds() const
Description of geometry of one entire detector.
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
Definition of data types for geometry description.
fhicl::Atom< art::InputTag > G4ModuleLabel
const std::vector< art::Ptr< sim::SimChannel > > & SimChannels() const
fhicl::Atom< art::InputTag > DefaultHitModuleLabel
std::vector< sim::TrackIDE > ChannelToTrackIDEs(detinfo::DetectorClocksData const &clockData, raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const
std::set< int > GetSetOfEveIds() const
double HitChargeCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
const bool fOverrideRealData
Contains all timing reference information for the detector.
std::vector< int > HitToTrackIds(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
double HitCollectionEfficiency(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
Header for the ParticleInvenotry Service Provider.
const art::InputTag fG4ModuleLabel
2D representation of charge deposited in the TDC/wire plane
unsigned int ChannelID_t
Type representing the ID of a readout channel.
std::vector< sim::IDE > HitToAvgSimIDEs(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
std::vector< sim::IDE > HitToAvgSimIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::vector< double > SimIDEsToXYZ(std::vector< sim::IDE > const &ides) const
double HitChargeCollectionEfficiency(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
void PrepEvent(const Evt &evt)
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::vector< double > SpacePointHitsToWeightedXYZ(detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> const &hits) const