UgliGeomHandle Class Reference

#include <UgliGeomHandle.h>

Inheritance diagram for UgliGeomHandle:

UgliGeomABC List of all members.

Public Member Functions

 UgliGeomHandle (const VldContext &vldc, Ugli::EModifyMode mmode=Ugli::kUseGlobal, Geo::EAppType apptype=Geo::kRecons)
 UgliGeomHandle (const UgliGeomHandle &that)
UgliGeomHandleoperator= (const UgliGeomHandle &ugh)
 UgliGeomHandle ()
virtual ~UgliGeomHandle ()
virtual void ResetVldContext (const VldContext &vldc)
virtual Bool_t IsGeo () const
virtual Bool_t IsValid () const
virtual Bool_t IsFrozen () const
virtual Bool_t IsAlgorithmic () const
virtual UgliScintPlnHandle GetScintPlnHandle (PlexPlaneId planeid)
virtual UgliSteelPlnHandle GetSteelPlnHandle (PlexPlaneId planeid)
virtual UgliStripHandle GetStripHandle (PlexStripEndId seid)
std::vector< UgliScintPlnHandleGetScintPlnHandleVector ()
std::vector< UgliSteelPlnHandleGetSteelPlnHandleVector ()
std::vector< UgliPlnHandleGetPlnHandleVector ()
virtual PlexPlaneId GetPlaneIdFromZ (Double_t z) const
virtual UgliSteelPlnHandle GetNearestSteelPlnHandle (Double_t z) const
virtual void GetTransverseExtent (PlaneView::PlaneView_t view, Float_t &tmin, Float_t &tmax) const
virtual void GetTransverseExtent (PlaneView::PlaneView_t view, Double_t &tmin, Double_t &tmax) const
virtual void GetZExtent (Float_t &zmin, Float_t &zmax, Int_t isuper=-1) const
virtual void GetZExtent (Double_t &zmin, Double_t &zmax, Int_t isuper=-1) const
virtual TVector3 GetHallExtentMin () const
virtual TVector3 GetHallExtentMax () const
virtual const VldRangeGetVldRange () const
virtual Detector::Detector_t GetDetector () const
virtual void Draw (Option_t *option="")
virtual void Print (Option_t *option="") const
virtual void ls (Option_t *option="rsn5") const
virtual void uv2xy (Float_t u, Float_t v, Float_t &x, Float_t &y) const
virtual void uv2xy (Double_t u, Double_t v, Double_t &x, Double_t &y) const
virtual void xy2uv (Float_t x, Float_t y, Float_t &u, Float_t &v) const
virtual void xy2uv (Double_t x, Double_t y, Double_t &u, Double_t &v) const
virtual TVector3 uvz2xyz (const TVector3 &uvz) const
virtual TVector3 xyz2uvz (const TVector3 &xyz) const
virtual void UpdateGlobalManager () const
void SwitchMedia (bool toswim)

Static Public Member Functions

static bool DoesValidGeomExist (const VldContext &vldc, Ugli::EModifyMode mmode=Ugli::kUseGlobal)

Protected Attributes

UgliGeometryfUgliGeometry
GeoGeometryfGeoGeometry

Private Member Functions

void Copy (TObject &that) const

Detailed Description

Definition at line 35 of file UgliGeomHandle.h.


Constructor & Destructor Documentation

UgliGeomHandle::UgliGeomHandle ( const VldContext vldc,
Ugli::EModifyMode  mmode = Ugli::kUseGlobal,
Geo::EAppType  apptype = Geo::kRecons 
)

Definition at line 56 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, Ugli::GetDefaultModifyMode(), UgliLoanPool::GetGeoGeometry(), UgliLoanPool::GetUgliGeometry(), GeoRefCnt::IncrementRef(), UgliRefCnt::IncrementRef(), UgliLoanPool::Instance(), Ugli::kFrozen, Ugli::kModifiable, Ugli::kUseGlobal, and UgliLoanPool::UseGeo().

00058                                                     : fUgliGeometry(0),
00059                                                         fGeoGeometry(0)
00060 {
00061    // Normal constructor
00062 
00063    Bool_t use_frozen = true;
00064    switch (mmode) {
00065    case (Ugli::kModifiable): use_frozen = false; break;
00066    case (Ugli::kFrozen):     use_frozen = true;  break;
00067    case (Ugli::kUseGlobal): 
00068       use_frozen = true;
00069       if (Ugli::kModifiable == 
00070           Ugli::GetDefaultModifyMode()) use_frozen = false;
00071       break;
00072    }
00073 
00074    if ( !UgliLoanPool::Instance()->UseGeo() ) {
00075      fUgliGeometry 
00076        = UgliLoanPool::Instance()->GetUgliGeometry(vldc,use_frozen);
00077      fUgliGeometry->IncrementRef();
00078    }
00079    else {
00080      fGeoGeometry
00081        = UgliLoanPool::Instance()->GetGeoGeometry(vldc,use_frozen,apptype);
00082      fGeoGeometry->IncrementRef();
00083    }
00084    
00085 }

