Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/EMCal-LEDs/README.org is written in an unsupported language. File is not indexed.

0001 #+title: Readme
0002 
0003 * Description
0004 - Going over the prdf files and extracting the waveforms fitted ADC, peak location and pedestal values.
0005 - Electronics readout chain: Signal -> SiPM -> Readout.
0006 - LED's take place of Signal.
0007   - Validate performance of the SiPMs.
0008 - Test pulse takes place of the SiPM.
0009   - Acts as an ideal response from the SiPMs.
0010 
0011 * Data
0012 ** Test Pulse
0013 - Location: ~/sphenix/lustre01/sphnxpro/commissioning/emcal/calib/calib-00005027-0000.prdf~
0014 - Packets Present: 6009-6016
0015 - Command used to check which packets present:
0016 #+begin_src bash
0017 dlist -i -f target.prdf
0018 #+end_src
0019 - Events: 11001
0020 - Command used to check the number of events present:
0021 #+begin_src bash
0022 dpipe -d n -s f -i target.prdf | wc -l
0023 #+end_src
0024 
0025 * dlist, ddump, and dpipe
0026 - the *dlist* utility, which lets you list the packets contained in a given event.
0027 - the *ddump* utility, which lets you dump and look at the contents of a packet in various ways.
0028 - the *dpipe* utility, which copies events from one destination to another with a lot of flexibility; you can also use this to sift through a data stream in a simple way.
0029 Reference: https://www.phenix.bnl.gov/~phoncs/oncs/code_documentation/Event/dlistddumpanddpipe.html
0030 
0031 * Readout Channels, IBs, Packets
0032 - In total there are 24,576 *readout channels* for the EMCal.
0033 - There are 64 *sectors* in the EMCal.
0034 - Each *sector* consists of 384 *readout channels* (8 in phi x 48 in eta).
0035 - Each *sector* is divided up into 6 *interface boards* (IB).
0036 - Each *IB* consists of 64 *readout channels* (8 in phi x 8 in eta).
0037 - Each *packet* consists of 3 IBs (192 *readout channels*).
0038 - Each *sector* consists of 2 *packets*.
0039 
0040 * Usage
0041 1) Compile ~LEDTowerBuilder.cc~ into ~libledtowerbuilder.so~ using:
0042   #+begin_src bash
0043 ./build_package
0044   #+end_src
0045   - Note: Make sure to have ~$MYINSTALL~ set correctly.
0046 
0047 2) Compile ~macro/Fun4All_LEDTowerBuilder.C~ using:
0048 #+begin_src bash
0049 make
0050 #+end_src
0051 
0052 3) Read over the prdfs and make basic histograms to a root file:
0053 #+begin_src bash
0054 ./bin/Fun4All_LEDTowerBuilder <events> <fListname> <outputFile>
0055 #+end_src
0056  - <events>: Number of events to analyze from the prdfs. Default = 1.
0057  - <fListname>: Location of the file list which contains the prdfs. Default = data/fileList.list.
0058  - <outputFile>: Location of the analyzed prdfs root file. Default: data/LEDTowerBuilder.root.
0059 
0060 4) Go through the LEDTowerBuilder.root generated in the previous step and create QA histograms.
0061 #+begin_src bash
0062 ./bin/read-LEDs <input> <output> <events>
0063 #+end_src
0064 - <input>:  Location of LEDTowerBuilder.root. Default = data/LEDTowerBuilder.root.
0065 - <output>: output root file. Default = output/test.root.
0066 - <events>: Number of events to analyze. Default = 0 (meaning all events).
0067 
0068 Example:
0069 #+begin_src bash
0070 ./bin/read-LEDs data/LEDTowerBuilder-<run>.root output/runs/<run>/test.root &> output/runs/<run>/log-read-LEDs.txt &
0071 #+end_src
0072 
0073 5) Plotting macro:
0074 #+begin_src bash
0075 root -b -l -q macro/display.C
0076 #+end_src
0077 
0078 Example:
0079 #+begin_src bash
0080 root -b -l -q 'macro/display.C("output/runs/<run>/test.root", "output/runs/<run>", "<run>")' &> output/runs/<run>/log-display.txt &
0081 #+end_src
0082 
0083 * Useful commands
0084 - Find the number of events within each prdf that matches some pattern.
0085 #+begin_src bash
0086 fd <pattern> /direct/sphenix+lustre01/sphnxpro/commissioning/emcal/calib | xargs -t -I % sh -c "dpipe -d n -s f -i % | wc -l"
0087 #+end_src
0088 
0089 - Find the packets present within each prdf that matches some pattern.
0090 #+begin_src bash
0091 fd <pattern> /direct/sphenix+lustre01/sphnxpro/commissioning/emcal/calib | xargs -t -I % dlist -i -f %
0092 #+end_src
0093 
0094 - Select a range of events from the prdf:
0095 #+begin_src bash
0096 eventcombiner -v -i -e <start-event> -n <nevents> -f -p <output.prdf> <input.prdf>
0097 #+end_src