-
Notifications
You must be signed in to change notification settings - Fork 22
First implementation of exporting input variables and infer the ParT network with onnxruntime #77
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
Open
suehara
wants to merge
68
commits into
lcfiplus:master
Choose a base branch
from
suehara:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
9b22996
VertexAnalysis on testproc updated
77c77f8
Merge branch 'master' of https://github.com/lcfiplus/LCFIPlus
3387685
DNNProvider2 (version 1)
caad803
DNNProvider2 modified
329a268
Merge branch 'master' of https://github.com/suehara/LCFIPlus
f301eca
add vertexfinderdnn.h
a4ae6de
add vertexfinderdnn.cc/h
9eb2a30
Add dEdx
788bdec
new version
8e77718
Merge /home/ilc/rtagami/LCFIPlus
e8476b5
Improve PFA-track assignment and track-MC assignment
f0f9627
DNNProvider2
0b33110
add MLInputGenerator and TorchInference (WIP)
tomohikosan 9da8573
implemented MLInputGenerator template functions for calculating ML in…
tomohikosan e710595
Changed functors types to use std::variant
tomohikosan a9162ab
implemented MLMakeNtuple as a new algorithm for ROOT format output of…
tomohikosan 892cb66
File renamed
tomohikosan e7fbd75
Added ONNX/Weaver interface from FCCAnalyses
tomohikosan b850fc8
MLInferenceWeaver added
tomohikosan 6c4c9ff
Implement MLInferenceWeaver
tomohikosan 6f10600
fix prefix
tomohikosan b7278bb
merged variable changes from ongoing strange tagging study
tomohikosan 2cf41b4
variable names are automatically read from JSON
tomohikosan ec3dba3
clean up code
tomohikosan c780a83
WeaverReader implemented
ebb58d3
suppress warning
tomohikosan f828463
Fix variable computation for weaver input
tomohikosan d06c8a2
Changes to make input variables match the previously trained weights
tomohikosan c38bceb
Use new PID
tomohikosan 08d2926
CMakeLists modified
387716d
Bugfix on weaver output
b6a6ca4
match current training
tomohikosan 9376c9e
implement sorted tracks and neutrals from jet
tomohikosan 093ac55
dump weaver input
tomohikosan 4a90523
fix neu_pfcand_mask
tomohikosan 344e4a7
CMakeLists modified
347768a
Bugfix on weaver output
0c14e07
match current training
tomohikosan 54f281a
implement sorted tracks and neutrals from jet
tomohikosan 3dddeb3
dump weaver input
tomohikosan 1c3f06a
fix neu_pfcand_mask
tomohikosan 63a7e4b
Merge branch 'onnx'
tomohikosan 0255ebe
Label on MLMakeNtuple, modification on FlavtagReader
703ac5c
Merge branch 'onnx' of 202.13.202.54:~/LCFIPlus.ml
ce5ac05
merge error fixed
af1a9cd
Remove data dump option
93bfb94
True jet flavor assignment implemented
6f85374
bugfix on MC flavor assignment
9296e21
Change of MLMakeNtuple for event categorization
f911b72
add event based classification with jets
tomohikosan bae2ea9
Add event-based input
ec3a38e
SGV new training
e4384a5
Compatibility for key4hep onnxruntime
45e5994
Add optional ONNX support with backward compatibility
8575a64
Implement backward compatibility for MC-PFO assignment
38d57b5
Merge upstream v00-11 with development branch
0458570
Reorder ReleaseNotes: place development additions first
de979ff
Fix non-trivial copy-assignment warnings in DNNProvider2 and vertexfi…
700465b
Remove unused variable in DNNProvider2
7a26be3
Remove onnx weight files
29b22d7
Fix hardcoded magnetic field values
aec0e52
Validate ambiguous settings during initialization
d425970
Improve sorting implementation efficiency
02e2aa6
Clarify LCRELATION parameter types in descriptions
29aba2d
Add support for LCIO jet collections with ParticleID persistence
b54281b
Add UpdateJetCollectionName option to MLInferenceWeaver
5bb6831
Add example steering files for ML workflows
528017c
Convert MLInputGenerator from namespace to static class
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| <marlin> | ||
|
|
||
| <constants> | ||
| <!-- ***** Global constant for reconstruction ***** --> | ||
| <!-- The k4geo directory where to look for the ILD model --> | ||
| <constant name="k4geo_DIR" value="/cvmfs/sw.hsf.org/key4hep/releases/2025-05-29/x86_64-almalinux9-gcc14.2.0-opt/k4geo/00-22-ubhvqv/share/k4geo" /> | ||
| <!-- ILD detector model --> | ||
| <constant name="DetectorModel" value="ILD_o1_v05" /> | ||
| <!-- The full compact file name --> | ||
| <constant name="CompactFile" value="${k4geo_DIR}/ILD/compact/${DetectorModel}/${DetectorModel}.xml" /> | ||
| </constants> | ||
|
|
||
| <execute> | ||
| <processor name="InitDD4hep"/> | ||
| <processor name="MLInferenceWeaver"/> | ||
| <processor name="LCIOOutput"/> | ||
| </execute> | ||
|
|
||
|
|
||
|
|
||
| <global> | ||
| <parameter name="LCIOInputFiles"> | ||
| /group/ilc/users/rtagami/correction_dEdx/bb/output/n000.d_dstm_14986_0.slcio | ||
| </parameter> | ||
| <parameter name="MaxRecordNumber" value="10"/> | ||
| <parameter name="SkipNEvents" value="0" /> | ||
| <parameter name="SupressCheck" value="false" /> | ||
| <parameter name="Verbosity" options="DEBUG0-4,MESSAGE0-4,WARNING0-4,ERROR0-4,SILENT">MESSAGE0</parameter> | ||
| </global> | ||
|
|
||
| <processor name="InitDD4hep" type="InitializeDD4hep"> | ||
| <!--InitializeDD4hep reads a compact xml file and initializes the DD4hep::LCDD object--> | ||
| <!--Name of the DD4hep compact xml file to load--> | ||
| <parameter name="DD4hepXMLFile" type="string"> ${CompactFile} </parameter> | ||
| </processor> | ||
|
|
||
| <processor name="MLInferenceWeaver" type="LcfiplusProcessor"> | ||
|
|
||
| <!-- run ML inference --> | ||
| <parameter name="Algorithms" type="stringVec"> MLInferenceWeaver </parameter> | ||
| <parameter name="ReadSubdetectorEnergies" type="int" value="1"/> <!-- true for ILD --> | ||
| <parameter name="UpdateVertexRPDaughters" type="int" value="0"/> <!-- false for non-updative PandoraPFOs --> | ||
| <parameter name="TrackHitOrdering" type="int" value="1"/> <!-- Track hit ordering: 0=ILD-LOI,SID-DBD, 1=ILD-DBD --> | ||
| <parameter name="PrintEventNumber" type="int" value="1"/> <!-- 0 for not printing event number, n for printing every n events --> | ||
|
|
||
| <parameter name="MagneticField" type="double" value="3.5"/> | ||
|
|
||
| <!-- specify input collection names --> | ||
| <parameter name="PFOCollection" type="string" value="PandoraPFOs" /> | ||
| <parameter name="PrimaryVertexCollectionName" type="string" value="PrimaryVertex" /> | ||
|
|
||
| <!-- ML Inference Weaver parameters --> | ||
| <parameter name="MLInferenceWeaver.JetCollectionName" type="string" value="RefinedJets" /> | ||
| <parameter name="MLInferenceWeaver.UpdateJetCollectionName" type="string" value="RefinedJets2" /> | ||
| <parameter name="MLInferenceWeaver.JsonFileName" type="string" value="../../onnx/ilc_nnqq_strange_cpidprob_mcpdg/preprocess.json" /> | ||
| <parameter name="MLInferenceWeaver.OnnxFileName" type="string" value="../../onnx/ilc_nnqq_strange_cpidprob_mcpdg/ilc_nnqq_strange_cpidprob_mcpdg.onnx" /> | ||
| <parameter name="MLInferenceWeaver.OutputParameterName" type="string" value="weaver" /> | ||
|
|
||
| </processor> | ||
|
|
||
| <processor name="LCIOOutput" type="LCIOOutputProcessor"> | ||
| <!--Writes the current event to the specified LCIO outputfile--> | ||
| <!--drops the named collections from the event--> | ||
| <parameter name="DropCollectionNames" type="StringVec"> </parameter> | ||
| <!--drops all collections of the given type from the event--> | ||
| <parameter name="DropCollectionTypes" type="StringVec"> </parameter> | ||
| <!-- write complete objects in subset collections to the file (i.e. ignore subset flag)--> | ||
| <parameter name="FullSubsetCollections" type="StringVec"> </parameter> | ||
| <!--force keep of the named collections - overrules DropCollectionTypes (and DropCollectionNames)--> | ||
| <parameter name="KeepCollectionNames" type="StringVec"> </parameter> | ||
| <!-- name of output file --> | ||
| <parameter name="LCIOOutputFile" type="string"> ml_inference_test_output.slcio </parameter> | ||
| <!--write mode for output file: WRITE_APPEND or WRITE_NEW--> | ||
| <parameter name="LCIOWriteMode" type="string"> WRITE_NEW </parameter> | ||
| <!--Set it to true to remove intermediate collections and keep only final products--> | ||
| <parameter name="SplitFilenameByEvent" type="bool"> false </parameter> | ||
| <!--will split output file if size in kB exceeds given value - doesn't work with APPEND and NEW--> | ||
| <parameter name="SplitFilenameSizekB" type="int"> 1996488704 </parameter> | ||
| </processor> | ||
|
|
||
| </marlin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| <marlin> | ||
|
|
||
| <constants> | ||
| <!-- ***** Global constant for reconstruction ***** --> | ||
| <!-- The lcgeo directory where to look for the ILD model --> | ||
| <constant name="lcgeo_DIR" value="/cvmfs/ilc.desy.de/sw/x86_64_gcc103_centos7/v02-03-03/lcgeo/v00-20-00" /> | ||
| <!-- ILD detector model --> | ||
| <constant name="DetectorModel" value="ILD_o1_v05" /> | ||
| <!-- The full compact file name --> | ||
| <constant name="CompactFile" value="${lcgeo_DIR}/ILD/compact/${DetectorModel}/${DetectorModel}.xml" /> | ||
| </constants> | ||
|
|
||
| <execute> | ||
| <processor name="InitDD4hep"/> | ||
| <processor name="MLMakeNtuple"/> | ||
| </execute> | ||
|
|
||
|
|
||
|
|
||
| <global> | ||
| <parameter name="LCIOInputFiles"> | ||
| test_nnbb.slcio | ||
| </parameter> | ||
| <parameter name="MaxRecordNumber" value="100"/> | ||
| <parameter name="SkipNEvents" value="0" /> | ||
| <parameter name="SupressCheck" value="false" /> | ||
| <parameter name="Verbosity" options="DEBUG0-4,MESSAGE0-4,WARNING0-4,ERROR0-4,SILENT">MESSAGE0</parameter> | ||
| </global> | ||
|
|
||
| <processor name="InitDD4hep" type="InitializeDD4hep"> | ||
| <!--InitializeDD4hep reads a compact xml file and initializes the DD4hep::LCDD object--> | ||
| <!--Name of the DD4hep compact xml file to load--> | ||
| <parameter name="DD4hepXMLFile" type="string"> ${CompactFile} </parameter> | ||
| </processor> | ||
|
|
||
| <processor name="MLMakeNtuple" type="LcfiplusProcessor"> | ||
|
|
||
| <!-- run primary and secondary vertex finders --> | ||
| <parameter name="Algorithms" type="stringVec"> MLMakeNtuple </parameter> | ||
| <parameter name="ReadSubdetectorEnergies" type="int" value="1"/> <!-- true for ILD --> | ||
| <parameter name="UpdateVertexRPDaughters" type="int" value="0"/> <!-- false for non-updative PandoraPFOs --> | ||
| <parameter name="TrackHitOrdering" type="int" value="1"/> <!-- Track hit ordering: 0=ILD-LOI,SID-DBD, 1=ILD-DBD --> | ||
| <parameter name="PrintEventNumber" type="int" value="1000"/> <!-- 0 for not printing event number, n for printing every n events --> | ||
|
|
||
| <parameter name="MagneticField" type="double" value="3.5"/> | ||
| <parameter name="PIDAlgorithmName" type="string" value="TMVA_BDT_MC_16bins_singleP" /> | ||
|
|
||
| <parameter name="UseMCP" type="int" value="1" /> | ||
| <parameter name="MCPCollection" type="string" value="MCParticlesSkimmed" /> | ||
| <parameter name="MCPFORelation" type="string" value="RecoMCTruthLink" /> | ||
|
|
||
| <!-- specify input collection names --> | ||
| <parameter name="PFOCollection" type="string" value="PandoraPFOs" /> | ||
| <parameter name="PrimaryVertexCollectionName" type="string" value="PrimaryVertex" /> | ||
|
|
||
| <parameter name="MLMakeNtuple.JetCollectionName" type="string" value="RefinedJets" /> | ||
| <parameter name="MLMakeNtuple.OutputRootFileName" type="string" value="test_nnbb_mlmakentuple.root" /> | ||
| <parameter name="MLMakeNtuple.TTreeName" type="string" value="ntp" /> | ||
| <parameter name="MLMakeNtuple.Label" type="int" value="0" /> | ||
|
|
||
|
|
||
| </processor> | ||
|
|
||
| </marlin> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be automatically added by our tagging script if you put them between the
BEGINRELEASENOTESandENDRELEASENOTESin the PR as you have already done.