AIDA GELINA BRIKEN nToF CRIB ISOLDE CIRCE nTOFCapture DESPEC DTAS EDI_PSA 179Ta CARME StellarModelling DCF K40
  nToF, Page 3 of 4  ELOG logo
ID Date Authordown Subject
  38   Sun Oct 9 20:57:54 2022 Nikolay SosninDetectors in-beam, no target

After long beam-off, changed detector mount by moving it 2 cm forward into the beam, after removing LiF 3.

Attachment 1: Det_Holder_Default_Position_Resize.jpg
Det_Holder_Default_Position_Resize.jpg
Attachment 2: Detectors_in_Beam_CloseUp_Resize.jpg
Detectors_in_Beam_CloseUp_Resize.jpg
Attachment 3: Detectors_in_Beam_Resize.jpg
Detectors_in_Beam_Resize.jpg
Attachment 4: Voltage_E_InBeam_AfterNeutrons_Resize.jpg
Voltage_E_InBeam_AfterNeutrons_Resize.jpg
Attachment 5: Voltage_E_InBeam_BeforeNeutrons_Resize.jpg
Voltage_E_InBeam_BeforeNeutrons_Resize.jpg
Attachment 6: Mounted_LiF3_Resize.jpg
Mounted_LiF3_Resize.jpg
Attachment 7: Voltage_dE_InBeam_AfterNeutrons_Resize.jpg
Voltage_dE_InBeam_AfterNeutrons_Resize.jpg
Attachment 8: Voltage_dE_InBeam_BeforeNeutrons_Resize.jpg
Voltage_dE_InBeam_BeforeNeutrons_Resize.jpg
Attachment 9: Gamma_Flash_InBeam_1_Resize.jpg
Gamma_Flash_InBeam_1_Resize.jpg
Attachment 10: Gamma_Flash_InBeam_2_Resize.jpg
Gamma_Flash_InBeam_2_Resize.jpg
Attachment 11: LiF3_Mount_Angle_View1_Resize.jpg
LiF3_Mount_Angle_View1_Resize.jpg
Attachment 12: LiF3_Mount_Angle_View2_Resize.jpg
LiF3_Mount_Angle_View2_Resize.jpg
  40   Sun Oct 9 21:07:02 2022 Nikolay SosninBoron Sample 3 Measurement

21:15 Changed from detectors in-beam to boron-10 sample 3 in-beam (in-beam measurement got 1000 triggers, 500 of which were dedicated). The sample was mounted identically to LiF 3. An attempt was made to replace the 20-micron dE detector with a 50-micron one, but the screwholes on the 50-micron detector did not match the 300-micron E-detector ones and therefore could not be mounted. 20-micron detector was therefore re-attached. Planning to run for 12 hours with boron than dismount.

Attachment 1: Voltage_dE4_Resize.jpg
Voltage_dE4_Resize.jpg
Attachment 2: Voltage_E4_Resize.jpg
Voltage_E4_Resize.jpg
Attachment 3: E_dE_Position_Before_Boron_Resize.jpg
E_dE_Position_Before_Boron_Resize.jpg
Attachment 4: E_dE_Position_Boron_Above_Resize.jpg
E_dE_Position_Boron_Above_Resize.jpg
Attachment 5: E_dE_Position_Boron_Back_Resize.jpg
E_dE_Position_Boron_Back_Resize.jpg
Attachment 6: E_dE_Position_Boron_Resize.jpg
E_dE_Position_Boron_Resize.jpg
Attachment 7: Boron_Sample_Rotation_Angle_Resize.jpg
Boron_Sample_Rotation_Angle_Resize.jpg
Attachment 8: Boron_Sample3_Target_View_Resize.jpg
Boron_Sample3_Target_View_Resize.jpg
Attachment 9: Boron_Measurement_Chamber_Interior2_Resize.jpg
Boron_Measurement_Chamber_Interior2_Resize.jpg
Attachment 10: Boron_Mounted_Resize.jpg
Boron_Mounted_Resize.jpg
Attachment 11: Boron_Measurement_Chamber_Interior1_Resize.jpg
Boron_Measurement_Chamber_Interior1_Resize.jpg
Attachment 12: Boron_Sample3_Back_Resize.jpg
Boron_Sample3_Back_Resize.jpg
Attachment 13: Boron_Sample3_Front_Resize.jpg
Boron_Sample3_Front_Resize.jpg
Attachment 14: Boron_Sample3_InBeam_Resize.jpg
Boron_Sample3_InBeam_Resize.jpg
  44   Mon Jul 31 10:21:41 2023 Nikolay Sosninn_TOF Data and Filtering
