LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "TCTruth.h"
Public Member Functions | |
TruthMatcher (TjStuff &my_tjs) | |
void | Initialize () |
void | MatchTrueHits () |
void | MatchTruth (const HistStuff &hist, bool fStudyMode) |
void | MatchAndSum (const HistStuff &hist, const std::vector< unsigned int > &mcpSelect, const geo::TPCID &inTPCID) |
void | PrintResults (int eventNum) const |
bool | CanReconstruct (unsigned int mcpIndex, unsigned short nDimensions, const geo::TPCID &tpcid) |
std::vector< unsigned int > | PutMCPHitsInVector (unsigned int mcpIndex, CTP_t inCTP) |
void | StudyShowerParents (HistStuff &hist) |
void | StudyElectrons (const HistStuff &hist) |
void | StudyPiZeros (const HistStuff &hist) |
Public Attributes | |
TjStuff & | tjs |
std::array< short, 5 > | EPCnts {{0}} |
std::array< float, 5 > | TSums |
std::array< float, 5 > | EPTSums |
float | MCP_TSum |
float | MCP_EPTSum |
float | MCP_Cnt |
float | MCP_PFP_Cnt |
float | Prim_TSum |
float | Prim_EPTSum |
float | PFP_Cnt |
unsigned short | nBadEP |
unsigned short | nLongInPln |
unsigned short | nLongMCP |
unsigned short | nGoodLongMCP |
std::array< unsigned short, 3 > | TruVxCounts |
|
inline |
Definition at line 25 of file TCTruth.h.
References CanReconstruct(), EPCnts, EPTSums, hist, Initialize(), MatchAndSum(), MatchTrueHits(), MatchTruth(), MCP_Cnt, MCP_EPTSum, MCP_PFP_Cnt, MCP_TSum, nBadEP, nGoodLongMCP, nLongInPln, nLongMCP, PFP_Cnt, Prim_EPTSum, Prim_TSum, PrintResults(), PutMCPHitsInVector(), StudyElectrons(), StudyPiZeros(), StudyShowerParents(), TruVxCounts, and TSums.
bool tca::TruthMatcher::CanReconstruct | ( | unsigned int | mcpIndex, |
unsigned short | nDimensions, | ||
const geo::TPCID & | tpcid | ||
) |
Definition at line 1135 of file TCTruth.cxx.
References geo::CryostatID::Cryostat, tca::TjStuff::fHits, tca::TjStuff::MCPartList, tca::TjStuff::NumPlanes, tjs, and geo::TPCID::TPC.
Referenced by MatchTruth(), and TruthMatcher().
void tca::TruthMatcher::Initialize | ( | ) |
Definition at line 20 of file TCTruth.cxx.
References EPCnts, EPTSums, nBadEP, TruVxCounts, and TSums.
Referenced by tca::TrajClusterAlg::TrajClusterAlg(), and TruthMatcher().
void tca::TruthMatcher::MatchAndSum | ( | const HistStuff & | hist, |
const std::vector< unsigned int > & | mcpSelect, | ||
const geo::TPCID & | inTPCID | ||
) |
Definition at line 874 of file TCTruth.cxx.
References tca::AlgBitNames, tca::TjStuff::allTraj, evd::details::begin(), geo::CryostatID::Cryostat, tca::DecodeCTP(), tca::EncodeCTP(), evd::details::end(), EPCnts, EPTSums, tca::TjStuff::EventsProcessed, tca::HistStuff::fEff, tca::HistStuff::fEP_T, tca::TjStuff::fHits, tca::HistStuff::fPur, tca::kKilled, tca::kUsedHits, tca::TjStuff::MatchTruth, MCP_Cnt, MCP_EPTSum, MCP_PFP_Cnt, MCP_TSum, tca::TjStuff::MCPartList, nBadEP, nGoodLongMCP, nLongInPln, nLongMCP, tca::TjStuff::NumPlanes, tca::PDGCodeIndex(), tca::TjStuff::pfps, tca::PrintHit(), tca::PutTrajHitsInVector(), tca::SetIntersection(), tjs, util::flags::to_string(), geo::TPCID::TPC, and TSums.
Referenced by MatchTruth(), and TruthMatcher().
void tca::TruthMatcher::MatchTrueHits | ( | ) |
Definition at line 31 of file TCTruth.cxx.
References sim::ParticleList::begin(), dir, simb::MCParticle::E(), sim::ParticleList::empty(), sim::ParticleList::end(), energy, tca::TjStuff::fHits, tca::TjStuff::geom, cheat::BackTrackerService::HitToTrackIDEs(), ipart, simb::kBeamNeutrino, simb::kCosmicRay, simb::kSingleParticle, simb::kUnknown, simb::MCParticle::Mass(), tca::TjStuff::MatchTruth, tca::TjStuff::MCPartList, simb::MCParticle::Mother(), simb::MCTruth::Origin(), cheat::ParticleInventoryService::ParticleList(), simb::MCParticle::PdgCode(), geo::GeometryCore::PlaneWireToChannel(), simb::MCParticle::Process(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), tca::SetMag(), geo::GeometryCore::SignalType(), sim::ParticleList::size(), tjs, simb::MCParticle::TrackId(), cheat::ParticleInventoryService::TrackIdToMCTruth_P(), cheat::ParticleInventoryService::TrackIdToMotherParticle_P(), geo::GeometryCore::View(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().
Referenced by tca::TrajClusterAlg::GetHitCollection(), and TruthMatcher().
void tca::TruthMatcher::MatchTruth | ( | const HistStuff & | hist, |
bool | fStudyMode | ||
) |
Definition at line 459 of file TCTruth.cxx.
References tca::TjStuff::allTraj, CanReconstruct(), geo::CryostatID::Cryostat, tca::DecodeCTP(), tca::DeltaAngle(), dir, tca::EncodeCTP(), evd::details::end(), sim::ParticleList::EveId(), tca::TjStuff::fHits, tca::HistStuff::fNearTj, tca::HistStuff::fPFPStartAngDiff, tca::HistStuff::fPFPStartdX, tca::HistStuff::fPFPStartdY, tca::HistStuff::fPFPStartdZ, tca::HistStuff::fPFPStartEnd, tca::HistStuff::fTruT, tca::TjStuff::geom, tca::InsideTPC(), ipart, geo::GeometryCore::IterateTPCIDs(), tca::kEnvNearTj, tca::kKilled, tca::kUsedHits, tca::MakeBareTP(), MatchAndSum(), tca::TjStuff::MatchTruth, tca::TjStuff::MCPartList, geo::TPCGeo::Nplanes(), tca::TjStuff::NumPlanes, part, cheat::ParticleInventoryService::ParticleList(), tca::HistStuff::PDGCode_reco_true, tca::PDGCodeIndex(), tca::TjStuff::pfps, geo::PlaneID::Plane, tca::PosSep(), tca::PrintHitShort(), PutMCPHitsInVector(), tca::PutTrajHitsInVector(), tca::TjStuff::SelectEvent, tca::SetMag(), StudyElectrons(), tjs, geo::TPCID::TPC, geo::GeometryCore::TPC(), tca::TjStuff::TPCID, TruVxCounts, and tca::TjStuff::vtx3.
Referenced by tca::TrajClusterAlg::RunTrajClusterAlg(), and TruthMatcher().
void tca::TruthMatcher::PrintResults | ( | int | eventNum | ) | const |
Definition at line 1083 of file TCTruth.cxx.
References EPTSums, MCP_Cnt, MCP_EPTSum, MCP_TSum, nBadEP, nGoodLongMCP, nLongInPln, nLongMCP, Prim_EPTSum, Prim_TSum, tca::TjStuff::SelectEvent, tjs, TruVxCounts, and TSums.
Referenced by tca::TrajClusterAlg::RunTrajClusterAlg(), and TruthMatcher().
std::vector< unsigned int > tca::TruthMatcher::PutMCPHitsInVector | ( | unsigned int | mcpIndex, |
CTP_t | inCTP | ||
) |
Definition at line 1156 of file TCTruth.cxx.
References geo::CryostatID::Cryostat, tca::DecodeCTP(), tca::TjStuff::fHits, tca::TjStuff::MCPartList, geo::PlaneID::Plane, tjs, and geo::TPCID::TPC.
Referenced by MatchTruth(), and TruthMatcher().
void tca::TruthMatcher::StudyElectrons | ( | const HistStuff & | hist | ) |
Definition at line 386 of file TCTruth.cxx.
References tca::TjStuff::allTraj, tca::HistStuff::fChgRMS, tca::HistStuff::fElectronLike, tca::HistStuff::fElectronLike_Len, tca::HistStuff::fMomAsym, tca::kKilled, tca::TjStuff::MCPartList, tca::MCSMom(), tca::PDGCodeIndex(), tca::PosSep(), and tjs.
Referenced by MatchTruth(), and TruthMatcher().
void tca::TruthMatcher::StudyPiZeros | ( | const HistStuff & | hist | ) |
Definition at line 415 of file TCTruth.cxx.
References sim::ParticleList::begin(), simb::MCParticle::E(), sim::ParticleList::end(), sim::ParticleList::EveId(), tca::HistStuff::fChgToMeV, tca::HistStuff::fChgToMeV_Etru, tca::TjStuff::fHits, ipart, tca::TjStuff::MCPartList, cheat::ParticleInventoryService::ParticleList(), simb::MCParticle::PdgCode(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), tca::SetMag(), tjs, and simb::MCParticle::TrackId().
Referenced by TruthMatcher().
void tca::TruthMatcher::StudyShowerParents | ( | HistStuff & | hist | ) |
Definition at line 235 of file TCTruth.cxx.
References tca::TjStuff::allTraj, tca::ChgFracBetween(), tca::ChgToMeV(), tca::TjStuff::cots, tca::DotProd(), tca::EncodeCTP(), energy, sim::ParticleList::EveId(), tca::TjStuff::EventsProcessed, tca::HistStuff::fAlong, tca::FarEnd(), tca::HistStuff::fChgFrac, tca::HistStuff::fDang1, tca::HistStuff::fDang2, tca::FindAlongTrans(), tca::HistStuff::fInShwrProb, tca::HistStuff::fMCSMom, tca::HistStuff::fPfpEnergy, tca::HistStuff::fPfpLen, tca::HistStuff::fSep, tca::HistStuff::fShEnergy, tca::HistStuff::fShowerParentBkg, tca::HistStuff::fShowerParentSig, tca::HistStuff::fTrans, tca::InShowerProbLong(), tca::InsideTPC(), tca::kKilled, tca::MakeBareTP(), tca::TjStuff::MCPartList, tca::MCSMom(), tca::TjStuff::NumPlanes, part, cheat::ParticleInventoryService::ParticleList(), tca::TjStuff::pfps, tca::PointDirection(), tca::PosSep(), tca::PosSep2(), tca::ShowerEnergy(), tca::TjStuff::showers, ss, tca::StoreShower(), tjs, and tca::TjStuff::TPCID.
Referenced by tca::TrajClusterAlg::RunTrajClusterAlg(), and TruthMatcher().
std::array<short, 5> tca::TruthMatcher::EPCnts {{0}} |
Definition at line 57 of file TCTruth.h.
Referenced by Initialize(), MatchAndSum(), and TruthMatcher().
std::array<float, 5> tca::TruthMatcher::EPTSums |
Definition at line 59 of file TCTruth.h.
Referenced by Initialize(), MatchAndSum(), PrintResults(), and TruthMatcher().
float tca::TruthMatcher::MCP_Cnt |
Definition at line 63 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
float tca::TruthMatcher::MCP_EPTSum |
Definition at line 62 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
float tca::TruthMatcher::MCP_PFP_Cnt |
Definition at line 64 of file TCTruth.h.
Referenced by MatchAndSum(), and TruthMatcher().
float tca::TruthMatcher::MCP_TSum |
Definition at line 61 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
unsigned short tca::TruthMatcher::nBadEP |
Definition at line 69 of file TCTruth.h.
Referenced by Initialize(), MatchAndSum(), PrintResults(), and TruthMatcher().
unsigned short tca::TruthMatcher::nGoodLongMCP |
Definition at line 72 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
unsigned short tca::TruthMatcher::nLongInPln |
Definition at line 70 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
unsigned short tca::TruthMatcher::nLongMCP |
Definition at line 71 of file TCTruth.h.
Referenced by MatchAndSum(), PrintResults(), and TruthMatcher().
float tca::TruthMatcher::PFP_Cnt |
Definition at line 67 of file TCTruth.h.
Referenced by TruthMatcher().
float tca::TruthMatcher::Prim_EPTSum |
Definition at line 66 of file TCTruth.h.
Referenced by PrintResults(), and TruthMatcher().
float tca::TruthMatcher::Prim_TSum |
Definition at line 65 of file TCTruth.h.
Referenced by PrintResults(), and TruthMatcher().
TjStuff& tca::TruthMatcher::tjs |
Definition at line 55 of file TCTruth.h.
Referenced by CanReconstruct(), tca::MCParticleListUtils::GetMCPartListIndex(), tca::MCParticleListUtils::MakeCheatShower(), tca::MCParticleListUtils::MakeTruTrajPoint(), MatchAndSum(), MatchTrueHits(), MatchTruth(), tca::MCParticleListUtils::MCParticleStartTjID(), tca::MCParticleListUtils::PrimaryElectronPFPID(), tca::MCParticleListUtils::PrimaryElectronStart(), tca::MCParticleListUtils::PrimaryElectronTjID(), PrintResults(), PutMCPHitsInVector(), StudyElectrons(), StudyPiZeros(), and StudyShowerParents().
std::array<unsigned short, 3> tca::TruthMatcher::TruVxCounts |
Definition at line 78 of file TCTruth.h.
Referenced by Initialize(), MatchTruth(), PrintResults(), and TruthMatcher().
std::array<float, 5> tca::TruthMatcher::TSums |
Definition at line 58 of file TCTruth.h.
Referenced by Initialize(), MatchAndSum(), PrintResults(), and TruthMatcher().