gemc / source

gemc website:
gemc.jlab.org
14 stars 73 forks source link

RICH updates: making timing consistent with ccdb + adding background hits #223

Closed cpecar closed 1 year ago

cpecar commented 1 year ago

Current RICH digitization produced TDC values from a simulation of the PMT avalanche itself, which produces realistic timing results but is not necessarily consistent with the time walk and time offset parameters in the ccdb. This PR will introduce an option to instead produce TDC values based on the time calibration parameters from the ccdb.

Additionally, this PR implements RICH dark current hits based on a 500Hz dark rate across all pixels.

cpecar commented 1 year ago

Outputs of RICH time calibration check when using rga-fall2018 RICH time calibration parameters in gemc digitization and in reconstruction. image

cpecar commented 1 year ago

Some test plots using:

Individual photon Cherenkov angle, a few thousand single electrons thrown. Using new ccdb-timing feature with ccbd parameters set to zero (what we would currently default to with ccdb-timing on and an MC run number like 11) eleChAngle_inb_ccdbzero_filled

Individual photon Cherenkov angle, single electrons thrown, ccdb-timing with the time parameters taken now from rga-fall2018 (with a real rg-a run number): eleChAngle_inb_ccdbtime_filled

Need to produce higher statistics to properly understand Cherenkov angle resolution effects from just this change. I can also try to put together some time-resolution plots in addition to the one already in an above comment, but it will take more time.

cpecar commented 1 year ago

Some more plots with same code versions as above. Now looking at an estimate of hit time resolution here taken as calibrated_hit_time - (emission_time + traced_time).

With ccdbTiming on and time calibration parameters from rga-fall2018: photonTime_ccdbTimeOn_paramsRga

With ccdbTiming on and time calibration parameters zero (default e.g. run=11): photonTimeRes_ccdbTimeOn_paramsZero

Might want some input from Marco M. on if these look reasonable enough, or if maybe we should inject a smaller spread in things like time offset. Also some weird spikes I think due to the time stamp correction that only show up with time calibration parameters set to 0.

If we want I can try to produce something with the timing taken just from the MAPMT simulation (ccdbTiming off, how it was before this PR), but this should in principle require actually extracting the resulting time calibration parameters which would need a much larger simulated dataset.