Attachment 1: Al26_Filtering.pptx
  50   Thu Aug 10 10:50:15 2023 Nikolay SosninAl26 Chamber Cabling/Vacuum/NIM
Attachment 1: Vacuum_Reading.JPG
Vacuum_Reading.JPG
Attachment 2: Pulser_Settings3.JPG
Pulser_Settings3.JPG
Attachment 3: Pulser_Settings2.JPG
Pulser_Settings2.JPG
Attachment 4: NIM_Bin.JPG
NIM_Bin.JPG
Attachment 5: Currents.JPG
Currents.JPG
Attachment 6: Amplifier_Settings.JPG
Amplifier_Settings.JPG
Attachment 7: HV_EDET.JPG
HV_EDET.JPG
Attachment 8: HV_DEED.JPG
HV_DEED.JPG
Attachment 9: Pulser_Settings1.JPG
Pulser_Settings1.JPG
Attachment 10: Cables_Full_View.JPG
Cables_Full_View.JPG
Attachment 11: Preamp_Cables.JPG
Preamp_Cables.JPG
Attachment 12: BNC_Converters.JPG
BNC_Converters.JPG
Attachment 13: DAQ_Cable_Connection_BNC.JPG
DAQ_Cable_Connection_BNC.JPG
Attachment 14: Ribbon_Cables_DAQ.JPG
Ribbon_Cables_DAQ.JPG
Attachment 15: Ribbon_Cables_DAQ.JPG
Ribbon_Cables_DAQ.JPG
Attachment 16: NIM_Setup_Full.JPG
NIM_Setup_Full.JPG
Attachment 17: Vacuum_Pump.JPG
Vacuum_Pump.JPG
Attachment 18: Vacuum_Pump_Exhaust.JPG
Vacuum_Pump_Exhaust.JPG
Attachment 19: Vacuum_Pump_Attachment.JPG
Vacuum_Pump_Attachment.JPG
Attachment 20: Vacuum_Gauge.JPG
Vacuum_Gauge.JPG
Attachment 21: Vacuum_Valve_Lid.JPG
Vacuum_Valve_Lid.JPG
Attachment 22: Ribbon_Cables_Back.JPG
Ribbon_Cables_Back.JPG
Attachment 23: Ribbon_Cables.JPG
Ribbon_Cables.JPG
  51   Thu Aug 10 11:30:32 2023 Nikolay SosninSilicons and LiF3+Gafchromic Target
