LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "BeamFlashTrackMatchTaggerAlg.h"
Classes | |
struct | FlashComparisonProperties |
Public Types | |
using | Providers_t = lar::ProviderPack< geo::GeometryCore, detinfo::LArProperties > |
Pack of provider-interface supporting services we need. More... | |
Public Member Functions | |
BeamFlashTrackMatchTaggerAlg (fhicl::ParameterSet const &p) | |
void | RunCompatibilityCheck (std::vector< recob::OpFlash > const &, std::vector< recob::Track > const &, std::vector< anab::CosmicTag > &, std::vector< size_t > &, Providers_t, phot::PhotonVisibilityService const &, opdet::OpDigiProperties const &) |
void | SetHypothesisComparisonTree (TTree *, TH1F *, TH1F *) |
void | RunHypothesisComparison (unsigned int const, unsigned int const, std::vector< recob::OpFlash > const &, std::vector< recob::Track > const &, Providers_t, phot::PhotonVisibilityService const &, opdet::OpDigiProperties const &) |
void | RunHypothesisComparison (unsigned int const, unsigned int const, std::vector< recob::OpFlash > const &, std::vector< simb::MCParticle > const &, Providers_t, phot::PhotonVisibilityService const &, opdet::OpDigiProperties const &) |
Private Types | |
enum | CompatibilityResultType { kCompatible = 0, kSingleChannelCut, kCumulativeChannelCut, kIntegralCut } |
typedef struct cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties | FlashComparisonProperties_t |
typedef enum cosmic::BeamFlashTrackMatchTaggerAlg::CompatibilityResultType | CompatibilityResultType |
Private Member Functions | |
std::vector< float > | GetMIPHypotheses (recob::Track const &track, Providers_t providers, phot::PhotonVisibilityService const &pvs, opdet::OpDigiProperties const &, float XOffset=0) |
std::vector< float > | GetMIPHypotheses (simb::MCParticle const &particle, size_t start_i, size_t end_i, Providers_t providers, phot::PhotonVisibilityService const &pvs, opdet::OpDigiProperties const &, float XOffset=0) |
void | AddLightFromSegment (TVector3 const &pt1, TVector3 const &pt2, std::vector< float > &lightHypothesis, float &totalHypothesisPE, geo::GeometryCore const &geom, phot::PhotonVisibilityService const &pvs, float const &PromptMIPScintYield, float XOffset) |
void | NormalizeLightHypothesis (std::vector< float > &lightHypothesis, float const &totalHypothesisPE, geo::GeometryCore const &geom) |
CompatibilityResultType | CheckCompatibility (std::vector< float > const &lightHypothesis, const recob::OpFlash *flashPointer, geo::GeometryCore const &geom) |
bool | InDetector (TVector3 const &, geo::GeometryCore const &) |
bool | InDriftWindow (double, double, geo::GeometryCore const &) |
void | FillFlashProperties (std::vector< float > const &opdetVector, float &, float &, float &, float &, float &, geo::GeometryCore const &geom) |
float | CalculateChi2 (std::vector< float > const &, std::vector< float > const &) |
void | PrintTrackProperties (recob::Track const &, std::ostream *output=&std::cout) |
void | PrintFlashProperties (recob::OpFlash const &, std::ostream *output=&std::cout) |
void | PrintHypothesisFlashComparison (std::vector< float > const &, const recob::OpFlash *, geo::GeometryCore const &geom, CompatibilityResultType, std::ostream *output=&std::cout) |
Private Attributes | |
const anab::CosmicTagID_t | COSMIC_TYPE_FLASHMATCH |
const anab::CosmicTagID_t | COSMIC_TYPE_OUTSIDEDRIFT |
const bool | DEBUG_FLAG |
float | fMinTrackLength |
float | fMinOpHitPE |
float | fMIPdQdx |
float | fOpDetSaturation |
float | fSingleChannelCut |
float | fCumulativeChannelThreshold |
unsigned int | fCumulativeChannelCut |
float | fIntegralCut |
bool | fMakeOutsideDriftTags |
bool | fNormalizeHypothesisToFlash |
TTree * | cTree |
FlashComparisonProperties_t | cFlashComparison_p |
std::vector< float > | cOpDetVector_flash |
std::vector< float > | cOpDetVector_hyp |
TH1F * | cOpDetHist_flash |
TH1F * | cOpDetHist_hyp |
Definition at line 48 of file BeamFlashTrackMatchTaggerAlg.h.
|
private |
|
private |
using cosmic::BeamFlashTrackMatchTaggerAlg::Providers_t = lar::ProviderPack<geo::GeometryCore, detinfo::LArProperties> |
Pack of provider-interface supporting services we need.
Definition at line 51 of file BeamFlashTrackMatchTaggerAlg.h.
Enumerator | |
---|---|
kCompatible | |
kSingleChannelCut | |
kCumulativeChannelCut | |
kIntegralCut |
Definition at line 146 of file BeamFlashTrackMatchTaggerAlg.h.
cosmic::BeamFlashTrackMatchTaggerAlg::BeamFlashTrackMatchTaggerAlg | ( | fhicl::ParameterSet const & | p | ) |
Title: Beam Flash<–>Track Match Algorithim Class Author: Wes Ketchum (wketc), based on code from Ben Jones hum@ lanl. gov
Description: Algorithm that compares all tracks to the flash during the beam gate, and determines if that track is consistent with having produced that flash. Input: recob::OpFlash, recob::Track Output: anab::CosmicTag (and Assn<anab::CosmicTag,recob::Track>)
Definition at line 31 of file BeamFlashTrackMatchTaggerAlg.cxx.
|
private |
Definition at line 376 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fOpDetSaturation, phot::PhotonVisibilityService::GetAllVisibilities(), phot::PhotonVisibilityService::NOpChannels(), and pt1.
Referenced by GetMIPHypotheses().
|
private |
Definition at line 545 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fMinOpHitPE.
Referenced by RunHypothesisComparison().
|
private |
Definition at line 500 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fCumulativeChannelCut, fCumulativeChannelThreshold, fIntegralCut, fMinOpHitPE, fNormalizeHypothesisToFlash, fSingleChannelCut, geo::GeometryCore::IsValidOpChannel(), geo::GeometryCore::MaxOpChannel(), geo::GeometryCore::NOpDets(), geo::GeometryCore::OpDetFromOpChannel(), recob::OpFlash::PE(), and recob::OpFlash::TotalPE().
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 324 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::Cryostat(), geo::OpDetGeo::GetCenter(), geo::CryostatGeo::OpDet(), sum, and y.
Referenced by RunHypothesisComparison().
|
private |
Definition at line 424 of file BeamFlashTrackMatchTaggerAlg.cxx.
References AddLightFromSegment(), fMIPdQdx, fNormalizeHypothesisToFlash, lar::ProviderPack< Providers >::get(), recob::Track::LocationAtPoint(), NormalizeLightHypothesis(), recob::Track::NumberTrajectoryPoints(), pt, and opdet::OpDigiProperties::QE().
Referenced by RunCompatibilityCheck(), and RunHypothesisComparison().
|
private |
Definition at line 459 of file BeamFlashTrackMatchTaggerAlg.cxx.
References AddLightFromSegment(), fMIPdQdx, fNormalizeHypothesisToFlash, lar::ProviderPack< Providers >::get(), NormalizeLightHypothesis(), simb::MCParticle::Position(), pt, and opdet::OpDigiProperties::QE().
|
private |
Definition at line 358 of file BeamFlashTrackMatchTaggerAlg.cxx.
References util::abs(), geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), and geo::GeometryCore::DetLength().
Referenced by RunHypothesisComparison().
|
private |
Definition at line 367 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::DetHalfWidth().
Referenced by RunCompatibilityCheck(), and RunHypothesisComparison().
|
private |
Definition at line 414 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::NOpDets().
Referenced by GetMIPHypotheses().
|
private |
Definition at line 584 of file BeamFlashTrackMatchTaggerAlg.cxx.
References recob::OpFlash::OnBeamTime(), recob::OpFlash::Time(), recob::OpFlash::TotalPE(), recob::OpFlash::YCenter(), recob::OpFlash::YWidth(), recob::OpFlash::ZCenter(), and recob::OpFlash::ZWidth().
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 600 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fNormalizeHypothesisToFlash, geo::GeometryCore::IsValidOpChannel(), geo::GeometryCore::MaxOpChannel(), geo::GeometryCore::NOpDets(), geo::GeometryCore::OpDetFromOpChannel(), recob::OpFlash::PE(), and recob::OpFlash::TotalPE().
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 564 of file BeamFlashTrackMatchTaggerAlg.cxx.
References recob::Track::Length(), recob::Track::LocationAtPoint(), and recob::Track::NumberTrajectoryPoints().
Referenced by RunCompatibilityCheck().
void cosmic::BeamFlashTrackMatchTaggerAlg::RunCompatibilityCheck | ( | std::vector< recob::OpFlash > const & | flashVector, |
std::vector< recob::Track > const & | trackVector, | ||
std::vector< anab::CosmicTag > & | cosmicTagVector, | ||
std::vector< size_t > & | assnTrackTagVector, | ||
Providers_t | providers, | ||
phot::PhotonVisibilityService const & | pvs, | ||
opdet::OpDigiProperties const & | opdigip | ||
) |
Definition at line 66 of file BeamFlashTrackMatchTaggerAlg.cxx.
References CheckCompatibility(), COSMIC_TYPE_FLASHMATCH, COSMIC_TYPE_OUTSIDEDRIFT, DEBUG_FLAG, fMakeOutsideDriftTags, fMinTrackLength, lar::ProviderPack< Providers >::get(), GetMIPHypotheses(), InDriftWindow(), recob::Track::Length(), recob::Track::LocationAtPoint(), recob::Track::NumberTrajectoryPoints(), PrintFlashProperties(), PrintHypothesisFlashComparison(), PrintTrackProperties(), and track.
Referenced by cosmic::BeamFlashTrackMatchTagger::produce().
void cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison | ( | unsigned int const | run, |
unsigned int const | event, | ||
std::vector< recob::OpFlash > const & | flashVector, | ||
std::vector< recob::Track > const & | trackVector, | ||
Providers_t | providers, | ||
phot::PhotonVisibilityService const & | pvs, | ||
opdet::OpDigiProperties const & | opdigip | ||
) |
Definition at line 133 of file BeamFlashTrackMatchTaggerAlg.cxx.
References CalculateChi2(), cFlashComparison_p, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::chi2, cOpDetVector_flash, cOpDetVector_hyp, cTree, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::event, FillFlashProperties(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_index, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_nOpDet, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_sigmay, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_sigmaz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_totalPE, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_y, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_z, fMinOpHitPE, fMinTrackLength, lar::ProviderPack< Providers >::get(), GetMIPHypotheses(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_index, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_sigmay, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_sigmaz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_totalPE, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_y, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_z, InDriftWindow(), recob::Track::Length(), recob::Track::LocationAtPoint(), recob::Track::NumberTrajectoryPoints(), recob::OpFlash::OnBeamTime(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::run, track, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endx, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endy, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_startx, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_starty, and cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_startz.
void cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison | ( | unsigned int const | run, |
unsigned int const | event, | ||
std::vector< recob::OpFlash > const & | flashVector, | ||
std::vector< simb::MCParticle > const & | mcParticleVector, | ||
Providers_t | providers, | ||
phot::PhotonVisibilityService const & | pvs, | ||
opdet::OpDigiProperties const & | opdigip | ||
) |
Definition at line 217 of file BeamFlashTrackMatchTaggerAlg.cxx.
References CalculateChi2(), cFlashComparison_p, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::chi2, cOpDetHist_flash, cOpDetHist_hyp, cOpDetVector_flash, cOpDetVector_hyp, cTree, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::event, FillFlashProperties(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_index, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_nOpDet, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_sigmay, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_sigmaz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_totalPE, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_y, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::flash_z, fMinOpHitPE, fMinTrackLength, lar::ProviderPack< Providers >::get(), GetMIPHypotheses(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_index, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_sigmay, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_sigmaz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_totalPE, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_y, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::hyp_z, InDetector(), InDriftWindow(), simb::MCParticle::NumberTrajectoryPoints(), recob::OpFlash::OnBeamTime(), simb::MCParticle::Position(), simb::MCParticle::Process(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::run, simb::MCTrajectory::TotalLength(), simb::MCParticle::Trajectory(), cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endx, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endy, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_endz, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_startx, cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_starty, and cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::trk_startz.
void cosmic::BeamFlashTrackMatchTaggerAlg::SetHypothesisComparisonTree | ( | TTree * | tree, |
TH1F * | hist_flash, | ||
TH1F * | hist_hyp | ||
) |
Definition at line 47 of file BeamFlashTrackMatchTaggerAlg.cxx.
References cFlashComparison_p, cOpDetHist_flash, cOpDetHist_hyp, cOpDetVector_flash, cOpDetVector_hyp, cTree, and cosmic::BeamFlashTrackMatchTaggerAlg::FlashComparisonProperties::leaf_structure.
|
private |
Definition at line 140 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 143 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 144 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 141 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 142 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 83 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 84 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 99 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 85 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 93 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility().
|
private |
Definition at line 92 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility().
|
private |
Definition at line 94 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility().
|
private |
Definition at line 96 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 88 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CalculateChi2(), CheckCompatibility(), and RunHypothesisComparison().
|
private |
Definition at line 87 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck(), and RunHypothesisComparison().
|
private |
Definition at line 89 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by GetMIPHypotheses().
|
private |
Definition at line 97 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), GetMIPHypotheses(), and PrintHypothesisFlashComparison().
|
private |
Definition at line 90 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by AddLightFromSegment().
|
private |
Definition at line 91 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility().