A module looping over a set of solutions. More...

Detailed Description

A module looping over a set of solutions.

A loop is done over the set of solution. For each solution, the outputs are filled with the list of particles and the jacobian, and the modules of the path are executed. At least one module must use the output produced by this module.

If the path is executed, the solution is ensured to be valid.

In details

Each blocks produce a set of solutions. In order to define the final integrand value, various computations (matrix element, initial state, …) must be performed on each solution. Letting each module handling multiple solutions, but it leads to many problems, the biggest one being the synchronization between modules: a solution can be seen as valid from a module, but not for another. Instead, each module only handles a set of particle, without the necessity to know where it comes from (input particle or solution of a block), and the iteration over the solutions is delegated to this Looper module. For each solution, a sequence of module is executed, as described by the path argument.

Schematically, things can be represented by this graph:

───────
Block
───┬───
├─ Solutions
───┴────
─┬────┬─
│ │
│ ├─ Solution
│ │
│ ──┴─────
Module
│ ──┬─────
│ │
│ │
│ ──┴─────
Module
│ ──┬─────
│ │
└─┬──┘
───┴───
───┬───

Integration dimension

This module requires 0 phase-space point.

Parameters

Name Type Description
path Path An execution path. For each solution, each module of the path will be executed in order.

Inputs

Name Type Description
solutions vector(Solution) The set of solutions to iterate over. It's usually the output of one of the blocks.

Outputs

Name Type Description
particles vector(LorentzVector) The particles of the current solution. This output only makes sense for a module inside the execution path. For any other module, this output is invalid.
jacobian double The jacobian of the current solution. This output only makes sense for a module inside the execution path. For any other module, this output is invalid.

Definition at line 113 of file Looper.cc.

Inheritance diagram for Looper:

Public Member Functions

 Looper (PoolPtr pool, const ParameterSet &parameters)
 
virtual void configure () override
 Called once at the beginning of the job.
 
virtual void beginIntegration () override
 Called once at the beginning of the integration.
 
virtual void endIntegration () override
 Called once at the end of the integration.
 
virtual void beginPoint () override
 Called once when a new PS point is started. More...
 
virtual void endPoint () override
 Called once when a PS point is finished. More...
 
virtual Status work () override
 Main function. More...
 
- Public Member Functions inherited from Module
 Module (PoolPtr pool, const std::string &name)
 Constructor. More...
 
virtual void beginLoop ()
 Called once at the beginning of a loop. More...
 
virtual void endLoop ()
 Called once at the end of a loop. More...
 
virtual void finish ()
 Called once at the end of the job.
 
virtual std::string name () const final
 

Additional Inherited Members

- Public Types inherited from Module
enum  Status : std::int8_t { OK, NEXT, ABORT }
 
- Static Public Member Functions inherited from Module
static std::string statusToString (const Status &status)
 
static bool is_virtual_module (const std::string &name)
 Test if a given name correspond to a virtual module. More...
 
- Protected Member Functions inherited from Module
template<typename T , typename... Args>
std::shared_ptr< T > produce (const std::string &name, Args... args)
 Add a new output to the module. More...
 
template<typename T >
Value< T > get (const std::string &module, const std::string &name)
 
template<typename T >
Value< T > get (const InputTag &tag)
 
- Protected Attributes inherited from Module
PoolPtr m_pool
 

Member Function Documentation

◆ beginPoint()

virtual void Looper::beginPoint ( )
inlineoverridevirtual

Called once when a new PS point is started.

Only relevant if the module is inside a loop, since otherwise the module is called only once anyway

Reimplemented from Module.

Definition at line 141 of file Looper.cc.

◆ endPoint()

virtual void Looper::endPoint ( )
inlineoverridevirtual

Called once when a PS point is finished.

Only relevant if the module is inside a loop, since otherwise the module is called only once anyway

Reimplemented from Module.

Definition at line 145 of file Looper.cc.

◆ work()

virtual Status Looper::work ( )
inlineoverridevirtual

Main function.

This method is called for each integration step. The module's logic and work happen here.

You'll usually want to override this function if you want your module to perform some task.

Reimplemented from Module.

Definition at line 149 of file Looper.cc.


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