Mēnsūra
Public Member Functions | List of all members
TriggerRange Class Reference

An aggregate to describe selection on triggers. More...

#include <TriggerRange.hpp>

Public Member Functions

 TriggerRange ()=default
 Default constructor.
 
 TriggerRange (unsigned long firstRun, unsigned long lastRun, std::initializer_list< std::string > const &dataTriggers, double intLumi, std::initializer_list< std::string > const &mcTriggers)
 Constructor for a typical use case. More...
 
 TriggerRange (unsigned long firstRun, unsigned long lastRun, std::string const &dataTrigger, double intLumi, std::string const &mcTrigger)
 Specialization of the above version to be used when a single trigger is requested.
 
 TriggerRange (TriggerRange const &)=default
 Default copy constructor.
 
TriggerRangeoperator= (TriggerRange const &)=default
 Default assignment operator.
 
virtual ~TriggerRange ()=default
 Destructor.
 
std::set< std::string > const & GetDataTriggers () const
 Returns trigger patterns defining selection in data. More...
 
std::string const & GetDataTriggerPattern () const
 Returns one of data trigger patterns.
 
double GetLuminosity () const
 Returns effective integrated luminosity corresponding to the trigger set, 1/pb.
 
std::set< std::string > const & GetMCTriggers () const
 Returns trigger patterns defining selection to be applied to simulation. More...
 
std::string const & GetMCTriggerPattern () const
 Returns one of MC trigger patterns.
 
bool InRange (EventID const &eventID) const
 Checks whether the specified event is in the data-taking period described by this object. More...
 
void SetDataTriggers (std::initializer_list< std::string > const &dataTriggers, double intLumi)
 Specifies trigger selection in data and the corresponding integrated luminosity. More...
 
void SetMCTriggers (std::initializer_list< std::string > const &mcTriggers)
 Specifies trigger selection to be applied in simulation. More...
 
void SetRange (EventID const &first, EventID const &last)
 Specifies the data-taking period. More...
 

Detailed Description

An aggregate to describe selection on triggers.

This class puts together inputs for various aspects of trigger selection in a given data-taking period. The selection in data is described by a set of triggers, which are assumed to be combined with an inclusive disjunction (i.e. logical OR). An integrated luminosity corresponding to this set of triggers is stored. In addition, a set of triggers to be applied in simulation (which are also assumed to be be combined together with an inclusive disjunction) is saved.

Trigger names are stored and provided by this class without the "HLT_" prefix and the postfix with trigger version.

This class is only intended to aggregate information and simplify access to it. It does not describe algorithms that exploit this information, for example, to perform the actual trigger selection or to calculate an event weight to be applied to simulation.

Constructor & Destructor Documentation

TriggerRange::TriggerRange ( unsigned long  firstRun,
unsigned long  lastRun,
std::initializer_list< std::string > const &  dataTriggers,
double  intLumi,
std::initializer_list< std::string > const &  mcTriggers 
)

Constructor for a typical use case.

The data-taking period is specified by the two run numbers (both boundaries are included in the range). Consult documentation for SetDataTriggers and SetMCTriggers for description of the remaining parameters.

Member Function Documentation

std::set< std::string > const & TriggerRange::GetDataTriggers ( ) const

Returns trigger patterns defining selection in data.

When the set contains multiple patterns, they are assumed to be combined with an inclusive disjunction.

std::set< std::string > const & TriggerRange::GetMCTriggers ( ) const

Returns trigger patterns defining selection to be applied to simulation.

When the set contains multiple patterns, they are assumed to be combined with an inclusive disjunction.

bool TriggerRange::InRange ( EventID const &  eventID) const

Checks whether the specified event is in the data-taking period described by this object.

Returns true if the specified event is in the allowed range. Both lower and upper bounds are included.

void TriggerRange::SetDataTriggers ( std::initializer_list< std::string > const &  dataTriggers,
double  intLumi 
)

Specifies trigger selection in data and the corresponding integrated luminosity.

The first argument is a set of trigger names. The "HLT_" prefix and version postfix are not required. The second argument is the effective integrated luminosity recorded with the given set of trigger (combined with an inclusive disjunction), measured in 1/pb.

void TriggerRange::SetMCTriggers ( std::initializer_list< std::string > const &  mcTriggers)

Specifies trigger selection to be applied in simulation.

Usually, this selection should be as similar as possible to the one applied in data. The provided set of triggers must meet the same requirements as the one given to method SetDataTriggers.

void TriggerRange::SetRange ( EventID const &  first,
EventID const &  last 
)

Specifies the data-taking period.

This method sets the data range covered by this object. Both boundaries are included in the range.


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