ATLAS Offline Software
Functions
TILB Namespace Reference

Functions

def TILBHeader (num)
 
def TILBComments (num)
 
def TILB (num)
 

Function Documentation

◆ TILB()

def TILB.TILB (   num)

Definition at line 93 of file TILB.py.

93 def TILB(num):
94  import string
95  inpfile = open("TILB-GEO-01","rt")
96  outfile = open("TILB.sql","awt")
97  line = modname = comment = volline = cindx = ' '
98  nmax = 0
99  n1 = n2 = n3 = n15 = n21 = n22 = n23 = n24 = n25 = n26 = 0
100  r4 = r5 = r6 = r7 = r8 = r9 = r10 = 0.0
101  r11 = r12 = r13 = r14 = r16 = r17 = r18 = r19 = r20 = r27 = 0.0
102 
103  outfile.write("\n")
104 
105  indx = -1
106  while 1 :
107  line = inpfile.readline()
108  indx = indx + 1
109  cindx = str(indx)
110  if line == "":
111  break
112 
113  name = string.split(line)
114  nmax = len(name)
115  try:
116  if nmax < 1:
117  raise IndexError
118  if nmax > 27:
119  raise IndexError
120 
121  if name[0] == "###":
122  break
123 
124  n1 = int(name[0])
125  n2 = int(name[1])
126  n3 = int(name[2])
127  r4 = float(name[3])
128  r5 = float(name[4])
129  r6 = float(name[5])
130  r7 = float(name[6])
131  r8 = float(name[7])
132  r9 = float(name[8])
133  r10 = float(name[9])
134  r11 = float(name[10])
135  r12 = float(name[11])
136  r13 = float(name[12])
137  r14 = float(name[13])
138  n15 = int(name[14])
139  r16 = float(name[15])
140  r17 = float(name[16])
141  r18 = float(name[17])
142  r19 = float(name[18])
143  r20 = float(name[19])
144  n21 = int(name[20])
145  n22 = int(name[21])
146  n23 = int(name[22])
147  n24 = int(name[23])
148  n25 = int(name[24])
149  n26 = int(name[25])
150  r27 = float(name[26])
151 
152  volline = str(indx)+","+str(n1)+","+str(n2)+","+str(n3)+","+str(r4)+","+str(r5)+","+str(r6)
153  volline = volline+","+str(r7)+","+str(r8)+","+str(r9)+","+str(r10)+","+str(r11)+","+str(r12)
154  volline = volline+","+str(r13)+","+str(r14)+","+str(n15)+","+str(r16)+","+str(r17)+","+str(r18)
155  volline = volline+","+str(r19)+","+str(r20)+","+str(n21)+","+str(n22)+","+str(n23)+","+str(n24)
156  volline = volline+","+str(n25)+","+str(n26)+","+str(r27)
157 
158  outfile.write("insert into TILB_data (TILB_data_id,SECTION,NPERIOD,NMODUL,RMIN,RMAX,RMINIMAL,RMAXIMAL,\n")
159  outfile.write("DZPERIO,DRFRONT,DZEND,FLANGEX,FLANGEY,ZOFFSET,PHIGAP,ISCI_ST,DZMODUL,DZMAST,DZSPAC,\n")
160  outfile.write("DZEND1,DZEND2,NGIRDER,NSCIN,FINGPATTERN,NPERCUTPOS,NPERCUTNEG,CURSCINT,DZGIR) values (\n")
161  outfile.write(volline)
162  outfile.write(");\n")
163  outfile.write("insert into TILB_data2tag values ('TILB-GEO-01', ")
164  outfile.write(cindx)
165  outfile.write(");\n")
166 
167  except IndexError: # coments are in line
168  print ' IndexError : ',nmax,' ',name
169 
170  inpfile.close()
171  outfile.close()
172  return num
173 
174 # ---------------------------------------------------------------------------------------------------------------

◆ TILBComments()

def TILB.TILBComments (   num)

Definition at line 55 of file TILB.py.

