37TH RD50 Workshop

A comprehensive MIP measurement & analysis system Evangelos –Leonidas Gkougkousis

CERN, EP-R&D WG 1.1: Hybride Pixel Detectors

Geneva – November 19th, 2020 Mechanics General Overview Spacers M4x20 screws

All parts in transit from CERN since last Friday

source container source support back

Trigger source support DUT front Aluminum support assembly (reduced size) baseplate 20 / 11 / 2020 E. L. Gkougkousis 2 Mechanics

Individual Pieces https://twiki.cern.ch/twiki/bin/view/Main/HGTDSensorTesting#Mechanics

• Assembled on aluminum Specifications breadboard base Outer dimensions 250 x 220 x 10 mm • M5 tapped hole grid, 15 mm Material Aluminum Plate spacing Grid type M5 • 10 mm thickness recommended Grid size 16 X 14 Grid spacing 15 mm for stability

Base Distance form grid end to edge 12.5 mm

+ + =

• 3-piece aluminum L-shaped support frame for board alignment and mounting • M5 screws used for fixing to baseplate & mount sensor board to the frame

Plane support Plane • 165 mm x 120 mm outer dimentions • 2xM5, 10 mm nuts per board mounting hole as spacers.

• 2-pice support designed for CERN sources • Encapsulates an L-frame plane support • 3D printed piece + • ABS with a 99% fill factor for mechanical stability • Non-metallic parts to avoid bremsstrahlung

• Assures correct alignment with boards and sensors Source Holder Source

20 / 11 / 2020 E. L. Gkougkousis 3 Electronics st 1 Stage • Electronics based on UCSC single channel board • High frequency SiGe (~2GHz) common emitter first stage charge amplifier (470 Ohm trans-impedance)

• Based on Iminium transistor (Vcc >1.25V) with well calibrated gain to voltage ratio • 1.8 mm 4-layer FRP architecture with buried signal layer • SMA calibration inputs and dielectric impedance test • 2.25 V input, ~17 mA

 Estimated gain of 10  Extremely fast shaping time (< 1 ns)  Bandwidth limited (especially at low frequencies)  Relative expensive  No hot-swap available  High leakage current because of heavy decoupling  Integrated low pass Reworked Double Amplifier Calibration filtering at HV, LV side area, input input capacitor with limited cut-off ground diode capacitor (missing) contract assembly (replaced (removed) ) https://twiki.cern.ch/twiki/bin/view/Main/HGTDSensorTesting#Second_Stage_Amplifier

20 / 11 / 2020 E. L. Gkougkousis 4 Electronics https://twiki.cern.ch/twiki/bin/view/Main/LgadSecondStage 2nd Stage Amplifier • Mini-Circuits integrated GALI-52 Voltage amplifier on test board • Gallium Phosphate technology with 2GHz bandwidth • 15.5 dB at 50 Ohm matched impedance • 0.64 dB insertion loses at 1 GHz • Supply Voltage: 12 +/- 0.2 V • Supply current: 60 +/- 10 mA

• Amplifier directly mounted to Readout board • Aluminum shield cover with M1.2 screws for shielding • Outer dimensions 36 x 40 mm • SMA to SMA connector (18 GHz cut-off), rated at 1.5kV

https://twiki.cern.ch/twiki/bin/view/Main/LgadCables

Cables and connectors • Direct SMA-BNC cables (no converters) for signal, HV and LV • 50 Ohm, 20 GHz, RG-174 standard with 2m max length • Thin Coaxial cooper shielded cables, PTFE insulation • 100 dB/m shielding effectiveness with 3kV operating voltage (HYTEM HY402FLEX) • banana-BNC converters at the HV and LV side

20 / 11 / 2020 E. L. Gkougkousis 5 •Environmental Expander (EnviE) https://gitlab.cern.ch/egkougko/environemental-monitoring-expander-envie

• Based on an ESP8266 microcontroller with integrated 10- bit ADC, I2C and WiFi 802.11b • Integrated OLED 128X64 pixel screen • Base board 3 humidity and 5 temperature channels • High precision voltage dividers and sensor decoupling • ARDUINO / LoUA core based • Temperature resolution of 0.8 oC ± 0.06 % • Humidity resolution of 0.1 % across the range with integrated temperature compensation

20 / 11 / 2020 E. L. Gkougkousis 6 Assembly Absorbers – Shields 90 푒− 90 푒− 90 50mm x 50mm tin plated 38푆푟 → 39푌 → 40푍푟 metal shield covers on both sides Emax= 0.46 MeV Emax= 2.28 MeV T1/2 = 28,8 y T1/2 = 64 h

 Multi-energetic electron 300mm diameter circular spectrum openings at center of both  Emax at 2.28MeV front and back covers on top  Average energy ~ 939 keV from of the sensor pad 90Y decay  Average energy ~ 188 keV from 90Sr decay

30 μm thickness, 2 x 2 cm Al foil attached on both openings Low temperature Multi-metal solder (91% Tin 9% Zinc)

20 / 11 / 2020 E. L. Gkougkousis 7 Assembly Wire bonding TRD for temp. sensing Gold plated dive-in pins Assembled sensor

