R3BRoot icon indicating copy to clipboard operation
R3BRoot copied to clipboard

System of units

Open klenze opened this issue 1 year ago • 9 comments

ROOT says:

Selecting the System of Units in ROOT Historically the system of units in ROOT was based on the three basic units centimeters, seconds and GigaElectronVolts. For the LHC era in Geant4 collaboration decided that a basic unit system based on millimeters, nanoseconds and MegaElectronVolts was better suited for the LHC experiments. All LHC experiments use Geant4 and effectively adopted this convention for all areas of data processing: simulation, reconstruction and data analysis.

I think following the lead of the LHC experiments here and adopt the Geant4 units. This has the additional advantage that we can use Geant4 unit prefixes.

I think writing

  • task->SetThreshold(20*MeV)
  • task->SetMaxTheta(10*degree)
  • task->SetRadius(20*cm)
  • hist->Fill(hit->GetEnergy() / keV ) is very verbose.

(Of course, it what would be even better would be dimensionality checking at compile time (so that 20*cm+1*MeV or hist->Fill(hit->GetEnergy()) will not even compile, but this would require more work.

klenze avatar Feb 04 '23 18:02 klenze