Skip to content

Introduce proper generator IDs#11509

Merged
sawenzel merged 3 commits intoAliceO2Group:devfrom
benedikt-voelkel:gen-ids
Jul 19, 2023
Merged

Introduce proper generator IDs#11509
sawenzel merged 3 commits intoAliceO2Group:devfrom
benedikt-voelkel:gen-ids

Conversation

@benedikt-voelkel
Copy link
Contributor

@benedikt-voelkel benedikt-voelkel commented Jun 15, 2023

  • 3 values forseen

    • global ID assigend to a o2::eventgen::PrimaryGenerator
    • cocktail constituent ID in case a o2::eventgen::Generator consists
      of multiple cocktail constituents. If a specific constituent is used
      for an event, that event will be flagged with that ID
    • source ID to mark source in emebdding scenarios
  • all 3 values are encoded into a single short, passed to mcCollision
    table at the end

  • provide decoding via helper functions

  • Global ID (and short description)

    • can be set via
      o2-sim --confKeyValues
      "PrimaryGenerator.id=3;PrimaryGenerator.description=a specific gen"
  • Each cocktail constituent must first be registered via
    o2::eventgen::Generator::addCocktailConstituent(int, std::string)

    then, each egnerated event must set a valid ID during
    o2::eventgen::Generator::GenerateEvent
    or
    o2::eventgen::Generator::importParticles

    if cocktail constituents are set but no valid ID is given, no event
    will be generated

@benedikt-voelkel
Copy link
Contributor Author

Tested with https://github.com/benedikt-voelkel/O2DPG/tree/cocktail-test

${O2DPG_ROOT}/MC/run/PWGHF/run_pp_HFtriggers_ccbar_gaptrigger.sh

@benedikt-voelkel benedikt-voelkel force-pushed the gen-ids branch 3 times, most recently from bf1952c to 8885521 Compare June 28, 2023 16:55
@benedikt-voelkel benedikt-voelkel marked this pull request as ready for review June 28, 2023 17:00
@benedikt-voelkel benedikt-voelkel requested review from a team and sawenzel as code owners June 28, 2023 17:00
@benedikt-voelkel benedikt-voelkel changed the title [WIP] Introduce proper generator IDs Introduce proper generator IDs Jul 2, 2023
@alibuild
Copy link
Collaborator

alibuild commented Jul 4, 2023

Error while checking build/O2/fullCI for 8885521 at 2023-07-04 16:43:

## sw/BUILD/GEANT4_VMC-latest/log
CMake Error at /sw/slc8_x86-64/CMake/v3.23.1-13/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

Full log here.

* 3 values
  * global ID assigend to a o2::eventgen::PrimaryGenerator
  * cocktail constituent ID in case a o2::eventgen::Generator consists
    of multiple cocktail constituents. If a specific constituent is used
    for an event, that event will be flagged with that ID
  * source ID to mark source in emebdding scenarios

* all 3 values are encoded into a single short, passed to mcCollision
  table at the end

* provide decoding via helper functions/dynamic columns in mcCOllision
  table

Set the IDs
  * Global ID (and short description)
    * can be set via
      o2-sim --confKeyValues \
       "PrimaryGenerator.id=3;PrimaryGenerator.description=a specific gen"

  * Each cocktail constituent must first be registered via
    o2::eventgen::Generator::addCocktailConstituent(int, std::string)

    then, each egnerated event must set a valid ID during
    o2::eventgen::Generator::GenerateEvent
    or
    o2::eventgen::Generator::importParticles

    if cocktail constituents are set but no valid ID is given, no event
    will be generated

  * source ID is derived by the framework as before,  not up to the user

* combine MC Gen ID and particle status to MCGenProperties
  (naming not final, MCGenHelper, MCGenUtils?)

Please consider the following formatting changes
* rename cocktail to subGenerator everywhere

* a cocktail should stay a cocktail of different generators

* remove comment in AnalysisDataModel
* generator ID from 0 to 127 (included)
* sub-generator ID from -1 to 30 (included)
* source ID from 0 to 15 (included)
@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for 66bc61c at 2023-07-12 19:54:

No log files found

Full log here.

@sawenzel sawenzel merged commit a1792d4 into AliceO2Group:dev Jul 19, 2023
mwinn2 pushed a commit to mwinn2/AliceO2 that referenced this pull request Aug 24, 2023
* Introduce proper generator IDs

* 3 values
  * global ID assigend to a o2::eventgen::PrimaryGenerator
  * cocktail constituent ID in case a o2::eventgen::Generator consists
    of multiple cocktail constituents. If a specific constituent is used
    for an event, that event will be flagged with that ID
  * source ID to mark source in emebdding scenarios

* all 3 values are encoded into a single short, passed to mcCollision
  table at the end