• Wire bonds are to be kept to a minimum distance from sensor to reduce inductance • Gold-plated dive-in pads required • Flatness of top sensor pad to be guaranteed • Anisotropically conductive adhesive tape to attach sensor (3M155818-ND ) https://www.digikey.com/product-detail/en/3m-tc/3-4-5-9703/3M155818- ND/3830765

20 / 11 / 2020 E. L. Gkougkousis 8 Functional Setups Schematics

Board type Sampic LeCroy WR Channels 16 4 Sampling Rate 8.4Gs/sec 20 Gs/sec Impedance 50 Ω 50 Ω MCX, SMA, BNC, USB, Connectors USB, Ethernet GPIB slave

Bandwidth 1.6GHz 5GHz

Resolution 8 – 11 bit 8 bit (11 tough fit) Dynamic Scale 1V Range dependent

20 / 11 / 2020 E. L. Gkougkousis 9 Functional Setups Location, Location, Location HV 1 – Keithley 2410 DAQ & control PC

4-channel LV HV 2 – Keithley 2410 HMP4040 Climate Chamber 28/2/-020 (Binder MK-115)

40 Gs (Agilent Infinium) Timing boards

Second Stage

20 / 11 / 2020 E. L. Gkougkousis 10 Functional Setups Location, Location, Location

 Replicate the lab setup at Previssin  Use of an “Abandoned” iTk climate chamber  Replace all infrastructure, mechanical supports and instruments  Take care of Sr90 source (34 MBq) and RP procedures  Software installation, configuration and testing  Dry air provided from central circuit

20 / 11 / 2020 E. L. Gkougkousis 11 DAQ Software Current supported Instrument Library

Supported Sampic Series v2.0 (16 ch version)

TDS5000 series WaveRunner Infinium DS08000  Under Integration series series  Compatible with models form the same family, may require minor adjustments if use of different model of one of the supported brands Supported Climate Chambers

Votsch VT4002 Votsch VT4002 EM Votsch VC2020 Binder MK53 Binder MK115 + Air input  Many more can be added, need to create a LabVIEW library for your model

20 / 11 / 2020 E. L. Gkougkousis 12 DAQ Software Current supported Instrument Library

High voltage Supported Low Voltage Power supplies

363X series 364X series HMP4040 PL330DP 2400 / 2410  Multiple models supported from these series  Will not support CAEN  Units supported at any combination with a maximum of 4  Plans include support for channels 2600 series electrometers How does multi – instrument support work?  Completely transparent for end user  Selection of instrument through drop-down menus  UI adapts to selected instrument (polymorphism)  Acquired data have a single unique format (no matter which oscilloscope used)  Customized commands and libraries used in each case  New instrument integration easy through use of separated dedicated libraries

20 / 11 / 2020 E. L. Gkougkousis 13 DAQ Software 1 General Interface  Tab interface organized in 4 sections: I. HV Control, V-I recording and visualization 2 II. Low Voltage and temperature control III. Oscilloscope and triggering mode control IV. Charged particle and auto-trigger sequencing and programming  Multiple supported instruments with adaptive 4 3 polymorphic UI  Integrated error handling and quai-full proof operation ()

20 / 11 / 2020 E. L. Gkougkousis 14 DAQ Software Event Preview

 Real-time Waveform Visualization  Dynamically enabled / only visible during data taking  Available for LeCroy, and Agilent oscilloscopes  Holds last acquired waveform in case of error  Re-initialization at program start-up  Eliminate need to remotely access oscilloscope GUI

20 / 11 / 2020 E. L. Gkougkousis 15 DAQ Software HV Control and Monitoring HV PSU model select

1st HV channel control panel

2nd HV channel control panel Filename to save data (asci format, tab separated .txt)

Voltage/Time graph (15 days implemented buffer size, reset afterwards)

Current/Time graph (15 days implemented buffer size, reset afterwards)

20 / 11 / 2020 E. L. Gkougkousis 16 DAQ Software HV Control and Monitoring

Data Logging: Current, Voltage and their uncertainties are recorded in a vertical line separated ASCII file. ONLY active channel recorded. Automatic start/Stop upon Example from output file: HV activation. • Default directory : /system/user/ • Data append existing file • File created at HV power on • Record only value variations to limit channel voltage current date time data size δV δI

IVs: Simultaneously plotting both channel voltage and current vs time. Start automatically once at least one channel turned on. Auto scaling time axis. 15 day buffer for continues running.

20 / 11 / 2020 E. L. Gkougkousis 17 DAQ Software Agilent 363x + 364x Temperature and LV control

Hameg HMP404

2 x Agilent 364x

LV Selection menu 2 x Agilent 363x

Votsh VT4002 No Air / VC2020

Votsh VT4002 Air

Binder MK53 Climate chamber selection menu

20 / 11 / 2020 E. L. Gkougkousis 18 DAQ Software Oscilloscope Control

Oscilloscope model select

Oscilloscope settings control panel Timing and vertical scale control for up to 4 oscilloscope channels

Triggering Mode select Coincidence trigger with multichannel logic or single channel edge trigger configuration

20 / 11 / 2020 E. L. Gkougkousis 19 DAQ Software Oscilloscope Control – Channel Settings

