Beam Test Offline Code Jianchun Wang Syracuse University 01/17/02 Outline Status of the code Function modules Discussion topics.
Published byModified over 6 years ago
Presentation on theme: "Beam Test Offline Code Jianchun Wang Syracuse University 01/17/02 Outline Status of the code Function modules Discussion topics."— Presentation transcript:
Beam Test Offline Code Jianchun Wang Syracuse University 01/17/02 Outline Status of the code Function modules Discussion topics
01/17/02Jianchun (JC) Wang2 Status All main functions are done, but need more testing and polishing. The code was tested with Syracuse computers (Alpha with Linux and OSF1) during development. The code was submitted to CVS this week, we need to decide whether keep it as a new release or a new project (Rob and Lynn will tell us about CVS). The code was tested on fnsimu1 and fsgi03. GNUmakefile.standalone are used. We need to work out GNUmakefile. We need to solve some issues and decide on what else functions should be included.
01/17/02Jianchun (JC) Wang3 General Description Data Analysis Read in real data (include MC track), convert ADC counts into charge, form cluster and convert into coordinates, form rough track and perform Kalman filter, write out ntuple and track summary file for further study MC Simulation Generate tracks, calculate intersection points on each plane, simulate charge collection and convert it into ADC counts, write out in similar format as real data plus the track information Auto Alignment Read in track summary file (local coordinates and resolutions), go through MINUIT with geometry conversion, for different geometry calculate chi2 for each track, minimize the sum of chi2 and write out new geometry
01/17/02Jianchun (JC) Wang4 Tasks tb_controldata_in_filedata_out_filehbk_filerun_id Raw dataeventrun01234.dat-run01234.hbk- MC dataeventmcd01234.dat-mcd01234.hbk- Raw data + summarysummaryrun01234.dattrk01234.datrun01234.hbk- MC data + summarysummarymcd01234.dattrk01234.datmcd01234.hbk- Alignmentaligntrk01234.dat-aln01234.hbk- MC generationmcgen-mcd01234.datmcg01234.hbk1234 Tasks are selected by tb_control and information inside input data file Names of output data file and histogram file can be defined or with default
01/17/02Jianchun (JC) Wang5 Function Modules Data encode and decode Geometry manipulation ADC charge conversion Cluster formation and conversion into coordinates Track formation Track fitting with Kalman filter MC Simulation MINUIT alignment ( a.k.a. Auto alignment ) CWN ntuple Parameter control through name list read
01/17/02Jianchun (JC) Wang6 Data File Format A: Header 1.RAWD, SIMU, TRAK 2.Length of the block 3.Version 4.Run ID 5.Number of planes 6.Time Tag 7.… other comments B: Data Hits 1.Length of data block 2.Cell 1 data 3.… 4.Length of data block C: MC Track 1.Length of the block 2.Number of tracks 3.Local X for plane 1 4.Local Y for plane 1 5.… 6.Length of the block Data format for one cell 1111 pppp 000c cccc rrrr rrrr aaaa aaaa D: Track Summary 1.Length of the block 2.Plane ID 3.Local X for plane 1 4.Local Y for plane 1 5.Error on X for plane 1 6.Error on Y for plane 1 7.… 8.Length of the block Raw data from DAQ (RAWD): ABBBBBB… MC data generated (SIMU): ABCBCBC… Selected track summary (TRAK): ADDDDDD…
01/17/02Jianchun (JC) Wang8 Endian on Different Platforms Within a given 16- or 32-bit word, bytes at lower addresses have higher significance (big_endian) Most processor use big_endian, some use little_endian, very very few use middle_endian The machine we used for DAQ, and most of machines that we are going to use for analysis are big_endian In order that the data can be used for both big_endian and little_endian machine, I add byte swap in data reading and MC data writing It was tested standalone, not with real code yet. And I need to work on GNUmakefile ( Most functions associated with coding is in testbeam_dio.c )
01/17/02Jianchun (JC) Wang9 Geometry Manipulation The geometry manipulation has very little change. Initial geometry information is read in from geometry file (tb_geometry.dat). Parameters are derived for easier conversion between world coordinate (WC), and local coordinate (LC). In MINUIT fit, fit parameters are connected with selected geometry parameters. Each time the fit parameters changed, the derived parameters recalculated.
01/17/02Jianchun (JC) Wang10 ADC Charge Conversion Testbeam 2000 use curve for FPIX0, and one set of 4 thresholds for all FPIX1 cells. Testbeam 2002 use calibration for each cell, and directly use threshold value instead of curves. Each plane has its own sixy_adc_file name. The ADC information is also used in the MC simulation where charge in pixel cell is converted to ADC value.
01/17/02Jianchun (JC) Wang11 Pixel Cluster Testbeam 2000 uses Penny’s cluster formation initially wrote to work with simulation package we developed at Syracuse. The eta calculation using output from her code in 2-column case is wrong. Testbeam 2002 imported the one I use for standalone simulation. Cluster center of gravity is calculated and converted into local coordinate where the orientation of row and column is considered and can be easily controlled. World coordination is calculated here so track formation can use more precise position. In testbeam 2000, we use local coordinate shift with the center for track formation.
01/17/02Jianchun (JC) Wang12 Track Formation Track formation is kept in same style. Use hits in two x seed planes to make a path, for other planes choose the closest hit (within a cut). Y information currently is not used.
01/17/02Jianchun (JC) Wang13 Track Fitting Rob had updated Kalman filter code to work with current version MCFast. It can treat a pixel hit as two strip hits, and only fit on hits with good resolution. It performs fit and derives residual with or with out the hit, and also provide the chi2 of the fit. In MINUIT alignment, strip-equivalent is enforced. The interface subroutine is kept in same style, modification are done mainly associated with local coordinate.
01/17/02Jianchun (JC) Wang14 MC Simulation One or more tracks are generated (with no multiple scattering at this moment). Intersection with each plane is calculated. Charge generation, noise simulation, ADC conversion were imported from standalone simulation with modification. Hits are encoded and written out. The electric field, charge mobility, diffusion, effects of magnetic field are calculated at initialization.
01/17/02Jianchun (JC) Wang15 MINUIT Alignment This is to determine the real geometry configuration by minimize the sum of chi2 from many track fit. CPU is a big issue here since we need to perform Kalman filter many many times. It deals with summary of pre-selected tracks. It provides interactive mode although it can also run in batch mode. Due to CPU limitation, only small portion of all geometry parameters can be FREE at a time. This is controlled in mn_skip.dat file, with very simple format. The “best” geometry is written in mn_geometry.dat with same format as tb_geometry.dat.
01/17/02Jianchun (JC) Wang16 Histogram ID 11100 Geometry parameters 11200 Geometry parameters after alignment 11300 Global parameters and Detector parameters 11400 Simulation parameter maps 11500 Charge simulation parameters 21000 Simulated track and hits 31000 Track summary 32000 MINUIT fit 41000 Hit information 42000 Cluster information 43000 Difference of reconstructed hit position and generated position 51000 Form track 61000 Kalman filter
01/17/02Jianchun (JC) Wang17 Column Wised Ntuple CWN has many advantages over RWN especially when the number of element is uncertain. With CWN, when we add more pixels or shift to study other plane, we need only small modification on index. Benefit mentioned in Rob’s message a) does not waste disk space on information which is absent for this event ie you can declare very large arrays for hits but it only uses disk space for the ones which are present. b) faster interactive response if you are only referencing a small subset of the ntuple variables. This comes partly from a) but also from a "smarter" layout of how data is stored on disk. c) much easier maintenance when you change the number of detectors