Difference between revisions of "UITF Mott Analysis"
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=='''Data Files'''== | =='''Data Files'''== | ||
− | + | CODA writes the data to this disk: /data/idaq | |
+ | |||
Line 7: | Line 8: | ||
=='''Decode a Run'''== | =='''Decode a Run'''== | ||
− | You must log on to the idaq account of the itfmdaq0 machine: | + | * You must log on to the idaq account of the itfmdaq0 machine: |
− | <span style="color:red"> [ | + | <span style="color:red"> [10] user_name@opsl01 > ssh -Y idaq@itfmdaq0 </span> |
− | To then decode a run (turn it from a .dat file to a .root file which is more useable), first go to the proper directory: | + | * To then decode a run (turn it from a .dat file to a .root file which is more useable), first go to the proper directory: |
[22] idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/decoder/''' | [22] idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/decoder/''' | ||
[23] idaq@itfmdaq0 > ./fadc_decode_Source fullpath/filename [Option(s)] | [23] idaq@itfmdaq0 > ./fadc_decode_Source fullpath/filename [Option(s)] | ||
− | Or: | + | * Or: |
− | <span style="color:red">[ | + | <span style="color:red">[11] idaq@itfmdaq0 > '''decode.pl''' RunNumber [Option(s)] </span> |
Output ROOTfiles go to: | Output ROOTfiles go to: | ||
'''cd /work/idaq/Mott/Analysis/rootfiles/''' | '''cd /work/idaq/Mott/Analysis/rootfiles/''' | ||
− | Usage = ./decode.pl RunNumber -Ped -Debug -Trig x -PedFile x | + | Usage = ./decode.pl RunNumber -Ped -Debug -Trig x -PedFile x -Farm -Del x file or run# -Outputs directory |
-Ped : Pedestal subtraction active with default files | -Ped : Pedestal subtraction active with default files | ||
-Debug : Debugging mode, saves all channels to ntuple | -Debug : Debugging mode, saves all channels to ntuple | ||
Line 30: | Line 31: | ||
-Outputs : Set the output directory for the .root and .txt files | -Outputs : Set the output directory for the .root and .txt files | ||
− | + | * To check on the FADC profiles, cd as above, the command: | |
− | [ | + | [12] idaq@itfmdaq0 > root Mott_Sample_####_0.root |
for the proper output filename from the decoder | for the proper output filename from the decoder | ||
Line 47: | Line 48: | ||
=='''Analysis Scripts'''== | =='''Analysis Scripts'''== | ||
− | The new Full Analysis script is being maintained on the '''itfmdaq0''' machine | + | * The new Full Analysis script is being maintained on the '''itfmdaq0''' machine. |
To use the current version log onto idaq@itfmdaq0, then following these steps: | To use the current version log onto idaq@itfmdaq0, then following these steps: | ||
− | + | <span style="color:red">[13] idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/FullAnalysis/EditFull/'''</span> | |
− | <span style="color:red"> [ | + | <span style="color:red">[14] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] (TDC cuts will be applied)</span> |
− | <span style="color:red">[ | + | <span style="color:red">[15] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] --499 (Will not apply TDC cuts) </span> |
− | <span style="color:red">[ | ||
+ | * Full_Analysis generates few txtfiles | ||
− | + | idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/FullAnalysis/TextFiles/''' | |
− | + | idaq@itfmdaq0 > gedit Mott_Run_####.copyme | |
− | |||
− | idaq@ | ||
− | idaq@ | ||
copyme.txt generates a line that should be copied using gedit (otherwise formatting gets lost) and pasted into spreadsheet Run2RawData.ods. The spreadsheet lives in the same directory. | copyme.txt generates a line that should be copied using gedit (otherwise formatting gets lost) and pasted into spreadsheet Run2RawData.ods. The spreadsheet lives in the same directory. | ||
<span style="color:blue">To adjust energy cuts , go to </span> | <span style="color:blue">To adjust energy cuts , go to </span> | ||
− | idaq@ | + | idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/FullAnalysis/TextFiles/src''' |
− | idaq@ | + | idaq@itfmdaq0 > gedit MottAnalysis.C |
− | This opens the file with the cuts. Without | + | This opens the file with the cuts. Without cuts, edit Double_t ECutLo = -0.5; to desired low cut, Double_t ECutHi = 2; to desired high cut. Save file |
− | + | Then to compile, go to | |
− | idaq@ | + | idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/ |
− | + | idaq@itfmdaq0 > make | |
this compiles the code with the new cuts from the saved MottAnalysis.C | this compiles the code with the new cuts from the saved MottAnalysis.C | ||
− | run idaq@ | + | run idaq@itfmdaq0 > ./FullAnalysis [RunNumber] --499 again and you'll get the data with the new cuts. |
− | + | idaq@itfmdaq0 > cd '''/work/idaq/Mott/Analysis/FullAnalysis/TextFiles/''' | |
− | |||
− | idaq@ | ||
.long contains Asymmetry calculations, Ns, and detector rates | .long contains Asymmetry calculations, Ns, and detector rates | ||
This will tell you useful things like the asymmetry and detector rates as well as make a bunch of plots that go to: | This will tell you useful things like the asymmetry and detector rates as well as make a bunch of plots that go to: | ||
+ | <span style="color:red"> '''[15] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/Figures/ ''' </span> | ||
− | + | * To view figures | |
− | |||
− | |||
− | |||
+ | <span style="color:red"> '''[16] idaq@itfmdaq0 > eog *7899* ''' </span> | ||
− | + | * To output all of the printed information to a easily parsable text file try: | |
+ | [17] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] > ../TextFiles/Analysis_[RunNumber].txt | ||
+ | Additional information about the script can be found in the README file maintained in the same directory as the script. | ||
− | |||
− | |||
− | |||
=='''Compiling Full Analysis'''== | =='''Compiling Full Analysis'''== | ||
Line 106: | Line 100: | ||
* cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/ | * cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/ | ||
* make | * make | ||
+ | |||
+ | |||
+ | |||
=='''Additional Analysis Tools'''== | =='''Additional Analysis Tools'''== | ||
Line 116: | Line 113: | ||
* Simple plots of data from decoded rootfiles can be generated by: | * Simple plots of data from decoded rootfiles can be generated by: | ||
− | [ | + | [18] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/rootfiles/ |
− | [ | + | [19] idaq@itfmdaq0 > root -l Mott_Sample_[RunNumber]_[SegmentNumber].root |
root [1] T->Draw("Sample_CH1:Iteration$","","*l",10,100) | root [1] T->Draw("Sample_CH1:Iteration$","","*l",10,100) | ||
− | root [2] T->Draw(" | + | root [2] T->Draw("Sample_Hel:Entry$","","*l",100,1000) |
− | root [3] T->Draw(" | + | root [3] T->Draw("Sample_Hel") |
− | root [4] T->Draw(" | + | root [4] T->Draw("Sample_Hel:Entry$","","*l") |
− | * There are several additional macros that may used for the analysis (with some modification). All are in | + | * There are several additional macros that may used for the analysis (with some modification). All are in itfmdaq0 in the directory: |
'''/work/idaq/Mott/Analysis/macro/''' | '''/work/idaq/Mott/Analysis/macro/''' | ||
* For example, to plot the Mott FADC Pedestals: | * For example, to plot the Mott FADC Pedestals: | ||
− | [ | + | [20] idaq@itfmdaq0 > root |
root [0] .L FADC_Ped.C | root [0] .L FADC_Ped.C | ||
root [1] FADC_Ped t | root [1] FADC_Ped t | ||
Enter Run Number: | Enter Run Number: | ||
− | + | 200 | |
root [2] t.Loop() | root [2] t.Loop() | ||
Line 138: | Line 135: | ||
* To calculate Mott Asymmetries: | * To calculate Mott Asymmetries: | ||
− | [ | + | [21] idaq@itfmdaq0 > root |
root [0] .L MottAsym.C | root [0] .L MottAsym.C | ||
root [1] MottAsym t | root [1] MottAsym t | ||
Enter Run Number: | Enter Run Number: | ||
− | + | 200 | |
root [2] t.Loop() | root [2] t.Loop() | ||
Line 148: | Line 145: | ||
* To calculate charge asymmetry from a Mott_Sample run, follow these steps: | * To calculate charge asymmetry from a Mott_Sample run, follow these steps: | ||
− | [ | + | [22] idaq@itfmdaq0 > root |
root [0] .L Charge_Sample.C | root [0] .L Charge_Sample.C | ||
root [1] Charge_Sample t | root [1] Charge_Sample t | ||
Line 158: | Line 155: | ||
* For a scalar run to adjust PITA using the BCM: | * For a scalar run to adjust PITA using the BCM: | ||
− | [ | + | [23] idaq@itfmdaq0 > root |
root [3] .L ChargeAsym.C | root [3] .L ChargeAsym.C | ||
root [3] ChargeAsym t | root [3] ChargeAsym t | ||
Line 168: | Line 165: | ||
* To print Run Time, Detector Triggers, Accepted Triggers, and Average Beam Current: | * To print Run Time, Detector Triggers, Accepted Triggers, and Average Beam Current: | ||
− | [ | + | [24] idaq@itfmdaq0 > root |
root [0] .L TimeScaler.C | root [0] .L TimeScaler.C | ||
root [1] TimeScaler t | root [1] TimeScaler t | ||
Line 186: | Line 183: | ||
- macro '''BPMsPos.C''' prints the raw wire signals and calculates the beam positions and the helicity-correlated position differences. | - macro '''BPMsPos.C''' prints the raw wire signals and calculates the beam positions and the helicity-correlated position differences. | ||
− | |||
− | |||
− | |||
Line 215: | Line 209: | ||
depends on the scattering angle, so false asymmetries from misalignments | depends on the scattering angle, so false asymmetries from misalignments | ||
may only cancel to first order - see paper for detailed discussion. | may only cancel to first order - see paper for detailed discussion. | ||
+ | |||
Line 228: | Line 223: | ||
jget /mss/accel/peppo/raw/Mott_Sample_7231.dat.0 | jget /mss/accel/peppo/raw/Mott_Sample_7231.dat.0 | ||
The file will be copied from tape to the cache area: /cache/mss/accel/peppo/raw | The file will be copied from tape to the cache area: /cache/mss/accel/peppo/raw | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 12:12, 3 July 2022
Data Files
CODA writes the data to this disk: /data/idaq
Decode a Run
- You must log on to the idaq account of the itfmdaq0 machine:
[10] user_name@opsl01 > ssh -Y idaq@itfmdaq0
- To then decode a run (turn it from a .dat file to a .root file which is more useable), first go to the proper directory:
[22] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/decoder/ [23] idaq@itfmdaq0 > ./fadc_decode_Source fullpath/filename [Option(s)]
- Or:
[11] idaq@itfmdaq0 > decode.pl RunNumber [Option(s)]
Output ROOTfiles go to:
cd /work/idaq/Mott/Analysis/rootfiles/
Usage = ./decode.pl RunNumber -Ped -Debug -Trig x -PedFile x -Farm -Del x file or run# -Outputs directory
-Ped : Pedestal subtraction active with default files -Debug : Debugging mode, saves all channels to ntuple -Trig x : x=1=Detector, x=2=nT_Settle -PedFile x : Pedestal subtraction with a specific file -Farm : Farm option, NO pedestal subtraction -Del x : x=0 No Delay, x=8 8-window delay -Outputs : Set the output directory for the .root and .txt files
- To check on the FADC profiles, cd as above, the command:
[12] idaq@itfmdaq0 > root Mott_Sample_####_0.root
for the proper output filename from the decoder
command for opening "Root object browser"
root [1] new TBrowser
follow paths to Mott_Sample_####_0.root
Analysis Scripts
- The new Full Analysis script is being maintained on the itfmdaq0 machine.
To use the current version log onto idaq@itfmdaq0, then following these steps:
[13] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/ [14] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] (TDC cuts will be applied) [15] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] --499 (Will not apply TDC cuts)
- Full_Analysis generates few txtfiles
idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/TextFiles/ idaq@itfmdaq0 > gedit Mott_Run_####.copyme
copyme.txt generates a line that should be copied using gedit (otherwise formatting gets lost) and pasted into spreadsheet Run2RawData.ods. The spreadsheet lives in the same directory.
To adjust energy cuts , go to
idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/TextFiles/src idaq@itfmdaq0 > gedit MottAnalysis.C This opens the file with the cuts. Without cuts, edit Double_t ECutLo = -0.5; to desired low cut, Double_t ECutHi = 2; to desired high cut. Save file Then to compile, go to idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/ idaq@itfmdaq0 > make
this compiles the code with the new cuts from the saved MottAnalysis.C run idaq@itfmdaq0 > ./FullAnalysis [RunNumber] --499 again and you'll get the data with the new cuts.
idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/TextFiles/
.long contains Asymmetry calculations, Ns, and detector rates
This will tell you useful things like the asymmetry and detector rates as well as make a bunch of plots that go to:
[15] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/FullAnalysis/Figures/
- To view figures
[16] idaq@itfmdaq0 > eog *7899*
- To output all of the printed information to a easily parsable text file try:
[17] idaq@itfmdaq0 > ./FullAnalysis [RunNumber] > ../TextFiles/Analysis_[RunNumber].txt
Additional information about the script can be found in the README file maintained in the same directory as the script.
Compiling Full Analysis
- cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/src
- edit MottAnalysis.C
- cd /work/idaq/Mott/Analysis/FullAnalysis/EditFull/
- make
Additional Analysis Tools
- ROOT provides a utility that generates a skeleton class designed to loop over the entries of the tree:
root [0] TFile *f = new TFile("Mott_Sample_7231_0.root"); root [1] T->MakeClass("MyClass") Files: MyClass.h and MyClass.C generated from Tree: T
- Simple plots of data from decoded rootfiles can be generated by:
[18] idaq@itfmdaq0 > cd /work/idaq/Mott/Analysis/rootfiles/ [19] idaq@itfmdaq0 > root -l Mott_Sample_[RunNumber]_[SegmentNumber].root root [1] T->Draw("Sample_CH1:Iteration$","","*l",10,100) root [2] T->Draw("Sample_Hel:Entry$","","*l",100,1000) root [3] T->Draw("Sample_Hel") root [4] T->Draw("Sample_Hel:Entry$","","*l")
- There are several additional macros that may used for the analysis (with some modification). All are in itfmdaq0 in the directory:
/work/idaq/Mott/Analysis/macro/
- For example, to plot the Mott FADC Pedestals:
[20] idaq@itfmdaq0 > root root [0] .L FADC_Ped.C root [1] FADC_Ped t Enter Run Number: 200 root [2] t.Loop()
- To calculate Mott Asymmetries:
[21] idaq@itfmdaq0 > root root [0] .L MottAsym.C root [1] MottAsym t Enter Run Number: 200 root [2] t.Loop()
- To calculate charge asymmetry from a Mott_Sample run, follow these steps:
[22] idaq@itfmdaq0 > root root [0] .L Charge_Sample.C root [1] Charge_Sample t Enter Run Number: RunNumber root [2] t.Loop()
- For a scalar run to adjust PITA using the BCM:
[23] idaq@itfmdaq0 > root root [3] .L ChargeAsym.C root [3] ChargeAsym t Enter Run Number: RunNumber root [3] t.Loop()
- To print Run Time, Detector Triggers, Accepted Triggers, and Average Beam Current:
[24] idaq@itfmdaq0 > root root [0] .L TimeScaler.C root [1] TimeScaler t Enter Run Number: 8179 root [2] t.Loop(); RunTime = 343.624 s Detector Triggers = 1331454 Accepted Triggers = 1016762 Average Beam Current = 2.12783 uA
- BPMs Analysis is done in /work/idaq/Mott/Analysis/macro:
- macro pos_EPICS.C shows an example of how the positions are calculated in the BPMs screens using the EPICS wire counts. - macro inj_BPMs_ped.C calculates the wire pedestal for each BPM. A run with Gains OFF must be used to calculate pedestals (e.g., [1]). - macro BPMs_Wire.C prints the raw wire signals (RingScaler_CH17 - RingScaler_CH32) from S1 Scaler. - macro BPMsPos.C prints the raw wire signals and calculates the beam positions and the helicity-correlated position differences.
Cross-ratio Method - Advantages and False Asymmetries
This is the paper that is frequently referenced when discussing the cross-ratio method to calculate asymmetries: G. G. Ohlsen, Jr. and P. W. Keaton, Nucl. Instrum. Meth. 109, 41 (1973) Media:Cross_ratio.pdf. On page 3, the advantages of the this method are listed.
In this cross-ratio method, the Mott asymmetry is independent (cancel to all orders) of relative detector efficiencies and solid angles, of relative integrated charge (charge asymmetry), and of target thickness variations. However, differences in the beam polarization for the two helicity states cancel to first order.
Dead time in the counting equipment may be either common to the two channels or not, depending on the equipment used. If it is not common, a correction is required. For the Mott, the dead time is caused by the slow DAQ, which is common to all our detectors - no correction is required. This is why even when we have large dead times, we still measure the same asymmetry as the old Mott DAQ.
Section 3.3 of the paper talks about misalignment errors and the effect of detectors having different scattering angle. The Mott Analysing Power depends on the scattering angle, so false asymmetries from misalignments may only cancel to first order - see paper for detailed discussion.
MSS and Farm
- From jlabl2, do: ssh ifarm to access ifarm1101, the interactive front end for the CentOS 6.2 farm.
- MSS: The archive location of the Stub Files is: /mss/accel/peppo/raw
Old files (before May 2012, Run Number < 4,000): /mss/accel/positron/PEPPo or /mss/accel/positron/mott
- To get files from MSS:
jget /mss/accel/peppo/raw/Mott_Sample_7231.dat.0 The file will be copied from tape to the cache area: /cache/mss/accel/peppo/raw