Com. Interface: Sets the VISA port for the Oscilloscope type: Select one of the four supported oscilloscope types oscilloscope to to work with. Dialog box disabled when configure program running.

Error: Error indicator will turn ON if communications fails, set parameters are out of range for instrument or instrument reports error. Turning panel OFF/ON clears error.

Time-Base: Set time scale, time offset and memory depth in number of points. Sampling rate will be adjusted to maximum value for selected memory depth.

Vertical setup: Voltage scale and offset, coupling, impedance (when available), ON/OFF: To turn on or off the oscilloscope one needs to bandwidth limit and probe use the corresponding buttons at the trigger attenuation settings. Enable / disable mode section. Then all parameters are channel trace. ONLY ENABLED applied and the instrument is set to the channels are considered during data selected mode. taking.

20 / 11 / 2020 E. L. Gkougkousis 20 DAQ Software Oscilloscope Control - Trigger Coincidence trigger

• When initiated, all vertical and timing settings are applied in addition the logic setting for the coincidence trigger. • Edge trigger is disabled. OR • Continuously cycles and updates settings on the fly. • If stopped, last settings are left on instrument. • All channels set to active are displayed, regardless if they participate in the trigger condition. Edge trigger

 Only selected trigger channel is activated and its vertical and timing settings adjusted.  All other channels are deactivated.  Logic trigger is disabled while edge trigger is active  While active, cycles continuously with the instrument applying any setting modification on the fly.  When deactivated, last applied settings are let.

20 / 11 / 2020 E. L. Gkougkousis 21 DAQ Software MIP Scans and Dark Rate

MIP data Control Set temperatures, DUT and Trigger HV and number of events per point to be recorded. Each waveform is individually recorded and a folder structure is created

Dark Rate Measurement Scans all voltages up to breakdown and produces a dark rate vs Voltage measurements. Multiple temperatures can be sequenced automatically

Dark rate vs Voltage plot

20 / 11 / 2020 E. L. Gkougkousis 22 DAQ Software MIP Sequential Measurement Roadmap • A four state approach to guarantee stability and error management • Code execution falls back to previous step in case of error Six preliminary sequential steps before we even start looking at the waveform Temp, setup Preliminary Oscilloscope Low Voltage Climate Enable (~2% of set settings setup Power ON chamber dry air validation activation intake point)

Deactivate Set HV values for Create Query Visualize and dry air intake both DUT and appropriate oscilloscope save waveforms reference folder structure for data

Turn HV off Activate Set new Deactivate dry Repeat data Continue until and wait for dry air temp point air cycle (step 2) all points 0 completed

Turn HV off Turn Low Close Tep. Left to last set- and wait for voltage oscilloscope point to protect 0 off connection irradiated sensors

20 / 11 / 2020 E. L. Gkougkousis 23 DAQ Software MIP data File structure • User inputs a single directory for data saving • A folder structure is created per temp and voltage point • Each waveform is waved in a separate file winthin the appropriate folder • IV log file is register for the duration of measurements

One folder per temperature point IV log file

Single folder per voltage point and per temperature

20 / 11 / 2020 E. L. Gkougkousis 24 DAQ Software Dark Rate Measurement

Dark Rate: Dark rate for each point is defined as the average of the inverse of the time difference between two consecutive triggers. Measurement is repeated until the recorded evets reach the set numbers of trigger per point. The final value is then estimated by a Poisson fit of collected data.

Data File: Path to save the single txt file containing Temperature array: Comma separated temperature values. For the dark rate per voltage point and per each temperature a dark rate scan up to temperature the maximum voltage OR until instrument saturation will be performed.

Max Voltage: Maximum value of HV to be tested. Typically sensors saturate dark rate measurement capabilities of the instruments before reaching this point. IN such a case, the measurement will stop once the saturation point is reached. An emergency ramp down is implemented in case of current exceeding compliance set in HV tab.

20 / 11 / 2020 E. L. Gkougkousis 25 Timing Analysis Framework Why does it makes sense?  Code available on git: https://gitlab.cern.ch/egkougko/lgadutils  Structure: Gkougkousis V. RD50 Talk June 2020: link

Package headers Steering macro examples (local) Classes implementation Grid Macros Example files from all instruments Grid Scripts for batch jobs External libraries

 Following standard ATLAS analysis package organization  Running as interpreted (CINT), compiled (CMake) or RootCore version  Tested in multiplatform environment (Windows, Linux), appropriate preprocessor instructions incorporated for compatibility  Only requirement ROOT (with FFTW and RooFit), no ATLAS software  Validated with ROOT 5 and production version of ROOT 6  Allows users to control their analysis by creating a top level steering macro  Combines all steps, from data conversion starting from RAW or txt files to plotting

20 / 11 / 2020 E. L. Gkougkousis 26 Timing Analysis Framework How is the logic structured?  Four main classes with dedicated header and implementation files, one wrapper class handling user interaction  LGADUtils Wrapper to handle user I/O and pass arguments  LGADBase Basic framework function and infastructure  LGADRun Timing resolution, CFD maps, multi DUT operations  LGADChannel Mean pulse shape, mean pulse properties form entire run  WaveForm Single Waveform properties and time walk corrections

 Bonus: LGADSel Selector Class with auto-set 64 channel support level

