RDFAnalysis  0.1.1
Physics analysis with ROOT::RDataFrame
RDFAnalysis Namespace Reference

Namespaces

 detail
 

Data Structures

class  CutflowDetail
 Detail class containing cutflow information. More...
 
class  CutflowWriter
 Class to write cutflows from Nodes. More...
 
class  DefaultBranchNamer
 Default implementation of the IBranchNamer interface. More...
 
class  EmptyDetail
 Empty detail class - adds no extra information to the node. More...
 
class  IBranchNamer
 Abstract base class that describes how a Node should name its branches internally. More...
 
class  INodeWriter
 Base class for writing specific information from Nodes to file. More...
 
struct  is_std_function
 
struct  is_std_function< std::function< R(Ts...)> >
 
class  Node
 Class to represent a single step in the analysis process. More...
 
class  NodeBase
 Base class for the Node classes. More...
 
class  OutputWriter
 Class to write out objects from an RDFAnalysis. More...
 
class  range_t
 Helper class to allow iterating through a container without allowing users to modify that container. More...
 
class  ResultWrapper
 Wrapper class for RResultPtrs. More...
 
class  RunMonitor
 The default run monitor. More...
 
class  ScheduleNamer
 Namer class to be used by the scheduler. More...
 
class  Scheduler
 Job scheduler. More...
 
class  SchedulerBase
 Base class for the scheduler. More...
 
class  SysResultPtr
 Class to wrap together RResultPtrs for different systematic variations. More...
 
struct  sysvar_traits
 Provide contextual information about a class. More...
 
struct  sysvar_traits< T, std::enable_if_t< std::decay_t< T >::is_rdf_sysvar, void > >
 Provide contextual information about a class. More...
 
class  SysVarBranch
 Class to trigger translation of a single branch name. More...
 
class  SysVarBranchVector
 Class to trigger translation of a vector of branches. More...
 
class  SysVarNewBranch
 Class to trigger translation of a new branch name. More...
 
class  SysVarStringExpression
 Class to trigger translation of a string expression. More...
 
class  TObjectWriter
 Class to write out the TObjects from a Node. More...
 

Typedefs

template<typename F , typename T >
using enable_ifn_string_t = std::enable_if_t<!std::is_convertible< F, std::string >{}, T >
 Reduce size of enable_if statements. More...
 
using RNode = ROOT::RDF::RNode
 Helper typedef. More...
 
using ColumnNames_t = ROOT::RDataFrame::ColumnNames_t
 Helper typedef. More...
 

Enumerations

enum  WeightStrategy { Null = 0, Multiplicative = 1 << 0, MCOnly = 1 << 1, Default = Multiplicative | MCOnly }
 enum class to describe how weights are applied. More...
 

Functions

template<typename Container >
auto as_range (Container &container)
 Make a range_t from a container. More...
 
template<typename Container >
auto as_range (const Container &container)
 Make a range_t from a const container. More...
 
TDirectory * getMkdir (TDirectory *dir, const std::string &name, bool doThrow=true)
 Get a directory, making it if it isn't there already. More...
 
template<typename Map >
Map::mapped_type getDefaultKey (const Map &theMap, const typename Map::key_type &key, const typename Map::key_type &defaultKey)
 Get a value by key, defaulting to a backup key if it is not there. More...
 
unsigned int getNSlots ()
 Get the number of slots used in this session. More...
 
std::string uniqueBranchName (const std::string &stub="GenBranch")
 Could perhaps be more natural in the IBranchNamer? More...
 
template<typename T >
std::enable_if_t< sysvar_traits< T >::is_sysvar, typename sysvar_traits< T >::value_type > sysVarTranslate (T &&t, IBranchNamer &namer, const std::string &syst)
 Translate a variable. More...
 
template<typename T >
std::enable_if_t<!sysvar_traits< T >::is_sysvar, T > sysVarTranslate (T &&t, IBranchNamer &, const std::string &)
 Translate a variable. More...
 
WeightStrategy operator| (WeightStrategy lhs, WeightStrategy rhs)
 Bitwise OR of two strategies. More...
 
WeightStrategyoperator|= (WeightStrategy &lhs, WeightStrategy rhs)
 Switch on the bits of lhs that are in rhs. More...
 
WeightStrategy operator& (WeightStrategy lhs, WeightStrategy rhs)
 Bitwise AND of two strategies. More...
 
WeightStrategyoperator&= (WeightStrategy &lhs, WeightStrategy rhs)
 Switch off any bits of lhs not in rhs. More...
 
WeightStrategy operator^ (WeightStrategy lhs, WeightStrategy rhs)
 Bitwise XOR of two strategies. More...
 
