pub struct TofCuts {Show 33 fields
pub nevents: u64,
pub min_hit_cor: u8,
pub min_hit_cbe: u8,
pub min_hit_umb: u8,
pub max_hit_cor: u8,
pub max_hit_cbe: u8,
pub max_hit_umb: u8,
pub min_hit_all: u8,
pub max_hit_all: u8,
pub min_cos_theta: f32,
pub max_cos_theta: f32,
pub only_causal_hits: bool,
pub hit_cbe_acc: u64,
pub hit_umb_acc: u64,
pub hit_cor_acc: u64,
pub hit_all_acc: u64,
pub fh_umb_acc: u64,
pub cos_theta_acc: u64,
pub hits_total: u64,
pub hits_rmvd_csl: u64,
pub hits_rmvd_ls: u64,
pub fh_must_be_umb: bool,
pub ls_cleaning_t_err: f64,
pub thru_going: bool,
pub thru_going_acc: u64,
pub fhi_not_bot: bool,
pub fhi_not_bot_acc: u64,
pub fho_must_panel7: bool,
pub fho_must_panel7_acc: u64,
pub lh_must_panel2: bool,
pub lh_must_panel2_acc: u64,
pub hit_high_edep: bool,
pub hit_high_edep_acc: u64,
}
Expand description
Sets of cuts which can be imposed on TofEvents
Fields§
§nevents: u64
the number of events which the cut instance has seen. This is all events, both rejected and passed.
min_hit_cor: u8
require at least N COR hits
min_hit_cbe: u8
require at least N CBE hits
min_hit_umb: u8
require at least N UMB hits
max_hit_cor: u8
§max_hit_cbe: u8
§max_hit_umb: u8
§min_hit_all: u8
§max_hit_all: u8
§min_cos_theta: f32
§max_cos_theta: f32
§only_causal_hits: bool
§hit_cbe_acc: u64
§hit_umb_acc: u64
§hit_cor_acc: u64
§hit_all_acc: u64
§fh_umb_acc: u64
§cos_theta_acc: u64
§hits_total: u64
§hits_rmvd_csl: u64
§hits_rmvd_ls: u64
§fh_must_be_umb: bool
§ls_cleaning_t_err: f64
§thru_going: bool
§thru_going_acc: u64
§fhi_not_bot: bool
§fhi_not_bot_acc: u64
§fho_must_panel7: bool
§fho_must_panel7_acc: u64
§lh_must_panel2: bool
§lh_must_panel2_acc: u64
§hit_high_edep: bool
§hit_high_edep_acc: u64
Implementations§
Source§impl TofCuts
impl TofCuts
pub fn new() -> Self
pub fn from_toml(filename: &str) -> Result<Self, SerializationError>
Sourcepub fn is_compatible(&self, other: &TofCuts) -> bool
pub fn is_compatible(&self, other: &TofCuts) -> bool
Can two cut instances be added?
Void cuts will automatically be comptaible
Sourcepub fn clear_stats(&mut self)
pub fn clear_stats(&mut self)
Zero out the event counter variables
pub fn is_void(&self) -> bool
pub fn get_acc_frac_hit_umb(&self) -> f64
pub fn get_acc_frac_hit_cbe(&self) -> f64
pub fn get_acc_frac_hit_cor(&self) -> f64
pub fn get_acc_frac_hit_all(&self) -> f64
pub fn get_acc_frac_cos_theta(&self) -> f64
pub fn get_acc_frac_fh_must_be_umb(&self) -> f64
pub fn get_acc_frac_thru_going(&self) -> f64
pub fn get_acc_frac_fhi_not_bot(&self) -> f64
pub fn get_acc_frac_fho_must_panel7(&self) -> f64
pub fn get_acc_frac_lh_must_panel2(&self) -> f64
pub fn get_acc_frac_hit_high_edep(&self) -> f64
Sourcepub fn accept(&mut self, ev: &mut TofEvent) -> bool
pub fn accept(&mut self, ev: &mut TofEvent) -> bool
Check if an event passes the selection and update the counters. If cleanings are enabled, this will change the event in-place!
Sourcepub fn pretty_print_efficiency(&self) -> String
pub fn pretty_print_efficiency(&self) -> String
Print out nicely formatted efficiencies
Trait Implementations§
Source§impl AddAssign for TofCuts
impl AddAssign for TofCuts
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for TofCuts
impl<'de> Deserialize<'de> for TofCuts
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for TofCuts
Auto Trait Implementations§
impl Freeze for TofCuts
impl RefUnwindSafe for TofCuts
impl Send for TofCuts
impl Sync for TofCuts
impl Unpin for TofCuts
impl UnwindSafe for TofCuts
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT
modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL
modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Add an aggregate function filter Read more
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more