st LGADBase

1 level

LGADRun 1 LGADRun 2 … HGTDRun n

nd 2

level DUTChannel 1 DUTChannel 2 DUTChannel 3 … DUTChannel n

rd 3

level Waveform 1 Waveform 2 Waveform 3 … Waveform n

th 4

20 / 11 / 2020 E. L. Gkougkousis 27 •Timing resolution Framework Inheritance

TSelector

LGADUtils

DUTChannel LGADSel WaveForm

LGADRun

 Inheritance from a TSelector allows for seamless analysis with interal or external root files  Normal selector methods implemented in LGADRun class  LGADSel is a wrapper for setting the pointers, branch address, figuring out number of active channels and used instruments and doing the necessary mapping  Universal access to the LGADUtils helper and fitting infrastructure

20 / 11 / 2020 E. L. Gkougkousis 28 •LGADBase Class Variables  Public Variables 0 : Sampic (ASCI) AqIsntrument TypDef 1 :LeCroy Scope (ASCI)  m_instrument enumerator 2 : Agilent Scope (Binary) 3 : Tektronix Scope (ASCI) 4 : LeCroy Scope (Binary)  m_verbose bool, Activate debug messages  m_ofname TString, Output root file name  m_TransFile TString, Transimpedance simulation library  m_ofile TFile*, output root file universal pointer  m_tree TTree*, analysis tree universal pointer  m_event unsigned int, total number of events

Global Steering variables Steering Global  m_nchan unsigned int, number of active channels  m_TrackComb bool, enables or disables combination with tracking

 m_srate vector, Sampling rate per channel  m_npoints vector, no. of points per channel  m_scale vector, Voltage scale per channel  m_physt vector, Physical cell time Sampic  m_ordrt vector, Ordered cell time  m_triggTime vector, Trigger time Agilent Scope

Tektronix Scope Propagated to analysis to Propagated

20 / 11 / 2020 E. L. Gkougkousis 29 •HGTDBase Class Public functions  Constructor and Destructor LGADUtils() Empty constructor, clear all vectors and virtual ~LGADUtils() write single 0, set default instrument to LeCroy and all variables to 0  Methods to set global variables SetInstrument(AqInstrument) Set the instrument from supported types bool SetSRate(double rate, unsigned int ch) Set sampling rate per channel. If not set by user, it will automatically be set during data conversion bool SetNPoints(unsigned int points, Set n. of points rate channel. If not set by unsigned int ch) user, it will automatically be set during data conversion or nTpule analysis SetInDataNames (TString DataDir , Set data directory, name of files and TString DataName. extension. If extension left black, it is TString ext ) automatically managed by instrument. (default is empty) SetOutDataNames (TString DataDir, Set output directory and filename. If left TString DataName) blank uses input directory and data name without extension (default is empty) SetTrackInDataNames (TString DataDir, Set Tracking directory and filename to TString DataName) include in the analysis (default is empty)

20 / 11 / 2020 E. L. Gkougkousis 30 •LGADBase Class Public functions  Methods to get global variables AqInstrument GetInstrument() Returns the instrument set (integer value) double GetSRate(unsigned int ch) Retunes sampling rate for specified channel unsigned int GetNPoints(unsigned int ch) Retunes No. of points for selected channel bool GetTrackComb() Returns True if tracking is included and  General Helper functions false otherwise string reduce(const string str, Replaces or removes characters in a string const string fill, with the specified sequence in “fill”. const string whitespace) Default is empty. string trim(const string str, Removes characters or spaces from the const string whitespace) beginning and end of the string unsigned int CountFiles(const char* dir, Returns number of files of extension const char* ext) “ext” in folder “dir”. POSIX dependent. int DirExists(const char* path) Checks if folder exists. Returns 1 if it does, 0 if not. int template Derivate(template *T, int start = 1) Analytically computes point derivative of bool vector w starting at index start. Compute standard mean value of vector double double Mean(template *T, W from element start to stop float int start = -1, int stop = -1) double Stdev(template *T, Compute standard deviation of vector w int start = -1, int stop = -1) form element start to stop

20 / 11 / 2020 E. L. Gkougkousis 31 •LGADBase Class – Data Converters Data Converters

TDS series Infiniium Series Dedicated Converters for multiple instruments with up to 64 native or daisy chained channels

Sampic Series v2.0 WaveRunner (16, 34, 68 ch versions) DRS4 (natively)

 Completely transparent for the user, only need to set the m_instrument correctly and appropriate converter will be called  Input/output directories have to be set, extension if not set are automatically assigned  Converter will figure out number of channels and will create output Ntpule with respect to instrument and channels

20 / 11 / 2020 E. L. Gkougkousis 32 •LGADUtils Class – Data Converters Data Converters  Dedicated Functions bool ConvertData() Starts the data conversion with the parameters set. m_instrument and input/output dirs. Must be already defined void SetStartStopEvnt(unsigned int Evntt1, Set the event to start the conversion from unsigned int Evnt2) and where to stop. If not called, it goes thought the entire run. Effective only in Tektronix and LeCroy readout mode.  Time Alignment • Effect visible on Sampic and when more than one oscilloscope are daisy chained • All channels should trigger simultaneously • Trigger time difference between channels presents a binned Gaussian peeked at 0 • Bin size is equal to sampling rate

