xboa
Public Member Functions | Public Attributes | Private Member Functions | List of all members
MAUSTracking Class Reference

Provides an interface to MAUS tracking routines for use by xboa.algorithms. More...

Inherits TrackingBase.

Public Member Functions

def __init__
 Ensure MAUS is initialised, ready for tracking. More...
 
def track_one
 Track a hit and return a list of output hits. More...
 
def track_many
 Track many hits and return a list of list of output hits. More...
 

Public Attributes

 random_seed
 
 spill
 

Private Member Functions

def _mc_event_to_hit_list
 Make a list of data from a MAUS mc event. More...
 
def _virtual_hit_to_xboa_hit
 Fill hit data from a MAUS virtual hit. More...
 
def _primary_to_xboa_hit
 Fill hit data from a MAUS primary. More...
 
def _hit_to_primary
 Fill primary data from a hit. More...
 

Detailed Description

Provides an interface to MAUS tracking routines for use by xboa.algorithms.

Definition at line 40 of file _maus_tracking.py.

Constructor & Destructor Documentation

def __init__ (   self,
  datacards = None,
  seed = 0 
)

Ensure MAUS is initialised, ready for tracking.

  • datacards json document containing datacards that will be used for initialise MAUS. If datacards is None, TrackingMAUS will not attempt to initialise MAUS and will not check that MAUS is initialised.
  • seed initial random seed; each time a particle is fired, the seed increments by 1 Raises an ImportError if maus is not installed or maus environment is not sourced

Definition at line 53 of file _maus_tracking.py.

Member Function Documentation

def track_one (   self,
  hit 
)

Track a hit and return a list of output hits.

  • hit initial Hit - particle to be tracked (of Hit type)

Track a hit and return a list of output hits. The output hits should correspond to e.g. particle crossings over cell ends, depending on the usage of the Tracking object; see algorithm documentation.

Spill number will increment by one for each call to track_one or track_many

Definition at line 77 of file _maus_tracking.py.

References MAUSTracking.track_many().

Referenced by TrackingBase.track_many().

def track_many (   self,
  list_of_hits 
)

Track many hits and return a list of list of output hits.

  • list_of_hits list of Hits - initial particles to be tracked

Track many hits and return a list containing a list of output hits, one for each track. This provides a hook for tracking codes that have significant set up and tear down times, or which simulate collective effects that need to be taken into account by the algorithm

Spill number will increment by one for each call to track_one or track_many

Definition at line 94 of file _maus_tracking.py.

References MAUSTracking._hit_to_primary(), MAUSTracking._mc_event_to_hit_list(), MausRootHitFactory.spill, MausJsonHitFactory.spill, and MAUSTracking.spill.

Referenced by MAUSTracking.track_one().

def _mc_event_to_hit_list (   self,
  mc_event,
  event_number 
)
private

Make a list of data from a MAUS mc event.

Definition at line 108 of file _maus_tracking.py.

References MAUSTracking._primary_to_xboa_hit(), and MAUSTracking._virtual_hit_to_xboa_hit().

Referenced by MAUSTracking.track_many().

def _virtual_hit_to_xboa_hit (   self,
  virtual_hit,
  event 
)
private

Fill hit data from a MAUS virtual hit.

  • virtual_hit json object corresponding to the hit
  • event integer event number

Definition at line 122 of file _maus_tracking.py.

References MausRootHitFactory.spill, MausJsonHitFactory.spill, and MAUSTracking.spill.

Referenced by MAUSTracking._mc_event_to_hit_list().

def _primary_to_xboa_hit (   self,
  primary,
  event,
  particle 
)
private

Fill hit data from a MAUS primary.

Definition at line 143 of file _maus_tracking.py.

References MausRootHitFactory.spill, MausJsonHitFactory.spill, and MAUSTracking.spill.

Referenced by MAUSTracking._mc_event_to_hit_list().

def _hit_to_primary (   self,
  hit 
)
private

Fill primary data from a hit.

Definition at line 164 of file _maus_tracking.py.

References MAUSTracking.random_seed.

Referenced by MAUSTracking.track_many().

Member Data Documentation

random_seed

Definition at line 62 of file _maus_tracking.py.

Referenced by MAUSTracking._hit_to_primary().

spill

The documentation for this class was generated from the following file: