63 std::vector<art::Ptr<recob::Hit>> hits;
67 std::vector<art::Ptr<recob::Hit>>
::iterator itr = hits.begin();
77 while (itr != hits.end()) {
80 mf::LogInfo(
"CheckBackTracking") << *((*itr).get()) <<
"\n channel is: " << (*itr)->Channel();
82 std::vector<sim::TrackIDE> trackides = bt_serv->
HitToTrackIDEs(clockData, *itr);
84 std::vector<double> xyz = bt_serv->
HitToXYZ(clockData, *itr);
87 <<
"hit weighted mean position is (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2] <<
")";
89 for (
size_t t = 0;
t < trackides.size(); ++
t) {
92 int eveID = pi_serv->
ParticleList().EveId(trackides[
t].trackID);
95 <<
"track id: " << trackides[
t].trackID <<
" contributed " << trackides[
t].energy <<
"/" 96 << trackides[
t].energyFrac <<
" to the current hit and has eveID: " << eveID;
99 for (
size_t e = 0;
e < eveides.size(); ++
e) {
101 <<
"eve id: " << eveides[
e].trackID <<
" contributed " << eveides[
e].energy <<
"/" 102 << eveides[
e].energyFrac <<
" to the current hit";
104 if (eveIDs.find(eveides[
e].trackID) == eveIDs.end()) eveIDs.insert(eveides[e].trackID);
113 while (setitr != eveIDs.end()) {
118 <<
"eve ID: " << *setitr <<
" purity: " << bt_serv->
HitCollectionPurity(clockData,
id, hits)
std::string fHitModuleLabel
label for module creating recob::Hit objects
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
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
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
3-dimensional objects, potentially hits, clusters, prongs, etc.
double HitCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
const sim::ParticleList & ParticleList() const
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)