ECal Initial Timing Calibration
To find timing outliers and generate timing distribution after replay
- ssh to a-onl and do goecal
- this will take you to /adaqfs/home/a-onl/sbs/ECAL_replay/scripts.
- From here, execute the root script generate_time_outliers.C with the only argument being the replayed run number
- Note: This will output to the screen and as a textfile the list of channels with timing peaks greater than +/-15ns outside of the expected 195ns peak, along with their timing peak and number of entries.
- Note: This will also generate a root file /hist/time_outlier_fits#.root, where # will be the run number of the replayed data. This root file has individual histograms for each block with a time peak more than +/-15ns outside of the desired value (in order to easily verify whether the culprit is a poor fit due to low statistic or if the delay just needs to be updated), and at the very bottom of the list of histograms there is also a histogram showing the timing peak for every channel.
To generate new delays based on output of previous data
- Then, run the script generate_fadc_timing_delays.C with the only argument being the same run replay number used in the previous script
- This outputs to the screen the list of all channels grouped by crate and slot in the same format required by the ecal.cnf file. This output to the screen can then be copied and pasted directly into the ecal.cnf file the exact same way we make new pedestals.
- Note: This script reads in the old delays and changes only the delays of the channels which were outside of the +/- 15ns range. If the channel with a “bad” timing peak has less than 100 events, then the timing delay is left unchanged. If there are more than 100 events for that channel, then the difference between the timing peak of that channel and the desired timing peak is added to the already existing delay for that channel in the ecal.cnf
- To find the ecal.cnf file, need to ssh sbs-onl@adaq2 and go to /adaqfs/home/sbs-onl/ecal/cfg/fadc250/ecal.cnf
- PLEASE MAKE A COPY OF THE ecal.cnf BEFORE MAKING CHANGES, this may not be necessary but its best to stay safe