UgliStripHandle Class Reference

#include <UgliStripHandle.h>

Inheritance diagram for UgliStripHandle:
UgliStripABC

List of all members.

Public Member Functions

 UgliStripHandle (UgliStripNode *stripNode)
 UgliStripHandle (GeoStripNode *stripNode)
 UgliStripHandle (const UgliStripHandle &that)
UgliStripHandleoperator= (const UgliStripHandle &that)
 UgliStripHandle ()
virtual ~UgliStripHandle ()
virtual Bool_t IsGeo () const
virtual Bool_t IsValid () const
virtual Bool_t IsFrozen () const
virtual PlexStripEndId GetSEId () const
virtual Float_t GetHalfLength () const
virtual Float_t GetHalfThickness () const
virtual Float_t GetHalfWidth () const
virtual Float_t GetTPos (Float_t orthCoord=9999.) const
virtual Float_t PartialLength (const StripEnd::StripEnd_t end) const
virtual Bool_t IsMirrored (const StripEnd::StripEnd_t end) const
virtual Float_t WlsPigtail (const StripEnd::StripEnd_t end) const
virtual Float_t WlsBypass () const
virtual Float_t ClearFiber (const StripEnd::StripEnd_t end) const
virtual Float_t TotalAttenuation (const StripEnd::StripEnd_t end, const Float_t alongLength) const
virtual TVector3 GlobalPos (const Float_t alongLength, const Bool_t onWLS=false, const Bool_t globalInXYZ=true) const
virtual TVector3 GlobalToLocal (const TVector3 &global, const Bool_t globalInXYZ=true) const
virtual TVector3 LocalToGlobal (const TVector3 &local, const Bool_t globalInXYZ=true) const
virtual Float_t DistanceAlong (const PlexStripEndId &orthogonalStrip) const
virtual TVector3 Intersection (const PlexStripEndId &orthogonalStrip) const
UgliScintMdlHandle GetScintMdlHandle () const
UgliScintPlnHandle GetScintPlnHandle () const
Float_t GetZRotRelMdlRad () const
Float_t GetLPosRelMdl () const
Float_t GetTPosRelMdl () const
Bool_t AttemptSet (const char *what="?") const
void SetZRotRelMdlRad (Float_t radians)
void SetLTPosRelMdl (Float_t lpos, Float_t tpos)
void RotateRelMdlBy (Float_t deltaRadians)
void ShiftLTPosRelMdlBy (Float_t dlpos, Float_t dtpos)

Protected Attributes

UgliStripNodefUgliStripNode
GeoStripNodefGeoStripNode

Detailed Description

Definition at line 25 of file UgliStripHandle.h.


Constructor & Destructor Documentation

UgliStripHandle::UgliStripHandle ( UgliStripNode stripNode  ) 

Definition at line 45 of file UgliStripHandle.cxx.

References fUgliStripNode, and UgliStripNode::IncrementRef().

00046   : fUgliStripNode(node),fGeoStripNode(0)
00047 {
00048    // ctor keeps reference count up-to-date
00049 
00050    if (fUgliStripNode) fUgliStripNode->IncrementRef();
00051 } 

UgliStripHandle::UgliStripHandle ( GeoStripNode stripNode  ) 

Definition at line 54 of file UgliStripHandle.cxx.

References fGeoStripNode, and GeoNode::IncrementRef().

00055   : fUgliStripNode(0),fGeoStripNode(node)
00056 {
00057    // ctor keeps reference count up-to-date
00058 
00059    if (fGeoStripNode) fGeoStripNode->IncrementRef();
00060 }

UgliStripHandle::UgliStripHandle ( const UgliStripHandle that  ) 

Definition at line 63 of file UgliStripHandle.cxx.

References fGeoStripNode, fUgliStripNode, GeoNode::IncrementRef(), and UgliStripNode::IncrementRef().

00064    : UgliStripABC(),
00065      fUgliStripNode(that.fUgliStripNode),
00066      fGeoStripNode(that.fGeoStripNode)
00067 {
00068    // copy constructor keeps reference counts up-to-date
00069 
00070    if (fUgliStripNode) fUgliStripNode->IncrementRef();
00071    if (fGeoStripNode) fGeoStripNode->IncrementRef();
00072 }