55 def TILBComments(num):
56  outfile = open("TILB.sql","awt")
57  outfile.write("\n")
58  outfile.write("comment on column TILB_data.TILB_data_id is 'TileCal TILB, Section';\n")
59  outfile.write("comment on column TILB_data.SECTION is '1-barrel, 2-extended, 3-ITC1, 4-ITC2, 5-Gap, 6-Crack';\n")
60  outfile.write("comment on column TILB_data.NPERIOD is 'Number of periods in the module';\n")
61  outfile.write("comment on column TILB_data.NMODUL is 'Number of modules,in full cylinder, ")
62  outfile.write("used for Dphi calcuations only (Dphi = 2 pi / Nmodules)';\n")
63  outfile.write("comment on column TILB_data.RMIN is 'Minimal active radius';\n")
64  outfile.write("comment on column TILB_data.RMAX is 'Maximal active radius';\n")
65  outfile.write("comment on column TILB_data.RMINIMAL is 'Minimal radius of section mother (G4)';\n")
66  outfile.write("comment on column TILB_data.RMAXIMAL is 'Maximal radius of section mother (G4)';\n")
67  outfile.write("comment on column TILB_data.DZPERIO is 'Dummy';\n")
68  outfile.write("comment on column TILB_data.DRFRONT is 'Thickness of the front plate (in R)';\n")
69  outfile.write("comment on column TILB_data.DZEND is 'Thickness of the endplates (in Z) if they are equal';\n")
70  outfile.write("comment on column TILB_data.FLANGEX is 'End plate square hole dimension or min width for gap envelope';\n")
71  outfile.write("comment on column TILB_data.FLANGEY is 'End plate square hole position or max width for gap envelope';\n")
72  outfile.write("comment on column TILB_data.ZOFFSET is 'Offset of the module center along Z';\n")
73  outfile.write("comment on column TILB_data.PHIGAP is 'Design gap between modules';\n")
74  outfile.write("comment on column TILB_data.ISCI_ST is 'ID of the first scintillator';\n")
75  outfile.write("comment on column TILB_data.DZMODUL is 'Z-length of the module';\n")
76  outfile.write("comment on column TILB_data.DZMAST is 'Master plate thickness';\n")
77  outfile.write("comment on column TILB_data.DZSPAC is 'Spacer thickness';\n")
78  outfile.write("comment on column TILB_data.DZEND1 is 'Thickens of the end plate 1';\n")
79  outfile.write("comment on column TILB_data.DZEND2 is 'Thickens of the end plate 2';\n")
80  outfile.write("comment on column TILB_data.NGIRDER is 'Number of girder elements';\n")
81  outfile.write("comment on column TILB_data.NSCIN is 'Number of scintillators in the period';\n")
82  outfile.write("comment on column TILB_data.FINGPATTERN is 'Finger type of 2 fingers in barrel or one ")
83  outfile.write("finger in ext.barrel standard barrel fingers: 11 (both L and R present), ")
84  outfile.write("10 (L), 13 (R), 1 (no L, no R), standard ext.barrel fingers: 2 (finger present) or 0';\n")
85  outfile.write("comment on column TILB_data.NPERCUTPOS is 'number of cut periods at higher Z ( Z > 0 )';\n")
86  outfile.write("comment on column TILB_data.NPERCUTNEG is 'number of cut periods at lower Z side ( Z < 0 )';\n")
87  outfile.write("comment on column TILB_data.CURSCINT is 'scintillator number to describe special ITC cells';\n")
88  outfile.write("comment on column TILB_data.DZGIR is 'length of girder in special ITC cells';\n")
89  outfile.close()
90  return num
91 
92 # ---------------------------------------------------------------------------------------------------------------

◆ TILBHeader()

def TILB.TILBHeader (   num)

TILB.sql generator

Definition at line 6 of file TILB.py.

6 def TILBHeader(num):
7  outfile = open("TILB.sql","wt")
8  outfile.write("SET echo OFF;\n")
9  outfile.write("set linesize 132;\n")
10 # outfile.write("drop table TILB_data2tag cascade constraints;\n")
11 # outfile.write("drop table TILB_data cascade constraints;\n")
12  outfile.write("create table TILB_data (\n")
13  outfile.write("TILB_data_id number(10),\n")
14  outfile.write("SECTION number(10),\n")
15  outfile.write("NPERIOD number(10),\n")
16  outfile.write("NMODUL number(10),\n")
17  outfile.write("RMIN float(63),\n")
18  outfile.write("RMAX float(63),\n")
19  outfile.write("RMINIMAL float(63),\n")
20  outfile.write("RMAXIMAL float(63),\n")
21  outfile.write("DZPERIO float(63),\n")
22  outfile.write("DRFRONT float(63),\n")
23  outfile.write("DZEND float(63),\n")
24  outfile.write("FLANGEX float(63),\n")
25  outfile.write("FLANGEY float(63),\n")
26  outfile.write("ZOFFSET float(63),\n")
27  outfile.write("PHIGAP float(63),\n")
28  outfile.write("ISCI_ST number(10),\n")
29  outfile.write("DZMODUL float(63),\n")
30  outfile.write("DZMAST float(63),\n")
31  outfile.write("DZSPAC float(63),\n")
32  outfile.write("DZEND1 float(63),\n")
33  outfile.write("DZEND2 float(63),\n")
34  outfile.write("NGIRDER number(10),\n")
35  outfile.write("NSCIN number(10),\n")
36  outfile.write("FINGPATTERN number(10),\n")
37  outfile.write("NPERCUTPOS number(10),\n")
38  outfile.write("NPERCUTNEG number(10),\n")
39  outfile.write("CURSCINT number(10),\n")
40  outfile.write("DZGIR float(63)\n")
41  outfile.write(") ;\n")
42  outfile.write("\n")
43  outfile.write("alter table TILB_data add constraint TILB_data_pk\n")
44  outfile.write("primary key (TILB_data_id);\n")
45  outfile.write("\n")
46  outfile.write("create table TILB_data2tag (\n")
47  outfile.write(" TILB_vers varchar2(255),\n")
48  outfile.write(" TILB_data_id number(10)\n")
49  outfile.write(") ;\n")
50 
51  outfile.close()
52  return num
53 
54 # ---------------------------------------------------------------------------------------------------------------
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TILB.TILBHeader
def TILBHeader(num)
Definition: TILB.py:6
Trk::open
@ open
Definition: BinningType.h:40
TILB.TILBComments
def TILBComments(num)
Definition: TILB.py:55
str
Definition: BTagTrackIpAccessor.cxx:11
readCCLHist.float
float
Definition: readCCLHist.py:83
TILB.TILB
def TILB(num)
Definition: TILB.py:93