Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:48

0001 #!/bin/env python
0002 
0003 import os
0004 
0005 # Path of the input tables
0006 INPUTPATH = '/afs/cern.ch/cms/OO/mag_field/versions_new/version_18l_160812_3_8t_v9_small_fin'
0007 #INPUTPATH = '/afs/cern.ch/cms/OO/mag_field/versions_new/version_18l_160812_3t_v9_large_fin'
0008 #INPUTPATH = '/afs/cern.ch/cms/OO/mag_field/versions_new/version_18l_160812_3_5t_v9_large_fin'
0009 #INPUTPATH = '/afs/cern.ch/cms/OO/mag_field/versions_new/version_18l_160812_3_8t_v9_large_fin'
0010 
0011 
0012 f = open('tableList.txt', 'w') #will write a list of tables here, for further validation scripts
0013 for part in range (1, 3) : 
0014     for sector in range (1, 13) :
0015         subdir = 's'+str(sector).zfill(2)
0016         os.system('mkdir -p '+subdir)
0017         for volume in range (1, 465) :
0018             volNo=str(volume+1000*part)
0019             type='rpz' # for Tubs, Cone, TruncTubs
0020             if (volume>=138 and volume <= 402) :
0021                 type = 'xyz' #for Box, Trapezoid         
0022             fullpath = INPUTPATH+'/'+subdir+'_'+str(part)+'/v-'+type+'-'+volNo+'.table'
0023             f.write(fullpath+'\n')
0024             status = os.system('${CMSSW_BASE}/test/${SCRAM_ARCH}/prepareFieldTable '+fullpath +' '+ subdir+'/grid.'+volNo+'.bin '+ str(sector))
0025             if status != 0 :
0026                 print('ERROR table not processed:', fullpath)
0027         
0028 f.close()