Skip to content

Commit

Permalink
Fix bug in z simulation (#90)
Browse files Browse the repository at this point in the history
* Fix bug in z simulation

* Update plugin version
  • Loading branch information
dachengx authored Sep 27, 2024
1 parent a0b187a commit cc40cd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/create_readonly_utilix_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [ ! -z "$RUNDB_API_URL" ]
then
cat > $HOME/.xenon_config <<EOF
[basic]
logging_level=debug
logging_level=DEBUG
[RunDB]
rundb_api_url = $RUNDB_API_URL
Expand Down
9 changes: 6 additions & 3 deletions axidence/plugins/salting/events_salting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class EventsSalting(ExhaustPlugin, DownChunkingPlugin, EventPositions, EventBasics):
__version__ = "0.0.1"
__version__ = "0.0.2"
child_plugin = True
depends_on = "run_meta"
provides = "events_salting"
Expand Down Expand Up @@ -207,8 +207,11 @@ def sampling(self, start, end):
r = np.sqrt(self.rng.random(size=self.n_events)) * straxen.tpc_r
self.events_salting["x"] = np.cos(theta) * r
self.events_salting["y"] = np.sin(theta) * r
self.events_salting["z"] = -self.rng.random(size=self.n_events)
self.events_salting["z"] *= self.max_drift_length - self.min_drift_length
self.events_salting["z"] = self.rng.uniform(
low=-self.max_drift_length,
high=-self.min_drift_length,
size=self.n_events,
)
s2_x, s2_y, z_naive = self.inverse_field_distortion(
self.events_salting["x"],
self.events_salting["y"],
Expand Down

0 comments on commit cc40cd3

Please sign in to comment.