Time for each channel needs to be recalibrated with respect to a channel of reference

20 / 11 / 2020 E. L. Gkougkousis 33 •LGADUtils Class – Data Converters Time Alignment Tow possible correction methods

• Assume that reference channel start • Assume all channels start at 0 always at 0 • Shift voltage values to any of the • Adjust the start time of additional channels to the end of the waveform channels to compensate trigger time to compensate for trigger mismatch mismatch • Works for small mismatches

20 / 11 / 2020 E. L. Gkougkousis 34 •LGADUtils Class - HGTDFits RooFit Implementation int GaussFit(vector *w, Performs Gaussian fit on vector w, pair &gmean, returns mean and sigma with pair &gsigma, uncertainties. Points sets the start pair points) and stop index of fiting int LinearFit(vector* vec, Performs Linear fit on w, returns pair &slope, slope and intercept with errors. Fit pair &intersept) limits adjusted automatically. int GauLinear(std::vector* vec, Performs Gauss X Linear fit on w, pair &magMPV, returns mean and sigma with pair &magSigma) uncertainties. int GauLandauFit(vector* vec, Performs Gauss X Landau fit on w, pair &magMPV, returns MPV and sigma with pair &magSigma) uncertainties. float LinearInter(float x1, float y1, Tow point linear interpolation on float x2, float y2, float y3) y3, between (x1, y1) and (x2 y2). double FFT(vector *w, int snrate, Fast Furrier transform on w, from int start, int stop) point start to stop. It returns the first order frequency. Limits for all fits are automatically adjusted with respect to std & mean of w Return codes are indicative of failure type (Minuit fit quality, vector elements…) Implemented quality requirement (Minuit Covariant has to succeed)

20 / 11 / 2020 E. L. Gkougkousis 35 •LGADSelector Class Features

 Holds all required pointers and branches for all instruments and cases  Dynamic definition of number of active channels from nTuple branches, no upper limit to channel number  Will automatically determined the number of channels saved in a root file and set appropriate pointers  Will automatically detect type of instrument from the saved branches in root file and will set m_instrument variable. If in disagreement with what eternally set, Selector prevails  Will connect the appropriate branches per instrument type  Resets the vectors and pointers already used in the converters section (if any) and assigns them to nTpule branches  Shell class for the analysis, written in the HGTDRun class

20 / 11 / 2020 E. L. Gkougkousis 36 •LGADSelector Class Ntuple Variables General  EvnNo unsigned int, event number  w01 - wXX double, channel amplitude in millivolts  t01 – tXX double, channel time in picoseconds

Agilent, LeCroy, Tektronix  vScale01 – vScaleXX float, voltage sale per channel  nPoints01 – nPointsXX unsigned int, number of points per channel  SnRate01 – SnRateXX Long_64t, Sampling rate per channel

Agilent  triggTimeXX – triggTimeXX double, trigger time per channel

Lecroy, Tektronix  Triggtime double, global trigger time

Sampic  phystXX - phystXX double, time of the physical cell of the chip  ordrtXX - ordrtXX double, time with respect of the general clock  nPoints double, global number of points per channel  SnRate double, global sampling rate

20 / 11 / 2020 E. L. Gkougkousis 37 •Waveform Class Main Functions  Constructor and Destructor WaveForm() Empty constructor WaveForm(vector* voltage, Constructor with voltage and time vectors. It vector time) will calculate sampling rate. WaveForm(vector* voltage, Constructor with voltage vector and sampling int snrate) rate. I twill generate the time vector. WaveForm(vector* voltage, Full constructor with time, voltage and rate. vector time, If rate does not agree with time vector, rate is int snrate) overwritten. virtual ~WaveForm() Destructor  Methods to set variables void SetVoltage(std::vector *volt) Set the voltage points vector. This is a pointer void SetTime(std::vector time) Set the time vector void SetPolarity(polarity pol) Define polarity if known. Enumerator typdef void SetSnRate(int snrate) Set the sampling rate void SetCFDfraction(double fraction) Set the CDF fraction for calculations void SetTrigg(double tri) Set the constant threshold trigger void SetBasePos(basepos pos) Define the position with respect to baseline void SetTransimp(float transimp) Set 1st stage amplifier trans-impedence value void SetAmpGain(float gain)

20 / 11 / 2020 E. L. Gkougkousis 38 •Waveform Class Analysis roadmap • A four sequential step analysis approach • Analysis escalates in a pyramid structure Five preliminary sequential steps before we even start looking at the waveform

Set Waveform Determine Find max, Find start, Determine if Determine if values polarity min point stop point noise pulse within Step1 window

Define noise Use Gaussian Pedestal Recalculate start, points fit for subtraction/ stop points, min,

noise/Pedestal inversion max Step2

Compute charge Determine Determine CFDCompute dV/dT Determine Estimate Trigger &

rise time Time Trigger Time CFD ToT Step3

