Timing analysis instructions
Endcap
The analysis proceeds in two steps. First, you run the StEEmcTimingMaker over the MuDsts to obtain some histograms of the ADC spectrums for each channel. Second, you analyze these histograms as a function of time delay. A tarball with all code is located at:
/star/u/aliceb/eemc_timing.tar
For the endcap most everything is happening from the EEMC_timing directory.
Running the Maker
- Prepare your inputs. The inputs to the maker are: the number of events you want to run over, an input file list, and output file name, the tower delay, the mapmt delay and the number of files you want to run over. We will run the maker on the condor using the STAR scheduler. You will be modifying the submitall file with the relevant inputs. First, once you know the locations of the MuDsts, make files called <run_number>.list for each run. Easiest way to do this is ls /the/path/to/the/files/this/run/*.MuDst.root > <run_number>.list. The scheduler input demands each file input be proceeded by file:/ so after you get your list, open your favorite editor and change all the file names to file:/the/path/to/the/files/this/run/*.MuDst.root (easiest way I know to do this). You can see the *.list file in the tarball for an example.
- Modify the script pptestcalib.xml to point to your areas.
- Modify the script submitall to have the correct run numbers, delays and file counts.
- Submit to the scheduler with ./submitall
- Make sure you get a root file for each run in the EEMC_timing/timing_files direcotry. Check to make sure that stuff is filled (histogram names h_crate-*_channel-* for the towers and h_pmtcrate-*_channel-* for the mapmts) where it should be
Making the plots
The code make_tower_curves.C makes the plots for the tower. I highly recommend you don't run interactively.
- Define the number of runs taken, nRuns, and put the relevant run numbers in the array int runNumbers[nRuns].
- Put the proper timings in the array float timings[nRuns] .
- Change the path variable in the function defintion to point to your area.
- root -b -q make_tower_curves.C
- I wrote a little script to concatenate all the files this makes in your timing_files directory. cd to timing_files and do ./towcat
The shower max detector code is pretty much the same. Modify the same variables and then run make_mapmt_curves.C. Change to the timing_files directory and then concatenate the files: ./pmtcat
Barrel
This is really pretty much the same idea, with a few complications because there are so many channels to the showermax detectors. First you run a maker and then you make plots. The maker is StEmcOfflineCalibrationMaker. A tarball with all code is located at:
/star/u/aliceb/bemc_timing.tar
Running the Maker
- Prepare your inputs. In your BEMC_timing/macro directory making file lists with the name syntax as for the endcap, with file:/ proceeding each file name.
- Modify the script pptestcalib.xml to point to your areas. In this case the maker runs a bit slower so I bust up the jobs - you will get multiple root files for each run.
- Modify the script submitall to have the correct run numbers.
- Submit to the scheduler with ./submitall
- Make sure you get a root file for each run in the BEMC_timing/Results/root directory. At this point all the info is in 2d histograms with names proceeded by towerSlopes, etc.
Making the plots
The code is in the BEMC_timing/Timing directory. I highly recommend you don't run interactively. For the towers you will run make_timing_curves.C
- Define the number of runs taken, nRuns, and put the relevant run numbers in the array int runNumbers[nRuns].
- Put the right number of files per run in the array int nFiles[nRuns].
- Put the proper timings in the array float timings[nRuns] .
- Change the path variable in the function defintion to point to your area.
- root -b -q make_timing_curves.C
- I wrote a little script to concatenate all the files this makes in your BEMC_timing/Timing/Plots directory. cd to Plots and do ./tow_cat
For the showermax things are a bit more complicated. First you need to project the 2-d histograms to 1d using strip_smd.C. This will create a root file for each run with a histogram of the spectra for each crate. This code also fits pedestals because the peds in the database were bad.
- Modify run_strip_smd to have the relevant run numbers and files per run (first 2 inputs). Then run with ./run_strip_smd > & mylog.log &. You can follow it with tail -f mylog.log to see it go. It actually runs twice - once for each plane (that's the 0/1 in the last input to strip_smd.C).
- Make sure you have 2 new root files for each run in the BEMC_timing/Results/root directory.
- Make the timing curves with root -b -q make_smde_curves.C and root -b -q make_smdp_curves.C
- Concatenate the files with the scripts smdp_cat and smde_cat in the BEMC_timing/Plots directory.
For the preshower you do the same kind of thing - first project the 2-d histograms into 1d histograms for each crate. This is a bit less painful because there aren't as many channels and there is only 1 plane.
- Modify run_strip_pre to have the relevant run numbers and files per run (first 2 inputs). Then run with ./run_strip_pre > & mylog.log &. You can follow it with tail -f mylog.log to see it go.
- Make sure you have 1 new root files for each run in the BEMC_timing/Results/root directory.
- Make the timing curves with root -b -q make_bprs_curves.C
- Concatenate the files with the script pre_cat in the BEMC_timing/Plots directory.
- aliceb's blog
- Login or register to post comments