{"action":"created","issue":{"url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/69","repository_url":"https://api.github.com/repos/MoMEMta/MoMEMta","labels_url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/69/comments","events_url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/69/events","html_url":"https://github.com/MoMEMta/MoMEMta/pull/69","id":158956442,"number":69,"title":"Improve handling of solutions with a Looper module","user":{"login":"blinkseb","id":386274,"avatar_url":"https://avatars.githubusercontent.com/u/386274?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkseb","html_url":"https://github.com/blinkseb","followers_url":"https://api.github.com/users/blinkseb/followers","following_url":"https://api.github.com/users/blinkseb/following{/other_user}","gists_url":"https://api.github.com/users/blinkseb/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkseb/subscriptions","organizations_url":"https://api.github.com/users/blinkseb/orgs","repos_url":"https://api.github.com/users/blinkseb/repos","events_url":"https://api.github.com/users/blinkseb/events{/privacy}","received_events_url":"https://api.github.com/users/blinkseb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MoMEMta/MoMEMta/labels/do%20not%20merge","name":"do not merge","color":"e99695"},{"url":"https://api.github.com/repos/MoMEMta/MoMEMta/labels/ready%20for%20review%20/%20comments","name":"ready for review / comments","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-06-07T15:41:01Z","updated_at":"2016-08-29T11:57:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MoMEMta/MoMEMta/pulls/69","html_url":"https://github.com/MoMEMta/MoMEMta/pull/69","diff_url":"https://github.com/MoMEMta/MoMEMta/pull/69.diff","patch_url":"https://github.com/MoMEMta/MoMEMta/pull/69.patch"},"body":"Add looper module to loop over solutions\r\n\r\nThis is a major change in how the graph is evaluated. Previously, each module was responsible for looping over all possible solutions (called *invisibles*), and had to produce the same number of outputs at the number of inputs, otherwise the sync is lost. Dropping a solution was almost impossible.\r\n\r\nNow, only the Blocks produce a set of solutions. All other modules expected in input only one solution. To deal with multiple solution, a new module is introduced, the Looper. As its name indicates, it loops over a set a solution and execute a set of modules for each iteration. In order for the Looper to know which modules it has to execute, a new concept is introduced, the Path. A Path is simply a collection of modules, specified by the user in the lua configuration file. Ordering is not important, since it also benefits from the graph feature we already have. Final module of a Path will usually be a `Summer` module, which simply sum some values at each iteration. To visualize the things, you will have a MatrixElement module inside a path, followed by a Summer module. The MatrixElement module will produce a weight for each solution, and the summer will sum all these weights to produce the final integrand.\r\n\r\nIt's possible that a solution provided by the Block is in reality not physical, but this can only be determined later on by another module. To solve the problem, the `Module::work` method now returns a value instead of `void`. Depending on the return value, the execution can be aborted, or simply skip to the next integration step. Possible values are:\r\n\r\n - `Status::OK`: everything is fine, keep going\r\n - `Status::NEXT`: Stop the current execution path, and skip to the next one. This has two different meaning:\r\n    - If the module is in a loop, it means going to the next iteration of the loop, skipping remaining modules in the path\r\n    - If the module is not in a loop, it means skipping the remaining modules, and going to the next integration step, returning 0 to cuba.\r\n - `Status::ABORT`: Desperate situation, abort the integration.\r\n\r\nAll modules have been updated to return `Status::NEXT` when they estimate that the current solution is non-physical.\r\n\r\nAs a module is now able to abort the integration, the user can retrieve the final status of the integration using the new `MoMEMta::getIntegrationStatus()` method, returning:\r\n\r\n - `IntegrationStatus::SUCCESS`: integration successful\r\n - `IntegrationStatus::ACCURARY_NOT_REACHED`: integration stopped before the desired level of accuracy was reached\r\n - `IntegrationStatus::FAILED`: integration failed\r\n - `IntegrationStatus::ABORTED`: integration aborted\r\n\r\nTo simplify the whole logic, a `Solution` class is added, wrapping together a set of LorentzVector and a jacobian. There's also a `valid` flag, not used for the moment.\r\n\r\nFinally, there's one last change needed. Previously, MoMEMta tried to auto-detect which module produced the final value of the integrand, looking for a module producing an output named `integrands` and allowing only one of such module to exist. It's however no longer possible because it's now possible with the looper to have more than one module producing quantities that can be considered as final integrand. It's now mandatory to specify which InputTag to use to retrieve the integrand value, using the new `integrand()` lua function.\r\n\r\n--\r\n\r\nI've ported all the lua files to use the looper modules, and I've checked that both the TT & WW weight are the same before & after the change. I did not check the result of the phase-space volumes and cross-sections.\r\n\r\nThe documentation has also been updated to reflect the changes.\r\n\r\n--\r\n\r\nThis is **not** in any way final, but I open the PR to gather feedback and comments on the feature. For example, I'm not really satisfied by the `Path` implementation. If you guys have better ideas!"},"comment":{"url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/comments/243104051","html_url":"https://github.com/MoMEMta/MoMEMta/pull/69#issuecomment-243104051","issue_url":"https://api.github.com/repos/MoMEMta/MoMEMta/issues/69","id":243104051,"user":{"login":"swertz","id":8058274,"avatar_url":"https://avatars.githubusercontent.com/u/8058274?v=3","gravatar_id":"","url":"https://api.github.com/users/swertz","html_url":"https://github.com/swertz","followers_url":"https://api.github.com/users/swertz/followers","following_url":"https://api.github.com/users/swertz/following{/other_user}","gists_url":"https://api.github.com/users/swertz/gists{/gist_id}","starred_url":"https://api.github.com/users/swertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swertz/subscriptions","organizations_url":"https://api.github.com/users/swertz/orgs","repos_url":"https://api.github.com/users/swertz/repos","events_url":"https://api.github.com/users/swertz/events{/privacy}","received_events_url":"https://api.github.com/users/swertz/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T11:57:23Z","updated_at":"2016-08-29T11:57:23Z","body":"I think the DMEM module has to go in the looper: https://github.com/MoMEMta/MoMEMta/pull/69/commits/ae0c4e51f2949718346e304c27759e3047c564bd#diff-42ca085c71cbf316a382c47243b2b575R152"}}
{"actor":{"display_login":"swertz"}}