[][src]Crate malice


"milli ALICE" aka malice is a tiny framework defining some sensible defaults to analyze the ALICE open data.


malice supports two IO back-ends. The first and recommended one is the pure Rust root-io crate. The second one is behind the cpp feature gate and depends on the c++ ROOT framework.


Here is a very simple example "analysis" using malice which counts the number of tracks in an event. For a more comprehensive, but still small, example check out simple-analysis.

use alice_open_data;
use malice::{default_event_filter, default_track_filter};
use malice::event_iterator_from_files;

let file = alice_open_data::test_file()
    .expect("No data files found. Did you download with alice-open-data?");

// Create an iterator over all the events in all the given files
let events = event_iterator_from_files(vec![file].into_iter());

for event in events.filter(default_event_filter) {
     // Fill only if we have a valid primary vertex
     if let Some(prime_vtx) = event.primary_vertex() {
         let n_tracks = event
         // Apply a sensible default "cut" on the valid tracks
         .filter(|tr| default_track_filter(&tr, &prime_vtx))
         println!("This event had {} valid tracks", n_tracks);



A model for a subset of an event as stored in the published data


Various attributes of tracks. Flags are based on those found in AliRoot's AliVTrack.[h,cxx]


Clusters in the ITS associated with the curren track See AliESDTrack::HasPointOnITSLayer


The most likely position in the detector where the current event took place. The primary vertex is the most likely common origin of all the reconstructed tracks.


A Track is a reconstruction of the trajectory of a particle traversing the detector.


Triggers are low level qualifier of an event. One event may "fire" several triggers.



A simple but reasonable default event selection Returns true if the given event passes the recommended selection criterion


Applies a reasonable set of default track cuts returning true if the track is valid


Main entry point for analyses running over ALICE's open data. Produces an iterator over events from an iterator over files (either local or remote).


A helper function which turns a path to an ALICE ESD file into a stream over the Events of that file.


Create a stream of events found in the given files (local or remote). You probably want to use event_iterator_from_files instead unless you are a on the wasm32 target.


So called hybrid tracks are sometimes used in order to achieve a more uniform distribution of tracks in eta and phi. This function cannot be used with the default_track_filter and might need more debugging. Use with care.