UgliGeomHandle::UgliGeomHandle ( const UgliGeomHandle that  ) 

Definition at line 88 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoRefCnt::IncrementRef(), UgliRefCnt::IncrementRef(), and IsGeo().

00089   : UgliGeomABC()
00090 {
00091    // copy constructor keeps reference count up-to-date
00092 
00093    // patterned after other ROOT objects
00094 
00095    ((UgliGeomHandle&)that).Copy(*this);
00096    if ( !IsGeo() ) fUgliGeometry->IncrementRef();
00097    else fGeoGeometry->IncrementRef();
00098    
00099 }

UgliGeomHandle::UgliGeomHandle (  ) 

Definition at line 26 of file UgliGeomHandle.cxx.

References UgliLoanPool::GetGeoGeometry(), UgliLoanPool::GetUgliGeometry(), GeoRefCnt::IncrementRef(), UgliRefCnt::IncrementRef(), UgliLoanPool::Instance(), Geo::kRecons, SimFlag::kUnknown, Detector::kUnknown, Msg::kWarning, MSG, and UgliLoanPool::UseGeo().

00027   : fUgliGeometry(0),fGeoGeometry(0)
00028 {
00029    // Default constructor
00030 
00031    MSG("Ugli",Msg::kWarning) 
00032       << endl
00033       << "UgliGeomHandle created by default ctor" 
00034       << endl;
00035 
00036 //   assert(0);
00037 
00038    VldContext vldc(Detector::kUnknown,SimFlag::kUnknown,
00039                    VldTimeStamp((time_t)0,0));
00040 
00041    if ( !UgliLoanPool::Instance()->UseGeo() ) {
00042      fUgliGeometry 
00043        = UgliLoanPool::Instance()->GetUgliGeometry(vldc,true);
00044      fUgliGeometry->IncrementRef();
00045    }
00046    else {
00047      fGeoGeometry
00048        = UgliLoanPool::Instance()->GetGeoGeometry(vldc,true,Geo::kRecons);
00049      fGeoGeometry->IncrementRef();
00050    }
00051    
00052 
00053 }

UgliGeomHandle::~UgliGeomHandle (  )  [virtual]

Definition at line 102 of file UgliGeomHandle.cxx.

References GeoRefCnt::DecrementRef(), UgliRefCnt::DecrementRef(), fGeoGeometry, fUgliGeometry, and IsGeo().

00103 {
00104    // handle deletion updates reference count
00105    if ( !IsGeo() ) fUgliGeometry->DecrementRef();
00106    else            fGeoGeometry->DecrementRef();
00107   
00108 } 


Member Function Documentation

void UgliGeomHandle::Copy ( TObject &  that  )  const [private]

Definition at line 156 of file UgliGeomHandle.cxx.

References fGeoGeometry, and fUgliGeometry.

00157 {
00158    // actual copying
00159 
00160    TObject::Copy(that);
00161    ((UgliGeomHandle&)that).fUgliGeometry = fUgliGeometry;
00162    ((UgliGeomHandle&)that).fGeoGeometry  = fGeoGeometry;
00163 
00164 }

bool UgliGeomHandle::DoesValidGeomExist ( const VldContext vldc,
Ugli::EModifyMode  mmode = Ugli::kUseGlobal 
) [static]

Definition at line 147 of file UgliGeomHandle.cxx.

References UgliLoanPool::DoesValidGeomExist(), and UgliLoanPool::Instance().

00149 {
00150    // static method for testing if ctor will construct a new geometry
00151    // turns around and asks UgliLoanPool
00152    return UgliLoanPool::Instance()->DoesValidGeomExist(vldc,mmode);
00153 }

void UgliGeomHandle::Draw ( Option_t *  option = ""  )  [inline, virtual]

Reimplemented from UgliGeomABC.

Definition at line 205 of file UgliGeomHandle.h.

References GeoGeometry::Draw(), UgliGeometry::Draw(), fGeoGeometry, fUgliGeometry, and IsGeo().

Referenced by PageDisplay::DrawGeometry().

00206 { if ( !IsGeo() ) fUgliGeometry->Draw(option); 
00207   else            fGeoGeometry->Draw(option); }

virtual Detector::Detector_t UgliGeomHandle::GetDetector ( void   )  const [inline, virtual]

Definition at line 85 of file UgliGeomHandle.h.

References VldRange::GetDetectorMask(), and GetVldRange().

Referenced by uv2xy(), uvz2xyz(), xy2uv(), and xyz2uvz().

TVector3 UgliGeomHandle::GetHallExtentMax (  )  const [inline, virtual]

Implements UgliGeomABC.

Definition at line 190 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetHallExtentMax(), UgliGeometry::GetHallExtentMax(), and IsGeo().

Referenced by GenieModule::GetHallExtent(), GeoSwimmer::Initialize(), and GeoValidate::TestGeom_GetHallExtentMax().

