Rivet API documentation
![]() |
Rivet 4.1.3
|
Type-specific multiplexed YODA analysis object. More...
#include <RivetYODA.hh>
Public Types | |
| using | Inner = T |
| Typedef for the YODA type being represented. | |
Public Member Functions | |
| Multiplexer (const vector< string > &weightNames, const T &p) | |
| T::Ptr | active () const |
| template<typename U = T> | |
| auto | binning () const -> std::enable_if_t< hasBinning< T >::value, const typename U::BinningT & > |
| string | basePath () const |
| Get the AO path of the object, without variation suffix. | |
| string | baseName () const |
| Get the AO name of the object, without variation suffix. | |
| operator bool () const | |
| bool | operator! () const |
| T * | operator-> () |
| Forwarding dereference-call operator. | |
| T * | operator-> () const |
| Forwarding dereference-call operator. | |
| T & | operator* () |
| Forwarding dereference operator. | |
| const T & | operator* () const |
| Forwarding dereference operator. | |
| bool | operator== (const MultiplexedAO &p) |
| Test for equality. | |
| bool | operator!= (const MultiplexedAO &p) |
| Test for inequality. | |
| const vector< bool > & | fillOutcomes () const |
| const vector< double > & | fillFractions () const |
Access methods | |
| void | setActiveWeightIdx (size_t iWeight) |
| Set the active-object pointer to point at a variation in the persistent set. | |
| void | setActiveFinalWeightIdx (size_t iWeight) |
| Set the active-object pointer to point at a variation in the final set. | |
| void | unsetActiveWeight () |
| Unset the active-object pointer. | |
| void | reset () |
| Clear the active object pointer. | |
| void | newSubEvent () |
| Create a new FillCollector for the next sub-event. | |
| void | collapseEventGroup (const vector< std::valarray< double > > &weights, const double nlowfrac=-1.0) |
| Pushes the (possibly collapsed) fill(s) into the persistent objects. | |
| void | collapseSubevents (const vector< std::valarray< double > > &weights, const double nlowfrac) |
| void | pushToFinal () |
| const vector< typename T::Ptr > & | persistent () const |
| T::Ptr | persistent (const size_t iWeight) |
| Direct access to the persistent object in weight stream iWeight. | |
| const vector< typename T::Ptr > & | final () const |
| T::Ptr | final (const size_t iWeight) |
| Direct access to the finalized object in weight stream iWeight. | |
| YODA::AnalysisObjectPtr | activeAO () const |
| Get the currently active analysis object. | |
| void | initBootstrap () |
| Helper method to resize aux vectors to AO size. | |
Detailed Description
class Rivet::Multiplexer< T >
Type-specific multiplexed YODA analysis object.
Specialisations of this class (to each type of YODA object) are effectively the user-facing types in Rivet analyses, modulo a further wrapping via the MultplexAOPtr (which is a customised std::shared_pointer around the Multiplexer).
Multiplexers instantiate one AO for each of the multiweights (x2 for pre- and post-finalize copies). They can expose either FillCollector<T> or T active pointers, for the analyze() and finalize() steps, respectively.
- Todo
- Some things are not really well-defined here. For instance: fill() in the finalize() method and integral() in the analyze() method. Should we throw?
Member Function Documentation
◆ active()
|
inline |
Get the current active analysis object (may be either persistent or final, depending on stage)
Referenced by operator*(), operator*(), operator->(), operator->(), and reset().
◆ activeAO()
|
inlinevirtual |
Get the currently active analysis object.
Implements Rivet::MultiplexedAO.
◆ basePath()
|
inlinevirtual |
Get the AO path of the object, without variation suffix.
Implements Rivet::MultiplexedAO.
◆ collapseEventGroup()
|
inlinevirtual |
Pushes the (possibly collapsed) fill(s) into the persistent objects.
- Todo
- If we don't multiplex (Binned)Estimates, perhaps we can get rid of this protection?
Implements Rivet::MultiplexedAO.
References collapseSubevents(), and initBootstrap().
◆ collapseSubevents()
|
inline |
Collapse the set of FillCollectors (i.e. _evgroup) into combined fills of the persistent objects, using fractional fills if there are subevents
Referenced by collapseEventGroup().
◆ final()
|
inline |
Get the set of final analysis objects, as used by Analysis::finalize() and written out
◆ initBootstrap()
|
inlinevirtual |
Helper method to resize aux vectors to AO size.
Implements Rivet::MultiplexedAO.
Referenced by collapseEventGroup().
◆ newSubEvent()
|
inlinevirtual |
Create a new FillCollector for the next sub-event.
Called every sub-event by AnalysisHandler::analyze() before dispatch to Analysis::analyze(). The fill values will be redistributed over variations by collapseEventGroup().
Implements Rivet::MultiplexedAO.
◆ operator bool()
|
inlineexplicit |
Test for object validity.
- Note
- Don't use active() here: assert will catch.
◆ operator!()
|
inline |
Test for object invalidity.
- Note
- Don't use active() here: assert will catch.
◆ operator*()
|
inlinevirtual |
◆ operator->() [1/2]
|
inlinevirtual |
◆ operator->() [2/2]
|
inlinevirtual |
◆ persistent()
|
inline |
Get the set of persistent (i.e. after whole event groups) live objects, as used by Analysis::analyze().
◆ pushToFinal()
|
inlinevirtual |
Copy all variations from the "live" persistent set to the final collection used by Analysis::finalize()
Implements Rivet::MultiplexedAO.
References Rivet::copyAO().
◆ setActiveFinalWeightIdx()
|
inlinevirtual |
Set the active-object pointer to point at a variation in the final set.
Implements Rivet::MultiplexedAO.
◆ setActiveWeightIdx()
|
inlinevirtual |
Set the active-object pointer to point at a variation in the persistent set.
Implements Rivet::MultiplexedAO.
◆ unsetActiveWeight()
|
inlinevirtual |
Unset the active-object pointer.
Implements Rivet::MultiplexedAO.
The documentation for this class was generated from the following file:
- /builds/hepcedar/rivet/include/Rivet/Tools/RivetYODA.hh
Generated on for Rivet by