Attachment 1: EDET_150um_Box.JPG
EDET_150um_Box.JPG
Attachment 2: EDET_150um.JPG
EDET_150um.JPG
Attachment 3: EDET_ID.JPG
EDET_ID.JPG
Attachment 4: DEED_20um_Box.JPG
DEED_20um_Box.JPG
Attachment 5: LiF3_Gafchrmoic_Target_Mounted.JPG
LiF3_Gafchrmoic_Target_Mounted.JPG
Attachment 6: LiF3_Gafchromic_Side.JPG
LiF3_Gafchromic_Side.JPG
Attachment 7: LiF3_Gafchromic_Front.JPG
LiF3_Gafchromic_Front.JPG
Attachment 8: Detector_Mount_and_LiF3.JPG
Detector_Mount_and_LiF3.JPG
Attachment 9: Detectors_Mounting.JPG
Detectors_Mounting.JPG
Attachment 10: Detectors_Mounted_DEED.JPG
Detectors_Mounted_DEED.JPG
Attachment 11: Detectors_Mounted_EDET.JPG
Detectors_Mounted_EDET.JPG
Attachment 12: Detectors_and_LiF3_Gafchrmoic_TestPosition.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition.JPG
Attachment 13: Detectors_and_LiF3_Gafchrmoic_TestPosition_Back.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition_Back.JPG
Attachment 14: Detectors_and_LiF3_Gafchrmoic_TestPosition_Below.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition_Below.JPG
Attachment 15: Detectors_and_LiF3_Gafchrmoic_TestPosition_Above.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition_Above.JPG
Attachment 16: Detectors_and_LiF3_Gafchrmoic_TestPosition_Tilt.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition_Tilt.JPG
Attachment 17: Detectors_and_LiF3_Gafchrmoic_TestPosition_Front.JPG
Detectors_and_LiF3_Gafchrmoic_TestPosition_Front.JPG
Attachment 18: Assembly_Insert.JPG
Assembly_Insert.JPG
  59   Fri Aug 11 13:16:56 2023 Nikolay SosninE Front Incorrect Cabling

E front 2x16-way to 1x34-way IDC cable from the Junction Box to the IDC-Lemo 00 adaptor was found to be inserted upside-down - the 16-way IDC connectors did not have polarisation keys - meaning the E detector p+n junction strip signals collected with 26Al for the first night are not working. Signals from the dE p+n junction strips and E n+n Ohmic strips will be OK. The mistake occurred at the conclusion of the noise tests yesterday - see https://elog.ph.ed.ac.uk/nToF/52

The 2x16-way to 1x34-way IDC cable without polarisation keys has now been replaced.

Run 216417 and onwards have correct cabling. For runs before that, E back and dE are still reliable.

  60   Fri Aug 11 16:50:58 2023 Nikolay SosninEDET24

After inserting aluminium target, previously-dead channel 24 on EDET was re-plugged into a 12-bit card SPD02872. It is the only EDET on 12-bit card, the rest are on 14-bit. From pulsers, there appears to be a 90 ns offset from this EDET to others, with EDET24 preceeding the rest. The last channel on 14-bit cards was broken, hence havng to use 12-bit.

Attachment 1: EDET24_Card.JPG
EDET24_Card.JPG
Attachment 2: EDET24_Cable.JPG
EDET24_Cable.JPG
  61   Sat Aug 12 09:24:19 2023 Nikolay Sosnin26Al Protons

Here is a Google spreadsheet for counting protons for the runs:

https://docs.google.com/spreadsheets/d/1INX8G9GAu-M70SdZdz55qXnMZNXKXLW7xfFH-eaLuQw/edit?usp=sharing

  65   Thu Aug 17 10:26:51 2023 Nikolay SosninData Processing

To run raw2root on LXPLUS, you will need to add the following line to your .bashrc, performed using

gedit ~/.bashrc &

then paste line at the bottome of the file

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/afs/cern.ch/user/n/ntofuser/public

then save and close the gedit (a linux text editor similar to Windows Notepad). Text file .bashrc is responsible for setting correct paths to various system settings when you log in. The line above sets correct libraries for raw2root from the n_TOF official directories.

 

The old version of raw2root which I use is stored in a directory on EOS accessible via LXPLUS:

cd /eos/home-n/nsosnin/public/raw2root

If you examine the contents of the directory using command ls, there will be two folders: ntoflib and prg. The relative location of these folders on your system should always be the same, and you do not need to do anything in the ntoflib directory, so we can explore the next directory

cd prg && ls

Command cd means change directory and ls is list contents, double-& chains commands in a sequence. Your terminal should now display two more directories: detector and raw2root. detector is a list of codes for various detector types, examine its contents with ls detector. We use MWDdetector.cc and its library header file MWDdetector.h. All the filters are defined and can be changed in MWDdetector.cc, which is a C++ code. You can browse and change its contents with gedit. raw2root codes, however, are run from the raw2root directory, so let's change to it

cd raw2root && ls