00191 { if ( !IsGeo() ) return fUgliGeometry->GetHallExtentMax(); 
00192   else            return (fGeoGeometry->GetHallExtentMax())*Munits::cm; }

TVector3 UgliGeomHandle::GetHallExtentMin (  )  const [inline, virtual]

Implements UgliGeomABC.

Definition at line 186 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetHallExtentMin(), UgliGeometry::GetHallExtentMin(), and IsGeo().

Referenced by GenieModule::GetHallExtent(), GeoSwimmer::Initialize(), and GeoValidate::TestGeom_GetHallExtentMin().

00187 { if ( !IsGeo() ) return fUgliGeometry->GetHallExtentMin(); 
00188   else            return (fGeoGeometry->GetHallExtentMin())*Munits::cm; }

UgliSteelPlnHandle UgliGeomHandle::GetNearestSteelPlnHandle ( Double_t  z  )  const [inline, virtual]

Definition at line 195 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, UgliGeometry::GetNearestSteelPlnNode(), and IsGeo().

Referenced by AlgFitTrackSR::CalculateNoise(), AlgFitTrackCam::GetNoiseMatrix(), BfldCache::SetSteelAndPlaneMapCache(), and GeoValidate::TestGeom_GetNearestSteelPlnHandle().

00196 {
00197   if ( !IsGeo() ) 
00198     return UgliSteelPlnHandle(fUgliGeometry->GetNearestSteelPlnNode(z));
00199   else 
00200     return UgliSteelPlnHandle(fGeoGeometry->
00201                               GetNearestSteelPlnNode(z/Munits::cm));
00202   
00203 }

virtual PlexPlaneId UgliGeomHandle::GetPlaneIdFromZ ( Double_t  z  )  const [inline, virtual]

Implements UgliGeomABC.

Definition at line 67 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetPlaneIdFromZ(), UgliGeometry::GetPlaneIdFromZ(), and IsGeo().

Referenced by PreFilter::Ana(), NuReco::CalcExtraTruthVariables(), AlgFitTrackSR::RunAlg(), and GeoValidate::TestGeom_GetPlaneIdFromZ().

00068       { if ( !IsGeo() ) return fUgliGeometry->GetPlaneIdFromZ(z);
00069         else            return fGeoGeometry->GetPlaneIdFromZ(z/Munits::cm); }

vector< UgliPlnHandle > UgliGeomHandle::GetPlnHandleVector (  ) 

Definition at line 226 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetPlnNodePtrVector(), UgliGeometry::GetPlnNodePtrVector(), and IsGeo().

Referenced by BfldCanvasSlice::BfldCanvasSlice(), FidVol::infid_z_finder(), SwimGeo::SwimGeo(), and GeoValidate::TestGeom_GetPlnHandleVector().

00227 {
00228 //{ return fUgliGeometry->GetPlnHandleVector(); }
00229   vector<UgliPlnHandle> plnHandles;
00230   if ( !IsGeo() ) {
00231     vector<UgliPlnNode*>  plnNodes =
00232       fUgliGeometry->GetPlnNodePtrVector();
00233     for (unsigned int i=0; i<plnNodes.size(); ++i)
00234       plnHandles.push_back(UgliPlnHandle(plnNodes[i]));
00235   }
00236   else {
00237     vector<GeoPlnNode*>  plnNodes =
00238       fGeoGeometry->GetPlnNodePtrVector();
00239     for (unsigned int i=0; i<plnNodes.size(); ++i)
00240       plnHandles.push_back(UgliPlnHandle(plnNodes[i]));
00241   }
00242   
00243   return plnHandles;
00244 }

UgliScintPlnHandle UgliGeomHandle::GetScintPlnHandle ( PlexPlaneId  planeid  )  [virtual]

Definition at line 170 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetScintPlnNode(), UgliGeometry::GetScintPlnNode(), and IsGeo().

Referenced by RecoTreeModule::Ana(), AtNuTreeModule::Ana(), CandTrackHandle::BelongsWithShower(), CandShowerHandle::BelongsWithShower(), CandTrackHandle::BelongsWithTrack(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), MeuReco::CalcLPos(), MeuReco::CalcPosOfGaps(), MeuReco::CalcPosOfTrkEndGaps(), MeuReco::CalcStripDists(), AlgTrack::CalculateTrace(), TridUVPage::CreateSketches(), TridPageDetector::CreateSketches(), AlgTrackSRList::FindNumSkippedPlanes(), AlgFitTrackSR::FindNumSkippedPlanes(), AlgTrackSRList::FindTimingDirection(), ToyMCModule::Get(), DmxShowerPlane::GetHypothesisLowerBound(), DmxMuonPlane::GetHypothesisLowerBound(), GeometryHelper::GetScintPlnHandle(), CandStripHandle::GetTPos(), GeometryHelper::GetX0(), GeometryHelper::GetZ(), DmxShowerPlane::GetZPosition(), DmxMuonPlane::GetZPosition(), ParticleTruthHelper::Process(), AlgTrackSR::RunAlg(), AlgShowerSS::RunAlg(), AlgShowerSR::RunAlg(), AlgFarDetStrip::RunAlg(), AlgAtNuRecoMCTruth::RunAlg(), AlgTrack::SetdS(), AlgFitTrackCam::SetRangeAnddS(), DmxShowerPlane::SetStrips(), DmxMuonPlane::SetStrips(), ShieldGeom::SetupShieldGeom(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), AlgFitTrackSR::SwimVertexAndEndPoints(), GeoValidate::TestGeom_GetScintPlnHandle(), GeoValidate::TestScintMdl(), GeoValidate::TestScintPln(), GeoValidate::TestStrip(), and MeuPlots::ugliClearFibre().

