/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
gen::RpcStrips Class Reference

List of all members.

Public Member Functions

def __init__
def stripid
def write

Public Attributes

 site
 siteid
 siterow
 sitename
 sitetelename

Static Public Attributes

string lvname = "/dd/Geometry/RPC/lvRPCStrip"
list siteids = [0x01,0x02,0x04]
list siteRpcrow = [6,6,9]
int rpcid = 07
list siteRnames = ['Near','Near','Far']
list siteTelename = ['Near','LA','Far']

Detailed Description

Definition at line 43 of file gen.py.


Constructor & Destructor Documentation

def gen::RpcStrips::__init__ (   self,
  site,
  siteid,
  siterow,
  sitename,
  sitetelename 
)

Definition at line 53 of file gen.py.

00054                                                                 :
00055         self.site = site
00056         self.siteid = siteid
00057         self.siterow = siterow
00058         self.sitename = sitename
00059         self.sitetelename = sitetelename
00060         pass


Member Function Documentation

def gen::RpcStrips::stripid (   self,
  site,
  rpc,
  irow,
  icol,
  ilay,
  istr 
)

Definition at line 62 of file gen.py.

00063                                                   :
00064         return (site<<24)|(rpc<<16)|(irow<<12)|(icol<<8)|(ilay<<4)|istr
00065 

def gen::RpcStrips::write (   self,
  outdir 
)

Definition at line 66 of file gen.py.

