UgliPlnNode Class Reference

#include <UgliPlnNode.h>

Inheritance diagram for UgliPlnNode:
UgliPlnABC UgliRefCnt TNodeX UgliScintPlnNode UgliSteelPlnNode

List of all members.

Public Member Functions

 UgliPlnNode ()
virtual PlexPlaneId GetPlexPlaneId () 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 ~UgliPlnNode ()
virtual UgliGeometryGetUgliGeometry () const

Protected Member Functions

 UgliPlnNode (UgliGeometry *ugliGeometry, const PlexPlaneId &planeid)
virtual void IncrementRef ()
virtual void DecrementRef ()
void TransformLocal2Global (Double_t *lxyz, Double_t *gxyz) const

Protected Attributes

UgliGeometryfUgliGeometry
PlexPlaneId fPlaneId

Private Member Functions

 UgliPlnNode (const UgliPlnNode &that)
UgliPlnNodeoperator= (const UgliPlnNode &ugh)

Friends

class UgliGeometry
class UgliGeometryReroot
class UgliPlnHandle

Detailed Description

Definition at line 23 of file UgliPlnNode.h.


Constructor & Destructor Documentation

UgliPlnNode::UgliPlnNode (  ) 

Definition at line 28 of file UgliPlnNode.cxx.

00029   : fUgliGeometry(0)
00030 {
00031    // Default constructor (for i/o)
00032 }

UgliPlnNode::~UgliPlnNode (  )  [virtual]

Definition at line 44 of file UgliPlnNode.cxx.

References UgliRefCnt::CountRef(), GetPlexPlaneId(), Msg::kWarning, and MSG.

00045 {
00046    // destructor should delete any owned objects
00047    if (CountRef()) {
00048       MSG("Ugli",Msg::kWarning)
00049         << "~UgliPlnNode " << GetPlexPlaneId()
00050         << " still had " << CountRef()
00051         << " outstanding references " << endl;
00052    }
00053 }

UgliPlnNode::UgliPlnNode ( UgliGeometry ugliGeometry,
const PlexPlaneId planeid 
) [protected]

Definition at line 35 of file UgliPlnNode.cxx.

00037    : TNodeX(planeid.AsString("p"),planeid.AsString("p"),"noshape"),
00038      fUgliGeometry(ugliGeometry), fPlaneId(planeid)
00039 {
00040 
00041 }

UgliPlnNode::UgliPlnNode ( const UgliPlnNode that  )  [private]

Member Function Documentation

void UgliPlnNode::DecrementRef (  )  [protected, virtual]

Reimplemented from UgliRefCnt.

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 64 of file UgliPlnNode.cxx.

References UgliRefCnt::DecrementRef(), UgliRefCnt::fRef, and fUgliGeometry.

Referenced by UgliPlnHandle::operator=(), and UgliPlnHandle::~UgliPlnHandle().

00065 { 
00066    fRef--; 
00067    fUgliGeometry->DecrementRef();
00068    if (!fRef) SetVisibility(0);
00069 }

