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

GeoScintPlnNode Class Reference

#include <GeoScintPlnNode.h>

Inheritance diagram for GeoScintPlnNode:

GeoPlnNode GeoNode GeoRefCnt List of all members.

Public Member Functions

 GeoScintPlnNode ()
virtual ~GeoScintPlnNode ()
GeoStripNodeGetClosestStrip (Float_t tpos, Float_t orthCoord=999999.) const
virtual GeoStripNodeGetStripNode (const PlexStripEndId &seid) const
virtual Int_t NumberOfStrips () const
virtual Int_t NumberOfModules () const
virtual std::vector< GeoStripNode * > GetStripNodePtrVector () const
virtual std::vector< GeoScintMdlNode * > GetScintMdlNodePtrVector () const
Float_t GetZRotRelSteelRad () const
Float_t GetX0RelSteel () const
Float_t GetY0RelSteel () const
void SetZRotRelSteelRad (Float_t radians)
void SetXY0RelSteel (Float_t x0, Float_t y0)

Protected Member Functions

 GeoScintPlnNode (GeoGeometry *geoGeometry, TGeoVolume *plnvol, TGeoMatrix *plnmatrix, TGeoVolume *parVolume, std::string globalpath, std::string nodename, const PlexPlaneId &planeid)
virtual GeoScintPlnVolumeGetScintPlnVolume () const

Private Member Functions

 GeoScintPlnNode (const GeoScintPlnNode &that)
GeoScintPlnNodeoperator= (const GeoScintPlnNode &that)

Friends

class GeoGeometry

Constructor & Destructor Documentation

GeoScintPlnNode::GeoScintPlnNode  )  [inline]
 

Definition at line 29 of file GeoScintPlnNode.h.

00029 {} // default constructor for i/o

GeoScintPlnNode::~GeoScintPlnNode  )  [virtual]
 

Definition at line 31 of file GeoScintPlnNode.cxx.

References GeoRefCnt::CountRef(), GeoPlnNode::GetPlexPlaneId(), and MSG.

00031                                   {
00032   // Destructor should delete any owned objects
00033   if ( CountRef() ) {
00034     MSG("Geo",Msg::kWarning)
00035       << "GeoScintPlnNode destructor " << GetPlexPlaneId()
00036       << " still had " << CountRef()
00037       << " outstanding references " << endl;
00038   }
00039 }

GeoScintPlnNode::GeoScintPlnNode GeoGeometry geoGeometry,
TGeoVolume *  plnvol,
TGeoMatrix *  plnmatrix,
TGeoVolume *  parVolume,
std::string  globalpath,
std::string  nodename,
const PlexPlaneId planeid
[protected]
 

Definition at line 21 of file GeoScintPlnNode.cxx.

00025   : GeoPlnNode(geo,plnvol,plnmatrix,parVol,globalpath,nodename,planeid) {
00026   // Normal constructor
00027   // Protected
00028 
00029 }

GeoScintPlnNode::GeoScintPlnNode const GeoScintPlnNode that  )  [private]
 


Member Function Documentation

GeoStripNode * GeoScintPlnNode::GetClosestStrip Float_t  tpos,
Float_t  orthCoord = 999999.
const
 

Definition at line 174 of file GeoScintPlnNode.cxx.

References GetStripNodePtrVector(), and GeoNode::UpdateGlobalManager().

00175                                                                         {
00176   // Return the node of the strip in the plane with a position
00177   // closest to "tpos", orthCoord is position in orthogonal coordinate
00178 
00179   UpdateGlobalManager();
00180 
00181   vector<GeoStripNode*> stripNodes = this -> GetStripNodePtrVector();
00182   GeoStripNode* closestNode = 0;
00183   Float_t closestDtpos = 999999.;
00184   
00185   for ( unsigned int i = 0; i < stripNodes.size(); ++i ) {
00186     Float_t strip_tpos = stripNodes[i] -> GetTPos(orthCoord);
00187     Float_t dtpos = TMath::Abs(strip_tpos-tpos);
00188     if ( dtpos < closestDtpos ) {
00189       closestNode = stripNodes[i];
00190       closestDtpos = dtpos;
00191     }
00192     else if ( closestNode != 0 ) {
00193       // Moving away from closet node
00194       return closestNode;
00195     }
00196   }
00197   
00198   return closestNode;
00199   
00200 }

vector< GeoScintMdlNode * > GeoScintPlnNode::GetScintMdlNodePtrVector  )  const [virtual]
 

Definition at line 139 of file GeoScintPlnNode.cxx.

References GeoScintPlnVolume::GetScintMdlNodePtrVector(), GetScintPlnVolume(), and GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::GetScintMdlHandleVector().

00139                                                                          {
00140   // Return vector of GeoScintMdlNode's in this plane
00141 
00142   UpdateGlobalManager();
00143   
00144   return (GetScintPlnVolume()->GetScintMdlNodePtrVector());
00145   
00146 }

virtual GeoScintPlnVolume* GeoScintPlnNode::GetScintPlnVolume  )  const [inline, protected, virtual]
 

Definition at line 55 of file GeoScintPlnNode.h.

Referenced by GetScintMdlNodePtrVector(), GetStripNodePtrVector(), NumberOfModules(), and NumberOfStrips().

00056     { return dynamic_cast<GeoScintPlnVolume*>(this->GetVolume()); }

GeoStripNode * GeoScintPlnNode::GetStripNode const PlexStripEndId seid  )  const [virtual]
 

Definition at line 42 of file GeoScintPlnNode.cxx.

References PlexStripEndId::AsString(), PlexPlaneId::AsString(), GeoPlnNode::GetPlexPlaneId(), MSG, and GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::GetStripHandle().

