UgliSteelPlnHandle Class Reference

#include <UgliSteelPlnHandle.h>

Inheritance diagram for UgliSteelPlnHandle:
UgliPlnHandle UgliSteelPlnABC UgliPlnABC

List of all members.

Public Member Functions

 UgliSteelPlnHandle (UgliSteelPlnNode *steelNode)
 UgliSteelPlnHandle (GeoSteelPlnNode *steelNode)
 UgliSteelPlnHandle (const UgliSteelPlnHandle &that)
UgliSteelPlnHandleoperator= (const UgliSteelPlnHandle &that)
 UgliSteelPlnHandle ()
virtual ~UgliSteelPlnHandle ()
virtual Bool_t IsValid () const
virtual Bool_t IsFrozen () const
virtual Float_t GetHalfThickness () const
virtual TVector3 GetCenter () const
virtual Float_t GetX0 () const
virtual Float_t GetY0 () const
virtual Float_t GetZ0 () 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 TVector3 GlobalToLocalVect (const TVector3 &global, const Bool_t globalInXYZ=true) const
virtual TVector3 LocalToGlobalVect (const TVector3 &local, const Bool_t globalInXYZ=true) const

Protected Attributes

UgliSteelPlnNodefUgliSteelPlnNode
GeoSteelPlnNodefGeoSteelPlnNode

Detailed Description

Definition at line 22 of file UgliSteelPlnHandle.h.


Constructor & Destructor Documentation

UgliSteelPlnHandle::UgliSteelPlnHandle ( UgliSteelPlnNode steelNode  ) 

Definition at line 45 of file UgliSteelPlnHandle.cxx.

00046   : UgliPlnHandle(node), fUgliSteelPlnNode(node), fGeoSteelPlnNode(0)
00047 {
00048    // ctor keeps reference count up-to-date
00049    // done by super-class UgliPlnHandle
00050    // don't do it here or we'll get two counts for every handle
00051 
00052    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->IncrementRef();
00053    // if (fGeoSteelPlnNode) fGeoSteelPlnNode->IncrementRef();
00054 }

UgliSteelPlnHandle::UgliSteelPlnHandle ( GeoSteelPlnNode steelNode  ) 

Definition at line 57 of file UgliSteelPlnHandle.cxx.

00058   : UgliPlnHandle(node), fUgliSteelPlnNode(0), fGeoSteelPlnNode(node)
00059 {
00060    // ctor keeps reference count up-to-date
00061    // done by super-class UgliPlnHandle
00062    // don't do it here or we'll get two counts for every handle
00063 
00064    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->IncrementRef();
00065    // if (fGeoSteelPlnNode) fGeoSteelPlnNode->IncrementRef();
00066 }

UgliSteelPlnHandle::UgliSteelPlnHandle ( const UgliSteelPlnHandle that  ) 

Definition at line 69 of file UgliSteelPlnHandle.cxx.

00070    : UgliPlnHandle(that),
00071      UgliSteelPlnABC(),
00072      fUgliSteelPlnNode(that.fUgliSteelPlnNode),
00073      fGeoSteelPlnNode(that.fGeoSteelPlnNode)
00074 {
00075    // copy constructor keeps reference counts up-to-date
00076    // done by super-class UgliPlnHandle
00077    // don't do it here or we'll get two counts for every handle
00078 
00079    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->IncrementRef();
00080    // if (fGeoSteelPlnNode) fGeoSteelPlnNode->IncrementRef();
00081 }

UgliSteelPlnHandle::UgliSteelPlnHandle (  ) 

Definition at line 23 of file UgliSteelPlnHandle.cxx.

References Msg::kDebug, and MSG.

00024   : UgliPlnHandle((UgliPlnNode*)0), fUgliSteelPlnNode(0), fGeoSteelPlnNode(0)
00025 {
00026    // Default constructor
00027 
00028    MSG("Ugli",Msg::kDebug) 
00029      << "UgliSteelPlnHandle created by default ctor" << endl;
00030 //   assert(0);
00031 }

UgliSteelPlnHandle::~UgliSteelPlnHandle (  )  [virtual]

Definition at line 34 of file UgliSteelPlnHandle.cxx.

00035 {
00036    // handle deletion updates reference count
00037    // done by super-class UgliPlnHandle
00038    // don't do it here or we'll get two counts for every handle
00039 
00040    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->DecrementRef();
00041    // if (fGeoSteelPlnNode) fGeoSteelPlnNode->DecrementRef();
00042 }


Member Function Documentation

TVector3 UgliSteelPlnHandle::GetCenter (  )  const [inline, virtual]
Float_t UgliSteelPlnHandle::GetHalfThickness (  )  const [inline, virtual]
Float_t UgliSteelPlnHandle::GetX0 (  )  const [inline, virtual]
Float_t UgliSteelPlnHandle::GetY0 (  )  const [inline, virtual]
Float_t UgliSteelPlnHandle::GetZ0 (  )  const [inline, virtual]
TVector3 UgliSteelPlnHandle::GlobalToLocal ( const TVector3 &  global,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 104 of file UgliSteelPlnHandle.cxx.

References Munits::cm, fGeoSteelPlnNode, fUgliSteelPlnNode, PlexPlaneId::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), GeoNode::GlobalToLocal(), UgliSteelPlnNode::GlobalToLocal(), UgliPlnHandle::IsGeo(), and Ugli::uvz2xyz().

Referenced by BfldCache::SetSteelAndPlaneMapCache(), and GeoValidate::TestSteelPln_GlobalToLocal().

