Presentation is loading. Please wait.

Presentation is loading. Please wait.

Offline Code for Next Beam Test Jianchun Wang 08/06/01.

Similar presentations

Presentation on theme: "Offline Code for Next Beam Test Jianchun Wang 08/06/01."— Presentation transcript:

1 Offline Code for Next Beam Test Jianchun Wang 08/06/01

2 Jianchun (JC) Wang2 General Programs MC Simulation Generate tracks, calculate intersection points on each planes, simulate charge collection and convert it into ADC counts, write out in similar format as real data plus the track information for later study 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/or track summary file 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

3 08/06/01Jianchun (JC) Wang3 Initialization  Read file names, program control (Simulation, Data_event, MC_event, Alignment), and other control information  Read geometry file, derive geometry parameters (SDMA)  Book histograms (SDMA)  Read ADC gain curve, dead or noisy cells (SDM)  Input bias voltage, depletion voltage, noise, threshold, dispersion, beam parameters, prepare for simulation (S)  Open data file and prepare for event read in (DM)  Read in track summary file, prepare for fit (A)

4 08/06/01Jianchun (JC) Wang4 Simulation Events  Simulate a track or several tracks with given beam condition (P,  P, beam size, beam tilt spread)  Calculate intersection points in local system  Charge deposition simulation  Charge read out simulation (Noise, threshold, dispersion, ADC curve)  Write out event information ( Cell ID, ADC counts, track information ) Planes Tracks

5 08/06/01Jianchun (JC) Wang5 Data Analysis Events  Read in event, convert ADC into charge  Clustering  Convert into location in local system  Apply  correction  Form very loose tracks  Fit tracks (Kalman Filter)  Fill ntuple  Write out selected tracks into summary file (optional) Planes Tracks

6 08/06/01Jianchun (JC) Wang6 Auto Alignment  Read in track summary file and prepare for the fit  Convert geometry parameters into MINUIT parameters and initialize them  Convert MINUIT into geometry parameters  Fit track with Kalman filter  Calculate chi2  Sum up chi2 over all tracks  Fill histogram and write out new geometry parameters MINUIT Calls Tracks

7 08/06/01Jianchun (JC) Wang7 Ending the Program  Output histogram(SDMA)  Output new geometry parameters (A)  Close all opened files(SDMA)

8 08/06/01Jianchun (JC) Wang8 Need to Be Answered  Data file format  Event display  Any other tasks ?

9 08/06/01Jianchun (JC) Wang9 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…

10 08/06/01Jianchun (JC) Wang10 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

Download ppt "Offline Code for Next Beam Test Jianchun Wang 08/06/01."

Similar presentations

Ads by Google