00067                           :
00068 
00069         from XmlDetDescGen.util import XmlFile, Comment
00070         from XmlDetDescGen.structure import DetElem,UserParameter
00071         strips = []
00072         totmods = 0
00073         totstrips = 0
00074         for irow in range(0,siterow):
00075             irow += 1
00076             for icol in range(0,9):
00077                 icol +=1
00078                 totmods += 1
00079                 for ilay in range(0,4):
00080                     ilay += 1
00081                     for istr in range(0,8):
00082                         istr += 1
00083                         totstrips = totstrips+1
00084                         stripid = self.stripid(siteid,self.rpcid,irow,icol,ilay,istr)
00085                         rowloop = irow
00086                         horslope = 'SlopMod'
00087                         if icol%2 == 1:
00088                             colloop = icol/2+1
00089                             unup = 'Un'
00090                         else:
00091                             colloop =icol/2
00092                             unup = 'Up'
00093                         if ilay == 1 or ilay == 4:
00094                             layloop = ilay/4+1
00095                             laychoose = '14'
00096                         else:
00097                             layloop = ilay/3+1
00098                             laychoose = '23'
00099                         data ={ 'site':site, 'rownum':irow, 'columnnum':icol, 'layernum':ilay, 'strnum':istr, 'sitename':sitename, 'colloop':colloop, 'rowloop':rowloop, 'layloop':layloop,'laychoose':laychoose, 'unup':unup, 'horslope':horslope,'sitetelename':sitetelename, 'farcol':10-icol, 'farrow':10-irow }
00100                         if icol%2 == 1:
00101                             npath="pv%(sitetelename)sRPCRoof/pv%(sitename)sUnSlopModArray/pv%(sitename)sUnSlopModOne:%(colloop)d/pv%(sitename)sUnSlopMod:%(rowloop)d/pv%(sitename)sSlopModUnit/pvRPCFoam/pvBarCham%(laychoose)sArray/pvBarCham%(laychoose)sArrayOne:%(layloop)d/pvBarCham%(laychoose)sUnit/pvRPCGasgap%(laychoose)s/pvStrip%(laychoose)sArray/pvStrip%(laychoose)sArrayOne:%(strnum)d/pvStrip%(laychoose)sUnit"%data
00102                         else:
00103                             npath="pv%(sitetelename)sRPCRoof/pv%(sitename)sUpSlopModArray/pv%(sitename)sUpSlopModOne:%(colloop)d/pv%(sitename)sUpSlopMod/pv%(sitename)sUnSlopMod:%(rowloop)d/pv%(sitename)sSlopModUnit/pvRPCFoam/pvBarCham%(laychoose)sArray/pvBarCham%(laychoose)sArrayOne:%(layloop)d/pvBarCham%(laychoose)sUnit/pvRPCGasgap%(laychoose)s/pvStrip%(laychoose)sArray/pvStrip%(laychoose)sArrayOne:%(strnum)d/pvStrip%(laychoose)sUnit"%data
00104 
00105                         if sitename == 'Far':
00106                             de = DetElem('%(site)s-rpc-row%(farrow)d-column%(farcol)d-layer%(layernum)d-strip%(strnum)d'%data,
00107                             self.lvname,
00108                             npath,
00109                             support="/dd/Structure/RPC/%(site)s-rpc"%data)
00110                         else:
00111                             de = DetElem('%(site)s-rpc-row%(rownum)d-column%(columnnum)d-layer%(layernum)d-strip%(strnum)d'%data,
00112                             self.lvname,
00113                             npath,
00114                             support="/dd/Structure/RPC/%(site)s-rpc"%data)
00115                         if sitename == 'Far':
00116                             stripid = self.stripid(siteid,self.rpcid,10-irow,10-icol,ilay,istr)
00117                         de.refs = [UserParameter("RpcID","int",['0x%x'%stripid],desc="Packed RpcStrip ID")]
00118                         strips.append(de)
00119                         continue
00120                     continue
00121                 continue
00122             continue
00123 
00124         icol = 5
00125         for irow in range(0,8,7):
00126             irown = irow/7+1
00127             if irow == 7 and sitename == 'Far':
00128                 irow += 3
00129             totmods += 1
00130             for ilay in range(0,4):
00131                 ilay += 1
00132                 for istr in range(0,8):
00133                     istr += 1
00134                     totstrips = totstrips+1
00135                     stripid = self.stripid(siteid,self.rpcid,irow,icol,ilay,istr)
00136                     if ilay == 1 or ilay == 4:
00137                         layloop = ilay/4+1
00138                         laychoose = '14'
00139                     else:
00140                         layloop = ilay/3+1
00141                         laychoose = '23'
00142                     data ={ 'site':site, 'rown':irown, 'rownum':irow, 'columnnum':icol-4, 'colname':icol, 'layernum':ilay, 'strnum':istr, 'sitename':sitename, 'layloop':layloop, 'laychoose':laychoose, 'sitetelename':sitetelename }
00143                     npath="pv%(sitetelename)sTeleRpc/pv%(sitetelename)sTeleRpc:%(rown)d/pvRPCFoam/pvBarCham%(laychoose)sArray/pvBarCham%(laychoose)sArrayOne:%(layloop)d/pvBarCham%(laychoose)sUnit/pvRPCGasgap%(laychoose)s/pvStrip%(laychoose)sArray/pvStrip%(laychoose)sArrayOne:%(strnum)d/pvStrip%(laychoose)sUnit"%data
00144                     de = DetElem('%(site)s-tele-rpc-row%(rownum)d-col%(colname)d-layer%(layernum)d-strip%(strnum)d'%data,
00145                     self.lvname,
00146                     npath,
00147                     support="/dd/Structure/RPC/%(site)s-rpc"%data)
00148                     de.refs = [UserParameter("RpcID","int",['0x%x'%stripid],desc="Packed RpcStrip ID")]
00149                     strips.append(de)
00150                     continue
00151                 continue
00152             continue
00153         print "RPC at %s-site total module number is %d"%(self.site, totmods)
00154         print "RPC at %s-site total read-out-strip channel number is %d"%(self.site, totstrips)
00155         file = XmlFile()
00156         file.objects = strips
00157         file.write(outdir+"/%s.xml"%self.site)
00158             
                             

Member Data Documentation

string gen::RpcStrips::lvname = "/dd/Geometry/RPC/lvRPCStrip" [static]

Definition at line 45 of file gen.py.

list gen::RpcStrips::siteids = [0x01,0x02,0x04] [static]

Definition at line 46 of file gen.py.

list gen::RpcStrips::siteRpcrow = [6,6,9] [static]

Definition at line 47 of file gen.py.

int gen::RpcStrips::rpcid = 07 [static]

Definition at line 48 of file gen.py.

list gen::RpcStrips::siteRnames = ['Near','Near','Far'] [static]

Definition at line 49 of file gen.py.

list gen::RpcStrips::siteTelename = ['Near','LA','Far'] [static]

Definition at line 50 of file gen.py.

Definition at line 53 of file gen.py.

Definition at line 53 of file gen.py.

Definition at line 53 of file gen.py.

Definition at line 53 of file gen.py.

Definition at line 53 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