PID
More...
Namespaces | |
dec | |
Decision tree PID. | |
Classes | |
class | AlignLibToVtx |
Rewrite a library file with events aligned according to vertex. More... | |
class | ApplyFilter |
Filter according to FilterList status of largest slice. More... | |
class | BackgroundEnricher |
Filter to remove non-pizero interactions. More... | |
class | DistanceMap |
Calculate and cache electrostatic potential between cells. More... | |
class | EventSummary |
Simple representation of event for LEM use. More... | |
class | FindLEMMatches |
Module to find best LEM matches. More... | |
class | FindMatchesAlg |
class | FindMatchesTranspose |
struct | FlippedPotentials |
Collection of Potential objects with odd and/or even view flipped. More... | |
class | GenFromLib |
Reconstitute ART events from a LEM library. More... | |
struct | GetWorkArgs |
class | Heads |
Mapping from a subset of the library to their best matches. More... | |
class | HeadsTranspose |
class | LEM |
Module to find best LEM matches. More... | |
class | LEMAssociator |
class | LEMClient |
Fetch LEM PID result from remote server. More... | |
class | LEMInput |
class | LEMLibrary |
Provide access to the LEM library to all modules. More... | |
class | LEMMixer |
class | LEMSummarizer |
Transform slices into the minimal description LEM needs to PID them. More... | |
struct | LEMWebSettings |
class | LEMWorker |
This runs on a high-mem node and reconstitutes LEMSummary events. More... | |
class | LEMWorkerOutput |
Runs after LEM on the high-mem node, returns results to the server. More... | |
class | Library |
Collection of events for matching. More... | |
class | LibrarySummary |
Details of the library LEM matches were made against. More... | |
class | LiteHit |
Compressed hit info, basic component of LEM events. More... | |
class | MakeLibrary |
Summarize ART events into LEM libary format. More... | |
class | MakeMatches |
Calculate final PID variables from match details. More... | |
class | MakePID |
Calculate final PID variables from match details. More... | |
class | Match |
Information about a LEM match. More... | |
class | MatchableEvent |
Attach some information used in matching to an EventSummary. More... | |
class | MatchIndices |
List of indices of matched events. More... | |
class | MatchList |
Collection of MatchSummary objects. More... | |
struct | MatchSummary |
Simplified Match information, suitable for serialization. More... | |
class | MergeMatches |
Merge LEM match lists from split running. More... | |
class | PIDDetails |
Attach LEM-specific info to the base PID object. More... | |
class | PIDExtraVars |
Outputs of the MakePID module. More... | |
class | PIDInput |
Attach MatchList and other useful stuff. More... | |
class | Potential |
Map of electrostatic potential at each cell. More... | |
class | Preselection |
struct | ReturnResultsArgs |
class | SortedMatchList |
class | UnTranspose |
Typedefs | |
typedef art::Source< GenFromLib > | GenFromLibSource |
Functions | |
double | SimpleSurvivalProb (const EventSummary &evt) |
float | CalcEnergy (const Potential &Va, const MatchableEvent &a, const MatchableEvent &b) |
double | FracChargeMatched (const EventSummary &a, const EventSummary &b, bool flipEven, bool flipOdd) |
void | FillPotential (const EventSummary &trial, Potential &V, bool flipEven, bool flipOdd) |
void | FillPotential (const EventSummary &trial, FlippedPotentials &Vs) |
std::vector< Match > | FindMatches (const MatchableEvent &trial, unsigned int libSize, const MatchableEvent *lib, const MatchableEvent *libDownsample, int factor, const std::multiset< float > &alreadyInput, unsigned int numMatches, int enrich, const Heads *heads, int headIdx, bool flipHeadEven, bool flipHeadOdd, bool useDownsample) |
std::ostream & | operator<< (std::ostream &os, const lem::Heads &hs) |
std::ostream & | operator<< (std::ostream &os, const lem::HeadsTranspose &hs) |
std::ostream & | operator<< (std::ostream &os, const lem::LibrarySummary &ls) |
bool | compareByCell (const LiteHit &a, const LiteHit &b) |
bool | compareByPlane (const LiteHit &a, const LiteHit &b) |
std::ostream & | operator<< (std::ostream &os, const lem::LiteHit &h) |
void | SetOnDemandMemoryLimit (long limit_mb) |
void | CreateOnDemandMapping (const std::string &fname, const char *base) |
long | MMapFileAtAddress (const std::string &fname, void *addr, bool touchAll, const std::string &lockName) |
void * | GetWorkThreadFunc (void *x) |
void * | ReturnResultsThreadFunc (void *x) |
int | Clamp (int x) |
int | MeanCell (geo::View_t view, const rb::Cluster &slice) |
void | DefaultVertex (const rb::Cluster &slice, int &plane, int &cell, int &cellOtherView, bool reverse) |
geo::CellUniqueId | FindCellRobust (double x, double y, double z) |
Steps around a bit. Can still return zero for total failure. More... | |
void | VertexToPlaneAndCell (const TVector3 vtx, const rb::Cluster &slice, int &plane, int &cell, int &cellOtherView, bool reverse) |
size_t | writeMemoryCallback (void *contents, size_t size, size_t nmemb, void *userp) |
std::string | get_http_response_internal (const std::string &host, const std::string &query, const std::string &postdata, int minPort, int maxPort, int queryTimeout, int retryTimeout, bool &ok) |
std::string | get_query (const std::string &host, const std::string &query, int minPort, int maxPort, int queryTimeout, int retryTimeout, bool &ok) |
Make an HTTP GET query. More... | |
std::string | post_query (const std::string &host, const std::string &query, const std::string &postdata, int minPort, int maxPort, int queryTimeout, int retryTimeout, bool &ok) |
Make an HTTP POST query. More... | |
std::string | get_release () |
Figure out the current release. TODO: does this belong somewhere else? More... | |
Variables | |
const int | kNumPlanes = 256 |
const int | kNumCells = 256 |
const int | kVertexPlane = 64 |
const int | kVertexCell = 128 |
const unsigned int | kMaxNumMatches = 1001 |
PID
Provide access to the LEM library to all modules.
typedef art::Source<GenFromLib> lem::GenFromLibSource |
Definition at line 216 of file GenFromLib_source.cc.
float lem::CalcEnergy | ( | const Potential & | Va, |
const MatchableEvent & | a, | ||
const MatchableEvent & | b | ||
) |
Definition at line 21 of file FindMatches.cxx.
References lem::LiteHit::cellIdx, energy, lem::EventSummary::hits, MECModelEnuComparisons::i, Nb, lem::EventSummary::nhits, lem::LiteHit::pecorr, lem::MatchableEvent::selfEnergy, and lem::Potential::V.
Referenced by lem::FindMatchesAlg::BestHeadFor(), lem::FindMatchesTranspose::endRun(), FindMatches(), lem::FindMatchesAlg::FindMatchesHeads(), lem::FindMatchesAlg::FindMatchesNoHeads(), and lem::LEM::produce().
Definition at line 154 of file MakeLibrary_module.cc.
References std::max(), and std::min().
Referenced by lem::MakeLibrary::produce(), ana::FitSinSq2Theta13::SetValue(), ana::FitDmSq41Sterile::SetValue(), ana::FitSinSqTheta23::SetValue(), FitSinSqTheta23UO::SetValue(), ana::FitSinSqTheta23UpperOctant::SetValue(), ana::FitDelta24InPiUnitsSterile::SetValue(), FitSinSqTheta23LO::SetValue(), ana::FitTheta13Sterile::SetValue(), ana::FitSinSqTheta23LowerOctant::SetValue(), ana::FitSinSqTheta13Sterile::SetValue(), ana::FitSinSq2Theta23::SetValue(), ana::FitSinSq2Theta13Sterile::SetValue(), ana::FitDmSq32::SetValue(), ana::FitTheta23Sterile::SetValue(), ana::FitDmSq32Scaled::SetValue(), ana::FitSinSqTheta23Sterile::SetValue(), ana::FitDmSq32NormalHierarchy::SetValue(), ana::FitTheta14Sterile::SetValue(), ana::FitDmSq32ScaledNH::SetValue(), ana::FitSinSqTheta14Sterile::SetValue(), ana::FitDmSq32ScaledIH::SetValue(), ana::FitDmSq32InvertedHierarchy::SetValue(), ana::FitTheta24Sterile::SetValue(), FitSinSqTheta23MaxMix::SetValue(), ana::FitTanSqTheta12::SetValue(), ana::FitSinSqTheta24Sterile::SetValue(), ana::FitSinSq2Theta12::SetValue(), ana::FitTheta34Sterile::SetValue(), ana::FitDmSq21::SetValue(), ana::FitSinSqTheta34Sterile::SetValue(), ana::FitTheta13InDegreesSterile::SetValue(), ana::FitTheta23InDegreesSterile::SetValue(), ana::FitTheta14InDegreesSterile::SetValue(), ana::FitTheta24InDegreesSterile::SetValue(), and ana::FitTheta34InDegreesSterile::SetValue().
Definition at line 11 of file LiteHit.cxx.
References lem::LiteHit::Cell().
Referenced by lem::LiteHit::operator<().
Definition at line 16 of file LiteHit.cxx.
References lem::LiteHit::Plane().
Referenced by lem::LiteHit::operator<().
void lem::CreateOnDemandMapping | ( | const std::string & | fname, |
const char * | base | ||
) |
Definition at line 123 of file OnDemand.cxx.
References ana::assert(), fclose(), and fileno.
Referenced by lem::Heads::FromMMapOnDemand(), lem::Library::FromMMapOnDemand(), and lem::HeadsTranspose::FromMMapOnDemand().
void lem::DefaultVertex | ( | const rb::Cluster & | slice, |
int & | plane, | ||
int & | cell, | ||
int & | cellOtherView, | ||
bool | reverse | ||
) |
Definition at line 20 of file Util.cxx.
References geom(), rb::Cluster::MaxPlane(), MeanCell(), rb::Cluster::MinPlane(), geo::GeometryBase::NPlanes(), geo::GeometryBase::Plane(), POTSpillRate::view, and geo::PlaneGeo::View().
Referenced by lem::LEMSummarizer::produce(), lem::AlignLibToVtx::produce(), and VertexToPlaneAndCell().
void lem::FillPotential | ( | const EventSummary & | trial, |
Potential & | V, | ||
bool | flipEven, | ||
bool | flipOdd | ||
) |
Definition at line 76 of file FindMatches.cxx.
References abs(), getBrightness::cell, lem::LiteHit::Cell(), make_syst_table_plots::h, lem::EventSummary::hits, MECModelEnuComparisons::i, lem::DistanceMap::Instance(), lem::DistanceMap::InvDist(), kVertexCell, lem::EventSummary::nhits, lem::LiteHit::pecorr, lem::LiteHit::Plane(), NDAPDHVSetting::plane, lem::Potential::V, and POTSpillRate::view.
Referenced by lem::FindLEMMatches::AddHists(), lem::LEM::AddHists(), FindMatches(), lem::FindMatchesAlg::FindMatchesHeads(), lem::FindMatchesAlg::FindMatchesNoHeads(), lem::FindMatchesTranspose::produce(), lem::LEM::produce(), and show_potential().
void lem::FillPotential | ( | const EventSummary & | trial, |
FlippedPotentials & | Vs | ||
) |
Definition at line 108 of file FindMatches.cxx.
References abs(), getBrightness::cell, lem::LiteHit::Cell(), make_associated_cosmic_defs::fc, make_syst_table_plots::h, lem::EventSummary::hits, MECModelEnuComparisons::i, lem::DistanceMap::Instance(), lem::DistanceMap::InvDist(), kVertexCell, lem::EventSummary::nhits, lem::LiteHit::pecorr, lem::LiteHit::Plane(), NDAPDHVSetting::plane, lem::Potential::V, lem::FlippedPotentials::V, and POTSpillRate::view.
geo::CellUniqueId lem::FindCellRobust | ( | double | x, |
double | y, | ||
double | z | ||
) |
Steps around a bit. Can still return zero for total failure.
Definition at line 38 of file Util.cxx.
References geo::GeometryBase::CellId(), and geom().
Referenced by VertexToPlaneAndCell().
std::vector< Match > lem::FindMatches | ( | const MatchableEvent & | trial, |
unsigned int | libSize, | ||
const MatchableEvent * | lib, | ||
const MatchableEvent * | libDownsample, | ||
int | factor, | ||
const std::multiset< float > & | alreadyInput, | ||
unsigned int | numMatches, | ||
int | enrich, | ||
const Heads * | heads, | ||
int | headIdx, | ||
bool | flipHeadEven, | ||
bool | flipHeadOdd, | ||
bool | useDownsample | ||
) |
Definition at line 175 of file FindMatches.cxx.
References a, ana::assert(), CalcEnergy(), lem::Heads::ChildIdxFor(), lem::Potential::Downsampled(), E, FillPotential(), lem::Heads::FlipEvenFor(), lem::Heads::FlipOddFor(), FracChargeMatched(), lem::Heads::HeadSeqsLen(), MECModelEnuComparisons::i, calib::j, m, runNovaSAM::ret, lem::MatchableEvent::selfEnergy, lem::FlippedPotentials::V, lem::MatchableEvent::weight, and ana::weight.
Referenced by lem::LEM::produce().
double lem::FracChargeMatched | ( | const EventSummary & | a, |
const EventSummary & | b, | ||
bool | flipEven, | ||
bool | flipOdd | ||
) |
Definition at line 37 of file FindMatches.cxx.
References abs(), lem::LiteHit::Cell(), lem::LiteHit::cellIdx, lem::EventSummary::hits, kVertexCell, std::min(), Na, Nb, lem::EventSummary::nhits, lem::LiteHit::pecorr, lem::LiteHit::Plane(), lem::EventSummary::totalPE, and registry_explorer::v.
Referenced by lem::FindMatchesTranspose::endRun(), FindMatches(), and lem::FindMatchesAlg::PackageMatches().
std::string lem::get_http_response_internal | ( | const std::string & | host, |
const std::string & | query, | ||
const std::string & | postdata, | ||
int | minPort, | ||
int | maxPort, | ||
int | queryTimeout, | ||
int | retryTimeout, | ||
bool & | ok | ||
) |
Definition at line 31 of file WebUtils.cxx.
References ana::assert(), om::cerr, om::cout, allTimeWatchdog::endl, genie::utils::style::Format(), central_limit::rand, string, sw, getGoodRuns4SAM::t0, getGoodRuns4SAM::t1, recentWatchdog::url, and writeMemoryCallback().
Referenced by get_query(), and post_query().
std::string lem::get_query | ( | const std::string & | host, |
const std::string & | query, | ||
int | minPort, | ||
int | maxPort, | ||
int | queryTimeout, | ||
int | retryTimeout, | ||
bool & | ok | ||
) |
Make an HTTP GET query.
Definition at line 147 of file WebUtils.cxx.
References get_http_response_internal().
Referenced by GetWorkThreadFunc().
std::string lem::get_release | ( | ) |
Figure out the current release. TODO: does this belong somewhere else?
Definition at line 178 of file WebUtils.cxx.
References om::cerr, e, allTimeWatchdog::endl, and cet::getenv().
Referenced by lem::LEMWorker::GetWork(), and lem::LEMClient::produce().
Definition at line 101 of file LEMWorker_module.cc.
References make_syst_table_plots::args, om::cerr, allTimeWatchdog::endl, get_query(), lem::LEMWebSettings::host, lem::LEMWebSettings::maxPort, lem::LEMWebSettings::minPort, lem::GetWorkArgs::params, lem::LEMWebSettings::queryTimeout, lem::LEMWebSettings::retryTimeout, string, and lem::GetWorkArgs::web.
Referenced by lem::LEMWorker::GetWork().
int lem::MeanCell | ( | geo::View_t | view, |
const rb::Cluster & | slice | ||
) |
Definition at line 14 of file Util.cxx.
References rb::Cluster::MaxCell(), and rb::Cluster::MinCell().
Referenced by DefaultVertex().
long lem::MMapFileAtAddress | ( | const std::string & | fname, |
void * | addr, | ||
bool | touchAll, | ||
const std::string & | lockName = "" |
||
) |
fname | File to map in |
addr | Where to map it |
touchAll | Read from every page to make sure it's cached |
lockName | If touchAll, coordinate using lock here |
Definition at line 18 of file Util.cxx.
References ana::assert(), om::cout, allTimeWatchdog::endl, MakeMiniprodValidationCuts::f, fclose(), fileno, MECModelEnuComparisons::i, makeTrainCVSamples::int, runNovaSAM::ret, and PandAna.Demos.pi0_spectra::tot.
Referenced by lem::Heads::FromMMap(), lem::Library::FromMMap(), and lem::HeadsTranspose::FromMMap().
std::ostream & lem::operator<< | ( | std::ostream & | os, |
const lem::LiteHit & | h | ||
) |
Definition at line 21 of file LiteHit.cxx.
References lem::LiteHit::Cell(), lem::LiteHit::pecorr, and lem::LiteHit::Plane().
std::ostream & lem::operator<< | ( | std::ostream & | os, |
const lem::LibrarySummary & | ls | ||
) |
Definition at line 32 of file LibrarySummary.cxx.
References lem::LibrarySummary::N, lem::LibrarySummary::totBkg, lem::LibrarySummary::totEnrich, and lem::LibrarySummary::totSig.
std::ostream & lem::operator<< | ( | std::ostream & | os, |
const lem::Heads & | hs | ||
) |
Definition at line 140 of file Heads.cxx.
References lem::Heads::fHeadSeqsLen, and lem::Heads::fNHeads.
Referenced by lem::LiteHit::operator<().
std::ostream & lem::operator<< | ( | std::ostream & | os, |
const lem::HeadsTranspose & | hs | ||
) |
Definition at line 147 of file Heads.cxx.
References lem::HeadsTranspose::fLibSize, and lem::HeadsTranspose::fNHeads.
std::string lem::post_query | ( | const std::string & | host, |
const std::string & | query, | ||
const std::string & | postdata, | ||
int | minPort, | ||
int | maxPort, | ||
int | queryTimeout, | ||
int | retryTimeout, | ||
bool & | ok | ||
) |
Make an HTTP POST query.
Definition at line 162 of file WebUtils.cxx.
References get_http_response_internal().
Referenced by lem::LEMClient::produce(), and ReturnResultsThreadFunc().
Definition at line 100 of file LEMWorkerOutput_module.cc.
References make_syst_table_plots::args, om::cerr, allTimeWatchdog::endl, lem::LEMWebSettings::host, lem::LEMWebSettings::maxPort, lem::LEMWebSettings::minPort, lem::ReturnResultsArgs::params, post_query(), lem::ReturnResultsArgs::postdata, lem::LEMWebSettings::queryTimeout, lem::LEMWebSettings::retryTimeout, and lem::ReturnResultsArgs::web.
Referenced by lem::LEMWorkerOutput::ReturnResults().
void lem::SetOnDemandMemoryLimit | ( | long | limit_mb | ) |
Definition at line 117 of file OnDemand.cxx.
Referenced by lem::LEMLibrary::reconfigure(), lem::FindMatchesTranspose::reconfigure(), and lem::LEM::reconfigure().
double lem::SimpleSurvivalProb | ( | const EventSummary & | evt | ) |
Definition at line 159 of file FindMatchesTranspose_module.cc.
References abs(), lem::EventSummary::ccnc, e, lem::EventSummary::IsSig(), lem::EventSummary::origPdg, lem::EventSummary::pdg, std::sin(), util::sqr(), and lem::EventSummary::trueEVis.
void lem::VertexToPlaneAndCell | ( | const TVector3 | vtx, |
const rb::Cluster & | slice, | ||
int & | plane, | ||
int & | cell, | ||
int & | cellOtherView, | ||
bool | reverse | ||
) |
Definition at line 60 of file Util.cxx.
References geo::PlaneGeo::Cell(), DefaultVertex(), FindCellRobust(), geom(), geo::CellGeo::GetCenter(), geo::GeometryBase::IdToCell(), geo::kPLANE_NOT_FOUND, geo::PlaneGeo::Ncells(), ncells, geo::GeometryBase::NextPlaneOtherView(), and geo::GeometryBase::Plane().
Referenced by lem::LEMSummarizer::produce(), lem::AlignLibToVtx::produce(), and lem::MakeLibrary::produce().
Definition at line 17 of file WebUtils.cxx.
References ana::assert(), submit_syst::str, and string.
Referenced by get_http_response_internal().
const unsigned int lem::kMaxNumMatches = 1001 |
Definition at line 29 of file FindMatches.h.
Referenced by lem::MakePID::beginJob(), lem::MergeMatches::produce(), lem::FindLEMMatches::produce(), and lem::LEM::produce().
const int lem::kNumCells = 256 |
Definition at line 17 of file DistanceMap.h.
Referenced by lem::DistanceMap::DistanceMap(), lem::DistanceMap::InvDist(), and lem::DistanceMap::MakeHist().
const int lem::kNumPlanes = 256 |
Definition at line 16 of file DistanceMap.h.
Referenced by lem::DistanceMap::DistanceMap(), lem::DistanceMap::InvDist(), and lem::DistanceMap::MakeHist().
const int lem::kVertexCell = 128 |
Definition at line 23 of file EventSummary.h.
Referenced by draw_event(), lem::EventSummary::EventSummary(), FillPotential(), lem::MatchableEvent::Flipped(), FracChargeMatched(), lem::FindLEMMatches::MatchToVertex(), lem::LEM::MatchToVertex(), lem::AlignLibToVtx::produce(), lem::MakeLibrary::produce(), refresh(), show_potential(), lem::MakeLibrary::SliceOrigin(), and lem::LEMSummarizer::SliceToLEMInput().
const int lem::kVertexPlane = 64 |
Definition at line 22 of file EventSummary.h.
Referenced by draw_event(), lem::EventSummary::EventSummary(), lem::FindLEMMatches::MatchToVertex(), lem::LEM::MatchToVertex(), lem::AlignLibToVtx::produce(), lem::MakeLibrary::produce(), refresh(), show_potential(), lem::MakeLibrary::SliceOrigin(), and lem::LEMSummarizer::SliceToLEMInput().