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

UgliStripNode.h

Go to the documentation of this file.
00001 
00002 // $Id: UgliStripNode.h,v 1.15 2006/04/07 18:03:14 kordosky Exp $
00003 //
00004 // UgliStripNode
00005 //
00006 // UgliStripNode is single strip
00007 //
00008 // Author:  R. Hatcher 2000.11.15
00009 //
00011 
00012 #ifndef UGLISTRIPNODE_H
00013 #define UGLISTRIPNODE_H
00014 class UgliStripNode;
00015 
00016 #include "UgliGeometry/Ugli.h"
00017 #include "UgliGeometry/UgliStripABC.h"
00018 #include "UgliGeometry/UgliRefCnt.h"
00019 #include "UgliGeometry/TNodeX.h"
00020 #include "UgliGeometry/UgliStripShape.h"
00021 class UgliScintMdlNode;
00022 
00023 class VldContext;
00024 class UgliDbiTables;
00025 class UgliGeometry;
00026 
00027 class UgliStripNode : public UgliStripABC, public UgliRefCnt, public TNodeX {
00028 
00029    friend class UgliGeometry;        // the geometry creates these
00030    friend class UgliScintPlnNode;    // the scint plane creates these
00031    friend class UgliStripHandle;     // handles play with our ref count
00032 
00033  public:
00034 
00035    // base TNode class has this public
00036    virtual ~UgliStripNode();
00037 
00038    virtual PlexStripEndId GetSEId() const;
00039 
00040    virtual Float_t        GetHalfLength() const;
00041    virtual Float_t        GetHalfThickness() const;
00042    virtual Float_t        GetHalfWidth() const;
00043 
00044    virtual Float_t        GetTPos(Float_t orthCoord=9999.) const;
00045 
00046    virtual Float_t        PartialLength(const StripEnd::StripEnd_t end) const;
00047    virtual Bool_t         IsMirrored(const StripEnd::StripEnd_t end) const;
00048    virtual Float_t        WlsPigtail(const StripEnd::StripEnd_t end) const;
00049    virtual Float_t        WlsBypass() const;
00050    virtual Float_t        ClearFiber(const StripEnd::StripEnd_t end) const;
00051    virtual Float_t        TotalAttenuation(const StripEnd::StripEnd_t end,
00052                                            const Float_t alongLength) const;
00053    
00054    // world coordinate for point along centerline or WLS fiber
00055    virtual TVector3       GlobalPos(const Float_t alongLength, 
00056                                     const Bool_t onWLS=false) const;
00057    // convert between world and nominal cell (box) coordinates
00058    virtual TVector3       GlobalToLocal(const TVector3& global) const;
00059    virtual TVector3       LocalToGlobal(const TVector3& local) const;
00060 
00061    // use position of orthogonal strip to calculate an intersection point
00062    virtual Float_t        DistanceAlong(const PlexStripEndId& orthogonalStrip) const;
00063    virtual TVector3       Intersection(const PlexStripEndId& orthogonalStrip) const;
00064 
00065    virtual UgliGeometry  *GetUgliGeometry() const { return fUgliGeometry; }
00066 
00067    // Returns the ScintMdlNode in which this StripNode is.
00068    UgliScintMdlNode* GetScintMdlNode(void) const;
00069    
00070    Float_t           GetZRotRelMdlRad() const;
00071    Float_t           GetLPosRelMdl() const;
00072    Float_t           GetTPosRelMdl() const;
00073 
00074    void              SetZRotRelMdlRad(Float_t radians);
00075    void              SetLTPosRelMdl(Float_t lpos, Float_t tpos);
00076 
00077  public:
00078 
00079    // Avoid creating UgliStrip without a reference 
00080    // to something having a Validity object
00081    UgliStripNode();  // should be protected, but needed for i/o
00082 
00083  protected:
00084 
00085    // inc/dec of references to this object should also that of UgliGeometry
00086    virtual void           IncrementRef();
00087    virtual void           DecrementRef();
00088 
00089    // ctor for DBI driven UgliScintPlnNode (w/ ScintMdlNodes)
00090    UgliStripNode(const PlexStripEndId seid, UgliScintMdlNode *mdl_node,
00091                  const UgliDbiTables& ugliTables);
00092 
00093    UgliStripShape* GetUgliStripShape() const;
00094 
00095    // info specific to this strip
00096    UgliGeometry  *fUgliGeometry;  // reference link
00097    PlexStripEndId fSEId;
00098    UInt_t         fMirrorMask;
00099    // pointer to attenuation curve???? 
00100 
00101  private:
00102 
00103    VldContext BackConstructVldContext() const;
00104 
00105    // avoid copy and assignment ctor by making them private and w/ no imp
00106    UgliStripNode(const UgliStripNode& that); 
00107    UgliStripNode& operator=(const UgliStripNode& ugh);
00108 
00109    ClassDef(UgliStripNode,1)
00110 };
00111 
00112 #ifndef __CINT__
00113 //=============================================================================
00114 // Implementation details -- inlines need to be hidden from CINT
00115 //=============================================================================
00116 
00117 inline UgliStripShape* UgliStripNode::GetUgliStripShape() const
00118 { return dynamic_cast<UgliStripShape*>(fShape); }
00119 
00120 inline PlexStripEndId UgliStripNode::GetSEId() const { return fSEId; }
00121 
00122 inline Bool_t UgliStripNode::IsMirrored(const StripEnd::StripEnd_t end) const 
00123 { return ( fMirrorMask & end ); }
00124 
00125 inline void UgliStripNode::SetLTPosRelMdl(Float_t lpos, Float_t tpos)
00126 { SetPosition(lpos,tpos,0.0); }
00127 
00128 inline Float_t UgliStripNode::GetZRotRelMdlRad() const
00129 { return fMatrix->GetPhi()*Ugli::deg2rad; }
00130 
00131 inline Float_t UgliStripNode::GetLPosRelMdl() const { return fX; }
00132 inline Float_t UgliStripNode::GetTPosRelMdl() const { return fY; }
00133 
00134 #endif /* __CINT__ */
00135 #endif // UGLISTRIPNODE_H

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