forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#7 from gvonsem/pepr_CMSSW_11_1_0_pre7_peprC…
…andDev Pepr candidate producer
- Loading branch information
Showing
8 changed files
with
857 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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,51 @@ | ||
# Running the pepr PF candidate producer for HGCAL | ||
|
||
This example demonstrates how to run the particle reconstruction in the HGCAL subdetector via inference of graph neural networks. | ||
|
||
## Setup | ||
|
||
Install CMSSW: | ||
``` | ||
export SCRAM_ARCH="slc7_amd64_gcc820" | ||
cmsrel CMSSW_11_1_0_pre7 | ||
cd CMSSW_11_1_0_pre7/src | ||
cmsenv | ||
scram b -j 8 | ||
``` | ||
|
||
Install custom packages: | ||
``` | ||
git cms-init | ||
git cms-merge-topic cms-pepr:pepr_CMSSW_11_1_0_pre7 | ||
scram b -j 8 | ||
``` | ||
|
||
## Generate events | ||
|
||
First we produce GEN-SIM-DIGI (GSD) events, in this example by shooting particles (e.g. photons) | ||
in a certain energy range towards the HGCAL subdetector via the `FlatEtaRangeGunProducer`. | ||
``` | ||
cd RecoHGCal/GraphReco/test | ||
cmsRun GSD_GUN.py seed=1 outputFile="file:1_GSD.root" maxEvents=5 | ||
``` | ||
Once the GSD events are produced, we can run the reconstruction step: | ||
``` | ||
cmsRun RECO_pf.py inputFiles="file://1_GSD.root" outputFile="file:1_RECO.root" outputFileDQM="file:1_DQM.root" maxEvents=5 | ||
``` | ||
A dedicated **EDProducer module**, the `peprCandidateFromHitProducer` located | ||
in the [RecoHGCAL/GraphReco](https://github.com/gvonsem/cmssw/tree/pepr_CMSSW_11_1_0_pre7_peprCandDev/RecoHGCal/GraphReco) package, | ||
produces PF candidates straight from rechit information, in this example via the [Object Condensation](https://arxiv.org/abs/2002.03605v3) method. | ||
The inference of trained graph neural network models is done by sending the rechit information per endcap to a custom Triton server, evaluating the model, | ||
and retrieving the regressed energy and position of clustered particle candidates. | ||
These candidates are subsequently turned into a PFcandidate collection named `recoPFCandidates_peprCandidateFromHitProducer__RECO`. Particle and charge identification as well as track-cluster matching are work in progress and not included yet. | ||
|
||
**Note:** it may take some time for the event loop in the reconstruction to start, and inference may be slow on a CPU server. The speed of communication with the client and especially the inference will improve drastically once dedicated Triton GPU servers are used. | ||
|
||
The **sequence** of the producer module is as follows: | ||
* In the constructor of the producer, the Triton client is started. | ||
* The producer checks for open pipes (set up to communicate with the Triton server) and will wait until the pipes are open to send the rechit data to the server. | ||
* In case the pipes are open before the producer reaches the check, the client will wait until the rechit data is passed from the producer. | ||
* The inference itself is done on the Triton server via the trained model that is stored there, and the results are passed back to the module where a collection of reconstructed particle candidates is created. | ||
* The Triton client is automatically closed in the destructor of the producer | ||
|
||
|
This file contains 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
Oops, something went wrong.