Encapsulate the cell geometry. More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-18/GeometryObjects/CellGeo.h"
Public Member Functions | |
CellGeo (const std::vector< const TGeoNode * > &n, int depth) | |
Construct a cell geometry. More... | |
~CellGeo () | |
void | GetCenter (double *xyz, double localz=0.0) const |
void | GetCenter (TVector3 &xyz, double localz=0.0) const |
double | DistToReadOut (double localz) const |
double | HalfW () const |
double | HalfL () const |
double | HalfD () const |
void | LocalToWorld (const double *local, double *world) const |
void | LocalToWorldVect (const double *local, double *world) const |
void | WorldToLocal (const double *local, double *world) const |
void | WorldToLocalVect (const double *local, double *world) const |
void | TranslateCell (double dx, double dy=0, double dz=0) |
void | TranslateCell (TGeoCombiTrans *comb) |
void | RestoreOriginal () |
Restore geometry to original. More... | |
const TGeoNode * | Node () const |
const CellUniqueId & | Id () const |
Static Public Member Functions | |
static void | clear () |
Private Member Functions | |
TGeoHMatrix | GetGeoMatrix () const |
Transformation matrix to world frame. More... | |
Private Attributes | |
CellUniqueId | fId |
Node ID number. More... | |
const TGeoNode * | fCellNode |
Pointer to the cell node. More... | |
TGeoHMatrix * | fTranslatedMatrix |
Adjusted matrix, if TranslateCell() has been called. More... | |
int | fParentMatrixIdx |
Index into fgParentMatrices. More... | |
Static Private Attributes | |
static std::vector< TGeoHMatrix > | fgParentMatrices |
Collection of unique parent matrices seen. More... | |
Encapsulate the cell geometry.
A note on the cell geometry: Cells are constructed such that, in their local frame, their profile occupies the x-y plane with their long dimension running along the z-axis. The dimension transverse to the beam runs along the local x and is called the width. The dimension parallel to the beam runs along the local y and is called the depth. The length of the cell runs along the local z-axis with z increasing as one moves toward the readout end of the cell.
geo::CellGeo::CellGeo | ( | const std::vector< const TGeoNode * > & | n, |
int | depth | ||
) |
Construct a cell geometry.
Definition at line 23 of file CellGeo.cxx.
References om::cerr, allTimeWatchdog::endl, fCellNode, fgParentMatrices, fId, fParentMatrixIdx, MECModelEnuComparisons::i, and geo::NodesToUniqueId().
geo::CellGeo::~CellGeo | ( | ) |
Definition at line 70 of file CellGeo.cxx.
References fTranslatedMatrix.
|
inlinestatic |
Definition at line 57 of file CellGeo.h.
References fgParentMatrices.
Referenced by geo::GeometryBase::LoadGeometryFile().
double geo::CellGeo::DistToReadOut | ( | double | localz | ) | const |
Return the distance from a point in the cell to the read out side of the cell
localz | : Z position in cm in local cell frame |
Definition at line 184 of file CellGeo.cxx.
References HalfL().
void geo::CellGeo::GetCenter | ( | double * | xyz, |
double | localz = 0.0 |
||
) | const |
Return the center position of a cell.
xyz | : 3-D array. The returned location. |
localz | : Distance along the length of the cell (cm). Default is center of cell |
Definition at line 159 of file CellGeo.cxx.
References LocalToWorld().
Referenced by geo::GeometryTest::analyze(), slicer::S4DParamCalc::analyze(), mcchk::RockAna::analyze(), align::Alignment::analyze(), sn::SNSlicerAna::analyze(), calib::HitEfficiency::analyze(), trk::KalmanTrackAna::analyze(), remid::ReMIdDedxRock::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), calib::CalibAna::ApproximateHitPos(), trk::KalmanTrackMerge::CanJoinTracks(), geo::GeometryBase::CellInfo(), dt::Chunk::CellMeasurements(), geo::GeometryBase::CellTpos(), geo::GeometryBase::ClosestApproach(), dt::Cand::ClosestToEndCell(), geo::GeometryBase::CountCellsOnLineFast(), murem::TrackCleanUpAlg::DeDxInPlane(), evd::GeometryDrawer::DrawCells2D(), evd::GeometryDrawer::DrawHighlightCell(), geo::LiveGeometry::FillBadBoxes(), bpfit::BreakPoint::FillHitList(), trk::KalmanGeoHelper::fillprivategeo(), bsf::BremShowerFilter::filter(), trk::KalmanTrack::FindTracks(), trident::DimuonSliceAna::FindVertex(), bpfit::DimuonFitter::FindVertexZ(), trk::CosmicTrackUtilities::FindZBoundaries(), calib::FindZBoundaries(), bpfit::DimuonFitter::FitView(), trk::WindowTrackingAlg::FitWindow(), evd::GeometryDrawer::GetBox(), jmshower::RecoJMShower::GetCellDistToPoint(), jmshower::RecoJMShower::GetCellDistToTrk(), slid::ParticleIDAlg::GetCellNodePos(), jmshower::RecoJMShower::GetCellNodePos(), GetCenter(), evd::RecoBaseDrawer::GetClusterOutlinesConvexHull(), geo::LiveGeometry::GetDetectorEdges(), skim::ParametersNumu::GetDetectorEdges(), airshower::AirSlicer::GetHitPos(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), ndreco::NDRecoFxs::getTrackActivity(), ndreco::NDRecoFxs::getTrackDedx(), jmshower::JMShower::GetTransHits(), jmshower::RecoJMShower::GetTrkHitPath(), jmshower::RecoJMShower::GetTrkHitPos(), jmshower::RecoJMShower::GetTrkPlaneCell(), jmshower::RecoJMShower::GetTrkPlaneDistToEdge(), jmshower::RecoJMShower::GetTrkPlanePos(), calib::GetXYZD(), rb::HitList::HitList(), dt::Chunk::HitsOnLine(), nerd::NERDProng::HitToHitDistance(), me::MEFinder::HitToHitDistance(), bsf::BremShowerFilter::inFiducial(), dif::DiFShowerFinder::inFiducial(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), lem::FindLEMMatches::MatchToVertex(), lem::LEM::MatchToVertex(), zcl::SMMCluster::MissC(), numue::NumuEAlg::NumuEAlg(), trk::CosmicTrackUtilities::PathLengthInCell(), calib::PathLengthInCell(), geo::plane_sort(), rb::Track::PlaneDirMap(), slid::ParticleIDAlg::PlaneHitCell(), slid::ParticleIDAlg::PlaneHitXYZ(), hv::HoughVertex::produce(), trk::KalmanTrack::produce(), trk::KalmanTrackMerge::produce(), jmshower::JMTrackMerge::produce(), zcl::SMMCluster::produce(), vdt::VertexDT::produce(), cvn::RegCVNMapper::produce(), cheat::MCCheater::produce(), remid::RecoMuon::produce(), evd::RawDataDrawer::RawDigit2D(), jmshower::RecoJMShower::RecoShowers(), trk::RLFit::RLFit(), hough::MultiHoughT::Scrub(), earms::ElasticArmsHS::Scrub(), vdt::VertexDT::Scrub(), fuzz::FuzzyKVertex::Scrub(), trk::KalmanTrackMerge::ShiftInterpolationPoints(), trk::WindowTrackingAlg::ShortTrackExtraPlane(), geo::sort_hori(), geo::sort_vert(), murem::TrackCleanUpAlg::SortByDistFromTrack(), geo::GeometryTest::testCellId(), geo::GeometryTest::testCellIdFromPos(), geo::GeometryTest::testCellPos(), slid::NuEEnergyAlg::VertexEnergy(), and lem::VertexToPlaneAndCell().
void geo::CellGeo::GetCenter | ( | TVector3 & | xyz, |
double | localz = 0.0 |
||
) | const |
Return the center position of a cell.
xyz | :a Tvector3 object. The returned location. |
localz | : Distance along the length of the cell (cm). Default is center of cell |
Definition at line 170 of file CellGeo.cxx.
References GetCenter().
|
private |
Transformation matrix to world frame.
Definition at line 211 of file CellGeo.cxx.
References fCellNode, fgParentMatrices, fParentMatrixIdx, fTranslatedMatrix, and runNovaSAM::ret.
Referenced by LocalToWorld(), LocalToWorldVect(), TranslateCell(), WorldToLocal(), and WorldToLocalVect().
double geo::CellGeo::HalfD | ( | ) | const |
Definition at line 205 of file CellGeo.cxx.
References fCellNode.
Referenced by dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), geo::GeometryTest::analyze(), remid::ReMIdDedxRock::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), trk::CosmicTrackAna::analyze(), trk::CosmicTrackAna::beginJob(), calib::BestPathEstimates(), slid::ParticleIDAlg::CalcTrkHitPath(), trk::KalmanTrackMerge::CanJoinTracks(), geo::GeometryBase::CellInfo(), dt::Chunk::CellMeasurements(), geo::GeometryBase::CountCellsOnLineFast(), murem::TrackCleanUpAlg::DeDxInPlane(), evd::GeometryDrawer::DrawCells2D(), evd::GeometryDrawer::DrawHighlightCell(), calib::BetheBlochFit::endJob(), dif::DiFShowerFinder::eparm(), calib::StopperThreshold::FillHist(), bpfit::BreakPoint::FillHitList(), trk::KalmanGeoHelper::fillprivategeo(), calib::StopperThreshold::FillTree(), bsf::BremShowerFilter::filter(), trk::WindowTrackingAlg::FindEndPoint(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), trk::KalmanTrack::FindTracks(), trk::CosmicTrackUtilities::FindZBoundaries(), calib::FindZBoundaries(), evd::GeometryDrawer::GetBox(), evd::RecoBaseDrawer::GetClusterOutlinesConvexHull(), nuesand::FillNueSandbox::GetdEdx(), jmshower::RecoJMShower::GetTrkHitPath(), rb::HitList::HitList(), dt::Chunk::HitsOnLine(), bsf::BremShowerFilter::inFiducial(), dif::DiFShowerFinder::inFiducial(), skim::EvaluatorNue::KeepSlice(), trk::CosmicTrackAlg::MakeTrack(), trk::WindowTrackingAlg::MakeTrack(), calib::MakeZBoundaryMap(), trk::KalmanGeoHelper::MatchTrajectoryToPlane(), dif::DiFShowerFinder::muonstub(), trk::CosmicTrackUtilities::PathLengthInCell(), calib::PathLengthInCell(), hv::HoughVertex::produce(), trk::KalmanTrack::produce(), trk::KalmanTrackMerge::produce(), remid::RecoMuon::produce(), caf::CAFMaker::produce(), evd::RawDataDrawer::RawDigit2D(), jmshower::RecoJMShower::RecoShowers(), trk::KalmanTrackMerge::ShiftInterpolationPoints(), calib::StopperThreshold::testPath(), trk::KalmanTrackMerge::ViewMergeTracks(), and calib::ZBounds().
double geo::CellGeo::HalfL | ( | ) | const |
Definition at line 198 of file CellGeo.cxx.
References fCellNode.
Referenced by geo::GeometryTest::analyze(), LightLevels::analyze(), trk::CosmicTrackAna::beginJob(), geo::GeometryBase::CellInfo(), geo::GeometryBase::ClosestApproach(), LightLevels::CreateHistos(), geo::GeometryBase::DistToElectronics(), DistToReadOut(), calib::Calibrator::GetAttenCurve(), align::SplitTracks::GetCellEndpoints(), calib::CosmicCalib::GetChannelHists(), calib::MakeAttenuationProfiles::GetChannelHists(), photrans::ImprovedTransport::GetPosCorr(), jmshower::RecoJMShower::GetTrkHitPath(), calib::AttenCache::LoadFromDatabase(), trk::CosmicTrackUtilities::PathLengthInCell(), calib::PathLengthInCell(), trk::KalmanTrack::produce(), trk::KalmanTrackMerge::produce(), photrans::PhotonTransport::produce(), and photrans::ImprovedTransport::StepAlongHit().
double geo::CellGeo::HalfW | ( | ) | const |
Definition at line 191 of file CellGeo.cxx.
References fCellNode.
Referenced by geo::GeometryTest::analyze(), calib::HitEfficiency::analyze(), remid::ReMIdDedxRock::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), trk::CosmicTrackAna::beginJob(), calib::BestPathEstimates(), trk::KalmanTrackMerge::CanJoinTracks(), geo::GeometryBase::CellInfo(), dt::Chunk::CellMeasurements(), geo::GeometryBase::CountCellsOnLineFast(), trk::KalmanGeoHelper::CountMissedCellsOnLine(), evd::GeometryDrawer::DrawCells2D(), evd::GeometryDrawer::DrawHighlightCell(), bpfit::BreakPoint::FillHitList(), trk::CosmicTrackAna::FillTrackHistograms(), calib::FindBelowThresholdCalibCandidates(), trk::KalmanTrack::FindTracks(), bpfit::DimuonFitter::FitView(), evd::GeometryDrawer::GetBox(), evd::RecoBaseDrawer::GetClusterOutlinesConvexHull(), jmshower::JMShower::GetTransHits(), jmshower::RecoJMShower::GetTrkPlaneCell(), rb::HitList::HitList(), dt::Chunk::HitsOnLine(), skim::EvaluatorNue::KeepSlice(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), trk::KalmanGeoHelper::MatchTrajectoryToPlane(), trk::CosmicTrackUtilities::PathLengthInCell(), calib::PathLengthInCell(), slid::ParticleIDAlg::PlaneHitCell(), hv::HoughVertex::produce(), trk::KalmanTrack::produce(), trk::KalmanTrackMerge::produce(), slid::Recluster::produce(), remid::RecoMuon::produce(), caf::CAFMaker::produce(), and evd::RawDataDrawer::RawDigit2D().
|
inline |
Definition at line 55 of file CellGeo.h.
References fId.
Referenced by geo::GeometryBase::BuildMaps(), geo::GeometryBase::DistToElectronics(), calib::MakeAttenuationProfiles::event(), trk::CosmicTrackAna::FillTrackHistograms(), calib::CosmicCalib::filter(), photrans::PhotonTransport::produce(), photrans::ImprovedTransport::StepAlongHit(), geo::GeometryTest::testCellId(), geo::GeometryTest::testCellIdFromPos(), geo::GeometryTest::testUniqueId(), and trk::CosmicTrackUtilities::TruePathLengthInCell().
void geo::CellGeo::LocalToWorld | ( | const double * | local, |
double * | world | ||
) | const |
Transform a position from local frame to world frame
local | : 3D array. Position in the local frame Input. |
world | : 3D array. Position in the world frame. Returned. |
Definition at line 80 of file CellGeo.cxx.
References GetGeoMatrix().
Referenced by zcl::SMMTriggerAna::analyze(), mcchk::CosmicAna::analyze(), calib::AssessCalib::analyze(), zcl::FmmTrackerValidation::analyze(), htk::HoughTrack::analyze(), mcchk::ShowerAnaCheck::EMMoliereRadius(), mcchk::ShowerAnaCheck::EMShowerWidth(), align::SplitTracks::GeoEstimatePos(), align::SplitTracks::GetCellEndpoints(), GetCenter(), zcl::SMMCluster::produce(), cheat::MCCheater::produce(), geo::GeometryTest::testFindCell(), and geo::GeometryTest::testStepping().
void geo::CellGeo::LocalToWorldVect | ( | const double * | local, |
double * | world | ||
) | const |
Transform a 3-vector from local frame to world frame
local | : 3D array. Position in the local frame Input. |
world | : 3D array. Position in the world frame. Returned. |
Definition at line 90 of file CellGeo.cxx.
References GetGeoMatrix().
Referenced by geo::GeometryTest::testFindCell(), and geo::GeometryTest::testStepping().
|
inline |
void geo::CellGeo::RestoreOriginal | ( | ) |
Restore geometry to original.
Definition at line 148 of file CellGeo.cxx.
References fTranslatedMatrix.
void geo::CellGeo::TranslateCell | ( | double | dx, |
double | dy = 0 , |
||
double | dz = 0 |
||
) |
Translate plane and all cells in plane by dx, dy and dz New transform will be stored in a separate TGeoHMatrix
Set rotation angles to 0 for now
Build the translation and rotation matrices phi, theta and psi are euler angles
dx, dy and dz are the translations we want
Definition at line 117 of file CellGeo.cxx.
References chisquared::theta.
void geo::CellGeo::TranslateCell | ( | TGeoCombiTrans * | comb | ) |
Translate plane using a previously defined TGeoCombiTrans New transform will be stored in a separate TGeoHMatrix
Definition at line 138 of file CellGeo.cxx.
References fTranslatedMatrix, and GetGeoMatrix().
void geo::CellGeo::WorldToLocal | ( | const double * | local, |
double * | world | ||
) | const |
Transform a position from world frame to local frame
world | : 3D array. Position in the world frame. Input. |
local | : 3D array. Position in the local frame Returned. |
Definition at line 100 of file CellGeo.cxx.
References GetGeoMatrix().
Referenced by calib::GetXYZD(), and g4n::FLSHitListAction::SteppingAction().
void geo::CellGeo::WorldToLocalVect | ( | const double * | local, |
double * | world | ||
) | const |
Transform a 3-vector from world frame to local frame
world | : 3D array. Position in the world frame. Input. |
local | : 3D array. Position in the local frame Returned. |
Definition at line 110 of file CellGeo.cxx.
References GetGeoMatrix().
|
private |
|
staticprivate |
Collection of unique parent matrices seen.
Definition at line 70 of file CellGeo.h.
Referenced by CellGeo(), clear(), and GetGeoMatrix().
|
private |
|
private |
Index into fgParentMatrices.
Definition at line 68 of file CellGeo.h.
Referenced by CellGeo(), and GetGeoMatrix().
|
private |
Adjusted matrix, if TranslateCell() has been called.
Definition at line 65 of file CellGeo.h.
Referenced by GetGeoMatrix(), RestoreOriginal(), TranslateCell(), and ~CellGeo().