When you list the contents of this directory there will be many files, none of which you need to edit. There will also be a directory called Traces, which I created as the default location for signal traces to be written, if relevant sections of MWDdetector.cc are uncommented (discussed below). If you are happy with the contents of MWDdetector.cc, you need to re-compile raw2root. Using C++ code, unlike some others, is a two-step process: compilation and execution. Various bits of code in raw2root and its libraries are put together into one executable file called raw2root during compilation stage, and then the code can be run by executing the executable. To compile raw2root, you need to be in its directory, which you can check by typing in

pwd

which should then display /eos/home-n/nsosnin/public/raw2root/prg/raw2root and if you it displays something else, use

cd /eos/home-n/nsosnin/public/raw2root/prg/raw2root

To compile raw2root in this directory use

make clean && make proper && make

The code will start compiling and do so for a while. It will display some warnings associated with other older n_TOF codes. There should, however, be no errors. If there are errors, something went wrong in MWDdetector.cc, so try troubleshooting it by Googling the errors (the line with the error will also display two numbers, something like error: MWDdetector.cc:1211:45, and the the second number is the line where the problem occurred). C++ errors are a dark art though, so feel free to contact me for help.

If the compilation displays no errors (woo!), the code compiled successfully. To test it, two things are needed: UserInput file and .raw.finished file. UserInput file called UserInput_Silicons.h, which I use, is already stored in that directory. If you examine it with gedit, you will see lines with detector names and numbers and the filtering parameters. The parameters are read in at the top of MWDdetector.cc in order, so you can follow the variables they are read into throughout the code to figure out which parameter does what (this is not an easy task!).

.raw.finished files are binary data files with detector signal traces, which raw2root filters and makes into ROOT files. These need to be downloaded from CERN servers (I left two example ones in the directory though). While the experiment is running these are stored, but will eventually be deleted, so if they don't download, contact me on staging data (i.e. writing it onto servers again after deletion). To download such a binary file for this experiment to the directory you are in use

xrdcp xroot://eosctapublicdisk.cern.ch//eos/ctapublicdisk/archive/ntof/2023/EAR2/26Al_DSSSD/216408/stream1/run216408_1_s1.raw.finished .

Here, xrdcp command is CERN's own copying command, which takes data from the directory listed in the command. I have highlighted above in yellow the bits you may need to change in the command. The first two are simply run number. The last one is the data segment. n_TOF data within a run are subdivided into 20 proton bunch segments, so one such .raw.finished file that you download contains 20 bunches (which is a very small amount of data, so if you need mass_processing, contact me or Fran (francisco.garcia.infantes@cern.ch) at n_TOF). You can download different segments by changing this number. Bunches 1-20 are in segment 0, bunches 21-40 in segment 1, etc.

Once you have downloaded the file of interest execute raw2root with command

./raw2root -p UserInput_Silicons.h -f run216408_1_s1.raw.finished -r rootout.root

This will run for some time, applying settings from UserInput to filters in MWDdetector.cc, and running the filters over data in the .raw.finished file. This will produce an output file called rootout.root, but feel free to change the name in the command to whatever you like, otherwise you will just keep overwriting the old files. This output file will have the amplitudes, times etc. of all the extracted signals listed, but it will not produce traces, as that is not standard raw2root functionality, and requires my code, which I added to MWDdetector.cc

To print traces, open MWDdetector.cc using

gedit ../detector/MWDdetector.cc &