Perform CFD time to voltage Correction Signal FFT Noise FFT

(Time Walk) Step4

20 / 11 / 2020 E. L. Gkougkousis 39 •Waveform Class Analysis roadmap • A four sequential step analysis approach • Analysis escalates in a pyramid structure Five preliminary sequential steps before we even start looking at the waveform

Set Waveform Determine Find max, Find start, Determine if See if pulse

Step1 values polarity min point stop point noise within window

Define noise Use Gaussian Pedestal Recalculate start, points fit for subtraction/ stop points, min,

Step2 noise/Pedestal inversion max

Compute charge Determine Determine CFDCompute dV/dT Determine Estimate Trigger &

rise time Time Trigger Time CFD ToT Step3

Perform CFD time to voltage Signal FFT Noise FFT

Correction (Time Walk) Step4

20 / 11 / 2020 E. L. Gkougkousis 40 •Waveform Class Polarity and Peak detection algorithm • Calculate analytically the first and second derivative for each waveform • Find the zero crossing points of first derivative (local extrema) No smoothing • Detect sign of the second applied!! derivative at each local extrema Tow point linear • If f ’’ < 0 : local maxima interpolation for • If f ’’ > 0 : local minima precision and to • Construct vectors containing the satisfy continui- local maxima and local minima ty requirement amplitude values of local maxima • Calculate for each vector the mimima theorem standard deviation and mean value • Calculate the highest distance from mean value for each vector

(Dm) Positive polarity • If SDmaxima> SDminima Dm(max) > Dm(min) or SDmaxima< 1.05*SDminima Dm(max) > Dm(min)

20 / 11 / 2020 E. L. Gkougkousis 41 •Waveform Class Noise • Find number of points with

0,8•Vmax value equal to 0.8•Vmax • If Npoints> 2 continue and test 0.7 , 0.6 & 0.5•Vmax to account for wavy waveforms

Is Signal? Is • If Npoints> 2 then require dNpoints < 8/12/16/20

• Noise calculation include only points before pulse • Points considered:

Nstsrt*10% to Nstsrt*90% •

Noise Points Points Noise If pulse not within window perform 10 – 90 % of preceding points same operation after Nend

• Noise defined as σ of Gaussian fit • Pedestal defined as mean of Gaussian fit • Gaussian fit limits and range are constrained within +/- 5 Standard deviation of amplitude values

• Fit quality check and revert to classic mean and std if minimization fails Noise estimation Noise

20 / 11 / 2020 E. L. Gkougkousis 42 •Waveform Class TimeWalk Correction

CFD Time 2 CFD Time 1

CFD Time is different for each waveform, to properly project and sum we need to compensate: Simples, fastest solution • Time correction Non-uniform time bins, • Set t0 = tCFD impossible to sum • Readjust time of each point as t’ = t – tCFD

• Voltage correction • Calculate the voltage at tCFD using two point linear interpolation More complex • Recalculate the voltage at each time point using two point linear Uniform time vector interpolation Easy to sum and fit • Readjust the time bins to be at exactly the same point as before

20 / 11 / 2020 E. L. Gkougkousis 43 •Waveform Class Main Functions int GetPolarity() Returns the polarity of the waveform (pos, neg, unef). It is calculated via a first and second order derivative test using the Fermat theorem of peak detection int GetSnRate() Returns the sampling rate od double GetTrigg() Returns trigger threshold float GetCFDfraction() Returns CFD percentage for calculations vector* GetVoltage() Return original voltage vector vector GetTime() Returns original time vector vector GetAdjVoltage() Returns voltage vector after baseline subtraction and inversion (in negative) vector GetTimeAdjVolt(float fraction) Returns voltage vector after baseline subtraction, inversion if negative and time walk correction. Fixed time binning required for mean pulse shape. Time walk correction is performed by recalculation each voltage for the original time corresponding to the middle of the time bin by linear extrapolation of the two adjacent values. int GetBasePos() Returns the relative position of the waveform with respect to baseline, Not used 20 / 11 / 2020 E. L. Gkougkousis 44 •Waveform Class Main Functions

bool GetIsSignal() double GetPedestalErr() bool GetIsInWidow() double GetCharge() float GetTransimp() double GetRiseTime(float bottom = -99, float top = -99) float GetAmpGain() double GetCFDTime(float fraction = -99) int GetMaxIndx() double GetTriggTime(float trigg = -99) double GetMaxTime() double GetdVdTMax() double GetMax() double GetdVdTCFD(float fraction = -99, int ndif = 0) double GetMaxErr() double GetCFDToT(float fraction = -99) int GetMinIndx() double GetTriggToT(float trigg = -99) double GetMinTime() double GetFrequency(int start = -1, int stop = -1) double GetMin() double GetJitterNdVdT() int GetStrIndx() double GetJitterRiseSNR() int GetEndIndx() double GetSignalFFT() double GetNoise() double GetNoiseFFT() double GetNoiseErr() bool dump() double GetPedestal()