UgliStripHandle::UgliStripHandle (  ) 

Definition at line 25 of file UgliStripHandle.cxx.

References Msg::kDebug, and MSG.

00026   : fUgliStripNode(0),fGeoStripNode(0)
00027 {
00028    // Default constructor
00029 
00030    MSG("Ugli",Msg::kDebug) 
00031      << "UgliStripHandle created by default ctor" << endl;
00032 //   assert(0);
00033 }

UgliStripHandle::~UgliStripHandle (  )  [virtual]

Definition at line 36 of file UgliStripHandle.cxx.

References GeoNode::DecrementRef(), UgliStripNode::DecrementRef(), fGeoStripNode, and fUgliStripNode.

00037 {
00038    // handle deletion updates reference count
00039   if (fUgliStripNode) fUgliStripNode->DecrementRef();
00040   if (fGeoStripNode) fGeoStripNode->DecrementRef();
00041   
00042 }


Member Function Documentation

Bool_t UgliStripHandle::AttemptSet ( const char *  what = "?"  )  const

Definition at line 110 of file UgliStripHandle.cxx.

References GetSEId(), IsFrozen(), Msg::kError, and MSG.

Referenced by SetLTPosRelMdl(), and SetZRotRelMdlRad().

00111 {
00112   if (!IsFrozen()) return true;
00113 
00114   MSG("Ugli",Msg::kError) 
00115     << "AttemptSet " << what << " on Frozen " 
00116     << GetSEId() << " twarted!" << endl;
00117   return false;
00118 }

Float_t UgliStripHandle::ClearFiber ( const StripEnd::StripEnd_t  end  )  const [inline, virtual]
Float_t UgliStripHandle::DistanceAlong ( const PlexStripEndId orthogonalStrip  )  const [inline, virtual]

Implements UgliStripABC.

Definition at line 160 of file UgliStripHandle.h.

References Munits::cm, GeoStripNode::DistanceAlong(), UgliStripNode::DistanceAlong(), fGeoStripNode, fUgliStripNode, and IsGeo().

Referenced by GeoValidate::TestStrip_DistanceAlong().

00161 { if ( !IsGeo() ) return fUgliStripNode->DistanceAlong(orthogonalStrip);
00162   else   return (fGeoStripNode->DistanceAlong(orthogonalStrip)*Munits::cm); }

Float_t UgliStripHandle::GetHalfLength (  )  const [inline, virtual]

Implements UgliStripABC.

Definition at line 119 of file UgliStripHandle.h.

References Munits::cm, fGeoStripNode, fUgliStripNode, UgliStripNode::GetHalfLength(), GeoStripNode::GetHalfLength(), and IsGeo().

Referenced by CompareToReroot::Ana(), ScintHitAna::Ana(), FitTrackMSListModule::Ana(), AltDeMuxDisplay::Ana(), TimingVarsAna::Analyze(), MeuReco::CalcLPos(), MeuReco::CalcStripDists(), PhotonCalibratedBlueComputer::ComputePhotons(), PhotonCalibratedPeComputer::ComputePhotons(), MakeAlignmentModule::ConvertToLocal(), TrackDirectionModule::ConvertToLocal(), TridPageDetector::CreateSketches(), SimpleCalScheme::DecalAttenCorrected(), StripAttenCalScheme::DecalAttenCorrected(), MNtpModule::FillTrkInfo(), AlgShowerSR::FindTimingDirection(), AlgTrackSR::FindTimingDirection(), AlgTrackSRList::FindTimingDirection(), AlgTrackSRList::FormCandTrackSR(), ToyMCModule::Get(), SimpleCalScheme::GetAttenCorrected(), StripAttenCalScheme::GetAttenCorrected(), NueDisplayModule::GetEvent(), PhotonCompositeGreenTracker::GreenPhotonToPe(), PhotonDefaultModel::GreenPhotonToPe(), PhotonFullGreenTracker::GreenPhotonToPe(), load_better_mipcal(), AlgFitTrackCam::NDStripBegTime(), ScintPhoton::Reset(), AlgFarDetShieldPlank::RunAlg(), AlgShowerAtNu::RunAlg(), AlgTrackAtNu::RunAlg(), AlgFarDetStrip::RunAlg(), PhotonDefaultModel::ScintPhotonToFibreHit(), PhotonFastBlueModel::ScintPhotonToFibreHit(), PhotonFullBlueTracker::ScintPhotonToFibreHit(), StripKG::Set(), AlgTrack::SetT(), AlgShowerSR::SetT(), AlgTrackCam::SetupTimingInfo(), AlgShowerCam::SetupTimingInfo(), PhotonInjector::SimulateEvent(), PhotonTransport::SimulateScintHit(), GeoValidate::TestStrip_GetHalfLength(), AlgFitTrackCam::TimingFit(), MeuPlots::ugliClearFibre(), and PhotonTransport::VerifyScintHit().

