Vped test 05/05/2023

I ran the test according: https://drupal.star.bnl.gov/STAR/blog/rjreed/epd-vped-scans-2019
In the Zeros.txt file sped is set to -127
Path to files with used settings: 

Run taking:

Zeros20123.txt, vped -127 (pedestal rhicclock clean): 24125021
vped = -20, pedAsPhys: 
24125022
vped = -10, pedAsPhys: 24125023
vped =   0,   pedAsPhys: 24125024
vped =   10, pedAsPhys: 24125025
vped =  20,  pedAsPhys: 24125026
Camac crate off,  pedAsPhys: 24125027 (there are 2 crates, have to enter the STAR hall

I added two runs:
We did not get some point for -20, -10, and 0 in order to do the linear fit we need more point than 1 :) so we extend vped to higher values, the settings files used for runs are added to the same folder as previous ones
Zeros20123.txt, vped -127 (pedestal rhicclock clean): 24128063
Vped 40 :   24128064
Vped 60 :   24128065 
Rhich clock Clean:  24128066

Data analysis:
ssh -A -Y ****@rssh.rhic.bnl.gov
ssh -t -A -Y stargw.starp.bnl.gov
rterm -i
stardev


Copied from /ldaphome/rjreed/EpdReader2023/:
EPDreader.C
StRoot
runEpdTrgHist2023.sh
map_EpdHistos.C
 to /star/u/mstefaniak/vpedCheckMaria

just run:
./runEpdTrgHist2023.sh #day #nrRun 
 ./runEpdTrgHist2023.sh 125 21(,22.... 27)

output folder created: 24125 (+ 24218)
analyse:
root4star -q -b 'map_EpdHistos.C("epdhist.2412502.root")'. for ech file-> CHANGE THE TIME STAMP!
output: mapped_epdhist.2412502.root
send to my computer (maybe there is better way to do this):
echo "mail text" | mailx -s "mapped_epdhist" -a mapped_epdhist.2412502.root mzs***@gmail.com

** edit 2024: there is a better way:

sftp mstefaniak@sftp.sdcc.bnl.gov. 
put ...





edit: I did not "hadd" files. sent one by one and then analyse on my laptop. 

some comments:
In order to avoid memory leak when you overwrite histograms good idea is to name histos differently using Form: 

for example: 
TH1* hOff = new TH1F(Form("hOff2_c%db%dch%d",i,j,k),Form("hOff2_c%db%dch%d",i,j,k),1,-1,1);

I had to change the SaveAs to save many pdf and then merge them, since on "my computer" (my favourite student's explanation:) )  it does not work properly -  I guess the version of ROOT or some root settings. 
New output attached.

edit:
I added 4th crate :) New plots available.

====================================================================================
This you can skip

Working on new configuration file
First an output from the Vped test - attached and also can be found in the TUFF map folder (where we keep the config files)
The quality of the first vped setting was verified by running:
Rhic clock clean with crate on: 24130049
Rhic clock clean with crate off: 24130050

The pedestals are compared and output in the file: Pedestals_Compare24130049.pdf

Some running needs to be done for few channels - in progress!

End of skipping
====================================================================================

***  FINAL VPED OUTPUT ***

We are within the +-5 limit of the vped spread between pedestals with camac crate on and off (only 2 channels are 5 difference, rest is smaller :) )
The new configuration file (just vipers for now): EPD_TUFFvped11may23.txt
The comparisons for pedestals crate on vs off: Pedestals_Compare24131049.pdf
The file is uploaded, so from now (Thu, 11 May 2023, 12:08) we have this file set as default configuration (until the new one will come...).

====================================================================================

I attached some useful macros for the future generations and for me probably because I will do that next year as well (attached files are .txt you have to change to .C)
- comaprePeds.C : based on "DrawPed.C", firstly run_pedeq.sh is used for preparing the root files with pedestal histos, take a look here https://drupal.star.bnl.gov/STAR/blog/mstefaniak/Quick-pedestal-check
- /net/onlhome.starp.bnl.gov/ldaphome/mstefaniak/sendToMaria.sh : speed up the pedestal files sending to your mail
- GetPPTT.C: input Eq, Qt, Channel -> output ew, PP, TT, uses the updated mapping for 2023 from file ttpp_boards.txt