Note, ".." on Linux means "previous directory", so the command above will leave raw2root directory, go to detector directory and open the code. In this code, uncomment (i.e. remove // or /* or */ characters in C++) from lines 310-312, 441, 442, 465 and 529. This will now print trace ROOT files into the Traces directory. Warning: this runs very slowly, as it's a lot of data being written to disk!

The if() statment on line 465 allows you to gate on specific bunches and detectors for producing traces. The contents of histograms inside the output files can be understood in terms of what MWDdetector.cc does by reading the lines 514-522 of that code. This should be everything you need to get started with processing traces and filtering outputs. Good luck!

  28   Thu May 26 09:20:32 2022 Nick / ClaudiaInventory of Items at n_TOF for (n,cp) experiments

Detectors currently in the boxes:

2x MSL type W1(SS)-50, 2902-4 (53um), 2940-6 (55um)

1x MSL type W1(SS)-20 2837-33 (20um)

1x MSL type W1(DS?) 1230-10  (500 or 300 um)

1x MSL type W1(DS)-500 1194-9 (494um)

 

Three aluminium crates contain 26Al(n, alpha) kit from EAR2, and was in the barracks (building 6547) near detector lab by EAR1 entrance. A list is attached and photos can be found on Dropbox:

https://www.dropbox.com/sh/68k1xove2zr1bmj/AADKvN8wR_Ia2EwZMOXZqdMCa?dl=0

Attachment 1: rn_image_picker_lib_temp_e85b2099-7b73-4246-843d-6351800c2709.jpg
rn_image_picker_lib_temp_e85b2099-7b73-4246-843d-6351800c2709.jpg
Attachment 2: rn_image_picker_lib_temp_3ff5f819-1e0c-4278-bbbc-01038a0a0c94.jpg
rn_image_picker_lib_temp_3ff5f819-1e0c-4278-bbbc-01038a0a0c94.jpg
  41   Mon Jul 3 13:01:30 2023 EmmanuelBoxes for nTOF experiments to CERN

Box 1

1. RC412 Cables

2. Screws and parts for rails

3. Small rails

 

Box 2

1. Vacuum valves

2. IDC cables

 

Box 3 (Detectors)

1. WI-20

3186-9

2. WI-150

3458-4

3. WI-150

3458-1

 

 

Box 4 (Detector)

1. WI-20

3485-12

*List

 

**We also have the tube for the long rails

 

  68   Tue Sep 5 16:09:45 2023 EmmanuelDrop in gain for DEED 14

Dear all,

There was an issue with one of the strips of the deltaE detector (DEED 14), for run216644. The gain dropped to almost a factor of 3. Find attached.

Somehow, it was fixed, but still lags, when compared to other strips of deltaE. This was tested for a more recent run, run216651. Find attached.

I also checked a bit older run (run216637) and they look similar.. Find attached. Maybe we should figure out if this will be a problem for the DEED14 strips.

 

NOTE: The plots have the run number at the top-center.

 

Emmanuel Odusina

 

 

Attachment 1: alndeed14.png
alndeed14.png
Attachment 2: alndeed14b.png
alndeed14b.png
Attachment 3: alndeed14old.png
alndeed14old.png
  69   Wed Sep 27 09:54:06 2023 Emmanuel10B sample in

We switched from Aluminium target to Boron Target (number 1) on Tuesday (26th of Sept.). The Aluminium target was placed in the material room by the RP. We will change to LiF (number 3) on Thursday (28th of Sept.)

Attachment 1: 20230926_113136.jpg
20230926_113136.jpg
Attachment 2: 20230926_113811.jpg
20230926_113811.jpg
Attachment 3: 20230926_115036.jpg
20230926_115036.jpg
Attachment 4: 20230926_115053.jpg
20230926_115053.jpg
Attachment 5: 20230926_111737.jpg
20230926_111737.jpg
  70   Thu Sep 28 15:32:16 2023 EmmanuelLiF sample in

We switched from 10B target (number 1) to LiF target (number 3). We planned to take this measurement for one day.

Attachment 1: 20230928_154334.jpg
20230928_154334.jpg
Attachment 2: 20230928_155923.jpg
20230928_155923.jpg
Attachment 3: 20230926_115053.jpg
20230926_115053.jpg
Attachment 4: 20230928_155747.jpg
20230928_155747.jpg
  71   Mon Oct 2 08:53:06 2023 EmmanuelEmpty Frame

An empty frame (on the top) was placed on Friday night.

Attachment 1: Empty_Frame.jpeg
Empty_Frame.jpeg
  72   Thu Dec 7 09:48:23 2023 EmmanuelMWDdetector and User Input

MWDdetector and UserInput

Attachment 1: UserInput_Silicons.h
                                                 DETECTOR SPECIFIC PARAMETERS (Lines may be commented with '#' sign!)
===================================================================================================================================================================================================================================
DETECTOR   DETECTOR   DETECTOR STEP   TIMING    MIXED     EXPAND   SMOOTHING     TIME          G-FLASH    G-FLASH     G-FLASH    G-FLASH   BASELINE   BASELINE   AMPLITUDE   AMPLITUDE   AREA/AMP.   AREA/AMP.   SIGNAL WIDTH   SIGNAL WIDTH    NUMBER OF     PULSE SHAPE
  NAME      NUMBER     CLASS   SIZE   FILTER   POLARITY   PULSES    FILTER       LIMIT         OPTION    THRESHOLD   MIN_WIDTH   WINDOW     OPTION     FILTER     OPTION     THRESHOLD   LOW THR.    HIGH THR.     LOW THR.       HIGH THR.    PULSE SHAPES     ADDRESS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PKUP          0         PSA   350/6      0        0          3       100     100000              0         100.        1.         0          -1       300        0              100         0.0        2000              1            4000            0

#################################
#    MWD PARAMETERS V6.2    #
#    Date: 10-Aug-2023      #
#################################
#################################

#                             Threshold   Polarity  PoleZeroCorr    DeconWindow      AvergWin    MAWindows  gain/offset   Gamma_Threshold    Amp_Threshold    fixed Dead time(ns)  time_diff_baselne    tailtime      time_const

EDET         1         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         2         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         3         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         4         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         5         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         6         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         7         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         8         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         9         MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         10        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         11        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         12        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         13        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         14        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         15        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20
EDET         16        MWD      1600            -1         5E5           150              40      1 60         16.0/0.0        100                6500             550                    1500            2      20

EDET         17        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         18        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         19        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         20        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         21        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         22        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         23        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         24        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         25        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         26        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         27        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         28        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         29        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         30        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         31        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20
EDET         32        MWD      800             1         5E5           150             40      1 60         16.0/0.0        100                6800             550                    1500            2      20

DEED         1         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200            550                    1500            2      20
DEED         2         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         3         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         4         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         5         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         6         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         7         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         8         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         9         MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         10        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         11        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         12        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         13        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         14        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         15        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20
DEED         16        MWD       30             -1         5E5            150             40      1 51         1.0/0.0         100                200             550                    1500            2      20

Attachment 2: MWDdetector.cc
/*
 * $Id$
 *
 * Author:	Sarah-Jane Lonsdale
 * Date:	02-Dec-2015
 * Version:     5.1 (8-Aug-2017)
 * Update:	Claudia Lederer-Woods
 * Date:	31-May-2018
 * Version:     6.0 (31-May-2018)
 * Update:	Nikolay Sosnin
 * Date:	24-Nov-2022
 * Version:     6.1 (24-Nov-2022)
 */

#include <math.h>
#include <string.h>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <TFile.h>
#include <TH1F.h>
#include <TString.h>

using namespace std;

#include "MWDdetector.h"

void FormatHist(TH1D* h, TString name, TString title, TString xtitle, TString ytitle, int color, int width, int marker_color, int marker_style);

bool MWDDetector::parseConfigLine(char* line, const char* settings_file)
{
	cout << "Config: " << line << endl;
	if (!Detector::parseConfigLine(line)) return false;

	// threshold
	char* pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid Threshold" << endl;
		return false;
	}
	threshold = atof(pch);

	// polarity
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid negative polarity" << endl;
		return false;
	}
	polarity = atoi(pch);
	if (polarity>=0)
		polarity = 1;
	else
		polarity = -1;

	// pole zero correction
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid pole zero correction" << endl;
		return false;
	}
	pz = atof(pch);

	// deconvolution window
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid deconvolution window" << endl;
		return false;
	}
	m = atoi(pch);

	// average window
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid average window" << endl;
		return false;
	}
	l = atoi(pch);

	// presample
	pch = strtok(NULL," "); //NS: 27.07.2023
	if (!pch) {
		cerr << "UserInput: Invalid presample" << endl;
		return false;
	}
	presample = atoi(pch);
	
	//averaging windows 2
	pch = strtok(NULL," "); //NS: 27.07.2023
	if (!pch) {
		cerr << "UserInput: Invalid presample" << endl;
		return false;
	}
	window = atoi(pch);

	// presample/averaging window 2
	/*if (!parse2real(&presample, &window)) {
		cerr << "UserInput: Invalid averager 1/2" << endl;
		return false;
	}*/

	// gain/offset
	if (!parse2real(&gain, &offset)) {
		cerr << "UserInput: Invalid gain/offset" << endl;
		return false;
	}

	// gamma flash search start
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid gamma_threshold" << endl;
		return false;
	}
	g_threshold = atoi(pch);

	// minimum amp_threshold
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid amp_threshold" << endl;
		return false;
	}
	amp_threshold = atoi(pch);

	// gamma flash primary (additional) offset
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: Invalid fixed Dead time(ns)" << endl;
		return false;
	}
	gamma_time_primary = atoi(pch);//SL 08/07/17

	// time different for baseline determination
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: time_diff_baselne" << endl;
		return false;
	}
	time_diff_baseline = atoi(pch);//SL 08/07/17

	// time after g flash which has undershoot
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: tailtime" << endl;
		return false;
	}
	tailtime = atoi(pch);//SL 08/07/17


	// Time constant
	pch = strtok(NULL," ");
	if (!pch) {
		cerr << "UserInput: time_const" << endl;
		return false;
	}
	time_const = atoi(pch);  // 28/08/23


	return true;
} // parseConfigLine

