/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Public Attributes
XmlDetDescGen::AD::gen::Cylinder Class Reference

List of all members.

Public Member Functions

def __init__
def parameters
def logvol

Public Attributes

 name
 rthick
 hthick
 material
 parent
 child
 params
 lv

Static Public Attributes

list NAMES = ["sst","oil"]

Detailed Description

Definition at line 11 of file gen.py.


Constructor & Destructor Documentation

def XmlDetDescGen::AD::gen::Cylinder::__init__ (   self,
  name,
  rthick,
  hthick,
  material,
  parent = None,
  child = None 
)

Definition at line 14 of file gen.py.

00015                                                                          :
00016         self.name = name
00017         self.rthick = rthick
00018         self.hthick = hthick
00019         self.material=material
00020         self.parent = parent
00021         self.child = child
00022         self.params = []
00023         self.lv = None
00024         return


Member Function Documentation

def XmlDetDescGen::AD::gen::Cylinder::parameters (   self)
Build up the parameters for a cylinder based on thicknesses and parent values.

Definition at line 25 of file gen.py.

00026                         :
00027         """
00028         Build up the parameters for a cylinder based on thicknesses and parent values.
00029         """
00030         if self.params: return self.params
00031 
00032         from XmlDetDescGen.parameter import Parameter
00033 
00034         ts = []
00035         ps = []
00036         for thing,thick in [("Radius",self.rthick),
00037                             ("Height",self.hthick)]:
00038             t = Parameter("AD%s%sThickness"%(self.name,thing),
00039                           thick,
00040                           "%s thickness for %s"%(thing,self.name.upper()))
00041             ts.append(t)
00042 
00043             pname = ""
00044             if self.child:
00045                 pname = "AD%s%s + "%(self.child.name,thing)
00046 
00047             double=""
00048             if thing == "Height": double = "*2.0"
00049             p = Parameter("AD%s%s"%(self.name,thing),
00050                           "%sAD%s%sThickness%s"%(pname,self.name,thing,double),
00051                           "%s for %s"%(thing,self.name.upper()))
00052             ps.append(p)
00053             continue
00054         if self.name=="sst":
00055             p = [Parameter("ADsstBotRibHeight",
00056                            "430*mm",
00057                            "Height for %s bottom ribs."%(self.name.upper())),
00058                  Parameter("SstFotHeight",
00059                            "10*mm",
00060                            "Height for %s feet."%(self.name.upper())),
00061                  Parameter("SstBotThickness",
00062                            "20*mm",
00063                            "%s bottom thickness."%(self.name.upper())),
00064                  Parameter("SstLidThickness",
00065                            "15*mm",
00066                            "%s bottom thickness."%(self.name.upper()))
00067                  ]
00068             ps.extend(p)
00069         if self.name=="oil":
00070             p=[Parameter("ADrftBotHeight",
00071                          "30*mm",
00072                          "Height for the bottom reflector in %s."
00073                          %(self.name.upper()))]               
00074             ps.extend(p)
00075         self.params = ps+ts
00076         return self.params

def XmlDetDescGen::AD::gen::Cylinder::logvol (   self)

Definition at line 77 of file gen.py.

00078                     :
00079         if self.lv: return self.lv
00080 
00081         from XmlDetDescGen.geometry import Tubs,Logvol,Physvol,PosXYZ
00082         from XmlDetDescGen.util import ExternalEntity
00083 
00084         pv = []
00085         if self.child:
00086             if self.name == 'oil':
00087                 pv.append(Physvol("pv"+self.child.name.upper(),
00088                                   self.child.logvol(),
00089                                   #PosXYZ(0, 0, "ADrftBotHeight+ADsstBotRibHeight-ADoilHeight/2")))
00090                                   PosXYZ(0, 0, "ADrftBotHeight+ADsstBotRibHeight")))
00091             else:
00092                 pv.append(Physvol("pv"+self.child.name.upper(),
00093                                   self.child.logvol()))
00094 
00095         if self.name == 'oil':
00096             pv.append(Physvol('pvAdPmtArray',
00097                               '/dd/Geometry/AdPmts/lvAdPmtArray'))
00098 
00099         pv.append(ExternalEntity("HandWrittenPhysVols"))
00100 
00101         self.lv = Logvol("lv"+self.name.upper(),self.material,
00102                          Tubs(self.name,
00103                               'AD%sHeight'%self.name,
00104                               'AD%sRadius'%self.name),
00105                          pv)
00106         return self.lv


Member Data Documentation

list XmlDetDescGen::AD::gen::Cylinder::NAMES = ["sst","oil"] [static]

Definition at line 12 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.

Definition at line 14 of file gen.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:07 for XmlDetDesc by doxygen 1.7.4