20 / 11 / 2020 E. L. Gkougkousis 45 •DUT Channel Class  Groups individual waveforms to a single object for more complicated calculations  Inherits the m_instrument, and other global parameters  Main Global Class variables: 0 : SingleCh AqBorad 1 : FourCh

 m_board enumerator 2 : IN2P3 TypDef 3 : CIVIDEC 4 : KU  m_channelID int, Channel ID number  m_channelName TString, Channel name (DUT name)  m_ChRate Long64_t, Sampling rate  m_ChTransimp float, Trans-impedance value of 1st stage amp.  m_ChAmpgain int, Second stage amp. Gain  m_ChFraction float, CFD fraction for this channel  m_ChTrigg double, trigger threshold for this channel (mV)  m_ChNoPulses int, Number of added waveforms (events)

 m_MeanChPulse vector>, voltage vector of generated pulse template with uncertenties

All variables are coupled with the standard Get() and Set() functions

20 / 11 / 2020 E. L. Gkougkousis 46 •DUT Channel Class Class logic Step 1, initialize: All class variables and pairs are initialized to -99, all vectors cleared at the beginning of the analysis. Step 2, Append: Each new waveform is added to the channel. If waveform calculations have failed at some point, only successful results are added, rest filled with default values. Step 3, Update: Channel Properties are updated and recalculated. Step to be performed at the end of the analysis. Step 4, Print/Dump: Print all calculated info (if m_verbose)

Two methods of channel properties calculations

Fit method 푻풆풎풑풍풂풕풆 풎풆풕풉풐풅  Add each property of each  Create waveform template waveform to a histogram from all added waveforms  Generate a value for each  Pass the template waveform property by fitting the histogram thought the WaveForm class with an appropriate distribution and recalculate all properties

20 / 11 / 2020 E. L. Gkougkousis 47 •DUT Channel Class Fit Method  For each added pulse add the computed values of properties given form the WaveForm Calss to a TH1  At the moment of Update(), apply the corresponding fit to the TH1 to extract the expected value of the property  Fit type deepens on the property  In case of fit failure, revert consecutively: Gauss X Landau Gauss Simple Mean / Standard deviation

Quantity Applied Fit type Min, Max voltage : Gauss, Gauss x Landau fit Start, stop, min, max indices : Gauss, Gaussian fit Noise / pedestal : Gaussian fit Dynamically defined Based on pedestal Min, Max, Rise, Trigger time : Gaussian fit Charge, dV/dT, Jitter, ToT: Gauss x Landau fit FFT: Variable bin Gaussian

20 / 11 / 2020 E. L. Gkougkousis 48 •DUT Channel Class Template Method  For each added pulse recover the time walk corrected voltage values and add them to a TH2  For each bin apply a Gauss X Landau distribution and generate the MPV and uncertainty.  Create a pulse template from all the MPV values and feed it trough the WaveForm Class  Recover all quantities computed on the template

 Both methods are performed!  Jitter computed though dV/dT and SNR in both approached  SNR and Jitter statistical uncertainties are computed  Any differences between results can be considered systematic uncertainties

20 / 11 / 2020 E. L. Gkougkousis 49 •DUT Channel Class FFT and Signal Frequency Project and fit Primary harmonics for all events

Isolate the signal on the Frequency Power Spectrum Waveform

Discrete FFT

Resolution퐹푠 퐹퐹푇푅푒푠 = 푁

Sampling Number of Frequency Samples Fixed sampling rate but Variable resolution Variable sample size

20 / 11 / 2020 E. L. Gkougkousis 50 •Iterative Re-Fitter Template Method  Main fitter engine for all fits  Fully automated, including limits, method and Minuit minimization  36 Iterations per fit performed varying limits and binning  Special provisions for over binning, integral on discrete variables  Variable binnign for FFT, frequency histograms

20 / 11 / 2020 E. L. Gkougkousis 51 •LGADRun Class Main analysis method

2D optimization plot – 0.5% binning

 Organized in a TSelector Mode  Main functions and execution order: Slave Begin() Slave Begin() Notify() Process() Terminate() Terminate()

Variable and Loading of Called every Called every Update General pointer additional time a file is event, channel Plotting and initialization libraries opened, Recover Time bookkeeping, Histograms (Trans- channel variables resolution Saving declaration impedance number and generate calculations file) instrument waveform and CFD maps definition append to Pulse template Channel and channel extraction waveform object creation

20 / 11 / 2020 E. L. Gkougkousis 52 •Additional libraries Trans - impedance simulation

 Points every 23.3 kHz in the 1 MHz – 10 GHz range  400 estimated values per simulation  2 detector pad capacitances, 3 and 4 pF

20 / 11 / 2020 E. L. Gkougkousis 53 •Example Steering macro – Running example

Include Compile the Order matters!! framework with ACLiC Create the object Convert testbeam data Convert Lab data Convert Sampic data Create the Run

Create the chain

Run

20 / 11 / 2020 E. L. Gkougkousis 54 •Deployment Main analysis method  Data conversion tested and verified in Testbeam, LeCroy Oscilloscope, Sampic, DRS4  Compatible with ROOT 5/ ROOT 6 under investigation (FFTW libraries issues)  Internal git (to IFAE + select beta testers), public once ROOT 6 issue resolved  Lab results produced, test bema validation and pulse shape generation Possible improvements and next steps  Web-type interface for testbeam logbook connection  Clear instruction Twiki  Integration of second stage amplifier selection and option  Board library with second stage trans-impedance and gain