int MWDDetector::analysis(
				ntof::lib::ReaderStructEVEH& eveh,	// EVEH event information
				ntof::lib::ReaderStructMODH& modh,	// MODH header information
				ntof::lib::ReaderStructACQC& acqc,	// ACQC pulse record
				PulseVector*   pulsevec,		// vector of pulses
				int movie_number,
				bool html)				// I: movie number
{
	Detector::analysis(eveh, modh, acqc, pulsevec, movie_number, html);

	double rate = modh.getSampleRate();
	int NofPeaks = 0;
	TString name = modh.getDetectorType();
	
	//double g_threshold = 2000; //move to .h file                           //CHANGED
	double tdiffsig = gamma_time_primary; 
	double tdiffbase = time_diff_baseline; // consider moving to h file
	int aver = presample;             //
	//double tailtime = 100000;  // time up to which there is an undershoot after gflash

	double* x          = new double[length_of_movie];
	double* xsmooth    = new double[length_of_movie]; //13.3.18
	double* xsmooth_ma = new double[length_of_movie]; //NS 22.05.2023
	double* y          = new double[length_of_movie];
	double* z          = new double[length_of_movie];
	double* zdiff      = new double[length_of_movie]; //13.3.18
	double* mwd_m      = new double[length_of_movie];
	double* ma_l       = new double[length_of_movie];	// moving average array
	double* mwd_deriv  = new double[length_of_movie];	// mwd derivative

	double timeScale = 1000.0 / rate; // in ns/Sample

	for(int i = 0; i < length_of_movie; i++){
	
		x[i] = polarity * (acqc[i] * gain + offset);
		y[i] = z[i] = zdiff[i] = xsmooth[i] = 0.0;         //13.3.18
	}
                                                //CHANGED
	int startofevent = aver / 2;
	
	//Averaging preamplifier output
	for(int i = startofevent; i < length_of_movie; i++){
		
		xsmooth[i] = 0.;
		
		for(int j = -1 * (aver - 1) / 2; j <= (aver - 1) / 2; j++){
			
			xsmooth[i] += x[i + j];                         
		}
		
		xsmooth[i] /= aver;
	}

	//Extra moving average test
	//const double window = 39.;
	int startofevent2 = window / 2; //NS 22.05.2023
	
	for(int i = startofevent2; i < length_of_movie; i++){
		
		xsmooth_ma[i] = 0.;
		
		for(int j = -1 * (window - 1) / 2; j <= (window - 1) / 2; j++){
			
			xsmooth_ma[i] += xsmooth[i + j];                         
		}
		
		xsmooth_ma[i] /= window;
	}

	// Locating maximum and minimum of derivative
	if(verbose){cout << "Begin amplitude extraction." << endl;}

	// Parameters for semi-gauss discriminator
	//const double time_const = 0; // SL 12/08/16 Emmanuel
	const double pole_zero = 5.e5;
	double a0, a1, b1;

	b1 = exp(-1. / int(time_const));
	a0 = (1. + b1) / 2.0;
	a1 = -1. * (1. + b1) / 2.0;

	// Single pole high pass with pz correction
	for(int i = 1; i < length_of_movie; i++){
		
		//y[i] = b1 * y[i - 1] + a0 * xsmooth[i] + a1 * xsmooth[i - 1] + xsmooth[i - 1] / pole_zero;
		y[i] = b1 * y[i - 1] + a0 * xsmooth_ma[i] + a1 * xsmooth_ma[i - 1] + xsmooth_ma[i - 1] / pz;
	}

	// Single pole low pass filter
	for(int i = 1; i < length_of_movie; i++){
	
		z[i] = b1 * z[i - 1] + a0 * y[i];
	}

	// devirative of filters
	for(int i = 1; i < length_of_movie; i++){
	
		zdiff[i] = -1. * z[i - 1] + z[i];
	}

	//bool beamType = false;
	
	//if(eveh.getBeamType() != 1){beamType = true;}

	double twait = 16000.; // introduce different time window for baseline depending on ded or par CLW 31/05/18

	/*if(eveh.getBeamType() == 2){twait = 13000.;} // dedicated
	if(eveh.getBeamType() == 3){twait = 19000.;} // parasitic
	else{twait = 16000.;}*/     

	////////////////////////////////////////
	//          MWD and filtering         //
	////////////////////////////////////////

	// moving window deconvolution
	for(int i = startofevent + m; i < length_of_movie; i++){ // SL 10/08/16   // 13/03/18 MWD on smoothed 
	
		//double d_m  = xsmooth[i] - xsmooth[i - m];
	  double d_m  = xsmooth_ma[i] - xsmooth_ma[i - m];
		double ma_m = 0.;

		for(int j = (i - m); j < (i - 1); j++) {
		
			//ma_m += xsmooth[j];
			ma_m += xsmooth_ma[j];
		}

		mwd_m[i] = d_m + ma_m / pz;
	}

	// moving average
	//for(int i = l + m + gamma_flash; i < length_of_movie; i++){ // SL 10/08/16
	for(int i = l + m; i < length_of_movie; i++){ // NS 31.07.2023
		
		ma_l[i] = 0.;

... 285 more lines ...
  74   Tue Apr 16 12:24:01 2024 EmmanuelMWD amplitude (dE and E)
Attachment 1: 26Al_PDF.pdf
26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf 26Al_PDF.pdf
  73   Mon Mar 25 12:57:30 2024 ClwAdapters for ntof setup

10 new Adapters for lemo to bnc on my desk

Attachment 1: 20240325_125536.jpg
20240325_125536.jpg
Attachment 2: 20240325_125528.jpg
20240325_125528.jpg
  5   Tue Oct 13 21:04:49 2015 Claudia LedererPhotos of Test Setup 5-10 October 2015

some photos in high resolution of the test setup 5-10 October 2015

Attachment 1: DSC00042.JPG
DSC00042.JPG
Attachment 2: DSC00048.JPG
DSC00048.JPG
Attachment 3: DSC00056.JPG
DSC00056.JPG
Attachment 4: DSC00065.JPG
DSC00065.JPG
  24   Tue Aug 23 15:34:38 2016 ClaudiaLeakage currents 23.08.16

 E = 0.03uA
dE = 0.04uA
PHDI = 0.09uA

- Monitor PHDI - increasing slowly...

ELOG V3.1.4-unknown