* provide decoding via helper functions/dynamic columns in mcCOllision
  table

Set the IDs
  * Global ID (and short description)
    * can be set via
      o2-sim --confKeyValues \
       "PrimaryGenerator.id=3;PrimaryGenerator.description=a specific gen"

  * Each cocktail constituent must first be registered via
    o2::eventgen::Generator::addCocktailConstituent(int, std::string)

    then, each egnerated event must set a valid ID during
    o2::eventgen::Generator::GenerateEvent
    or
    o2::eventgen::Generator::importParticles

    if cocktail constituents are set but no valid ID is given, no event
    will be generated

  * source ID is derived by the framework as before,  not up to the user

* combine MC Gen ID and particle status to MCGenProperties
  (naming not final, MCGenHelper, MCGenUtils?)

Please consider the following formatting changes

* Be consistent with Run1 and Run2

* rename cocktail to subGenerator everywhere

* a cocktail should stay a cocktail of different generators

* remove comment in AnalysisDataModel

* Adjust ID ranges

* generator ID from 0 to 127 (included)
* sub-generator ID from -1 to 30 (included)
* source ID from 0 to 15 (included)

---------

Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>
fcatalan92 pushed a commit to fcatalan92/AliceO2 that referenced this pull request Dec 20, 2023
* Introduce proper generator IDs

* 3 values
  * global ID assigend to a o2::eventgen::PrimaryGenerator
  * cocktail constituent ID in case a o2::eventgen::Generator consists
    of multiple cocktail constituents. If a specific constituent is used
    for an event, that event will be flagged with that ID
  * source ID to mark source in emebdding scenarios

* all 3 values are encoded into a single short, passed to mcCollision
  table at the end

* provide decoding via helper functions/dynamic columns in mcCOllision
  table

Set the IDs
  * Global ID (and short description)
    * can be set via
      o2-sim --confKeyValues \
       "PrimaryGenerator.id=3;PrimaryGenerator.description=a specific gen"

  * Each cocktail constituent must first be registered via
    o2::eventgen::Generator::addCocktailConstituent(int, std::string)

    then, each egnerated event must set a valid ID during
    o2::eventgen::Generator::GenerateEvent
    or
    o2::eventgen::Generator::importParticles

    if cocktail constituents are set but no valid ID is given, no event
    will be generated

  * source ID is derived by the framework as before,  not up to the user

* combine MC Gen ID and particle status to MCGenProperties
  (naming not final, MCGenHelper, MCGenUtils?)

Please consider the following formatting changes

* Be consistent with Run1 and Run2

* rename cocktail to subGenerator everywhere

* a cocktail should stay a cocktail of different generators

* remove comment in AnalysisDataModel

* Adjust ID ranges

* generator ID from 0 to 127 (included)
* sub-generator ID from -1 to 30 (included)
* source ID from 0 to 15 (included)

---------

Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>
benedikt-voelkel pushed a commit that referenced this pull request Jan 9, 2024
* Introduce proper generator IDs (#11509)

* Introduce proper generator IDs

* 3 values
  * global ID assigend to a o2::eventgen::PrimaryGenerator
  * cocktail constituent ID in case a o2::eventgen::Generator consists
    of multiple cocktail constituents. If a specific constituent is used
    for an event, that event will be flagged with that ID
  * source ID to mark source in emebdding scenarios

* all 3 values are encoded into a single short, passed to mcCollision
  table at the end

* provide decoding via helper functions/dynamic columns in mcCOllision
  table

Set the IDs
  * Global ID (and short description)
    * can be set via
      o2-sim --confKeyValues \
       "PrimaryGenerator.id=3;PrimaryGenerator.description=a specific gen"

  * Each cocktail constituent must first be registered via
    o2::eventgen::Generator::addCocktailConstituent(int, std::string)

    then, each egnerated event must set a valid ID during
    o2::eventgen::Generator::GenerateEvent
    or
    o2::eventgen::Generator::importParticles

    if cocktail constituents are set but no valid ID is given, no event
    will be generated

  * source ID is derived by the framework as before,  not up to the user

* combine MC Gen ID and particle status to MCGenProperties
  (naming not final, MCGenHelper, MCGenUtils?)

Please consider the following formatting changes

* Be consistent with Run1 and Run2

* rename cocktail to subGenerator everywhere

* a cocktail should stay a cocktail of different generators

* remove comment in AnalysisDataModel

* Adjust ID ranges

* generator ID from 0 to 127 (included)
* sub-generator ID from -1 to 30 (included)
* source ID from 0 to 15 (included)

---------

Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>

* Avoid warnings when looking for MCEventHeader info

in particular avoid
problem retrieving info 'subgenerator_id': no such key

* Fix typo in subGenerator check

---------

Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants