Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GeoPlnNode.cxx

Go to the documentation of this file.
00001 
00002 // $Id: GeoPlnNode.cxx,v 1.5 2005/06/12 14:42:30 schubert Exp $
00003 //
00004 // GeoPlnNode
00005 //
00006 // GeoPlnNode is a plane node
00007 //
00008 // Author:  S. Kasahara 06/04
00010 #include <TGeoManager.h>
00011 #include <TGeoBBox.h>
00012 
00013 #include "MessageService/MsgService.h"
00014 #include "GeoGeometry/GeoPlnNode.h"
00015 #include "GeoGeometry/GeoGeometry.h"
00016 
00017 ClassImp(GeoPlnNode)
00018 CVSID("$Id: GeoPlnNode.cxx,v 1.5 2005/06/12 14:42:30 schubert Exp $");
00019 
00020 //_____________________________________________________________________________
00021 GeoPlnNode::GeoPlnNode(GeoGeometry* geo, TGeoVolume* plnvol,
00022                        TGeoMatrix* plnmatrix, TGeoVolume* parVol,
00023                        std::string globalpath, std::string nodename, 
00024                        const PlexPlaneId& planeid)
00025   : GeoNode(geo,plnvol,plnmatrix,parVol,globalpath,nodename), 
00026     fPlaneId(planeid) {
00027   // Normal constructor
00028 
00029   UpdateGlobalManager();
00030 
00031 }
00032 
00033 //_____________________________________________________________________________
00034 GeoPlnNode::~GeoPlnNode() {
00035   // Destructor, should delete any owned objects
00036 
00037   UpdateGlobalManager();
00038   
00039   if ( CountRef() ) {
00040     MSG("Geo",Msg::kWarning)
00041       << "GeoPlnNode destructor " << GetPlexPlaneId()
00042       << " still had " << CountRef()
00043       << " outstanding references " << endl;
00044   }
00045 
00046 }
00047 
00048 //_____________________________________________________________________________
00049 Float_t GeoPlnNode::GetHalfThickness() const {
00050   // Public method.
00051  
00052   UpdateGlobalManager();
00053   
00054   Float_t halfdz = dynamic_cast<TGeoBBox*>(GetVolume()->GetShape())->GetDZ();
00055 
00056   return halfdz;
00057 }
00058 
00059 
00060 //_____________________________________________________________________________
00061 TVector3 GeoPlnNode::GetCenter() const {
00062   // Public method.
00063 
00064   UpdateGlobalManager();
00065   
00066   Double_t lxyz[3] = {0., 0., 0.};
00067   Double_t gxyz[3];
00068 
00069   LocalToGlobal(lxyz,gxyz);
00070   return TVector3(gxyz[0],gxyz[1],gxyz[2]);
00071 }
00072 
00073 //_____________________________________________________________________________
00074 Float_t GeoPlnNode::GetX0() const {
00075   // Public method.
00076 
00077    UpdateGlobalManager();
00078   
00079    Double_t lxyz[3] = {0., 0., 0.};
00080    Double_t gxyz[3];
00081 
00082    LocalToGlobal(lxyz,gxyz);
00083    return gxyz[0];
00084 }
00085 
00086 //_____________________________________________________________________________
00087 Float_t GeoPlnNode::GetY0() const {
00088   // Public method.
00089 
00090    UpdateGlobalManager();
00091   
00092    Double_t lxyz[3] = {0., 0., 0.};
00093    Double_t gxyz[3];
00094 
00095    LocalToGlobal(lxyz,gxyz);
00096    return gxyz[1];
00097 }
00098 
00099 //_____________________________________________________________________________
00100 Float_t GeoPlnNode::GetZ0() const {
00101   // Public method.
00102 
00103    UpdateGlobalManager();
00104   
00105    Double_t lxyz[3] = {0., 0., 0.};
00106    Double_t gxyz[3];
00107 
00108    LocalToGlobal(lxyz,gxyz);
00109    return gxyz[2];
00110 }
00111 
00112 

Generated on Mon Feb 15 11:06:45 2010 for loon by  doxygen 1.3.9.1