00042                                                                             {
00043   // Returns strip node corresponding to specified seid
00044 
00045   MSG("Geo",Msg::kDebug) << " PlaneId " << GetPlexPlaneId().AsString() 
00046                          << " GetStripNode " << seid.AsString() << endl;
00047 
00048   UpdateGlobalManager();
00049   
00050   TGeoVolume* vol = this -> GetVolume();
00051   Int_t nmodule = vol -> GetNdaughters();
00052   for ( int imdl = 0; imdl < nmodule; imdl++ ) {
00053     GeoScintMdlNode* mdlNode = dynamic_cast<GeoScintMdlNode*>
00054                                (vol -> GetNode(imdl));
00055     if ( mdlNode ) {
00056       GeoStripNode* stpNode = mdlNode -> GetStripNode(seid);
00057       if ( stpNode ) return stpNode;
00058     }
00059   }
00060 
00061   MSG("Geo",Msg::kWarning) << "GetStripNode for plane " 
00062        << GetPlexPlaneId().AsString() << " failed to find strip " 
00063        << seid.AsString() << "." << endl;
00064   
00065   return 0;
00066   
00067 }

vector< GeoStripNode * > GeoScintPlnNode::GetStripNodePtrVector  )  const [virtual]
 

Definition at line 129 of file GeoScintPlnNode.cxx.

References GetScintPlnVolume(), GeoScintPlnVolume::GetStripNodePtrVector(), and GeoNode::UpdateGlobalManager().

Referenced by GetClosestStrip(), and UgliScintPlnHandle::GetStripHandleVector().

00129                                                                    {
00130   // Return vector of GeoStripNode's in this plane
00131 
00132   UpdateGlobalManager();
00133   
00134   return (GetScintPlnVolume()->GetStripNodePtrVector());
00135   
00136 }

Float_t GeoScintPlnNode::GetX0RelSteel  )  const
 

Definition at line 83 of file GeoScintPlnNode.cxx.

References GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::GetX0RelSteel().

00083                                              {
00084   // Return the x pos relative to steel (x-coord from translation matrix)
00085 
00086   UpdateGlobalManager();
00087   
00088   const Double_t* trans = GetMatrix() -> GetTranslation();
00089   
00090   return trans[0];
00091   
00092 }

Float_t GeoScintPlnNode::GetY0RelSteel  )  const
 

Definition at line 95 of file GeoScintPlnNode.cxx.

References GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::GetY0RelSteel().

00095                                              {
00096   // Return the y pos relative to steel (y-coord from translation matrix)
00097 
00098   UpdateGlobalManager();
00099 
00100   const Double_t* trans = GetMatrix() -> GetTranslation();
00101   
00102   return trans[1];
00103   
00104 }

Float_t GeoScintPlnNode::GetZRotRelSteelRad  )  const
 

Definition at line 70 of file GeoScintPlnNode.cxx.

References GeoNode::UpdateGlobalManager().

Referenced by GeoStripNode::GetTPos(), and UgliScintPlnHandle::GetZRotRelSteelRad().

00070                                                   {
00071   // Return zrot relative to steel
00072 
00073   UpdateGlobalManager();
00074   
00075   const Double_t* rotmatrix = GetMatrix() -> GetRotationMatrix();
00076   Float_t zrotrelsteelrad = TMath::ATan2(rotmatrix[3],rotmatrix[0]);
00077   
00078   return zrotrelsteelrad;
00079   
00080 }

Int_t GeoScintPlnNode::NumberOfModules  )  const [virtual]
 

Definition at line 118 of file GeoScintPlnNode.cxx.

References GetScintPlnVolume(), and GeoNode::UpdateGlobalManager().

00118                                              {
00119   // Return total number of strips in plane
00120 
00121   UpdateGlobalManager();
00122   
00123   // Should cache this data once calculated
00124   return (GetScintPlnVolume() -> NumberOfModules());
00125   
00126 }

Int_t GeoScintPlnNode::NumberOfStrips  )  const [virtual]
 

Definition at line 107 of file GeoScintPlnNode.cxx.

References GetScintPlnVolume(), and GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::NumberOfStrips().

00107                                             {
00108   // Return total number of strips in plane
00109 
00110   UpdateGlobalManager();
00111   
00112   // Should cache this data once calculated
00113   return (GetScintPlnVolume() -> NumberOfStrips());
00114   
00115 }

GeoScintPlnNode& GeoScintPlnNode::operator= const GeoScintPlnNode that  )  [private]
 

void GeoScintPlnNode::SetXY0RelSteel Float_t  x0,
Float_t  y0
 

Definition at line 161 of file GeoScintPlnNode.cxx.

References MSG, and GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::SetXY0RelSteel().

00161                                                                        {
00162   // Dummy
00163 
00164   UpdateGlobalManager();
00165   
00166   MSG("Geo",Msg::kWarning) 
00167     << "GeoScintPlnNode::SetXY0RelSteel not implemented yet." << endl;
00168   return;
00169   
00170 }

void GeoScintPlnNode::SetZRotRelSteelRad Float_t  radians  ) 
 

Definition at line 149 of file GeoScintPlnNode.cxx.

References MSG, and GeoNode::UpdateGlobalManager().

Referenced by UgliScintPlnHandle::SetZRotRelSteelRad().

00149                                                               {
00150   // Dummy
00151 
00152   UpdateGlobalManager();
00153   
00154   MSG("Geo",Msg::kWarning) 
00155    << "GeoScintPlnNode::SetZRotRelSteelRad not implemented yet." << endl;
00156   return;
00157   
00158 }


Friends And Related Function Documentation

friend class GeoGeometry [friend]
 

Reimplemented from GeoNode.

Definition at line 25 of file GeoScintPlnNode.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:14 2010 for loon by  doxygen 1.3.9.1