00171 { if ( !IsGeo() ) 
00172     return UgliScintPlnHandle(fUgliGeometry->GetScintPlnNode(planeid)); 
00173   else 
00174     return UgliScintPlnHandle(fGeoGeometry->GetScintPlnNode(planeid)); }

vector< UgliScintPlnHandle > UgliGeomHandle::GetScintPlnHandleVector (  ) 

Definition at line 184 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetScintPlnNodePtrVector(), UgliGeometry::GetScintPlnNodePtrVector(), and IsGeo().

Referenced by AlignmentAlgorithm::AlignmentAlgorithm(), AlignmentHistograms::AlignmentHistograms(), UserDisplayModule::BuildDisplay(), NueDisplayModule::BuildDisplay(), Anp::Draw::CreateTH2(), EVD::DrawVS(), MultiPage::FullZoom(), EVD::FullZoom(), DataUtil::GetDetectorBinsUV(), StraightTrackAlignment::Init(), GeoValidate::TestGeom_GetScintPlnHandle(), GeoValidate::TestGeom_GetScintPlnHandleVector(), GeoValidate::TestGeom_GetStripHandle(), GeoValidate::TestScintMdl(), GeoValidate::TestScintPln(), GeoValidate::TestStrip(), and EVD::UpdateView().

00185 {
00186 //{ return fUgliGeometry->GetScintPlnHandleVector(); }
00187   vector<UgliScintPlnHandle> scintPlnHandles;
00188   if ( !IsGeo() ) {
00189     vector<UgliScintPlnNode*>  scintPlnNodes =
00190       fUgliGeometry->GetScintPlnNodePtrVector();
00191     for (unsigned int i=0; i<scintPlnNodes.size(); ++i)
00192       scintPlnHandles.push_back(UgliScintPlnHandle(scintPlnNodes[i]));
00193   }
00194   else {
00195     vector<GeoScintPlnNode*>  scintPlnNodes =
00196       fGeoGeometry->GetScintPlnNodePtrVector();
00197     for (unsigned int i=0; i<scintPlnNodes.size(); ++i)
00198       scintPlnHandles.push_back(UgliScintPlnHandle(scintPlnNodes[i]));
00199   }
00200   
00201   return scintPlnHandles;
00202 }

UgliSteelPlnHandle UgliGeomHandle::GetSteelPlnHandle ( PlexPlaneId  planeid  )  [inline, virtual]

Definition at line 143 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetSteelPlnNode(), UgliGeometry::GetSteelPlnNode(), and IsGeo().

Referenced by BfldCache::FillSMZLimits(), VertexFinder::FindVertex(), NtpVtxFinder::FindVertex(), GeometryHelper::GetdZSteel(), GeometryHelper::GetX0(), GeometryHelper::GetZ(), GeometryHelper::GetZVtx(), AlgTrackAtNu::RunAlg(), AlgShowerCam::RunAlg(), AlgShowerAtNu::RunAlg(), AlgFitTrackAtNu::RunAlg(), AlgTrack::SetdS(), AlgFitTrackCam::SetRangeAnddS(), GeoValidate::TestGeom_GetSteelPlnHandle(), and GeoValidate::TestSteelPln().

00144 { if ( !IsGeo() ) 
00145     return UgliSteelPlnHandle(fUgliGeometry->GetSteelPlnNode(planeid));
00146   else return UgliSteelPlnHandle(fGeoGeometry->GetSteelPlnNode(planeid)); }

vector< UgliSteelPlnHandle > UgliGeomHandle::GetSteelPlnHandleVector (  ) 

Definition at line 205 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetSteelPlnNodePtrVector(), UgliGeometry::GetSteelPlnNodePtrVector(), and IsGeo().

Referenced by ShwFit::BuildPlaneMap(), DataUtil::GetDetectorBinsZ(), GeoValidate::TestGeom_GetSteelPlnHandle(), GeoValidate::TestGeom_GetSteelPlnHandleVector(), and GeoValidate::TestSteelPln().