00120 { if ( !IsGeo() ) return fUgliStripNode->GetHalfLength();
00121   else            return (fGeoStripNode->GetHalfLength())*Munits::cm; } 

Float_t UgliStripHandle::GetHalfThickness (  )  const [inline, virtual]
Float_t UgliStripHandle::GetHalfWidth (  )  const [inline, virtual]
Float_t UgliStripHandle::GetLPosRelMdl (  )  const [inline]
UgliScintMdlHandle UgliStripHandle::GetScintMdlHandle ( void   )  const
UgliScintPlnHandle UgliStripHandle::GetScintPlnHandle ( void   )  const
PlexStripEndId UgliStripHandle::GetSEId (  )  const [inline, virtual]

Implements UgliStripABC.

Definition at line 115 of file UgliStripHandle.h.

References fGeoStripNode, fUgliStripNode, UgliStripNode::GetSEId(), GeoStripNode::GetSEId(), and IsGeo().

Referenced by AttemptSet(), ToyMCModule::Get(), DmxShowerPlane::GetHypothesisLowerBound(), DmxMuonPlane::GetHypothesisLowerBound(), GlobalPos(), GlobalToLocal(), PhotonCompositeGreenTracker::GreenPhotonToPe(), PhotonDefaultModel::GreenPhotonToPe(), PhotonFullGreenTracker::GreenPhotonToPe(), LocalToGlobal(), DmxMuonPlane::SetStrips(), DmxShowerPlane::SetStrips(), GeoValidate::TestGeom_GetStripHandle(), GeoValidate::TestScintPln_GetClosestStrip(), GeoValidate::TestScintPln_GetStripHandle(), GeoValidate::TestScintPln_GetStripHandleVector(), GeoValidate::TestStrip(), GeoValidate::TestStrip_ClearFiber(), GeoValidate::TestStrip_DistanceAlong(), GeoValidate::TestStrip_GetHalfLength(), GeoValidate::TestStrip_GetHalfThickness(), GeoValidate::TestStrip_GetHalfWidth(), GeoValidate::TestStrip_GetLPosRelMdl(), GeoValidate::TestStrip_GetScintMdlHandle(), GeoValidate::TestStrip_GetScintPlnHandle(), GeoValidate::TestStrip_GetSEId(), GeoValidate::TestStrip_GetTPos(), GeoValidate::TestStrip_GetTPosRelMdl(), GeoValidate::TestStrip_GetZRotRelMdlRad(), GeoValidate::TestStrip_GlobalPos(), GeoValidate::TestStrip_GlobalToLocal(), GeoValidate::TestStrip_Intersection(), GeoValidate::TestStrip_IsMirrored(), GeoValidate::TestStrip_LocalToGlobal(), GeoValidate::TestStrip_PartialLength(), GeoValidate::TestStrip_WlsBypass(), GeoValidate::TestStrip_WlsPigtail(), and TridModelRecoStrip::TridModelRecoStrip().

00116 { if ( !IsGeo() ) return fUgliStripNode->GetSEId();
00117   else            return fGeoStripNode->GetSEId(); }