20 / 11 / 2020 E. L. Gkougkousis 55 •Micrometer timing setup

Stationary 3D printed Triger plane Sr90 Support Moving DUT

3.7 MBq Sr90 Source

Piezo step motors

Assembly base plate

20 / 11 / 2020 E. L. Gkougkousis 56 •X-Z Table

20 / 11 / 2020 E. L. Gkougkousis 57 •BackUp

20 / 11 / 2020 E. L. Gkougkousis 58 •CAEN Digitizer Specifications • NIM, VME64, VME64x and desktop modules

• 16 and 32 channel options with daisy chain capability Form

Factor • 2 dedicated trigger channels • 1024 events memory for 1024 samples per event

• Self trigger with channel input (pulse ToT > 30nsec) • External trigger with NIM/TTL (115nsec latency)

Trigger • Fast trigger with 42nsec latency thought dedicated inputs (pulse width > 8.5 nsec) Board type Desktop NIM VME64 VME64x Channels 16 + 1 16 + 1 32 + 2 32 + 2 Sampling Rate 5Gs/sec, 2Gs/sec, 1.5Gs/sec, 0.75Gs/sec Impedance 50 Ω MCX for analog data, LEMO for TTL, MCX fast trigger, Connectors Optical/USB Bandwidth 500MHz Resolution 12 bit Dynamic Range ± 2V (50% attenuator to scale to DRS4 ±1V)

20 / 11 / 2020 E. L. Gkougkousis 59 •Fits infrastructure Available fitting options  Root multi-iterative automatic fitting for: I. Gauss II. Gauss X Landau int IterativeFit (std::vector *w, std::pair &gmean, std::pair &gsigma, TH1D* &FitHist, double &minchi2, std::string methode = "Gauss", std::pair points = std::make_pair(-1, -1))

 Unpinned 2-dimentional Linear fitting through RooFit and Minuit: int LinearFit (std::vector* vec, std::pair &slope, std::pair &intersept, std::vector* vecErr = NULL);

 Roofit Convolution fitting (no iterative readjustment) for: I. Gauss X Landau II. Gauss X Linear int RooConvFit (std::vector* vec, std::pair &magMPV, std::pair &magSigma, std::string conv);

 Tow point linear interpolation: double LinearInter(double x1, double y1, double x2, double y2, double y3);

 Fast Furrier transform algorithm: double FFT(std::vector *w, Long64_t snrate, int start, int stop);

20 / 11 / 2020 E. L. Gkougkousis 60 •Average pulse shape (RooFit) Starting point, Non-optimized RooFit Convolution

I. Average calculated from 100 events II. Each waveform is time aligned at 20% CFD III. For all events, the same point of each Several fit waveform projected in TH1F failure  as many TH1F as points in waveform points  each with as many entries as events (100 here) IV. Each TH1F fitted with a Landau X Gauss distribution V. MPV, sigma and uncertainty extracted VI. Fitting performed in RooFit using RooFit Convolution and Minuit VII. No starting parameters or optimization VIII.Plot the MPVs of each point in a single waveform

20 / 11 / 2020 E. L. Gkougkousis 61 •Average pulse shape (RooFit) Initial RooFit Optimization

I. Fit Binning:

 Symmetric fit limits: xav. ± (5 × σ)  Bin width defined as: σ /3  High statistics re-optimization, increase no. High uncertainties at the of bins if: N > 1.5 × N points bins beginning and end of II. Parameter constraints: pulse  Asymmetric limits for Landau MVP:

-4 × |xRMS| < xfit < 2 × | xRMS|  Asymmetric limits for Landau sigma:

-0.001 × σ < σfit < 2 × σ  Symmetric limits for Gauss mean: Reasonable sigma -2 × σ < σ < 2 × σ fit with respect to III. Parameter Initial values: MPV, no outliers

 Landau MPV = xRMS  Gauss sigma = 0 IV. No re-iteration implementation

20 / 11 / 2020 E. L. Gkougkousis 62 •Average pulse shape (Root) I. Iterative approach Root Optimization (no RooFit) II. Fit Binning:  Asymmetric fit limits: • Constraint parameter values but not fixed lower: xmin– ((n-5)/10) × σ upper: x – ((n-5)/2) × σ • Manually defined convolution function max • 1000 convolution steps where 7 < n < 2 6 cases • Select the fit with the best agreement (minimization of |1-x2/NDF| )  Bin number defined at least as:

Nbins= √ Nevents augmented by: X

(xmax – xmin )/(0.5 × σ × α/4) where 14 < α < 7 7 cases III. Parameter constraints:  Asymmetric limits for Landau MVP: 42 total xRMS-3×σ < xRMS< xRMS+3×σ iterations  Function integral limits set to: 0.1×Int. < X < 10×Int. More or less stable with Fit fails in specific points respect to parameters IV. Initial values:

 Landau MPV = xRMS  Convolution Integral = distribution integral  Convoluted sigma set to : σ / 4

20 / 11 / 2020 E. L. Gkougkousis 63