51 ,
fG4ModuleLabel{pset.get<std::string>(
"G4ModuleLabel",
"largeant")}
64 std::vector<art::Ptr<recob::Hit>>
hits;
68 std::vector<art::Ptr<recob::Hit>>
::iterator itr = hits.begin();
78 while (itr != hits.end()) {
81 mf::LogInfo(
"CheckBackTracking") << *((*itr).get()) <<
"\n channel is: " << (*itr)->Channel();
83 std::vector<sim::TrackIDE> trackides = bt_serv->
HitToTrackIDEs(clockData, *itr);
85 std::vector<double> xyz = bt_serv->
HitToXYZ(clockData, *itr);
88 <<
"hit weighted mean position is (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2] <<
")";
90 for (
size_t t = 0; t < trackides.size(); ++t) {
96 <<
"track id: " << trackides[t].trackID <<
" contributed " << trackides[t].energy <<
"/" 97 << trackides[t].energyFrac <<
" to the current hit and has eveID: " << eveID;
100 for (
size_t e = 0;
e < eveides.size(); ++
e) {
102 <<
"eve id: " << eveides[
e].trackID <<
" contributed " << eveides[
e].energy <<
"/" 103 << eveides[
e].energyFrac <<
" to the current hit";
105 if (eveIDs.find(eveides[
e].trackID) == eveIDs.end()) eveIDs.insert(eveides[e].trackID);
114 while (setitr != eveIDs.end()) {
119 <<
"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
Declaration of signal hit object.
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
CheckBackTracking(fhicl::ParameterSet const &pset)
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
EDAnalyzer(fhicl::ParameterSet const &pset)
int EveId(const int trackID) const
3-dimensional objects, potentially hits, clusters, prongs, etc.
#define DEFINE_ART_MODULE(klass)
double HitCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
T get(std::string const &key) const
std::string fG4ModuleLabel
label for module running G4 and making particles, etc
Definition of data types for geometry description.
const sim::ParticleList & ParticleList() const
code to link reconstructed objects back to the MC truth information
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
void analyze(art::Event const &evt)
Particle list in DetSim contains Monte Carlo particle information.