LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 | reconfigure (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 39 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 43 of file BeamFlashTrackMatchTaggerAlg.h.
Enumerator | |
---|---|
kCompatible | |
kSingleChannelCut | |
kCumulativeChannelCut | |
kIntegralCut |
Definition at line 138 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 16 of file BeamFlashTrackMatchTaggerAlg.cxx.
References reconfigure().
|
private |
Definition at line 347 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fOpDetSaturation, phot::PhotonVisibilityService::GetAllVisibilities(), and phot::PhotonVisibilityService::NOpChannels().
Referenced by GetMIPHypotheses().
|
private |
Definition at line 502 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fMinOpHitPE.
Referenced by RunHypothesisComparison().
|
private |
Definition at line 457 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 307 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::Cryostat(), geo::OpDetGeo::GetCenter(), geo::CryostatGeo::OpDet(), and y.
Referenced by RunHypothesisComparison().
|
private |
Definition at line 392 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 422 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 334 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), and geo::GeometryCore::DetLength().
Referenced by RunHypothesisComparison().
|
private |
Definition at line 341 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::DetHalfWidth().
Referenced by RunCompatibilityCheck(), and RunHypothesisComparison().
|
private |
Definition at line 383 of file BeamFlashTrackMatchTaggerAlg.cxx.
References geo::GeometryCore::NOpDets().
Referenced by GetMIPHypotheses().
|
private |
Definition at line 537 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 553 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 520 of file BeamFlashTrackMatchTaggerAlg.cxx.
References recob::Track::Length(), recob::Track::LocationAtPoint(), and recob::Track::NumberTrajectoryPoints().
Referenced by RunCompatibilityCheck().
void cosmic::BeamFlashTrackMatchTaggerAlg::reconfigure | ( | fhicl::ParameterSet const & | p | ) |
Definition at line 24 of file BeamFlashTrackMatchTaggerAlg.cxx.
References fCumulativeChannelCut, fCumulativeChannelThreshold, fIntegralCut, fMakeOutsideDriftTags, fMinOpHitPE, fMinTrackLength, fMIPdQdx, fNormalizeHypothesisToFlash, fOpDetSaturation, fSingleChannelCut, and fhicl::ParameterSet::get().
Referenced by BeamFlashTrackMatchTaggerAlg(), and cosmic::BeamFlashTrackMatchTagger::reconfigure().
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 56 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(), max, 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 122 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 204 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 39 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 131 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 134 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 135 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 132 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 133 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 77 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 78 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 94 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunHypothesisComparison(), and SetHypothesisComparisonTree().
|
private |
Definition at line 79 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by RunCompatibilityCheck().
|
private |
Definition at line 87 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), and reconfigure().
|
private |
Definition at line 86 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), and reconfigure().
|
private |
Definition at line 88 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), and reconfigure().
|
private |
Definition at line 90 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by reconfigure(), and RunCompatibilityCheck().
|
private |
Definition at line 82 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CalculateChi2(), CheckCompatibility(), reconfigure(), and RunHypothesisComparison().
|
private |
Definition at line 81 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by reconfigure(), RunCompatibilityCheck(), and RunHypothesisComparison().
|
private |
Definition at line 83 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by GetMIPHypotheses(), and reconfigure().
|
private |
Definition at line 91 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), GetMIPHypotheses(), PrintHypothesisFlashComparison(), and reconfigure().
|
private |
Definition at line 84 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by AddLightFromSegment(), and reconfigure().
|
private |
Definition at line 85 of file BeamFlashTrackMatchTaggerAlg.h.
Referenced by CheckCompatibility(), and reconfigure().