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

UgliScintMdlNode.h

Go to the documentation of this file.
00001 
00002 // $Id: UgliScintMdlNode.h,v 1.8 2003/10/29 19:22:13 rhatcher Exp $
00003 //
00004 // UgliScintMdlNode
00005 //
00006 // UgliScintMdlNode is single scintillator module
00007 //
00008 // Author:  R. Hatcher 2001.10.10
00009 //
00011 
00012 #ifndef UGLISCINTMDLNODE_H
00013 #define UGLISCINTMDLNODE_H
00014 class UgliScintMdlNode;
00015 class UgliScintPlnNode;
00016 class UgliScintMdlHandle;
00017 
00018 #include "UgliGeometry/Ugli.h"
00019 #include "UgliGeometry/UgliScintMdlABC.h"
00020 #include "UgliGeometry/UgliRefCnt.h"
00021 #include "UgliGeometry/TNodeX.h"
00022 
00023 #include <string>
00024 using std::string;
00025 
00026 class VldContext;
00027 class UgliGeometry;
00028 class UgliDbiTables;
00029 class TXTRU;
00030 
00031 class UgliScintMdlNode : public UgliScintMdlABC, public UgliRefCnt, public TNodeX {
00032 
00033    friend class UgliScintPlnNode;    // only the plane creates these
00034    friend class UgliScintMdlHandle;  // handles play with our ref count
00035 
00036  public:
00037 
00038    // base TNode class has this public
00039    virtual ~UgliScintMdlNode();
00040 
00041    virtual PlexScintMdlId GetPlexScintMdlId() const {return fScintMdlId;}
00042    virtual PlexPlaneId    GetPlexPlaneId() const;
00043    virtual Int_t          GetModuleNum() const;
00044 
00045    virtual Int_t          NumberOfStrips() const;
00046 
00047    virtual Float_t        GetClearFiber(const StripEnd::StripEnd_t end) const;
00048    virtual Float_t        GetExtraWlsFiber(const StripEnd::StripEnd_t end) const;
00049 
00050    // convert between world and scint module coordinates
00051    virtual TVector3       GlobalToLocal(const TVector3& global) const;
00052    virtual TVector3       LocalToGlobal(const TVector3& local) const;
00053                                            
00054    virtual UgliGeometry  *GetUgliGeometry() const { return fUgliGeometry; }
00055 
00056    // Returns the ScintPlnNode in which this ScintMdlNode is.
00057    UgliScintPlnNode* GetScintPlnNode(void) const;
00058 
00059    Float_t           GetZRotRelPlnRad() const;
00060    Float_t           GetLPosRelPln() const;
00061    Float_t           GetTPosRelPln() const;
00062 
00063    void              SetZRotRelPlnRad(Float_t radians);
00064    void              SetLTPosRelPln(Float_t lpos, Float_t tpos);
00065 
00066  public:
00067 
00068    // Avoid creating UgliStrip without a reference 
00069    // to something having a Validity object
00070    UgliScintMdlNode();  // should be protected, but needed for i/o
00071 
00072  protected:
00073 
00074    // inc/dec of references to this object should also that of UgliGeometry
00075    virtual void           IncrementRef();
00076    virtual void           DecrementRef();
00077 
00078    // ctor for DBI driven UgliGeometry
00079    UgliScintMdlNode(const PlexScintMdlId scintmdlid,
00080                     UgliScintPlnNode* plnNode, 
00081                     const UgliDbiTables& ugliTables);
00082 
00083    // info specific to this plane
00084    UgliGeometry    *fUgliGeometry;  // reference link
00085    PlexScintMdlId   fScintMdlId;
00086    Int_t            fModuleNum;
00087    Float_t          fClearLenEast, fClearLenWest;
00088    Float_t          fWlsLenEast, fWlsLenWest;
00089 
00090    // for setting basic outline
00091    static void SetDefaultModuleOutline(TXTRU* mdlShape, 
00092                                        const string& typeName, const Float_t width);
00093 
00094  private:
00095 
00096    // avoid copy and assignment ctor by making them private and w/ no imp
00097    UgliScintMdlNode(const UgliScintMdlNode& that); 
00098    UgliScintMdlNode& operator=(const UgliScintMdlNode& ugh);
00099 
00100    ClassDef(UgliScintMdlNode,1)
00101 };
00102 
00103 #ifndef __CINT__
00104 //=============================================================================
00105 // Implementation details -- inlines need to be hidden from CINT
00106 //=============================================================================
00107 
00108 inline PlexPlaneId UgliScintMdlNode::GetPlexPlaneId() const
00109 { return PlexPlaneId(fScintMdlId); }
00110 
00111 inline Int_t UgliScintMdlNode::GetModuleNum() const
00112 { return fScintMdlId.GetModule(); }
00113 
00114 inline void UgliScintMdlNode::SetLTPosRelPln(Float_t lpos, Float_t tpos)
00115 { SetPosition(lpos,tpos,0.0); }
00116 
00117 inline Float_t UgliScintMdlNode::GetZRotRelPlnRad() const
00118 { return fMatrix->GetPhi()*Ugli::deg2rad; }
00119 
00120 inline Float_t UgliScintMdlNode::GetLPosRelPln() const { return fX; }
00121 inline Float_t UgliScintMdlNode::GetTPosRelPln() const { return fY; }
00122 
00123 #endif /* __CINT__ */
00124 #endif // UGLISCINTMDLNODE_H

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