Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/TPC/DAQ/macros/Efficiency_ModuleDisplay_README.md is written in an unsupported language. File is not indexed.

0001 
0002 Here are the instructions for creating the polar efficiency plots for the TPC
0003 
0004 *** If you encounter any problems please reach out to Jennifer (jennifer.l.james@vanderbilt.edu) or Luke (luke.legnosky@stonybrook.edu)
0005 
0006 Go to sphenix/user/<username>/analysis/TPC/DAQ/TPCRawDataTree
0007 Make sure the TPCRawDataTree is able to run by doing the following command
0008   ./autogen.sh
0009 
0010 Then go to sphenix/user/<username>/analysis/TPC/DAQ/macros
0011 Open the Fun4All_TPC_UnpackPRDF.C with a text editor -- I use emacs
0012 
0013   Edit the input file to pull the correct run number PRDF files
0014   Now edit the output file to be some directory you will be working on the Efficiency_ModuleDisplay.C in
0015   (For emacs)
0016 Save ctrl-x ctrl-s
0017 Exit ctrl-x ctrl-c
0018 
0019 To change event number go into run_UnpackPRDF.sh located in sphenix/user/<username>/analysis/TPC/DAQ/macros and update the variable nEvents
0020 ---------------------------------------
0021 
0022 Now source in the PRDFs, you need all of the two lines below (pedestal):
0023 
0024   source run_UnpackPRDF.sh /sphenix/lustre01/sphnxpro/rawdata/commissioning/tpc/pedestal/*10179*
0025   /sphenix/lustre01/sphnxpro/rawdata/commissioning/tpc/pedestal/TPC_ebdc*_pedestal-00010179-0000.prdf
0026 
0027 OR -- you need all of the two lines below (beam):
0028 
0029   source run_UnpackPRDF.sh /sphenix/lustre01/sphnxpro/commissioning/tpc/beam/*11000*
0030   /sphenix/lustre01/sphnxpro/commissioning/tpc/beam/TPC_ebdc*_beam-00011000-0000.prdf
0031 
0032 Replace the run number to the one you need
0033 The * will make it run over all the sectors of the TPC. If you want just one sector enter the sector number
0034   Example: TPC_ebdc*_pedestal-00010179-0000.prdf  ---> TPC_ebdc00_pedestal-00010179-0000.prdf
0035 
0036 Depending on the number of events you run it will take some time (100 events is about 15 minutes on a good day)
0037 
0038 ---------------------------------------
0039 
0040 Move to the repository you put these files (If you'd like, you can move TPC_Channel_QA.C, SectorMap_Display.C, Efficiency_ModuleDisplay.C,
0041 and Noise_ModuleDisplay.C with you to avoid calling the whole path).
0042 
0043 Okay now you need to change the run number in TPC_Channel_QA.C in the following line,
0044 string runNumber = "pedestal-00010179";
0045 
0046  Also change the directory,
0047   /sphenix/user/rosstom/test/testFiles/TPC_ebdc"+sectorNumber+"_"+runNumber+"-0000.prdf_TPCRawDataTree.root
0048   *** Make sure to keep TPC_ebdc at the end of the path ***
0049 
0050 Example: /sphenix/user/rosstom/test/testFiles/TPC_ebdc"+sectorNumber+"_"+runNumber+"-0000.prdf_TPCRawDataTree.root \
0051 
0052          ---> /sphenix/<username>/<Working Directory>/TPC_ebdc"+sectorNumber+"_"+runNumber+"-0000.prdf_TPCRawDataTree.root
0053 
0054 Run TPC_Channel_QA.C with,
0055 
0056     root TPC_Channel_QA.C 
0057 
0058 This will take a long time probably to generate the root files.
0059 ---------------------------------------
0060 Yay, now there's root files we can build from. Now go into SectorMap_Display.C and we'll make some TNtuples from them.
0061   
0062   Change the variable runNumber to whichever run you're looking at and make sure to change the path in filename2 to the correct directory:
0063 
0064    Example: sphenix/u/jamesj3j3/workfest/sPHENIXProjects/outputfile_TPC_ebdc%s_pedestal-00010305.root \
0065 
0066             ---> sphenix/user/<username>/<Working Directory>/outputfile_TPC_ebdc%s_pedestal-00010305.root
0067 
0068   Make sure to change the outfile name to be the correct run number:
0069   TFile h_outfile10305("pedestal-10179-outfile.root", "RECREATE");
0070 
0071   Save and run. Should be pretty quick.
0072 -----------------------------------------
0073 Okay, now we can do Efficiency_ModuleDisplay.C
0074 
0075   Again change the input with proper run number:
0076     const TString filename3( Form( "./pedestal-10179-outfile.root") );
0077 
0078   Change the titles of the histograms as needed (dummy_his1 and dummy_his2)
0079   Change the minimum value of the live fraction percentage to the needed one (ErrCSide and ErrASide)
0080 
0081  Save and run. Will take about 20-30 seconds.
0082 --------------------------------------------
0083 Follow this same procedure for Noise_ModuleDisplay.C
0084 --------------------------------------------
0085 End of process