Skip to content

PWGHF: Add utility to apply event selection at the generated level - #6302

Merged
fcatalan92 merged 18 commits into
AliceO2Group:masterfrom
DelloStritto:master
Jun 5, 2024
Merged

PWGHF: Add utility to apply event selection at the generated level#6302
fcatalan92 merged 18 commits into
AliceO2Group:masterfrom
DelloStritto:master

Conversation

@DelloStritto

Copy link
Copy Markdown
Contributor

To be extended to candidateCreator2Prong.cxx and candidateCreatorDstar.cxx once reviewed.

@DelloStrittoDelloStritto changed the title PWGHF: add TF border cut at the particle generate levelPWGHF: add TF border cut at the generated particle levelMay 28, 2024
@mfaggin

mfaggin commented May 28, 2024

Copy link
Copy Markdown
Collaborator

thanks a lot @DelloStritto , a couple of comments from my side:

  • beware of this PR just merged, please rebase: PWGHF: new Pb-Pb event selections #6278
  • what about adding the same feature also in PWGHF/TableProducer/candidateCreatorCascade.cxx and PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx?

@fcatalan92fcatalan92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DelloStritto, thanks for looking into the event selection on MC. I added a comment on the strategy here below. Moreover, I would not add the selection code directly in the creator, instead you could add an utility function in utilsEvSelHf.

Comment threadPWGHF/TableProducer/candidateCreator3Prong.cxx Outdated
DelloStritto added a commit to DelloStritto/O2Physics that referenced this pull request May 30, 2024
Please consider the following formatting changes to AliceO2Group#6302
@DelloStrittoDelloStritto changed the title PWGHF: add TF border cut at the generated particle levelPWGHF: add utility to apply event selection at the generated levelMay 30, 2024

@vkuceravkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DelloStritto , see my minor suggestions.

Comment threadPWGHF/TableProducer/candidateCreator3Prong.cxx Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
DelloStritto added a commit to DelloStritto/O2Physics that referenced this pull request May 30, 2024
Please consider the following formatting changes to AliceO2Group#6302
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h

@fcatalan92fcatalan92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DelloStritto, thanks for implementing the comments. I have just a few more.
Please also check that the event selection is added to all the candidate creators.

Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
Comment threadPWGHF/Utils/utilsEvSelHf.h Outdated
fcatalan92
fcatalan92 previously approved these changes Jun 3, 2024
@fcatalan92
fcatalan92 enabled auto-merge (squash) June 3, 2024 15:34
vkucera
vkucera previously approved these changes Jun 3, 2024
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for aec28df at 2024-06-03 18:04:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:300:85: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
/sw/SOURCES/O2Physics/6302-slc7_x86-64/0/PWGHF/Utils/utilsEvSelHf.h:205:34: error: invalid conversion from 'int' to 'o2::hf_evsel::EventRejection' [-fpermissive]
ninja: build stopped: subcommand failed.

Full log here.

vkucera
vkucera previously approved these changes Jun 3, 2024
@vkucera
vkucera disabled auto-merge June 3, 2024 16:34
@vkucera
vkucera enabled auto-merge (squash) June 3, 2024 16:34
@vkuceravkucera changed the title PWGHF: add utility to apply event selection at the generated levelPWGHF: Add utility to apply event selection at the generated levelJun 3, 2024
@fcatalan92
fcatalan92 disabled auto-merge June 5, 2024 07:04
Comment threadPWGHF/TableProducer/candidateCreator2Prong.cxx Outdated
Comment threadPWGHF/TableProducer/candidateCreator3Prong.cxx Outdated
Comment threadPWGHF/TableProducer/candidateCreatorCascade.cxx Outdated
DelloStrittoand others added 3 commits June 5, 2024 09:49
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
@fcatalan92
fcatalan92 enabled auto-merge (squash) June 5, 2024 07:52
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 77064a5 at 2024-06-05 09:59:

