Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCD_DocGeoUtil.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // $Id: LCD_DocGeoUtil.hh,v 1.11 2004/02/03 12:45:21 uid561 Exp $
00003 // ----------------------------------------------------------------------------
00004 //
00005 // LCD_DocGeoUtil.h
00006 //
00007 // static utilities which sort out some of the particular element types
00008 // used in describing LCD detector geometry
00009 //
00010 #ifndef LCD_DOCGEOUTIL_H
00011 #define LCD_DOCGEOUTIL_H
00012 #include "xercesc/dom/deprecated/DOM_Document.hpp"
00013 
00014 class LCD_DocGeoUtil {
00015 public:
00016   // By default return width of a single layer.  If all is set to
00017   // true, multiply by number of layers
00018   // Input element may either be a layering element or have a
00019   // child which is a layering element
00020   static double getLayerWidth(XERCES_CPP_NAMESPACE::DOM_Element elt,
00021                               bool all = false);
00022 
00023   // Given a barrel (tube centered on IP) return dimensions
00024   static bool barrelDim(const XERCES_CPP_NAMESPACE::DOM_Element& tube,
00025                         double *pInnerR,
00026                         double *pOuterZ, double *pOuterR = 0);
00027 
00028   // Given a tube (barrel or not) return dimensions in "standard form,"
00029   // i.e., in terms of offset, length in z-dimension
00030   static bool tubeDim(const XERCES_CPP_NAMESPACE::DOM_Element& tube,
00031                       double *pInnerR,
00032                       double *pOffsetZ, double *pLength,
00033                       double *pOuterR = 0);
00034 
00035   // Similarly for a disk
00036   static bool diskDim(const XERCES_CPP_NAMESPACE::DOM_Element& disk,
00037                       double *pInnerR,
00038                       double *pInnerZ, double *pOuterR, double *pOuterZ = 0);
00039 
00040   static bool coneDim(const XERCES_CPP_NAMESPACE::DOM_Element& cone,
00041                       double *pMinInnerR,
00042                       double *pMinOuterR, double *pMaxInnerR,
00043                       double *pMaxOuterR, double *pInnerZ, double *pOuterZ);
00044 
00045   // If element is anything other than a volume (e.g., a complex volume)
00046   // answer will be no.  Otherwise, check one level down for "reflected"
00047   // attribute.
00048   static bool reflected(const XERCES_CPP_NAMESPACE::DOM_Element& vol);
00049 
00050   // Given a layered volume, find distance (r for tube, z for disk)
00051   // from ip to layer 0
00052   static double getLayer0Dist(const XERCES_CPP_NAMESPACE::DOM_Element& layered);
00053 
00054   // For now don't deal with a complex volume as a single object.
00055   // In particular it cannot be any other volume's neighbor, and
00056   // we don't try to compute overall dimensions for a complex volume,
00057   // just for its constituents
00058 
00059   // Given a complex volume whose component volumes are either all
00060   // tubes or all disks, find its dimensions
00061   // static bool complexDim(const DOM_Element& complex,  double *pInnerR,
00062   //                  double *pInnerZ, double *pOuterR, double *pOuterZ);
00063 
00064   // Given a segmentation element or something that contains one,
00065   // return number of phi and theta divisions.
00066   //  NOTE:  Old detector files really specified divisions in cos(theta),
00067   //  not theta, but the decision has been made to always segment
00068   //  by theta, even if the file says "cos_theta".
00069   static bool getSegmentation(const XERCES_CPP_NAMESPACE::DOM_Element& elt,
00070                               double *nTheta, double *nPhi);
00071 };
00072 #endif

Generated on Thu Oct 7 18:44:46 2004 for LCDG4 by doxygen 1.3.4