8 #ifndef CHEAT_CHECKBACKTRACKING_H 9 #define CHEAT_CHECKBACKTRACKING_H 85 std::vector< art::Ptr<recob::Hit> >
hits;
89 std::vector< art::Ptr<recob::Hit> >
::iterator itr = hits.begin();
97 while( itr != hits.end() ){
100 mf::LogInfo(
"CheckBackTracking") << *((*itr).get()) <<
"\n channel is: " << (*itr)->Channel();
102 std::vector<sim::TrackIDE> trackides = bt_serv->
HitToTrackIDEs(*itr);
104 std::vector<double> xyz = bt_serv->
HitToXYZ(*itr);
106 mf::LogInfo(
"CheckBackTracking") <<
"hit weighted mean position is (" 107 << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2] <<
")";
109 for(
size_t t = 0; t < trackides.size(); ++t){
114 mf::LogInfo(
"CheckBackTracking") <<
"track id: " << trackides[t].trackID
115 <<
" contributed " << trackides[t].energy <<
"/" 116 << trackides[t].energyFrac
117 <<
" to the current hit and has eveID: " 121 for(
size_t e = 0;
e < eveides.size(); ++
e){
122 mf::LogInfo(
"CheckBackTracking") <<
"eve id: " << eveides[
e].trackID
123 <<
" contributed " << eveides[
e].energy <<
"/" 124 << eveides[
e].energyFrac
125 <<
" to the current hit";
127 if(eveIDs.find(eveides[
e].trackID) == eveIDs.end()) eveIDs.insert(eveides[e].trackID);
135 while( setitr != eveIDs.end() ){
139 mf::LogInfo(
"CheckBackTracking") <<
"eve ID: " << *setitr
std::string fHitModuleLabel
label for module creating recob::Hit objects
const std::vector< double > HitToXYZ(const recob::Hit &hit)
const std::vector< sim::TrackIDE > HitToTrackIDEs(recob::Hit const &hit)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
void reconfigure(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
CheckBackTracking(fhicl::ParameterSet const &pset)
int EveId(const int trackID) const
3-dimensional objects, potentially hits, clusters, prongs, etc.
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
EDAnalyzer(Table< Config > const &config)
const double HitCollectionEfficiency(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)
std::string fG4ModuleLabel
label for module running G4 and making particles, etc
virtual ~CheckBackTracking()
code to link reconstructed objects back to the MC truth information
const double HitCollectionPurity(std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit > > const &hits)
const std::vector< sim::TrackIDE > HitToEveTrackIDEs(recob::Hit const &hit)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
const sim::ParticleList & ParticleList()
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
void analyze(art::Event const &evt)
art framework interface to geometry description