Skip to content

Commit

Permalink
Fixed bug, updated readme, updated example files
Browse files Browse the repository at this point in the history
  • Loading branch information
mjtueros committed Feb 14, 2024
1 parent 4017f07 commit 6fcf76e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
13 changes: 12 additions & 1 deletion sim2root/Common/raw_root_trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,18 @@ def zenith(self, value):
@property
def site_name(self):
"""Simulation Site TODO:standarize"""
return str(self._atmos_model)
return str(self._site_name)

@site_name.setter
def site_name(self, value):
# Not a string was given
if not (isinstance(value, str) or isinstance(value, ROOT.std.string)):
raise ValueError(
f"Incorrect type for site {type(value)}. Either a string or a ROOT.std.string is required."
)

self._site_name.string.assign(value)



@property
Expand Down
5 changes: 4 additions & 1 deletion sim2root/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ To run the script on the provided example event just go to the `ZHAireSRawRoot/`

i.e.

`python3 ZHAireSRawToRawROOT.py ./GP300_Xi_Sib_Proton_3.8_51.6_135.4_1618 standard 0 1 GP300_1618.root`
`python3 ZHAireSRawToRawROOT.py ./GP300_Xi_Sib_Proton_3.8_51.6_135.4_1618 standard 1 1618 GP300_Xi_Sib_Proton_3.8_51.6_135.4_1618.rawroot`
`python3 ZHAireSRawToRawROOT.py ./GP300_Xi_Sib_Proton_3.87_79.4_310.0_13790 standard 1 13790 GP300_Xi_Sib_Proton_3.8_51.6_135.4_13790.rawroot`

or alternativelly

Expand All @@ -56,6 +57,8 @@ or alternativelly

To let ZHAIRESRawToRawROOT make the choices for you. This is equivalent to running with RunID="SuitYourself", EventID="LookForIt", OutputFileName="GRANDConvention"

Look inside of the script for more inforation

## 2) Common/sim2root.py
Inside `Common/` you can find the final converter, `sim2root.py`

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 6fcf76e

Please sign in to comment.