00206 {
00207 //{ return fUgliGeometry->GetSteelPlnHandleVector(); }
00208   vector<UgliSteelPlnHandle> steelPlnHandles;
00209   if ( !IsGeo() ) {
00210     vector<UgliSteelPlnNode*>  steelPlnNodes =
00211       fUgliGeometry->GetSteelPlnNodePtrVector();
00212     for (unsigned int i=0; i<steelPlnNodes.size(); ++i)
00213       steelPlnHandles.push_back(UgliSteelPlnHandle(steelPlnNodes[i]));
00214   }
00215   else {
00216     vector<GeoSteelPlnNode*>  steelPlnNodes =
00217       fGeoGeometry->GetSteelPlnNodePtrVector();
00218     for (unsigned int i=0; i<steelPlnNodes.size(); ++i)
00219       steelPlnHandles.push_back(UgliSteelPlnHandle(steelPlnNodes[i]));
00220   }
00221   
00222   return steelPlnHandles;
00223 }

UgliStripHandle UgliGeomHandle::GetStripHandle ( PlexStripEndId  seid  )  [virtual]

Definition at line 177 of file UgliGeomHandle.cxx.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetStripNode(), UgliGeometry::GetStripNode(), and IsGeo().

Referenced by StraightTrackAlignment::AddTrack(), ScintHitAna::Ana(), RecoTreeModule::Ana(), FitTrackMSListModule::Ana(), CompareToReroot::Ana(), ChopModule::Ana(), AtNuTreeModule::Ana(), AltDeMuxDisplay::Ana(), NueDisplayModule::BuildDisplay(), MeuReco::CalcLPos(), MeuReco::CalcStripDists(), PhotonCalibratedPeComputer::ComputePhotons(), PhotonCalibratedBlueComputer::ComputePhotons(), TridModelMaker::CreateShowerModels(), TridUVPage::CreateSketches(), TridPageDetector::CreateSketches(), StripAttenCalScheme::DecalAttenCorrected(), SimpleCalScheme::DecalAttenCorrected(), Calibrator::DecalAttenCorrectedTpos(), AlgDeMuxBeam::DeMuxFirstNPlanesTest(), EVD::DrawVS(), ChopEvaluation::Evaluate(), PhotonTransport::FillBadHitNtuple(), NtpMaker::FillMCInfo(), NtpMCModule::FillNtpMCDigiScintHit(), NtpMCModule::FillNtpMCStdHep(), NtpSRModule::FillNtpShieldStrip(), MNtpModule::FillTrkInfo(), AlgDeMuxBeam::FindDigitCoG(), AlgTrackSRList::FindTimingDirection(), AlgTrackSR::FindTimingDirection(), AlgShowerSR::FindTimingDirection(), flshit_massage_local(), AlgTrackSRList::FormCandTrackSR(), Anp::FillMuonId::Get(), StripAttenCalScheme::GetAttenCorrected(), SimpleCalScheme::GetAttenCorrected(), Calibrator::GetAttenCorrectedTpos(), DmxShowerPlane::GetBestCoG(), DmxShowerPlane::GetCoG(), DmxMuonPlane::GetCoG(), NueDisplayModule::GetEvent(), AltDeMuxModule::GetFibreLengths(), AlgAltDeMuxBase::GetFibreLengths(), DmxShowerPlane::GetHypothesisCoG(), DmxMuonPlane::GetInitialCoG(), GeometryHelper::GetRotationCorrectedTPos(), DmxShowerPlane::GetSecondBestCoG(), DmxShowerPlane::GetThirdBestCoG(), DmxMuonPlane::GetTimingOffset(), DmxHypothesis::GetTimingOffset(), load_better_mipcal(), AlgFitTrackCam::NDStripBegTime(), Anp::FillShortVar::OtherStripEnergy(), CheezyDisplay::PlaneStripToXY(), TrackDirectionModule::ProcessRecord(), MakeAlignmentModule::ReadRecord(), MakeAlignmentModule::RecalculateResiduals(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgTrackAtNu::RunAlg(), AlgShowerAtNu::RunAlg(), AlgShieldPlank::RunAlg(), AlgFarDetStrip::RunAlg(), AlgFarDetShieldPlank::RunAlg(), StripKG::Set(), AltDeMuxCalc::SetFibreLengthE(), AltDeMuxCalc::SetFibreLengthW(), ShieldGeom::SetupShieldGeom(), AlgTrackCam::SetupTimingInfo(), AlgShowerCam::SetupTimingInfo(), PreFilter::SimCheck(), PhotonInjector::SimulateEvent(), PhotonTransport::SimulateScintHit(), GeoValidate::TestGeom_GetStripHandle(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_Intersection(), AlgFitTrackCam::TimingFit(), MeuPlots::ugliClearFibre(), MCDisp::Update(), and HistPage::Update().

00178 { if ( !IsGeo() ) 
00179     return UgliStripHandle(fUgliGeometry->GetStripNode(seid)); 
00180   else
00181     return UgliStripHandle(fGeoGeometry->GetStripNode(seid)); }

void UgliGeomHandle::GetTransverseExtent ( PlaneView::PlaneView_t  view,
Double_t &  tmin,
Double_t &  tmax 
) const [inline, virtual]

Definition at line 156 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetTransverseExtent(), UgliGeometry::GetTransverseExtent(), and IsGeo().

00159 { if ( !IsGeo() ) fUgliGeometry->GetTransverseExtent(view,tmin,tmax);
00160   else          { fGeoGeometry->GetTransverseExtent(view,tmin,tmax); 
00161                   tmin *= Munits::cm; tmax *= Munits::cm; }               
00162 }

void UgliGeomHandle::GetTransverseExtent ( PlaneView::PlaneView_t  view,
Float_t &  tmin,
Float_t &  tmax 
) const [inline, virtual]

Implements UgliGeomABC.

Definition at line 148 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetTransverseExtent(), UgliGeometry::GetTransverseExtent(), and IsGeo().

Referenced by UserDisplayModule::BuildDisplay(), NueDisplayModule::BuildDisplay(), MeuReco::CalcLPos(), MeuReco::CalcPosOfTrkEndGaps(), MultiPage::FullZoom(), EVD::FullZoom(), AlgTrackSR::RunAlg(), GeoValidate::TestGeom_GetTransverseExtent(), and EVD::UpdateView().

00151 { if ( !IsGeo() ) fUgliGeometry->GetTransverseExtent(view,tmin,tmax); 
00152   else          { fGeoGeometry->GetTransverseExtent(view,tmin, tmax); 
00153                   tmin *= Munits::cm; tmax *= Munits::cm; }               
00154 }

virtual const VldRange& UgliGeomHandle::GetVldRange (  )  const [inline, virtual]

Implements UgliGeomABC.

Definition at line 82 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, GeoGeometry::GetVldRange(), UgliGeometry::GetVldRange(), and IsGeo().

Referenced by BfldCache::BfldCache(), GetDetector(), DataUtil::GetDetectorBinsUV(), DataUtil::GetDetectorBinsZ(), IsValid(), ShieldGeom::SetupShieldGeom(), SwimGeo::SwimGeo(), and BfldCache::~BfldCache().

00083       { if ( !IsGeo() ) return fUgliGeometry->GetVldRange();
00084         else            return fGeoGeometry->GetVldRange();  }

void UgliGeomHandle::GetZExtent ( Double_t &  zmin,
Double_t &  zmax,
Int_t  isuper = -1 
) const [inline, virtual]

Definition at line 175 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetZExtent(), UgliGeometry::GetZExtent(), and IsGeo().

00176                                                            { 
00177   if ( !IsGeo() ) fUgliGeometry->GetZExtent(zmin,zmax,isuper); 
00178   else { 
00179     fGeoGeometry->GetZExtent(zmin,zmax,isuper); 
00180     zmin *= Munits::cm; zmax *= Munits::cm; 
00181   }
00182   
00183 }

void UgliGeomHandle::GetZExtent ( Float_t &  zmin,
Float_t &  zmax,
Int_t  isuper = -1 
) const [inline, virtual]

Implements UgliGeomABC.

Definition at line 166 of file UgliGeomHandle.h.

References Munits::cm, fGeoGeometry, fUgliGeometry, GeoGeometry::GetZExtent(), UgliGeometry::GetZExtent(), and IsGeo().

Referenced by PreFilter::Ana(), AlgTrack::CalculateTrace(), UberModuleLite::FillNtpFiducial(), UberModule::FillNtpFiducial(), NtpSRModule::FillNtpFiducialDistance(), MultiPage::FullZoom(), EVD::FullZoom(), DataUtil::GetDetectorBinsZ(), CandShowerHandle::IsContained(), StopMuFinderFar::IsStopping(), AlgTrackSR::RunAlg(), AlgFitTrackCam::SetRangeAnddS(), CheezyDisplay::SetVldContext(), GeoValidate::TestGeom_GetNearestSteelPlnHandle(), GeoValidate::TestGeom_GetPlaneIdFromZ(), GeoValidate::TestGeom_GetZExtent(), and EVD::UpdateView().

00167                                                            { 
00168   if ( !IsGeo() ) fUgliGeometry->GetZExtent(zmin,zmax,isuper); 
00169   else { 
00170     fGeoGeometry->GetZExtent(zmin,zmax,isuper); 
00171     zmin *= Munits::cm; zmax *= Munits::cm; 
00172   }
00173 }

Bool_t UgliGeomHandle::IsAlgorithmic (  )  const [inline, virtual]

Definition at line 139 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, GeoGeometry::IsAlgorithmic(), UgliGeometry::IsAlgorithmic(), and IsGeo().

00140 { if ( !IsGeo() ) return fUgliGeometry->IsAlgorithmic(); 
00141   else            return fGeoGeometry->IsAlgorithmic(); }

Bool_t UgliGeomHandle::IsFrozen (  )  const [inline, virtual]

Definition at line 135 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, GeoGeometry::IsFrozen(), UgliGeometry::IsFrozen(), and IsGeo().

Referenced by ResetVldContext().

00136 { if ( !IsGeo() ) return fUgliGeometry->IsFrozen();
00137   else            return fGeoGeometry->IsFrozen(); }

virtual Bool_t UgliGeomHandle::IsGeo (  )  const [inline, virtual]

Definition at line 54 of file UgliGeomHandle.h.

References fGeoGeometry.

Referenced by GenieModule::BeginRun(), Draw(), GetHallExtentMax(), GetHallExtentMin(), GetNearestSteelPlnHandle(), GetPlaneIdFromZ(), GetPlnHandleVector(), GetScintPlnHandle(), GetScintPlnHandleVector(), GetSteelPlnHandle(), GetSteelPlnHandleVector(), GetStripHandle(), GetTransverseExtent(), GetVldRange(), GetZExtent(), IsAlgorithmic(), IsFrozen(), ls(), operator=(), Print(), ResetVldContext(), SwitchMedia(), UgliGeomHandle(), UpdateGlobalManager(), and ~UgliGeomHandle().

00054 { return (fGeoGeometry != 0 ); }

Bool_t UgliGeomHandle::IsValid (  )  const [inline, virtual]

Definition at line 127 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, GetVldRange(), and Detector::kUnknown.

Referenced by UserDisplayModule::AddTrack(), TimingVarsAna::Analyze(), UserDisplayModule::BuildDisplay(), NueDisplayModule::BuildDisplay(), EVD::DrawVS(), flshit_massage_local(), MultiPage::FullZoom(), EVD::FullZoom(), Anp::FillMuonId::Get(), NueDisplayModule::GetEvent(), Anp::FillShortVar::OtherStripEnergy(), GeoValidate::TestLoanPool(), MCDisp::Update(), and EVD::UpdateView().

00128 { 
00129   if ( ( fUgliGeometry || fGeoGeometry ) &&
00130        ( GetVldRange().GetDetectorMask() != Detector::kUnknown ) ) 
00131     return kTRUE; // geometry constructed and valid detector type
00132   return kFALSE;
00133 }

void UgliGeomHandle::ls ( Option_t *  option = "rsn5"  )  const [inline, virtual]

Reimplemented from UgliGeomABC.

Definition at line 213 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, IsGeo(), GeoGeometry::ls(), and UgliGeometry::ls().

00214 { if ( !IsGeo() ) fUgliGeometry->ls(option); 
00215   else            fGeoGeometry->ls(option); }

UgliGeomHandle & UgliGeomHandle::operator= ( const UgliGeomHandle ugh  ) 

Definition at line 111 of file UgliGeomHandle.cxx.

References GeoRefCnt::DecrementRef(), UgliRefCnt::DecrementRef(), fGeoGeometry, fUgliGeometry, GeoRefCnt::IncrementRef(), UgliRefCnt::IncrementRef(), and IsGeo().

00112 {
00113    // assignment keeps reference counts up-to-date
00114 
00115    if ( !IsGeo() ) fUgliGeometry->DecrementRef();
00116    else            fGeoGeometry->DecrementRef();   
00117 
00118    ((UgliGeomHandle&)ugh).Copy(*this);
00119 
00120    if ( !IsGeo() ) fUgliGeometry->IncrementRef();
00121    else            fGeoGeometry->IncrementRef();
00122 
00123    return *this;
00124 }

void UgliGeomHandle::Print ( Option_t *  option = ""  )  const [inline, virtual]

Reimplemented from UgliGeomABC.

Definition at line 209 of file UgliGeomHandle.h.

References fGeoGeometry, fUgliGeometry, IsGeo(), GeoGeometry::Print(), and UgliGeometry::Print().

00210 { if ( !IsGeo() ) fUgliGeometry->Print(option); 
00211   else            fGeoGeometry->Print(option); }

void UgliGeomHandle::ResetVldContext ( const VldContext vldc  )  [virtual]

Definition at line 127 of file UgliGeomHandle.cxx.

References GeoRefCnt::DecrementRef(), UgliRefCnt::DecrementRef(), fGeoGeometry, fUgliGeometry, GeoGeometry::GetAppType(), UgliLoanPool::GetGeoGeometry(), UgliLoanPool::GetUgliGeometry(), GeoRefCnt::IncrementRef(), UgliRefCnt::IncrementRef(), UgliLoanPool::Instance(), IsFrozen(), and IsGeo().

00128 {
00129   Bool_t use_frozen = IsFrozen();
00130   if ( !IsGeo() ) {
00131     fUgliGeometry->DecrementRef();
00132     fUgliGeometry 
00133        = UgliLoanPool::Instance()->GetUgliGeometry(vldc,use_frozen);
00134     fUgliGeometry->IncrementRef();
00135   }
00136   else {
00137     Geo::EAppType apptype = fGeoGeometry->GetAppType();
00138     fGeoGeometry->DecrementRef();
00139     fGeoGeometry
00140        = UgliLoanPool::Instance()->GetGeoGeometry(vldc,use_frozen,apptype);
00141     fGeoGeometry->IncrementRef();
00142   }
00143 
00144 }

void UgliGeomHandle::SwitchMedia ( bool  toswim  ) 

Definition at line 246 of file UgliGeomHandle.cxx.

References fGeoGeometry, IsGeo(), Msg::kWarning, and MSG.

00246                                             {
00247   // Switch to swimmer media.  Only useful within PTSimApplication 
00248   // context, so perhaps should be protected with friend access? 
00249   // For now is public method.
00250 
00251   if ( !IsGeo() ) MSG("Ugli",Msg::kWarning) 
00252     << "SwitchMedia with UgliGeometry is not applicable." << endl;
00253   else fGeoGeometry -> SwitchMedia(toswim);
00254 
00255 }

virtual void UgliGeomHandle::UpdateGlobalManager (  )  const [inline, virtual]

Definition at line 100 of file UgliGeomHandle.h.

References fGeoGeometry, gGeoManager, IsGeo(), and GeoGeometry::UpdateGlobalManager().

00100                                             { 
00101      if ( !IsGeo() ) gGeoManager = 0;
00102      else fGeoGeometry->UpdateGlobalManager(); }

void UgliGeomHandle::uv2xy ( Double_t  u,
Double_t  v,
Double_t &  x,
Double_t &  y 
) const [inline, virtual]

Definition at line 220 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::uv2xy().

00222 { Ugli::uv2xy(GetDetector(),u,v,x,y); }

void UgliGeomHandle::uv2xy ( Float_t  u,
Float_t  v,
Float_t &  x,
Float_t &  y 
) const [inline, virtual]

Definition at line 217 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::uv2xy().

Referenced by UserDisplayModule::AddTrack(), TrackFilterBFCalibND::IsInCoverage(), and GeometryHelper::uv2xy().

00219 { Ugli::uv2xy(GetDetector(),u,v,x,y); }

TVector3 UgliGeomHandle::uvz2xyz ( const TVector3 &  uvz  )  const [inline, virtual]

Definition at line 229 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::uvz2xyz().

Referenced by MeuCuts::CalcXYZ(), TrackDirectionModule::ConvertToLocal(), MakeAlignmentModule::ConvertToLocal(), MeuCuts::ConvertToXY(), MeuReco::ConvertToXYZ(), TrackDirectionModule::GetDirectionalCosines(), and NuReco::uvz2xyz().

00230 { return Ugli::uvz2xyz(GetDetector(),uvz); }

void UgliGeomHandle::xy2uv ( Double_t  x,
Double_t  y,
Double_t &  u,
Double_t &  v 
) const [inline, virtual]

Definition at line 226 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::xy2uv().

00228 { Ugli::xy2uv(GetDetector(),x,y,u,v); }

void UgliGeomHandle::xy2uv ( Float_t  x,
Float_t  y,
Float_t &  u,
Float_t &  v 
) const [inline, virtual]

Definition at line 223 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::xy2uv().

Referenced by MCDisp::Update(), and GeometryHelper::xy2uv().

00225 { Ugli::xy2uv(GetDetector(),x,y,u,v); }

TVector3 UgliGeomHandle::xyz2uvz ( const TVector3 &  xyz  )  const [inline, virtual]

Definition at line 231 of file UgliGeomHandle.h.

References GetDetector(), and Ugli::xyz2uvz().

Referenced by AlignmentAlgorithm::AlignmentAlgorithm(), MeuReco::CalcLPos(), MakeAlignmentModule::RecalculateResiduals(), and NuReco::xyz2uvz().

00232 { return Ugli::xyz2uvz(GetDetector(),xyz); }


Member Data Documentation

GeoGeometry* UgliGeomHandle::fGeoGeometry [protected]

Definition at line 112 of file UgliGeomHandle.h.

Referenced by Copy(), Draw(), GetHallExtentMax(), GetHallExtentMin(), GetNearestSteelPlnHandle(), GetPlaneIdFromZ(), GetPlnHandleVector(), GetScintPlnHandle(), GetScintPlnHandleVector(), GetSteelPlnHandle(), GetSteelPlnHandleVector(), GetStripHandle(), GetTransverseExtent(), GetVldRange(), GetZExtent(), IsAlgorithmic(), IsFrozen(), IsGeo(), IsValid(), ls(), operator=(), Print(), ResetVldContext(), SwitchMedia(), UgliGeomHandle(), UpdateGlobalManager(), and ~UgliGeomHandle().

UgliGeometry* UgliGeomHandle::fUgliGeometry [protected]

Definition at line 111 of file UgliGeomHandle.h.

Referenced by Copy(), Draw(), GetHallExtentMax(), GetHallExtentMin(), GetNearestSteelPlnHandle(), GetPlaneIdFromZ(), GetPlnHandleVector(), GetScintPlnHandle(), GetScintPlnHandleVector(), GetSteelPlnHandle(), GetSteelPlnHandleVector(), GetStripHandle(), GetTransverseExtent(), GetVldRange(), GetZExtent(), IsAlgorithmic(), IsFrozen(), IsValid(), ls(), operator=(), Print(), ResetVldContext(), UgliGeomHandle(), and ~UgliGeomHandle().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:07:06 2014 for loon by  doxygen 1.4.7