WeightStrategyoperator^= (WeightStrategy &lhs, WeightStrategy rhs)
 Flip any bits of rhs that are in rhs. More...
 
WeightStrategy operator~ (WeightStrategy ws)
 Negate a value. More...
 
bool operator! (WeightStrategy ws)
 Contextually convert to a bool. More...
 

Typedef Documentation

using ColumnNames_t = ROOT::RDataFrame::ColumnNames_t

Helper typedef.

using enable_ifn_string_t = std::enable_if_t<!std::is_convertible<F, std::string>{}, T>

Reduce size of enable_if statements.

using RNode = ROOT::RDF::RNode

Helper typedef.

Enumeration Type Documentation

enum WeightStrategy
strong

enum class to describe how weights are applied.

There are two dimensions to the weighting strategy: whether the weight should be applied in 'data' modes or only in the 'MC' mode and whether or not the actual weight should be the product of the given one and any pre-existing weight.

Most weights are scale factors, which obey the strategy WeightStrategy::Multiplicative | WeightStrategy::MCOnly as scale factors are multiplicative (where they are unrelated, each individual scale factor should be applied only once on any event) and only applied to MC.

Weights applied in 'data' mode are typically specialised histogram weights (e.g. pt-weighted eta-phi plots).

If a weight should not be multiplicative and should be applied in both modes you would normally need to call this ~(WeightStrategy::Multiplicative | WeightStrategy::MC), however there is also a WeightStrategy::Null option which describes this.

Enumerator
Null 

Helper, meaning neither multiplicative nor MC-only.

Multiplicative 

Multiply the weight calculated here by the existing weight.

MCOnly 

The weight should only be applied in the MC-mode.

Default 

Default.

Function Documentation

auto RDFAnalysis::as_range ( Container &  container)

Make a range_t from a container.

auto RDFAnalysis::as_range ( const Container &  container)

Make a range_t from a const container.

Map::mapped_type RDFAnalysis::getDefaultKey ( const Map &  theMap,
const typename Map::key_type &  key,
const typename Map::key_type &  defaultKey 
)

Get a value by key, defaulting to a backup key if it is not there.

Template Parameters
MapThe map type being interrogated
Parameters
theMapThe map being interrogated
keyThe key to search for
defaultKeyThe fallback key

Try and return the item keyed by key from theMap. If it isn't there, return the item keyed by defaultKey instead.

TDirectory* RDFAnalysis::getMkdir ( TDirectory *  dir,
const std::string &  name,
bool  doThrow = true 
)
inline

Get a directory, making it if it isn't there already.

Parameters
dirThe directory from which to get/make the new one
nameThe name of the new directory
doThrowWhether to throw an exception if the function fails
unsigned int RDFAnalysis::getNSlots ( )
inline

Get the number of slots used in this session.

bool operator! ( WeightStrategy  ws)

Contextually convert to a bool.

WeightStrategy operator& ( WeightStrategy  lhs,
WeightStrategy  rhs 
)

Bitwise AND of two strategies.

WeightStrategy & operator&= ( WeightStrategy lhs,
WeightStrategy  rhs 
)

Switch off any bits of lhs not in rhs.

WeightStrategy operator^ ( WeightStrategy  lhs,
WeightStrategy  rhs 
)

Bitwise XOR of two strategies.

WeightStrategy & operator^= ( WeightStrategy lhs,
WeightStrategy  rhs 
)

Flip any bits of rhs that are in rhs.

WeightStrategy operator| ( WeightStrategy  lhs,
WeightStrategy  rhs 
)

Bitwise OR of two strategies.

WeightStrategy & operator|= ( WeightStrategy lhs,
WeightStrategy  rhs 
)

Switch on the bits of lhs that are in rhs.

WeightStrategy operator~ ( WeightStrategy  ws)

Negate a value.

std::enable_if_t<sysvar_traits<T>::is_sysvar, typename sysvar_traits<T>::value_type> RDFAnalysis::sysVarTranslate ( T &&  t,
IBranchNamer namer,
const std::string &  syst 
)

Translate a variable.

Template Parameters
TThe variable to translate

This is called for translatable arguments and calls their translate function.

std::enable_if_t<!sysvar_traits<T>::is_sysvar, T> RDFAnalysis::sysVarTranslate ( T &&  t,
IBranchNamer ,
const std::string &   
)

Translate a variable.

Template Parameters
TThe variable to translate

This is called for non-translatable arguments and just forwards the call.

std::string uniqueBranchName ( const std::string &  stub = "GenBranch")

Could perhaps be more natural in the IBranchNamer?