Float_t UgliStripHandle::GetTPos ( Float_t  orthCoord = 9999.  )  const [inline, virtual]
Float_t UgliStripHandle::GetTPosRelMdl (  )  const [inline]
Float_t UgliStripHandle::GetZRotRelMdlRad (  )  const [inline]
TVector3 UgliStripHandle::GlobalPos ( const Float_t  alongLength,
const Bool_t  onWLS = false,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 137 of file UgliStripHandle.cxx.

References Munits::cm, fGeoStripNode, fUgliStripNode, DataUtil::GetDetector(), GetSEId(), UgliStripNode::GlobalPos(), GeoStripNode::GlobalPos(), IsGeo(), and Ugli::xyz2uvz().

Referenced by FCPCFilterModule::Ana(), ShieldPlankListModule::Ana(), AltDeMuxDisplay::Ana(), TridPageDetector::CreateSketches(), TridUVPage::CreateSketches(), Calibrator::DecalAttenCorrectedTpos(), StraightTrackAlignment::FitTrackLessOne(), AlgTrackSRList::FormCandTrackSR(), Calibrator::GetAttenCorrectedTpos(), PreFilter::GetCDHZPos(), CheezyDisplay::PlaneStripToXY(), MakeAlignmentModule::RecalculateResiduals(), ShieldGeom::SetupShieldGeom(), GeoValidate::TestStrip_GlobalPos(), TridModelRecoStrip::TridModelRecoStrip(), MeuPlots::ugliClearFibre(), and HistPage::Update().

00139                                                                     {
00140   // convert a distance along the strip into global position
00141   // onWLS takes into account the extra waveshifter length in bypass region
00142   // globalInXYZ determines whether result is in XYZ or UVZ
00143   TVector3 globalXYZ;
00144   if ( !IsGeo() ) 
00145       globalXYZ = fUgliStripNode->GlobalPos(alongLength,onWLS);
00146   else {
00147       TVector3 gpos = fGeoStripNode->GlobalPos(alongLength/Munits::cm,onWLS);
00148       globalXYZ = (gpos *= Munits::cm);
00149   }
00150 
00151   if (globalInXYZ ) return globalXYZ;
00152   else              return Ugli::xyz2uvz(GetSEId().GetDetector(),globalXYZ);
00153 }

TVector3 UgliStripHandle::GlobalToLocal ( const TVector3 &  global,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 156 of file UgliStripHandle.cxx.

References Munits::cm, fGeoStripNode, fUgliStripNode, PlexPlaneId::GetDetector(), GetSEId(), UgliStripNode::GlobalToLocal(), GeoNode::GlobalToLocal(), IsGeo(), and Ugli::uvz2xyz().

Referenced by TimingVarsAna::Analyze(), MeuReco::CalcStripDists(), MakeAlignmentModule::ConvertToLocal(), TrackDirectionModule::ConvertToLocal(), MNtpModule::FillTrkInfo(), flshit_massage_local(), ToyMCModule::Get(), Anp::FillMuonId::Get(), NueDisplayModule::GetEvent(), Anp::FillShortVar::OtherStripEnergy(), and GeoValidate::TestStrip_GlobalToLocal().

00158 { 
00159   // convert a global position into a local (volume) one
00160   // globalInXYZ determines whether result is in XYZ or UVZ
00161   TVector3 globalXYZ = (globalInXYZ) ? 
00162       global : Ugli::uvz2xyz(GetSEId().GetDetector(),global);
00163 
00164   if ( !IsGeo() ) 
00165       return fUgliStripNode->GlobalToLocal(globalXYZ);
00166   else {
00167       TVector3 scaledglobal(globalXYZ); scaledglobal *= 1./Munits::cm;
00168       return (fGeoStripNode->GlobalToLocal(scaledglobal) *= Munits::cm); 
00169   }
00170 }

TVector3 UgliStripHandle::Intersection ( const PlexStripEndId orthogonalStrip  )  const [inline, virtual]

Implements UgliStripABC.

Definition at line 164 of file UgliStripHandle.h.

References Munits::cm, fGeoStripNode, fUgliStripNode, UgliStripNode::Intersection(), GeoStripNode::Intersection(), and IsGeo().

Referenced by GeoValidate::TestStrip_Intersection().

00165 { if ( !IsGeo() ) return fUgliStripNode->Intersection(orthogonalStrip);
00166   else {
00167     return (fGeoStripNode->Intersection(orthogonalStrip) *= Munits::cm); 
00168   }
00169 }

Bool_t UgliStripHandle::IsFrozen (  )  const [inline, virtual]
virtual Bool_t UgliStripHandle::IsGeo (  )  const [inline, virtual]
Bool_t UgliStripHandle::IsMirrored ( const StripEnd::StripEnd_t  end  )  const [inline, virtual]
Bool_t UgliStripHandle::IsValid (  )  const [inline, virtual]
TVector3 UgliStripHandle::LocalToGlobal ( const TVector3 &  local,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 173 of file UgliStripHandle.cxx.

References Munits::cm, fGeoStripNode, fUgliStripNode, DataUtil::GetDetector(), GetSEId(), IsGeo(), GeoNode::LocalToGlobal(), UgliStripNode::LocalToGlobal(), and Ugli::xyz2uvz().

Referenced by MeuReco::CalcLPos(), PhotonTransport::FillBadHitNtuple(), NtpMaker::FillMCInfo(), NtpMCModule::FillNtpMCDigiScintHit(), NtpMCModule::FillNtpMCStdHep(), PreFilter::SimCheck(), GeoValidate::TestStrip_GlobalToLocal(), GeoValidate::TestStrip_LocalToGlobal(), and MCDisp::Update().

00175 { 
00176   // convert a global position into a local (volume) one
00177   // globalInXYZ determines whether result is in XYZ or UVZ
00178   TVector3 globalXYZ;
00179   if ( !IsGeo() ) 
00180       globalXYZ = fUgliStripNode->LocalToGlobal(local); 
00181   else { 
00182       TVector3 scaledlocal(local); scaledlocal *= 1./Munits::cm;
00183       globalXYZ = (fGeoStripNode->LocalToGlobal(scaledlocal) *= Munits::cm); 
00184   }
00185 
00186   if (globalInXYZ ) return globalXYZ;
00187   else              return Ugli::xyz2uvz(GetSEId().GetDetector(),globalXYZ);
00188 }

UgliStripHandle & UgliStripHandle::operator= ( const UgliStripHandle that  ) 

Reimplemented from UgliStripABC.

Definition at line 75 of file UgliStripHandle.cxx.

References GeoNode::DecrementRef(), UgliStripNode::DecrementRef(), fGeoStripNode, fUgliStripNode, GeoNode::IncrementRef(), and UgliStripNode::IncrementRef().

00076 {
00077    // assignment keeps reference counts up-to-date
00078 
00079    
00080    if (fUgliStripNode) fUgliStripNode->DecrementRef();
00081    if (fGeoStripNode) fGeoStripNode->DecrementRef();
00082    
00083    fUgliStripNode = that.fUgliStripNode;
00084    fGeoStripNode = that.fGeoStripNode;
00085    
00086    if (fUgliStripNode) fUgliStripNode->IncrementRef();
00087    if (fGeoStripNode) fGeoStripNode->IncrementRef();
00088 
00089    return *this;
00090 }

Float_t UgliStripHandle::PartialLength ( const StripEnd::StripEnd_t  end  )  const [inline, virtual]
void UgliStripHandle::RotateRelMdlBy ( Float_t  deltaRadians  )  [inline]

Definition at line 183 of file UgliStripHandle.h.

References GetZRotRelMdlRad(), and SetZRotRelMdlRad().

00184 { SetZRotRelMdlRad(GetZRotRelMdlRad()+deltaRadians); }

void UgliStripHandle::SetLTPosRelMdl ( Float_t  lpos,
Float_t  tpos 
)

Definition at line 128 of file UgliStripHandle.cxx.

References AttemptSet(), Munits::cm, fGeoStripNode, fUgliStripNode, IsGeo(), UgliStripNode::SetLTPosRelMdl(), and GeoStripNode::SetLTPosRelMdl().

Referenced by ShiftLTPosRelMdlBy().

00129 {
00130   if (!AttemptSet("LTPos")) return;
00131   if (!IsGeo())fUgliStripNode->SetLTPosRelMdl(lpos,tpos);
00132   else fGeoStripNode->SetLTPosRelMdl(lpos/Munits::cm,tpos/Munits::cm);
00133   
00134 }

void UgliStripHandle::SetZRotRelMdlRad ( Float_t  radians  ) 

Definition at line 120 of file UgliStripHandle.cxx.

References AttemptSet(), fGeoStripNode, fUgliStripNode, IsGeo(), GeoStripNode::SetZRotRelMdlRad(), and UgliStripNode::SetZRotRelMdlRad().

Referenced by RotateRelMdlBy().

00121 {
00122   if (!AttemptSet("ZRotRelMdlRad")) return;
00123   if (!IsGeo())fUgliStripNode->SetZRotRelMdlRad(radians);
00124   else fGeoStripNode->SetZRotRelMdlRad(radians);
00125   
00126 }

void UgliStripHandle::ShiftLTPosRelMdlBy ( Float_t  dlpos,
Float_t  dtpos 
) [inline]

Definition at line 186 of file UgliStripHandle.h.

References Munits::cm, GetLPosRelMdl(), GetTPosRelMdl(), and SetLTPosRelMdl().

00187 { SetLTPosRelMdl((GetLPosRelMdl()+dlpos)/Munits::cm,
00188                  (GetTPosRelMdl()+dtpos)/Munits::cm); }

Float_t UgliStripHandle::TotalAttenuation ( const StripEnd::StripEnd_t  end,
const Float_t  alongLength 
) const [inline, virtual]

Implements UgliStripABC.

Definition at line 155 of file UgliStripHandle.h.

References Munits::cm, fGeoStripNode, fUgliStripNode, IsGeo(), UgliStripNode::TotalAttenuation(), and GeoStripNode::TotalAttenuation().

00156 { if ( !IsGeo() ) return fUgliStripNode->TotalAttenuation(end,alongLength);
00157   else            return fGeoStripNode->TotalAttenuation(end,
00158                                          alongLength/Munits::cm);  } 

Float_t UgliStripHandle::WlsBypass (  )  const [inline, virtual]
Float_t UgliStripHandle::WlsPigtail ( const StripEnd::StripEnd_t  end  )  const [inline, virtual]

Implements UgliStripABC.

Definition at line 143 of file UgliStripHandle.h.

References Munits::cm, fGeoStripNode, fUgliStripNode, IsGeo(), UgliStripNode::WlsPigtail(), and GeoStripNode::WlsPigtail().

Referenced by CompareToReroot::Ana(), FitTrackMSListModule::Ana(), AltDeMuxDisplay::Ana(), TimingVarsAna::Analyze(), MeuReco::CalcStripDists(), PhotonCalibratedBlueComputer::ComputePhotons(), MakeAlignmentModule::ConvertToLocal(), TrackDirectionModule::ConvertToLocal(), SimpleCalScheme::DecalAttenCorrected(), StripAttenCalScheme::DecalAttenCorrected(), MNtpModule::FillTrkInfo(), AlgShowerSR::FindTimingDirection(), AlgTrackSR::FindTimingDirection(), SimpleCalScheme::GetAttenCorrected(), StripAttenCalScheme::GetAttenCorrected(), NueDisplayModule::GetEvent(), DmxHypothesis::GetTimingOffset(), DmxMuonPlane::GetTimingOffset(), PhotonCompositeGreenTracker::GreenPhotonToPe(), PhotonDefaultModel::GreenPhotonToPe(), PhotonFullGreenTracker::GreenPhotonToPe(), load_better_mipcal(), AlgFitTrackCam::NDStripBegTime(), AlgShowerAtNu::RunAlg(), AlgTrackAtNu::RunAlg(), AlgFarDetStrip::RunAlg(), StripKG::Set(), AltDeMuxCalc::SetFibreLengthE(), AltDeMuxCalc::SetFibreLengthW(), AlgTrack::SetT(), AlgShowerSR::SetT(), ShieldGeom::SetupShieldGeom(), AlgTrackCam::SetupTimingInfo(), AlgShowerCam::SetupTimingInfo(), PhotonInjector::SimulateEvent(), GeoValidate::TestStrip_WlsPigtail(), AlgFitTrackCam::TimingFit(), and MeuPlots::ugliClearFibre().

00144 { if ( !IsGeo() ) return fUgliStripNode->WlsPigtail(end); 
00145   else            return (fGeoStripNode->WlsPigtail(end))*Munits::cm; } 


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1