Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drift time window #219

Open
YifanC opened this issue May 1, 2024 · 3 comments
Open

drift time window #219

YifanC opened this issue May 1, 2024 · 3 comments

Comments

@YifanC
Copy link
Collaborator

YifanC commented May 1, 2024

The drift time window is provided as a standalone parameter in the detector configuration file. It is not associated / calculated from the drift distance or electric field, which makes it rather inflexible to change to other detector configuration and prong to errors. To be improved.

@jiangmei-yang
Copy link
Member

jiangmei-yang commented Aug 22, 2024

I wrote a function to retrieve the longest drift time from the response file; should we use this as the value of time_padding or time_window, so we don't need to modify the time window for each different response config;

I don't see why we are having two different parameters time_padding and time_window, they seem to serve the same purpose in detsim.py; we may simply keep one? e.g.

t0 = abs(z - detector.TPC_BORDERS[t["pixel_plane"]][2][0]) / detector.V_DRIFT - detector.TIME_WINDOW
if not t0 < time_tick < t0 + detector.TIME_WINDOW:
and
t0 = abs(z - detector.TPC_BORDERS[t["pixel_plane"]][2][0]) / detector.V_DRIFT - detector.TIME_WINDOW
if not t0 < time_tick < t0 + detector.TIME_WINDOW:
these are the only places that TIME_WINDOW being used.

@jiangmei-yang
Copy link
Member

jiangmei-yang commented Aug 22, 2024

There are some small inconsistency on the same parameters among different functions:
In drifting.py,

track["t_start"] += min(drift_start, drift_end) / detector.V_DRIFT + track["t0"]

track["t_start"] = (shorter drift time) + track["t0"], but in detsim.py, tracks_current_mc,
t_start = round((t["t_start"]-t["t0_start"]-detector.TIME_PADDING) / detector.TIME_SAMPLING) * detector.TIME_SAMPLING
, when it tries to go back to (shorter drift time) = track["t_start"] - track["t0_start"];

so in drifting.py should we also subtract track["t0_start"]: track["t_start"] = (shorter drift time) + track["t0_start"]

track["t_start"] += min(drift_start, drift_end) / detector.V_DRIFT + track["t0"]
track["t_end"] += max(drift_start, drift_end) / detector.V_DRIFT + track["t0"]

and similarly: track["t_end"] = (longer drift time) + track["t0_end"]

@jiangmei-yang
Copy link
Member

t_end = round((track["t_end"] + 1) / detector.TIME_SAMPLING) * detector.TIME_SAMPLING

What is this + 1 for? Looks like a very arb. padding value and not being used when calculating time elsewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants