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

UgliScintPlnNode.h

Go to the documentation of this file.
00001 
00002 // $Id: UgliScintPlnNode.h,v 1.17 2003/10/29 19:22:13 rhatcher Exp $
00003 //
00004 // UgliScintPlnNode
00005 //
00006 // UgliScintPlnNode is single scintillator plane
00007 //
00008 // Author:  R. Hatcher 2000.11.15
00009 //
00011 
00012 #ifndef UGLISCINTPLNNODE_H
00013 #define UGLISCINTPLNNODE_H
00014 class UgliScintPlnNode;
00015 class UgliScintPlnABC;
00016 class UgliPlnNode;
00017 
00018 #include "UgliGeometry/Ugli.h"
00019 #include "UgliGeometry/UgliScintPlnABC.h"
00020 #include "UgliGeometry/UgliPlnNode.h"
00021 class UgliScintMdlNode;
00022 class UgliStripNode;
00023 
00024 #include <map>
00025 class VldContext;
00026 class UgliStripNode;
00027 class UgliDbiTables;
00028 
00029 class UgliScintPlnNode : public UgliScintPlnABC, public UgliPlnNode {
00030 
00031    friend class UgliGeometry;        // only the geometry creates these
00032    friend class UgliGeometryReroot;  // only the geometry creates these
00033    friend class UgliScintPlnHandle;  // handles play with our ref count
00034 
00035  public:
00036 
00037    // base TNode class has this public
00038    virtual ~UgliScintPlnNode();
00039 
00040    // generic plane
00041 //   virtual PlexPlaneId    GetPlexPlaneId() const {return fPlaneId;}
00042 //
00043 //   virtual Float_t        GetHalfThickness() const;
00044 //   virtual TVector3       GetCenter() const;
00045 //   virtual Float_t        GetX0() const;
00046 //   virtual Float_t        GetY0() const;
00047 //   virtual Float_t        GetZ0() const;
00048 
00049    // scint pln specific
00050    virtual Int_t                           NumberOfStrips() const;
00051    virtual std::vector<UgliStripNode*>     GetStripNodePtrVector() const;
00052    virtual std::vector<UgliScintMdlNode*>  GetScintMdlNodePtrVector() const;
00053 
00054    // convert between world and scint plane coordinates
00055    virtual TVector3       GlobalToLocal(const TVector3& global) const;
00056    virtual TVector3       LocalToGlobal(const TVector3& local) const;
00057 
00058    virtual UgliGeometry*           GetUgliGeometry() const 
00059       { return fUgliGeometry; }
00060 
00061    // scint node specific method
00062    virtual UgliStripNode*          GetStripNode(PlexStripEndId seid) const;
00063 
00064    Float_t           GetZRotRelSteelRad() const;
00065    Float_t           GetX0RelSteel() const;
00066    Float_t           GetY0RelSteel() const;
00067 
00068    void              SetZRotRelSteelRad(Float_t radians);
00069    void              SetXY0RelSteel(Float_t x0, Float_t y0);
00070 
00071  public:
00072 
00073    // Avoid creating UgliStrip without a reference 
00074    // to something having a Validity object
00075    UgliScintPlnNode();  // should be protected, but needed for i/o
00076 
00077  protected:
00078 
00079    // inc/dec of references to this object should also that of UgliGeometry
00080    virtual void           IncrementRef();
00081    virtual void           DecrementRef();
00082 
00083    // ctor for DBI driven UgliGeometry
00084    UgliScintPlnNode(const PlexPlaneId planeid, UgliGeometry* ugligeom,
00085                     const UgliDbiTables& ugliTables);
00086 
00087    // used by GetCenter, Get[X,Y,Z]0
00088    void TransformLocal2Global(Double_t *lxyz, Double_t *gxyz) const;
00089 
00090    // build all the strips  (DBI driven)
00091    void BuildStrips(const UgliDbiTables& ugliTables);
00092 
00093    std::map<PlexStripEndId,UgliStripNode*> fStripTable;
00094 
00095  private:
00096 
00097    // avoid copy and assignment ctor by making them private and w/ no imp
00098    UgliScintPlnNode(const UgliScintPlnNode& that); 
00099    UgliScintPlnNode& operator=(const UgliScintPlnNode& ugh);
00100 
00101    ClassDef(UgliScintPlnNode,1)
00102 };
00103 
00104 #ifndef __CINT__
00105 //=============================================================================
00106 // Implementation details -- inlines need to be hidden from CINT
00107 //=============================================================================
00108 
00109 inline void UgliScintPlnNode::SetXY0RelSteel(Float_t x0, Float_t y0)
00110 { SetPosition(x0,y0,0.0); }
00111 
00112 inline Float_t UgliScintPlnNode::GetZRotRelSteelRad() const
00113 { return fMatrix->GetPhi()*Ugli::deg2rad; }
00114 
00115 inline Float_t UgliScintPlnNode::GetX0RelSteel() const { return fX; }
00116 inline Float_t UgliScintPlnNode::GetY0RelSteel() const { return fY; }
00117 
00118 #endif /* __CINT__ */
00119 #endif // UGLISCINTPLNNODE_H

Generated on Mon Nov 23 05:28:45 2009 for loon by  doxygen 1.3.9.1