TVector3 UgliPlnNode::GetCenter (  )  const [virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnNode.

Definition at line 102 of file UgliPlnNode.cxx.

References TransformLocal2Global().

Referenced by UgliPlnHandle::GetCenter().

00103 {
00104    Double_t lxyz[3] = {0., 0., 0.};
00105    Double_t gxyz[3];
00106 
00107    TransformLocal2Global(lxyz,gxyz);
00108    return TVector3(gxyz[0],gxyz[1],gxyz[2]);
00109 }

Float_t UgliPlnNode::GetHalfThickness (  )  const [virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnNode.

Definition at line 72 of file UgliPlnNode.cxx.

References Msg::kError, and MSG.

Referenced by UgliPlnHandle::GetHalfThickness(), UgliGeometry::GetPlaneIdFromZ(), and UgliGeometry::GetZExtent().

00073 {
00074 
00075    TBRIK *brik = dynamic_cast<TBRIK*>(fShape);
00076    if (brik) return brik->GetDz();
00077 
00078    TXTRU *xtru = dynamic_cast<TXTRU*>(fShape);
00079    if (xtru) {
00080       Int_t    nz = xtru->GetNz();
00081       Float_t* fz = xtru->GetZ();
00082       return 0.5*TMath::Abs(fz[0]-fz[nz-1]);
00083    }
00084 
00085    MSG("Ugli",Msg::kError) <<
00086       "UgliPlnNode::GetHalfThickness: not a BRIK or TXTRU" << endl;
00087 
00088    return 0;
00089 }

virtual PlexPlaneId UgliPlnNode::GetPlexPlaneId (  )  const [inline, virtual]
virtual UgliGeometry* UgliPlnNode::GetUgliGeometry (  )  const [inline, virtual]

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 46 of file UgliPlnNode.h.

References fUgliGeometry.

00046 { return fUgliGeometry; }

Float_t UgliPlnNode::GetX0 (  )  const [virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnNode.

Definition at line 112 of file UgliPlnNode.cxx.

References TransformLocal2Global().

Referenced by UgliPlnHandle::GetX0().

00113 {
00114    Double_t lxyz[3] = {0., 0., 0.};
00115    Double_t gxyz[3];
00116 
00117    TransformLocal2Global(lxyz,gxyz);
00118    return gxyz[0];
00119 }

Float_t UgliPlnNode::GetY0 (  )  const [virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnNode.

Definition at line 122 of file UgliPlnNode.cxx.

References TransformLocal2Global().

Referenced by UgliPlnHandle::GetY0().

00123 {
00124    Double_t lxyz[3] = {0., 0., 0.};
00125    Double_t gxyz[3];
00126 
00127    TransformLocal2Global(lxyz,gxyz);
00128    return gxyz[1];
00129 }

Float_t UgliPlnNode::GetZ0 (  )  const [virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnNode.

Definition at line 132 of file UgliPlnNode.cxx.

References TransformLocal2Global().

Referenced by UgliGeometry::GetPlaneIdFromZ(), UgliStripNode::GetTPos(), UgliPlnHandle::GetZ0(), and UgliGeometry::GetZExtent().

00133 {
00134    Double_t lxyz[3] = {0., 0., 0.};
00135    Double_t gxyz[3];
00136 
00137    TransformLocal2Global(lxyz,gxyz);
00138    return gxyz[2];
00139 }

void UgliPlnNode::IncrementRef (  )  [protected, virtual]

Reimplemented from UgliRefCnt.

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 57 of file UgliPlnNode.cxx.

References UgliRefCnt::fRef, fUgliGeometry, and UgliRefCnt::IncrementRef().

Referenced by UgliPlnHandle::operator=(), and UgliPlnHandle::UgliPlnHandle().

00058 {
00059    fRef++; 
00060    fUgliGeometry->IncrementRef();
00061    SetVisibility(1);
00062 }

UgliPlnNode& UgliPlnNode::operator= ( const UgliPlnNode ugh  )  [private]

Reimplemented from UgliPlnABC.

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

void UgliPlnNode::TransformLocal2Global ( Double_t *  lxyz,
Double_t *  gxyz 
) const [protected]

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 92 of file UgliPlnNode.cxx.

Referenced by GetCenter(), GetX0(), GetY0(), and GetZ0().

00093 {
00094    // deal with fact that TNode::Master2Local isn't declared const
00095    UgliPlnNode* self = const_cast<UgliPlnNode*>(this);
00096    self->cd();
00097    self->UpdateMatrix();
00098    self->Local2Master(lxyz,gxyz);
00099 }


Friends And Related Function Documentation

friend class UgliGeometry [friend]

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 25 of file UgliPlnNode.h.

friend class UgliGeometryReroot [friend]

Reimplemented in UgliScintPlnNode, and UgliSteelPlnNode.

Definition at line 26 of file UgliPlnNode.h.

friend class UgliPlnHandle [friend]

Definition at line 27 of file UgliPlnNode.h.


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