## sw/BUILD/O2Physics-latest/log
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:48:33: error: static assertion failed: Argument number mismatch
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:50:11: error: no match for call to '(o2::framework::{anonymous}::memfun_type<void (o2::framework::TableBuilder::persist<signed char, signed char, signed char, int>(const std::array<const char*, 4>&)::<lambda(unsigned int, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<int>::FillType)>::*)(unsigned int, signed char, signed char, signed char, int) const>::type {aka std::function<void(unsigned int, signed char, signed char, signed char, int)>}) (int, const signed char&, const signed char&, const signed char&)'
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:48:33: error: static assertion failed: Argument number mismatch
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:50:11: error: no match for call to '(o2::framework::{anonymous}::memfun_type<void (o2::framework::TableBuilder::persist<signed char, signed char, int>(const std::array<const char*, 3>&)::<lambda(unsigned int, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<int>::FillType)>::*)(unsigned int, signed char, signed char, int) const>::type {aka std::function<void(unsigned int, signed char, signed char, int)>}) (int, const signed char&, const signed char&)'
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:48:33: error: static assertion failed: Argument number mismatch
/sw/slc7_x86-64/O2/daily-20240605-0200-local1/include/Framework/AnalysisHelpers.h:50:11: error: no match for call to '(o2::framework::{anonymous}::memfun_type<void (o2::framework::TableBuilder::persist<signed char, signed char, int>(const std::array<const char*, 3>&)::<lambda(unsigned int, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<signed char>::FillType, o2::framework::BuilderMaker<int>::FillType)>::*)(unsigned int, signed char, signed char, int) const>::type {aka std::function<void(unsigned int, signed char, signed char, int)>}) (int, const signed char&, const signed char&)'
ninja: build stopped: subcommand failed.

Full log here.

@fcatalan92
fcatalan92 merged commit 8d9eb4c into AliceO2Group:masterJun 5, 2024
nasirmehdimalik pushed a commit to nasirmehdimalik/O2Physics that referenced this pull request Jun 6, 2024
…liceO2Group#6302)
* PWGHF: add TF border cut at the particle generate level
* Adding utility for the event selection at the generated level
* fix clang
* fix
* Propagating PR to all candidate creators
* Splitting sel8 in the reco part
* Add monitoring
* fix
* fix
* Fix type of loop variable
* Revert bad idea
* Update PWGHF/TableProducer/candidateCreator2Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreatorCascade.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreator3Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
---------
Co-authored-by: Luigi Dello Stritto <ldellost@alicecerno2.cern.ch>
Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
GiorgioAlbertoLucia pushed a commit to GiorgioAlbertoLucia/O2Physics that referenced this pull request Jul 9, 2024
…liceO2Group#6302)
* PWGHF: add TF border cut at the particle generate level
* Adding utility for the event selection at the generated level
* fix clang
* fix
* Propagating PR to all candidate creators
* Splitting sel8 in the reco part
* Add monitoring
* fix
* fix
* Fix type of loop variable
* Revert bad idea
* Update PWGHF/TableProducer/candidateCreator2Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreatorCascade.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreator3Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
---------
Co-authored-by: Luigi Dello Stritto <ldellost@alicecerno2.cern.ch>
Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
echizzal pushed a commit to echizzal/O2Physics that referenced this pull request Jul 18, 2024
…liceO2Group#6302)
* PWGHF: add TF border cut at the particle generate level
* Adding utility for the event selection at the generated level
* fix clang
* fix
* Propagating PR to all candidate creators
* Splitting sel8 in the reco part
* Add monitoring
* fix
* fix
* Fix type of loop variable
* Revert bad idea
* Update PWGHF/TableProducer/candidateCreator2Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreatorCascade.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
* Update PWGHF/TableProducer/candidateCreator3Prong.cxx
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
---------
Co-authored-by: Luigi Dello Stritto <ldellost@alicecerno2.cern.ch>
Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
Co-authored-by: Fabio Catalano <fabio.catalano372@gmail.com>
Sign up for freeto 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.

5 participants

@DelloStritto@mfaggin@alibuild@fcatalan92@vkucera