00106 {
00107   // convert a global position into a local (volume) one
00108   // globalInXYZ determines whether result is in XYZ or UVZ
00109   TVector3 globalXYZ = (globalInXYZ) ? 
00110       global : Ugli::uvz2xyz(GetPlexPlaneId().GetDetector(),global);
00111 
00112   if (!IsGeo())
00113       return fUgliSteelPlnNode->GlobalToLocal(global);
00114   else {
00115       TVector3 scaledglobal(global); scaledglobal *= 1./Munits::cm;
00116       return (fGeoSteelPlnNode->GlobalToLocal(scaledglobal)*Munits::cm); 
00117   }
00118 }

TVector3 UgliSteelPlnHandle::GlobalToLocalVect ( const TVector3 &  global,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 140 of file UgliSteelPlnHandle.cxx.

References Munits::cm, fGeoSteelPlnNode, fUgliSteelPlnNode, PlexPlaneId::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), UgliSteelPlnNode::GlobalToLocalVect(), GeoNode::GlobalToLocalVect(), UgliPlnHandle::IsGeo(), and Ugli::uvz2xyz().

00142 {
00143   // convert a global direction vector into a local (volume) one
00144   // globalInXYZ determines whether result is in XYZ or UVZ
00145   TVector3 globalXYZ = (globalInXYZ) ? 
00146       global : Ugli::uvz2xyz(GetPlexPlaneId().GetDetector(),global);
00147 
00148   if (!IsGeo())
00149       return fUgliSteelPlnNode->GlobalToLocalVect(global);
00150   else {
00151       TVector3 scaledglobal(global); scaledglobal *= 1./Munits::cm;
00152       return (fGeoSteelPlnNode->GlobalToLocalVect(scaledglobal)*Munits::cm); 
00153   }
00154 }

Bool_t UgliSteelPlnHandle::IsFrozen (  )  const [inline, virtual]
Bool_t UgliSteelPlnHandle::IsValid (  )  const [inline, virtual]
TVector3 UgliSteelPlnHandle::LocalToGlobal ( const TVector3 &  local,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 121 of file UgliSteelPlnHandle.cxx.

References Munits::cm, fGeoSteelPlnNode, fUgliSteelPlnNode, DataUtil::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), UgliPlnHandle::IsGeo(), UgliSteelPlnNode::LocalToGlobal(), GeoNode::LocalToGlobal(), and Ugli::xyz2uvz().

Referenced by GeoValidate::TestSteelPln_GlobalToLocal(), and GeoValidate::TestSteelPln_LocalToGlobal().

00123 {
00124   // convert a local (volume) position into a global one
00125   // globalInXYZ determines whether result is in XYZ or UVZ
00126   TVector3 globalXYZ;
00127   if (!IsGeo())
00128       globalXYZ = fUgliSteelPlnNode->LocalToGlobal(local); 
00129   else {
00130       TVector3 scaledlocal(local); scaledlocal *= 1./Munits::cm;
00131       globalXYZ = (fGeoSteelPlnNode->LocalToGlobal(scaledlocal)*Munits::cm); 
00132   }
00133 
00134   if (globalInXYZ ) return globalXYZ;
00135   else              return Ugli::xyz2uvz(GetPlexPlaneId().GetDetector(),
00136                                          globalXYZ);
00137 }

TVector3 UgliSteelPlnHandle::LocalToGlobalVect ( const TVector3 &  local,
const Bool_t  globalInXYZ = true 
) const [virtual]

Definition at line 157 of file UgliSteelPlnHandle.cxx.

References Munits::cm, fGeoSteelPlnNode, fUgliSteelPlnNode, DataUtil::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), UgliPlnHandle::IsGeo(), GeoNode::LocalToGlobalVect(), UgliSteelPlnNode::LocalToGlobalVect(), and Ugli::xyz2uvz().

Referenced by BField::GetBField().

00159 {
00160   // convert a local (volume) direction into a global one
00161   // globalInXYZ determines whether result is in XYZ or UVZ
00162   TVector3 globalXYZ;
00163   if (!IsGeo())
00164       globalXYZ = fUgliSteelPlnNode->LocalToGlobalVect(local); 
00165   else {
00166       TVector3 scaledlocal(local); scaledlocal *= 1./Munits::cm;
00167       globalXYZ = (fGeoSteelPlnNode->LocalToGlobalVect(scaledlocal)*Munits::cm); 
00168   }
00169 
00170   if (globalInXYZ ) return globalXYZ;
00171   else              return Ugli::xyz2uvz(GetPlexPlaneId().GetDetector(),
00172                                          globalXYZ);
00173 }

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

Reimplemented from UgliPlnHandle.

Definition at line 84 of file UgliSteelPlnHandle.cxx.

References fGeoSteelPlnNode, and fUgliSteelPlnNode.

00085 {
00086    // assignment keeps reference counts up-to-date
00087    // done by super-class UgliPlnHandle
00088    // don't do it here or we'll get two counts for every handle
00089    
00090    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->DecrementRef();
00091    // fUgliSteelPlnNode = that.fUgliSteelPlnNode;
00092    // if (fUgliSteelPlnNode) fUgliSteelPlnNode->IncrementRef();
00093 
00094    if ( this != &that ) {
00095      UgliPlnHandle::operator=(that);
00096      fUgliSteelPlnNode = that.fUgliSteelPlnNode;
00097      //fUgliPlnNode      = that.fUgliPlnNode; // redundant? s.k.3/16/05
00098      fGeoSteelPlnNode = that.fGeoSteelPlnNode;
00099    }
00100    return *this;
00101 }


Member Data Documentation


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1