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

Units in TRestDetectorGas #20

Open
nkx111 opened this issue Aug 16, 2021 · 3 comments
Open

Units in TRestDetectorGas #20

nkx111 opened this issue Aug 16, 2021 · 3 comments

Comments

@nkx111
Copy link
Member

nkx111 commented Aug 16, 2021

I think we should make a same system of units for TRestDetectorGas. Now the diffusion units are cm^0.5 and the e-Field units are V/mm. Moreover the plotting methods receive input field in V/cm. This is very confusing. Maybe we can make all the distance field in unit mm, as in REST standard unit system.

@nkx111
Copy link
Member Author

nkx111 commented Aug 16, 2021

The conversion is supported from TRestSystemOfUnits that 1*(cm^0.5)==0.316*(mm^0.5). I think it is easy to convert diffusion parameters to standard unit.

@jgalan
Copy link
Member

jgalan commented Aug 17, 2021

Right, it is confusing, but for me it is strange to express field and diffusion in V/mm and mm^0.5. I am pretty much used to V/cm and cm^0.5, for those parameters. So it could be that units are stored internally in mm and V/mm but we operate them in V/cm? Just as it is done at the plotting methods.

Perhaps @cmargalejo or @juanangp got any insights here

@cmargalejo
Copy link
Member

In my opinion it should be compulsory for the user to include the units and then REST can internally convert them to the standard unit system if required. I think that would avoid a lot of problems. In case this is not possible, I would keep the same units everywhere even if we are not used to them, so that any new user (and experienced user!) knows exactly what to expect.

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

3 participants