The instrumented geometry of one entire detector (near, far, ipnd) More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-18/Geometry/LiveGeometry.h"
Classes | |
struct | BadBox |
struct | Params |
Public Types | |
using | Parameters = art::ServiceTable< Params > |
Public Member Functions | |
LiveGeometry (const Parameters ¶ms, art::ActivityRegistry ®) | |
~LiveGeometry () | |
void | postBeginSubRun (art::SubRun const &subrun) |
void | preBeginEvent (art::Event const &evt) |
Projected Distances | |
double | ProjectedDistanceToEdge (TVector3 vertex, TVector3 dir) |
double | ProjectedLiveDistanceToEdge (TVector3 vertex, TVector3 dir) |
double | ProjectedDistanceToNextBadRegion (TVector3 vertex, TVector3 dir) |
bool | ProjectedDistance (TVector3 vertex, TVector3 dir, double &distToEdge, double &distToNextBad, double &distDead) |
Projected Number of Cells | |
int | ProjectedCellsToEdge (TVector3 vertex, TVector3 dir) |
int | ProjectedLiveCellsToEdge (TVector3 vertex, TVector3 dir) |
recommended projection to use More... | |
int | ProjectedCellsToNextBadRegion (TVector3 vertex, TVector3 dir) |
Checking if Live | |
double | GetBadBoxCorner (bool view, int coord, int i) |
Get the corner of a bad box (hook for evend display) More... | |
int | NumBadBoxesX () |
Size of the vector of bad boxes in the XZ view. More... | |
int | NumBadBoxesY () |
Size of the vector of bad boxes in the YZ view. More... | |
bool | IsPointLiveInfo (TVector3 vertex, int &info) |
Note the muon catcher is considered bad; use in combination with InMuonCatcher if needed. More... | |
bool | IsPointLive (TVector3 vertex) |
Note the muon catcher is considered bad; use in combination with InMuonCatcher if needed. More... | |
int | DCMStatus (unsigned int dib, unsigned int dcm) |
returns: 0: RH says is bad; 1: good; 2: bad, either BC or DCM drop More... | |
double | DistToClosestBadRegion (TVector3 vertex) |
Define a fully good volume; used to be in Geometry Service | |
double | InstrumentedDetLength () |
get instrumented detector length of downstream part More... | |
double | InstrumentedDetFront () |
get instrumented detector front of downstream part More... | |
double | InstrumentedDetBack () |
get instrumented detector back of downstream part More... | |
int | InstrumentedDetEnds (double &frontDwnstrm, double &backDwnstrm, double &frontUpstrm, double &backUpstrm) |
give all detector ends information; most general More... | |
void | SetInstrumentation () |
calculate the detector end information More... | |
Distances to Edge | |
double | DistToEdgeXPlus (TVector3 vertex) |
double | DistToEdgeXMinus (TVector3 vertex) |
double | DistToTop (TVector3 vertex) |
double | DistToBottom (TVector3 vertex) |
double | DistToFront (TVector3 vertex) |
double | DistToBack (TVector3 vertex) |
double | DistToEdgeX (TVector3 vertex) |
double | DistToEdgeY (TVector3 vertex) |
double | DistToEdgeXY (TVector3 vertex) |
double | DistToEdgeZ (TVector3 vertex) |
Number of Cells/Planes to Edge | |
int | CellsToEdgeXPlus (TVector3 vertex) |
int | CellsToEdgeXMinus (TVector3 vertex) |
int | CellsToTop (TVector3 vertex) |
int | CellsToBottom (TVector3 vertex) |
int | PlanesToFront (TVector3 vertex) |
int | PlanesToBack (TVector3 vertex) |
int | CellsToEdgeX (TVector3 vertex) |
int | CellsToEdgeY (TVector3 vertex) |
int | CellsToEdgeXY (TVector3 vertex) |
int | PlanesToEdge (TVector3 vertex) |
ND Muon Catcher Functions | |
bool | InMuonCatcher (TVector3 vertex) |
int | DoWeEnterMC (TVector3 vertex, TVector3 dir) |
double | ProjectedDistanceInMC (TVector3 vertex, TVector3 dir) |
int | ProjectedCellsInMC (TVector3 vertex, TVector3 dir) |
int | FullNDProjectedCells (TVector3 vertex, TVector3 dir) |
double | XPositionAtTransition (TVector3 vertex, TVector3 dir) |
double | YPositionAtTransition (TVector3 vertex, TVector3 dir) |
double | DistanceToEdgeInMC (TVector3 vertex, int &wall) |
int | CellsToEdgeInMC (TVector3 vertex, int &wall) |
double | ProjectedAirDist (TVector3 vertex, TVector3 dir) |
double | ProjectedSteelDist (TVector3 vertex, TVector3 dir) |
Other | |
double | LiveDetectorVolume () |
in ktons More... | |
int | ProjectedWall (TVector3 vertex, TVector3 dir) |
if we assume the downstream InstrumentedDetEnds, what wall would this projected track exit from? More... | |
int | NBadDCMBC () |
int | NDropouts () |
int | TotalDropouts () |
double | MCFrontZ () const |
Z position at which the muon catcher starts. More... | |
Protected Member Functions | |
Private Functions for Determining Bad Boxes | |
void | SetupLiveGeo () |
Necessary set up before anything; get boudnaries, find and fill bad boxes. More... | |
void | FillBadBoxes () |
Fill bad and uninstrumented regions of detector. More... | |
void | GetDetectorEdges () |
Get proper detector boundaries for each view. More... | |
void | GetRHInfo () |
Get uninstrumented regions from RunHistory. More... | |
void | GetBCInfo () |
Get bad regions from BadChannels. More... | |
void | GetEvInfo () |
Get event by event information. More... | |
Protected Attributes | |
double | fEdgeFrontXZ =0 |
double | fEdgeBackXZ =0 |
double | fEdgeXMinusXZ =0 |
double | fEdgeXPlusXZ =0 |
proper 2D detector boundaries in XZ More... | |
double | fEdgeFrontYZ =0 |
double | fEdgeBackYZ =0 |
double | fEdgeTopYZ =0 |
double | fEdgeBottomYZ =0 |
proper 2D detector boundaries in YZ More... | |
double | fMCFront =0 |
double | fMCBack =0 |
double | fMCEdge =0 |
double | fMCTop =0 |
muon catcher boundaries More... | |
Params | fParams |
bool | fSetup = false |
have we done setup yet this run More... | |
bool | fEvFlag = false |
have we read in information for this event yet? (don't use preBeginEvent since race w/ BadChan) More... | |
std::string | fCalHitLabel |
int | fDCMs [12][14] |
int | fFrontUpstream = -5 |
int | fBackUpstream = -5 |
int | fFrontDownstream = -5 |
int | fBackDownstream = -5 |
int | fNumDiblocks = 0 |
int | fNumDCMs = 0 |
int | fNumCells = 0 |
int | fNumChannels = 0 |
int | fWall = 0 |
int | fNDropouts = 0 |
int | fTotalDropouts = 0 |
int | fNEvents = 0 |
int | fNBadChan = 0 |
float | fMassKtons |
std::vector< BadBox > | fBadBoxXZ |
std::vector< BadBox > | fBadBoxYZ |
The instrumented geometry of one entire detector (near, far, ipnd)
Definition at line 21 of file LiveGeometry.h.
Definition at line 36 of file LiveGeometry.h.
geo::LiveGeometry::LiveGeometry | ( | const Parameters & | params, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 31 of file LiveGeometry_service.cc.
References fSetup, postBeginSubRun(), preBeginEvent(), art::ActivityRegistry::sPostBeginSubRun, and art::ActivityRegistry::sPreProcessEvent.
geo::LiveGeometry::~LiveGeometry | ( | ) |
Definition at line 45 of file LiveGeometry_service.cc.
References fNEvents, fSetup, and fTotalDropouts.
int geo::LiveGeometry::CellsToBottom | ( | TVector3 | vertex | ) |
Definition at line 630 of file LiveGeometry_service.cc.
References DistToBottom(), fEdgeBottomYZ, fEdgeTopYZ, check_time_usage::float, and fNumCells.
Referenced by CellsToEdgeY().
Definition at line 1635 of file LiveGeometry_service.cc.
References geo::GeometryBase::CountCellsOnLineFast(), om::cout, geo::GeometryBase::DetId(), dist, DistanceToEdgeInMC(), allTimeWatchdog::endl, geom(), novadaq::cnv::kNEARDET, and confusionMatrixTree::out.
int geo::LiveGeometry::CellsToEdgeX | ( | TVector3 | vertex | ) |
Definition at line 617 of file LiveGeometry_service.cc.
References CellsToEdgeXMinus(), CellsToEdgeXPlus(), and std::min().
Referenced by CellsToEdgeXY().
int geo::LiveGeometry::CellsToEdgeXMinus | ( | TVector3 | vertex | ) |
Definition at line 610 of file LiveGeometry_service.cc.
References DistToEdgeXMinus(), fEdgeXMinusXZ, fEdgeXPlusXZ, check_time_usage::float, and fNumCells.
Referenced by CellsToEdgeX().
int geo::LiveGeometry::CellsToEdgeXPlus | ( | TVector3 | vertex | ) |
Definition at line 603 of file LiveGeometry_service.cc.
References DistToEdgeXPlus(), fEdgeXMinusXZ, fEdgeXPlusXZ, check_time_usage::float, and fNumCells.
Referenced by CellsToEdgeX().
int geo::LiveGeometry::CellsToEdgeXY | ( | TVector3 | vertex | ) |
Definition at line 643 of file LiveGeometry_service.cc.
References CellsToEdgeX(), CellsToEdgeY(), and std::min().
int geo::LiveGeometry::CellsToEdgeY | ( | TVector3 | vertex | ) |
Definition at line 637 of file LiveGeometry_service.cc.
References CellsToBottom(), CellsToTop(), and std::min().
Referenced by CellsToEdgeXY().
int geo::LiveGeometry::CellsToTop | ( | TVector3 | vertex | ) |
Definition at line 623 of file LiveGeometry_service.cc.
References DistToTop(), fEdgeBottomYZ, fEdgeTopYZ, check_time_usage::float, and fNumCells.
Referenced by CellsToEdgeY().
returns: 0: RH says is bad; 1: good; 2: bad, either BC or DCM drop
Definition at line 1752 of file LiveGeometry_service.cc.
References fDCMs, fEvFlag, and GetEvInfo().
Referenced by evd::GeometryDrawer::DrawBadBoxesPretty().
double geo::LiveGeometry::DistanceToEdgeInMC | ( | TVector3 | vertex, |
int & | wall | ||
) |
Definition at line 1595 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fMCBack, fMCEdge, fMCTop, geom(), InMuonCatcher(), and novadaq::cnv::kNEARDET.
Referenced by CellsToEdgeInMC(), DistToClosestBadRegion(), and trk::CosmicTrackUtilities::PointInDetector().
double geo::LiveGeometry::DistToBack | ( | TVector3 | vertex | ) |
Definition at line 505 of file LiveGeometry_service.cc.
References fBadBoxXZ, fBadBoxYZ, fEdgeBackXZ, fEdgeBackYZ, MECModelEnuComparisons::i, InstrumentedDetBack(), IsPointLive(), std::max(), std::min(), and Z1.
Referenced by slid::LIDTraining::analyze(), DistToEdgeZ(), calib::MuondEdxAna::filter(), calib::StopperSelection::IsContainedStopper(), PlanesToBack(), presel::CosmicVeto::produce(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
double geo::LiveGeometry::DistToBottom | ( | TVector3 | vertex | ) |
Definition at line 547 of file LiveGeometry_service.cc.
References fBadBoxYZ, fEdgeBottomYZ, MECModelEnuComparisons::i, IsPointLive(), std::min(), and Z1.
Referenced by slid::LIDTraining::analyze(), CellsToBottom(), DistToEdgeY(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
double geo::LiveGeometry::DistToClosestBadRegion | ( | TVector3 | vertex | ) |
Definition at line 1772 of file LiveGeometry_service.cc.
References DEFINE_ART_SERVICE, geo::GeometryBase::DetId(), DistanceToEdgeInMC(), stan::math::fabs(), fBadBoxXZ, fBadBoxYZ, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fEvFlag, geom(), GetEvInfo(), MECModelEnuComparisons::i, InMuonCatcher(), IsPointLive(), novadaq::cnv::kNEARDET, std::max(), std::min(), cet::pow(), std::sqrt(), and Z1.
double geo::LiveGeometry::DistToEdgeX | ( | TVector3 | vertex | ) |
Definition at line 562 of file LiveGeometry_service.cc.
References DistToEdgeXMinus(), DistToEdgeXPlus(), and std::min().
Referenced by LightLevels::analyze(), CerenkovResponse::analyze(), DistToEdgeXY(), and dif::DiFShowerFinder::produce().
double geo::LiveGeometry::DistToEdgeXMinus | ( | TVector3 | vertex | ) |
Definition at line 589 of file LiveGeometry_service.cc.
References fBadBoxXZ, fEdgeXMinusXZ, MECModelEnuComparisons::i, IsPointLive(), std::min(), and Z1.
Referenced by slid::LIDTraining::analyze(), CellsToEdgeXMinus(), DistToEdgeX(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
double geo::LiveGeometry::DistToEdgeXPlus | ( | TVector3 | vertex | ) |
Definition at line 575 of file LiveGeometry_service.cc.
References fBadBoxXZ, fEdgeXPlusXZ, MECModelEnuComparisons::i, IsPointLive(), std::min(), and Z1.
Referenced by slid::LIDTraining::analyze(), CellsToEdgeXPlus(), DistToEdgeX(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
double geo::LiveGeometry::DistToEdgeXY | ( | TVector3 | vertex | ) |
Definition at line 568 of file LiveGeometry_service.cc.
References DistToEdgeX(), DistToEdgeY(), and std::min().
Referenced by remid::ReMIdDedxFD::analyze(), LightLevels::analyze(), CerenkovResponse::analyze(), trk::CosmicTrackSelection::DistToEdge(), calib::StopperFilter::filter(), calib::StopperThreshold::FindTrajectoryPoints(), calib::EnergyStandardCandles::IsContained(), calib::StopperSelection::IsContainedStopper(), calib::StopperSelection::IsTrulyContainedStopper(), trk::CosmicTrackUtilities::PointInDetector(), and cosrej::CosRej::produce().
double geo::LiveGeometry::DistToEdgeY | ( | TVector3 | vertex | ) |
Definition at line 526 of file LiveGeometry_service.cc.
References DistToBottom(), DistToTop(), and std::min().
Referenced by DistToEdgeXY(), and dif::DiFShowerFinder::produce().
double geo::LiveGeometry::DistToEdgeZ | ( | TVector3 | vertex | ) |
Definition at line 480 of file LiveGeometry_service.cc.
References DistToBack(), DistToFront(), and std::min().
Referenced by remid::ReMIdDedxFD::analyze(), LightLevels::analyze(), CerenkovResponse::analyze(), trk::CosmicTrackSelection::DistToEdge(), calib::StopperFilter::filter(), calib::MuonTrackHits::filter(), calib::MuondEdxAna::filter(), calib::StopperThreshold::FindTrajectoryPoints(), calib::EnergyStandardCandles::IsContained(), calib::StopperSelection::IsContainedStopper(), calib::StopperSelection::IsTrulyContainedStopper(), trk::CosmicTrackUtilities::PointInDetector(), cosrej::CosRej::produce(), and dif::DiFShowerFinder::produce().
double geo::LiveGeometry::DistToFront | ( | TVector3 | vertex | ) |
Definition at line 486 of file LiveGeometry_service.cc.
References fBadBoxXZ, fBadBoxYZ, fEdgeFrontXZ, fEdgeFrontYZ, MECModelEnuComparisons::i, InstrumentedDetFront(), IsPointLive(), and std::min().
Referenced by LightLevels::analyze(), CerenkovResponse::analyze(), slid::LIDTraining::analyze(), DistToEdgeZ(), calib::MuondEdxAna::filter(), calib::StopperSelection::IsContainedStopper(), PlanesToFront(), presel::CosmicVeto::produce(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
double geo::LiveGeometry::DistToTop | ( | TVector3 | vertex | ) |
Definition at line 532 of file LiveGeometry_service.cc.
References fBadBoxYZ, fEdgeTopYZ, MECModelEnuComparisons::i, IsPointLive(), std::min(), and Z1.
Referenced by LightLevels::analyze(), CerenkovResponse::analyze(), slid::LIDTraining::analyze(), CellsToTop(), DistToEdgeY(), skim::EvaluatorNue::KeepSlice(), cosrej::MakeNueCosRej::produce(), and caf::CAFMaker::produce().
int geo::LiveGeometry::DoWeEnterMC | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1428 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fEdgeXMinusXZ, fEdgeXPlusXZ, fMCBack, fMCEdge, fMCFront, fMCTop, geom(), InMuonCatcher(), geo::IntersectsBox(), novadaq::cnv::kNEARDET, XPositionAtTransition(), and YPositionAtTransition().
Referenced by FullNDProjectedCells(), ProjectedAirDist(), and ProjectedSteelDist().
|
protected |
Fill bad and uninstrumented regions of detector.
Definition at line 1008 of file LiveGeometry_service.cc.
References geo::PlaneGeo::Cell(), om::cout, geo::GeometryBase::DetId(), geo::LiveGeometry::BadBox::edge, allTimeWatchdog::endl, fBadBoxXZ, fBadBoxYZ, fDCMs, fNumCells, fNumDCMs, fNumDiblocks, fParams, geom(), geo::CellGeo::GetCenter(), MECModelEnuComparisons::i, makeTrainCVSamples::int, calib::j, novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, novadaq::cnv::kTESTBEAM, geo::GeometryBase::Plane(), geo::LiveGeometry::BadBox::type, geo::LiveGeometry::Params::Verbose, geo::LiveGeometry::BadBox::XY1, geo::LiveGeometry::BadBox::XY2, geo::LiveGeometry::BadBox::Z1, and geo::LiveGeometry::BadBox::Z2.
Referenced by GetEvInfo().
int geo::LiveGeometry::FullNDProjectedCells | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1538 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), dir, DoWeEnterMC(), allTimeWatchdog::endl, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, geom(), MECModelEnuComparisons::i, InMuonCatcher(), geo::IntersectsBox(), IsPointLive(), novadaq::cnv::kNEARDET, std::max(), std::min(), ProjectedCellsInMC(), ProjectedDistanceInMC(), and ProjectedLiveCellsToEdge().
Referenced by remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), and cosrej::CosRej::produce().
Get the corner of a bad box (hook for evend display)
Definition at line 692 of file LiveGeometry_service.cc.
References fBadBoxXZ, fBadBoxYZ, fEvFlag, GetEvInfo(), and MECModelEnuComparisons::i.
Referenced by evd::GeometryDrawer::DrawBadBoxesExact().
|
protected |
Get bad regions from BadChannels.
Definition at line 812 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fDCMs, fNBadChan, fNDropouts, fNumDCMs, fNumDiblocks, fParams, geom(), MECModelEnuComparisons::i, chaninfo::BadChanList::IsBad(), calib::j, novadaq::cnv::kNEARDET, novadaq::cnv::kTESTBEAM, and geo::LiveGeometry::Params::Verbose.
Referenced by GetEvInfo(), and postBeginSubRun().
|
protected |
Get proper detector boundaries for each view.
Definition at line 917 of file LiveGeometry_service.cc.
References geo::PlaneGeo::Cell(), om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fMCBack, fMCEdge, fMCFront, fMCTop, fNumCells, fNumDiblocks, geom(), geo::CellGeo::GetCenter(), novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, novadaq::cnv::kTESTBEAM, and geo::GeometryBase::Plane().
Referenced by SetupLiveGeo().
|
protected |
Get event by event information.
Definition at line 1762 of file LiveGeometry_service.cc.
References geo::LiveGeometry::Params::CheckBadChannels, fEvFlag, FillBadBoxes(), fNDropouts, fNEvents, fParams, fSetup, fTotalDropouts, GetBCInfo(), and SetupLiveGeo().
Referenced by DCMStatus(), DistToClosestBadRegion(), GetBadBoxCorner(), IsPointLiveInfo(), LiveDetectorVolume(), NBadDCMBC(), NDropouts(), NumBadBoxesX(), NumBadBoxesY(), ProjectedDistance(), SetInstrumentation(), and TotalDropouts().
|
protected |
Get uninstrumented regions from RunHistory.
Definition at line 778 of file LiveGeometry_service.cc.
References om::cout, febshutoff_auto::dcm, nova::dbi::RunHistory::DiBlock::dcm, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fDCMs, fNumDCMs, fNumDiblocks, fParams, geom(), nova::dbi::RunHistory::GetDiBlock(), MECModelEnuComparisons::i, makeTrainCVSamples::int, calib::j, novadaq::cnv::kNEARDET, nova::dbi::RunHistory::NDiBlocks(), nova::dbi::RunHistory::DCM::nInstrumentedFEBs, nova::dbi::RunHistory::DiBlock::num, and geo::LiveGeometry::Params::Verbose.
Referenced by postBeginSubRun(), and SetupLiveGeo().
bool geo::LiveGeometry::InMuonCatcher | ( | TVector3 | vertex | ) |
Definition at line 1413 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fMCBack, fMCEdge, fMCFront, fMCTop, geom(), novadaq::cnv::kNEARDET, and runNovaSAM::ret.
Referenced by DistanceToEdgeInMC(), DistToClosestBadRegion(), DoWeEnterMC(), FullNDProjectedCells(), numusand::NumuSandFxs::getMissingE(), trk::CosmicTrackUtilities::PointInDetector(), ProjectedCellsInMC(), ProjectedDistanceInMC(), and ProjectedSteelDist().
double geo::LiveGeometry::InstrumentedDetBack | ( | ) |
get instrumented detector back of downstream part
Definition at line 1378 of file LiveGeometry_service.cc.
References ana::assert(), geo::GeometryBase::DetId(), fBackDownstream, fEdgeBackXZ, fEdgeBackYZ, check_time_usage::float, fNumDiblocks, geom(), novadaq::cnv::kUNKNOWN_DET, std::max(), and SetInstrumentation().
Referenced by DistToBack(), cosrej::CosRejFxs::getBBC(), calib::FiberCalibration::produce(), and ProjectedDistance().
int geo::LiveGeometry::InstrumentedDetEnds | ( | double & | frontDwnstrm, |
double & | backDwnstrm, | ||
double & | frontUpstrm, | ||
double & | backUpstrm | ||
) |
give all detector ends information; most general
Definition at line 1396 of file LiveGeometry_service.cc.
References ana::assert(), geo::GeometryBase::DetId(), fBackDownstream, fBackUpstream, fEdgeBackXZ, fEdgeBackYZ, fFrontDownstream, fFrontUpstream, check_time_usage::float, fNumDiblocks, geom(), novadaq::cnv::kUNKNOWN_DET, std::max(), and SetInstrumentation().
Referenced by calib::HitEfficiency::beginRun(), and comi::NumiFiltering::filter().
double geo::LiveGeometry::InstrumentedDetFront | ( | ) |
get instrumented detector front of downstream part
Definition at line 1369 of file LiveGeometry_service.cc.
References ana::assert(), geo::GeometryBase::DetId(), fBackDownstream, fEdgeBackXZ, fEdgeBackYZ, fFrontDownstream, check_time_usage::float, fNumDiblocks, geom(), novadaq::cnv::kUNKNOWN_DET, std::max(), and SetInstrumentation().
Referenced by DistToFront(), cosrej::CosRejFxs::getBBC(), calib::FiberCalibration::produce(), and ProjectedDistance().
double geo::LiveGeometry::InstrumentedDetLength | ( | ) |
get instrumented detector length of downstream part
Definition at line 1387 of file LiveGeometry_service.cc.
References ana::assert(), geo::GeometryBase::DetId(), fBackDownstream, fEdgeBackXZ, fEdgeBackYZ, fFrontDownstream, check_time_usage::float, fNumDiblocks, geom(), novadaq::cnv::kUNKNOWN_DET, std::max(), and SetInstrumentation().
Referenced by calib::StopperSelection::IsContainedStopper().
bool geo::LiveGeometry::IsPointLive | ( | TVector3 | vertex | ) |
Note the muon catcher is considered bad; use in combination with InMuonCatcher if needed.
Definition at line 135 of file LiveGeometry_service.cc.
References IsPointLiveInfo(), and LOG_DEBUG.
Referenced by DistToBack(), DistToBottom(), DistToClosestBadRegion(), DistToEdgeXMinus(), DistToEdgeXPlus(), DistToFront(), DistToTop(), FullNDProjectedCells(), numusand::NumuSandFxs::getMissingE(), calib::MakeZBoundaryMap(), ProjectedCellsToNextBadRegion(), ProjectedDistance(), and ProjectedDistanceToNextBadRegion().
bool geo::LiveGeometry::IsPointLiveInfo | ( | TVector3 | vertex, |
int & | info | ||
) |
Note the muon catcher is considered bad; use in combination with InMuonCatcher if needed.
Definition at line 82 of file LiveGeometry_service.cc.
References fBadBoxXZ, fBadBoxYZ, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fEvFlag, GetEvInfo(), MECModelEnuComparisons::i, LOG_DEBUG, std::max(), std::min(), and Z1.
Referenced by IsPointLive(), and ProjectedDistance().
double geo::LiveGeometry::LiveDetectorVolume | ( | ) |
in ktons
Definition at line 669 of file LiveGeometry_service.cc.
References fEvFlag, fMassKtons, fNumChannels, GetEvInfo(), and nova::dbi::RunHistory::NActiveChannels().
|
inline |
Z position at which the muon catcher starts.
Definition at line 130 of file LiveGeometry.h.
References fMCFront.
Referenced by cosrej::CosRej::produce().
int geo::LiveGeometry::NBadDCMBC | ( | ) |
Definition at line 1731 of file LiveGeometry_service.cc.
References fEvFlag, fNBadChan, and GetEvInfo().
Referenced by caf::CAFMaker::FillSpillVars(), and numusand::FillSandbox::produce().
int geo::LiveGeometry::NDropouts | ( | ) |
Definition at line 1738 of file LiveGeometry_service.cc.
References fEvFlag, fNDropouts, and GetEvInfo().
Referenced by skim::CellHitSkimmer::CheckEvent(), dqsf::DQSpillFlags::FillCountVars(), and numusand::FillSandbox::produce().
int geo::LiveGeometry::NumBadBoxesX | ( | ) |
Size of the vector of bad boxes in the XZ view.
Definition at line 677 of file LiveGeometry_service.cc.
References fBadBoxXZ, fEvFlag, and GetEvInfo().
Referenced by evd::GeometryDrawer::DrawBadBoxesExact().
int geo::LiveGeometry::NumBadBoxesY | ( | ) |
Size of the vector of bad boxes in the YZ view.
Definition at line 684 of file LiveGeometry_service.cc.
References fBadBoxYZ, fEvFlag, and GetEvInfo().
Referenced by evd::GeometryDrawer::DrawBadBoxesExact().
int geo::LiveGeometry::PlanesToBack | ( | TVector3 | vertex | ) |
Definition at line 656 of file LiveGeometry_service.cc.
References DistToBack(), fEdgeBackXZ, fEdgeFrontXZ, check_time_usage::float, and fNumDiblocks.
Referenced by PlanesToEdge().
int geo::LiveGeometry::PlanesToEdge | ( | TVector3 | vertex | ) |
Definition at line 663 of file LiveGeometry_service.cc.
References std::min(), PlanesToBack(), and PlanesToFront().
int geo::LiveGeometry::PlanesToFront | ( | TVector3 | vertex | ) |
Definition at line 649 of file LiveGeometry_service.cc.
References DistToFront(), fEdgeBackXZ, fEdgeFrontXZ, check_time_usage::float, and fNumDiblocks.
Referenced by PlanesToEdge().
void geo::LiveGeometry::postBeginSubRun | ( | art::SubRun const & | subrun | ) |
Definition at line 54 of file LiveGeometry_service.cc.
References geo::LiveGeometry::Params::CheckBadChannels, fDCMs, fParams, fSetup, GetBCInfo(), GetRHInfo(), MECModelEnuComparisons::i, and calib::j.
Referenced by LiveGeometry().
void geo::LiveGeometry::preBeginEvent | ( | art::Event const & | evt | ) |
Definition at line 72 of file LiveGeometry_service.cc.
References fEvFlag, fWall, and geom().
Referenced by LiveGeometry().
double geo::LiveGeometry::ProjectedAirDist | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1656 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), DoWeEnterMC(), allTimeWatchdog::endl, fMCFront, fMCTop, geom(), and novadaq::cnv::kNEARDET.
Referenced by cosrej::CosRej::produce().
int geo::LiveGeometry::ProjectedCellsInMC | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1503 of file LiveGeometry_service.cc.
References geo::GeometryBase::CountCellsOnLineFast(), om::cout, geo::GeometryBase::DetId(), dir, febshutoff_auto::end, allTimeWatchdog::endl, stan::math::fabs(), fMCEdge, fMCFront, geom(), InMuonCatcher(), novadaq::cnv::kNEARDET, ProjectedDistanceInMC(), XPositionAtTransition(), and YPositionAtTransition().
Referenced by FullNDProjectedCells().
int geo::LiveGeometry::ProjectedCellsToEdge | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 437 of file LiveGeometry_service.cc.
References geo::GeometryBase::CountCellsOnLineFast(), dir, geom(), and ProjectedDistance().
int geo::LiveGeometry::ProjectedCellsToNextBadRegion | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 450 of file LiveGeometry_service.cc.
References geo::GeometryBase::CountCellsOnLineFast(), dir, geom(), IsPointLive(), and ProjectedDistance().
bool geo::LiveGeometry::ProjectedDistance | ( | TVector3 | vertex, |
TVector3 | dir, | ||
double & | distToEdge, | ||
double & | distToNextBad, | ||
double & | distDead | ||
) |
Definition at line 227 of file LiveGeometry_service.cc.
References d, dir, fBadBoxXZ, fBadBoxYZ, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fEvFlag, fWall, GetEvInfo(), MECModelEnuComparisons::i, InstrumentedDetBack(), InstrumentedDetFront(), IsPointLive(), IsPointLiveInfo(), std::max(), std::min(), geo::ProjectToBoxEdgeFromOutside(), r(), ss, Z1, and Z2.
Referenced by ProjectedCellsToEdge(), ProjectedCellsToNextBadRegion(), ProjectedDistanceToEdge(), ProjectedDistanceToNextBadRegion(), ProjectedLiveCellsToEdge(), and ProjectedLiveDistanceToEdge().
double geo::LiveGeometry::ProjectedDistanceInMC | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1455 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, stan::math::fabs(), fMCBack, fMCEdge, fMCFront, fMCTop, geom(), InMuonCatcher(), novadaq::cnv::kNEARDET, std::min(), XPositionAtTransition(), and YPositionAtTransition().
Referenced by FullNDProjectedCells(), and ProjectedCellsInMC().
double geo::LiveGeometry::ProjectedDistanceToEdge | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 205 of file LiveGeometry_service.cc.
References ProjectedDistance().
Referenced by trk::CosmicTrackUtilities::TrueLengthEndPoints().
double geo::LiveGeometry::ProjectedDistanceToNextBadRegion | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 212 of file LiveGeometry_service.cc.
References IsPointLive(), and ProjectedDistance().
int geo::LiveGeometry::ProjectedLiveCellsToEdge | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
recommended projection to use
Definition at line 465 of file LiveGeometry_service.cc.
References geo::GeometryBase::CountCellsOnLineFast(), dir, geom(), and ProjectedDistance().
Referenced by remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedxFD::ContainedEvent(), FullNDProjectedCells(), nuesand::FillNueSandbox::GetMincell(), and cosrej::CosRej::produce().
double geo::LiveGeometry::ProjectedLiveDistanceToEdge | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 220 of file LiveGeometry_service.cc.
References ProjectedDistance().
Referenced by cosrej::CosRejFxs::getCVVars(), presel::CosmicVeto::produce(), and cosrej::CosRej::produce().
double geo::LiveGeometry::ProjectedSteelDist | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1683 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), DoWeEnterMC(), allTimeWatchdog::endl, fMCBack, fMCEdge, fMCFront, geom(), GetName(), MECModelEnuComparisons::i, InMuonCatcher(), novadaq::cnv::kNEARDET, geo::GeometryBase::MaterialsBetweenPoints(), plot_validation_datamc::p1, plot_validation_datamc::p2, std::sqrt(), XPositionAtTransition(), and YPositionAtTransition().
Referenced by cosrej::CosRej::produce().
int geo::LiveGeometry::ProjectedWall | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
if we assume the downstream InstrumentedDetEnds, what wall would this projected track exit from?
Definition at line 150 of file LiveGeometry_service.cc.
References geo::GeometryBase::DetLength(), fBackDownstream, fEdgeBottomYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fFrontDownstream, check_time_usage::float, fNumDiblocks, geom(), and SetInstrumentation().
Referenced by nuesand::FillNueSandbox::GetMincell().
void geo::LiveGeometry::SetInstrumentation | ( | ) |
calculate the detector end information
Definition at line 1284 of file LiveGeometry_service.cc.
References ana::assert(), om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fBackDownstream, fBackUpstream, fEvFlag, fFrontDownstream, fFrontUpstream, fNumDiblocks, geom(), nova::dbi::RunHistory::GetDataType(), nova::dbi::RunHistory::GetDiBlock(), GetEvInfo(), MECModelEnuComparisons::i, nova::dbi::RunHistory::IsDiBlockFullyInstrumented(), novadaq::cnv::kUNKNOWN_DET, nova::dbi::RunHistory::NDiBlocks(), and nova::dbi::RunHistory::DiBlock::num.
Referenced by InstrumentedDetBack(), InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), and ProjectedWall().
|
protected |
Necessary set up before anything; get boudnaries, find and fill bad boxes.
Definition at line 715 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fDCMs, fEdgeBackXZ, fEdgeBackYZ, fEdgeBottomYZ, fEdgeFrontXZ, fEdgeFrontYZ, fEdgeTopYZ, fEdgeXMinusXZ, fEdgeXPlusXZ, fMassKtons, fNumCells, fNumChannels, fNumDCMs, fNumDiblocks, fParams, fSetup, geom(), GetDetectorEdges(), GetRHInfo(), MECModelEnuComparisons::i, calib::j, novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, novadaq::cnv::kTESTBEAM, and geo::LiveGeometry::Params::Verbose.
Referenced by GetEvInfo().
int geo::LiveGeometry::TotalDropouts | ( | ) |
Definition at line 1745 of file LiveGeometry_service.cc.
References fEvFlag, fTotalDropouts, and GetEvInfo().
double geo::LiveGeometry::XPositionAtTransition | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1571 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fMCFront, geom(), and novadaq::cnv::kNEARDET.
Referenced by DoWeEnterMC(), ProjectedCellsInMC(), ProjectedDistanceInMC(), and ProjectedSteelDist().
double geo::LiveGeometry::YPositionAtTransition | ( | TVector3 | vertex, |
TVector3 | dir | ||
) |
Definition at line 1583 of file LiveGeometry_service.cc.
References om::cout, geo::GeometryBase::DetId(), allTimeWatchdog::endl, fMCFront, geom(), and novadaq::cnv::kNEARDET.
Referenced by remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), DoWeEnterMC(), cosrej::CosRej::produce(), ProjectedCellsInMC(), ProjectedDistanceInMC(), and ProjectedSteelDist().
|
protected |
Definition at line 147 of file LiveGeometry.h.
Referenced by InstrumentedDetBack(), InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), ProjectedWall(), and SetInstrumentation().
|
protected |
Definition at line 145 of file LiveGeometry.h.
Referenced by InstrumentedDetEnds(), and SetInstrumentation().
|
protected |
Definition at line 169 of file LiveGeometry.h.
Referenced by DistToBack(), DistToClosestBadRegion(), DistToEdgeXMinus(), DistToEdgeXPlus(), DistToFront(), FillBadBoxes(), GetBadBoxCorner(), IsPointLiveInfo(), NumBadBoxesX(), and ProjectedDistance().
|
protected |
Definition at line 169 of file LiveGeometry.h.
Referenced by DistToBack(), DistToBottom(), DistToClosestBadRegion(), DistToFront(), DistToTop(), FillBadBoxes(), GetBadBoxCorner(), IsPointLiveInfo(), NumBadBoxesY(), and ProjectedDistance().
|
protected |
Definition at line 142 of file LiveGeometry.h.
|
protected |
Definition at line 143 of file LiveGeometry.h.
Referenced by DCMStatus(), FillBadBoxes(), GetBCInfo(), GetRHInfo(), postBeginSubRun(), and SetupLiveGeo().
|
protected |
Definition at line 134 of file LiveGeometry.h.
Referenced by DistToBack(), DistToClosestBadRegion(), FullNDProjectedCells(), GetDetectorEdges(), InstrumentedDetBack(), InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), IsPointLiveInfo(), PlanesToBack(), PlanesToFront(), ProjectedDistance(), and SetupLiveGeo().
|
protected |
Definition at line 135 of file LiveGeometry.h.
Referenced by DistToBack(), DistToClosestBadRegion(), FullNDProjectedCells(), GetDetectorEdges(), InstrumentedDetBack(), InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), IsPointLiveInfo(), ProjectedDistance(), and SetupLiveGeo().
|
protected |
proper 2D detector boundaries in YZ
Definition at line 135 of file LiveGeometry.h.
Referenced by CellsToBottom(), CellsToTop(), DistToBottom(), DistToClosestBadRegion(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), ProjectedDistance(), ProjectedWall(), and SetupLiveGeo().
|
protected |
Definition at line 134 of file LiveGeometry.h.
Referenced by DistToClosestBadRegion(), DistToFront(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), PlanesToBack(), PlanesToFront(), ProjectedDistance(), and SetupLiveGeo().
|
protected |
Definition at line 135 of file LiveGeometry.h.
Referenced by DistToClosestBadRegion(), DistToFront(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), ProjectedDistance(), and SetupLiveGeo().
|
protected |
Definition at line 135 of file LiveGeometry.h.
Referenced by CellsToBottom(), CellsToTop(), DistToClosestBadRegion(), DistToTop(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), ProjectedDistance(), ProjectedWall(), and SetupLiveGeo().
|
protected |
Definition at line 134 of file LiveGeometry.h.
Referenced by CellsToEdgeXMinus(), CellsToEdgeXPlus(), DistToClosestBadRegion(), DistToEdgeXMinus(), DoWeEnterMC(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), ProjectedDistance(), ProjectedWall(), and SetupLiveGeo().
|
protected |
proper 2D detector boundaries in XZ
Definition at line 134 of file LiveGeometry.h.
Referenced by CellsToEdgeXMinus(), CellsToEdgeXPlus(), DistToClosestBadRegion(), DistToEdgeXPlus(), DoWeEnterMC(), FullNDProjectedCells(), GetDetectorEdges(), IsPointLiveInfo(), ProjectedDistance(), ProjectedWall(), and SetupLiveGeo().
|
protected |
have we read in information for this event yet? (don't use preBeginEvent since race w/ BadChan)
Definition at line 141 of file LiveGeometry.h.
Referenced by DCMStatus(), DistToClosestBadRegion(), GetBadBoxCorner(), GetEvInfo(), IsPointLiveInfo(), LiveDetectorVolume(), NBadDCMBC(), NDropouts(), NumBadBoxesX(), NumBadBoxesY(), preBeginEvent(), ProjectedDistance(), SetInstrumentation(), and TotalDropouts().
|
protected |
Definition at line 146 of file LiveGeometry.h.
Referenced by InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), ProjectedWall(), and SetInstrumentation().
|
protected |
Definition at line 144 of file LiveGeometry.h.
Referenced by InstrumentedDetEnds(), and SetInstrumentation().
|
protected |
Definition at line 157 of file LiveGeometry.h.
Referenced by LiveDetectorVolume(), and SetupLiveGeo().
|
protected |
Definition at line 136 of file LiveGeometry.h.
Referenced by DistanceToEdgeInMC(), DoWeEnterMC(), GetDetectorEdges(), InMuonCatcher(), ProjectedDistanceInMC(), and ProjectedSteelDist().
|
protected |
Definition at line 136 of file LiveGeometry.h.
Referenced by DistanceToEdgeInMC(), DoWeEnterMC(), GetDetectorEdges(), InMuonCatcher(), ProjectedCellsInMC(), ProjectedDistanceInMC(), and ProjectedSteelDist().
|
protected |
Definition at line 136 of file LiveGeometry.h.
Referenced by DoWeEnterMC(), GetDetectorEdges(), InMuonCatcher(), MCFrontZ(), ProjectedAirDist(), ProjectedCellsInMC(), ProjectedDistanceInMC(), ProjectedSteelDist(), XPositionAtTransition(), and YPositionAtTransition().
|
protected |
muon catcher boundaries
Definition at line 136 of file LiveGeometry.h.
Referenced by DistanceToEdgeInMC(), DoWeEnterMC(), GetDetectorEdges(), InMuonCatcher(), ProjectedAirDist(), and ProjectedDistanceInMC().
|
protected |
Definition at line 156 of file LiveGeometry.h.
Referenced by GetBCInfo(), and NBadDCMBC().
|
protected |
Definition at line 153 of file LiveGeometry.h.
Referenced by GetBCInfo(), GetEvInfo(), and NDropouts().
|
protected |
Definition at line 155 of file LiveGeometry.h.
Referenced by GetEvInfo(), and ~LiveGeometry().
|
protected |
Definition at line 150 of file LiveGeometry.h.
Referenced by CellsToBottom(), CellsToEdgeXMinus(), CellsToEdgeXPlus(), CellsToTop(), FillBadBoxes(), GetDetectorEdges(), and SetupLiveGeo().
|
protected |
Definition at line 151 of file LiveGeometry.h.
Referenced by LiveDetectorVolume(), and SetupLiveGeo().
|
protected |
Definition at line 149 of file LiveGeometry.h.
Referenced by FillBadBoxes(), GetBCInfo(), GetRHInfo(), and SetupLiveGeo().
|
protected |
Definition at line 148 of file LiveGeometry.h.
Referenced by FillBadBoxes(), GetBCInfo(), GetDetectorEdges(), GetRHInfo(), InstrumentedDetBack(), InstrumentedDetEnds(), InstrumentedDetFront(), InstrumentedDetLength(), PlanesToBack(), PlanesToFront(), ProjectedWall(), SetInstrumentation(), and SetupLiveGeo().
|
protected |
Definition at line 138 of file LiveGeometry.h.
Referenced by FillBadBoxes(), GetBCInfo(), GetEvInfo(), GetRHInfo(), postBeginSubRun(), and SetupLiveGeo().
|
protected |
have we done setup yet this run
Definition at line 140 of file LiveGeometry.h.
Referenced by GetEvInfo(), LiveGeometry(), postBeginSubRun(), SetupLiveGeo(), and ~LiveGeometry().
|
protected |
Definition at line 154 of file LiveGeometry.h.
Referenced by GetEvInfo(), TotalDropouts(), and ~LiveGeometry().
|
protected |
Definition at line 152 of file LiveGeometry.h.
Referenced by preBeginEvent(), and ProjectedDistance().