Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podio::DataSource #309

Merged
merged 32 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b6d1734
Integrating EDM4hep RDataSource
kjvbrt Aug 3, 2023
264899a
Add legacy reader
kjvbrt Aug 7, 2023
93fd3ac
Split off legacy reader
kjvbrt Aug 7, 2023
a2172d0
Protecting collection retrieval by mutex
kjvbrt Aug 8, 2023
58292c8
Add source test
kjvbrt Aug 14, 2023
96600f5
Updated man pages
kjvbrt Aug 15, 2023
33a357f
Renaming Source na DataSource
kjvbrt Aug 15, 2023
ca7e91e
Adding source test for run stages
kjvbrt Oct 3, 2023
ccd3671
Add tests for the standalone mode
kjvbrt Oct 12, 2023
da73dbb
Adding test files per process for histmaker
kjvbrt Oct 26, 2023
616a827
Adding selector by size and sorter by pT
kjvbrt Nov 15, 2023
2187e48
Few more analyzers
kjvbrt Nov 16, 2023
a61b6cf
Putting back things omitted from run_analysis.py
kjvbrt Jan 25, 2024
1530e5e
Adding e4hsource in LD_LIBRARY_PATH for managed tests
kjvbrt Jan 25, 2024
285a170
Making building of the source optional
kjvbrt Mar 1, 2024
e1aa165
Removed legacy support
kjvbrt Mar 1, 2024
9d74103
Separated analyzers using Collections into independent headers
kjvbrt Mar 4, 2024
258813c
Reimplementing analyzers needed for the stage1 of the example analysis
kjvbrt Mar 8, 2024
311379b
Adjusitng test input files
kjvbrt Mar 8, 2024
27dcbbd
Moving recoParticle definition
kjvbrt May 3, 2024
97db64b
Changes to use podio::ROOTDataSource
kjvbrt May 6, 2024
b1b76c3
using podio::DataSource
kjvbrt Aug 28, 2024
ce2981f
Adjusting stages source example
kjvbrt Sep 18, 2024
005ac4e
Adding C++ analysis tests
kjvbrt Sep 19, 2024
53f3402
Updating examples
kjvbrt Sep 20, 2024
7bd35ce
Formatting
kjvbrt Sep 20, 2024
d1aad33
Removing e4hsource
kjvbrt Sep 20, 2024
c2aa199
Adjust clang-format check
kjvbrt Sep 20, 2024
eb6dffe
Formatting
kjvbrt Sep 20, 2024
026ff54
Using PodioSource namespace
kjvbrt Oct 1, 2024
c0eb383
Adding .cache to .gitignore
kjvbrt Oct 1, 2024
26240f1
Formatting
kjvbrt Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding source test for run stages
kjvbrt committed Oct 1, 2024
commit ca7e91ed4445a7695369d603df0d51eadf26839b
49 changes: 49 additions & 0 deletions e4hsource/test/stages_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# list of processes (mandatory)
processList = {
'p8_ee_WW_ecm240': {'output': 'p8_ee_WW_ecm240_out'}
}

# Production tag when running over EDM4Hep centrally produced events, this
# points to the yaml files for getting sample statistics (mandatory)
prodTag = "FCCee/winter2023/IDEA/"

# Optional: output directory, default is local running directory
outputDir = "."

# Ncpus, default is 4, -1 uses all cores available
# nCPUS = -1

# How to read input files
useDataSource = True

testFile = '/eos/experiment/fcc/ee/generation/DelphesEvents/winter2023/' \
'IDEA/p8_ee_WW_ecm240/events_192112516.root'

# RDFanalysis class where the use defines the operations on the TTree
# (mandatory)
class RDFanalysis():

# analysis function to define the analyzers to process, please make sure
# you return the last dataframe, in this example it is df2
def analysers(df):

df2 = (
df
.Define(
"electron_truth",
"FCCAnalyses::ReconstructedParticle::selPDG(11)(MCRecoAssociations)")

.Define(
"electron_truth_pt",
"FCCAnalyses::ReconstructedParticle::getPt(electron_truth)")
)

return df2

def output():
branchList = [
"electron_truth",
"electron_truth_pt"
]

return branchList
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ add_integration_test("examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py"
add_integration_test("examples/FCCee/test/jet_constituents.py")
add_integration_test("examples/FCCee/vertex_lcfiplus/analysis_V0.py")
add_integration_test("e4hsource/test/histmaker_source.py")
add_integration_test("e4hsource/test/stages_source.py")

add_standalone_test("examples/FCCee/fullSim/caloNtupleizer/analysis.py")