Skip to content

Commit 2a39d09

Browse files
authored
Merge pull request #7 from gvonsem/pepr_CMSSW_11_1_0_pre7_peprCandDev
Pepr candidate producer
2 parents 9fc4fd5 + e9ddba7 commit 2a39d09

8 files changed

Lines changed: 857 additions & 1 deletion

File tree

RecoHGCal/GraphReco/BuildFile.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<use name="Geometry/CaloGeometry"/>
99
<use name="TrackingTools/Records"/>
1010
<use name="DataFormats/HGCRecHit"/>
11+
<use name="DataFormats/HGCalReco"/>
1112

1213
<use name="SimGeneral/HepPDTRecord"/>
1314
<use name="TrackPropagation/RungeKutta"/>
1415
<export>
1516
<lib name="1"/>
16-
</export>
17+
</export>

RecoHGCal/GraphReco/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Running the pepr PF candidate producer for HGCAL
2+
3+
This example demonstrates how to run the particle reconstruction in the HGCAL subdetector via inference of graph neural networks.
4+
5+
## Setup
6+
7+
Install CMSSW:
8+
```
9+
export SCRAM_ARCH="slc7_amd64_gcc820"
10+
cmsrel CMSSW_11_1_0_pre7
11+
cd CMSSW_11_1_0_pre7/src
12+
cmsenv
13+
scram b -j 8
14+
```
15+
16+
Install custom packages:
17+
```
18+
git cms-init
19+
git cms-merge-topic cms-pepr:pepr_CMSSW_11_1_0_pre7
20+
scram b -j 8
21+
```
22+
23+
## Generate events
24+
25+
First we produce GEN-SIM-DIGI (GSD) events, in this example by shooting particles (e.g. photons)
26+
in a certain energy range towards the HGCAL subdetector via the `FlatEtaRangeGunProducer`.
27+
```
28+
cd RecoHGCal/GraphReco/test
29+
cmsRun GSD_GUN.py seed=1 outputFile="file:1_GSD.root" maxEvents=5
30+
```
31+
Once the GSD events are produced, we can run the reconstruction step:
32+
```
33+
cmsRun RECO_pf.py inputFiles="file://1_GSD.root" outputFile="file:1_RECO.root" outputFileDQM="file:1_DQM.root" maxEvents=5
34+
```
35+
A dedicated **EDProducer module**, the `peprCandidateFromHitProducer` located
36+
in the [RecoHGCAL/GraphReco](https://github.com/gvonsem/cmssw/tree/pepr_CMSSW_11_1_0_pre7_peprCandDev/RecoHGCal/GraphReco) package,
37+
produces PF candidates straight from rechit information, in this example via the [Object Condensation](https://arxiv.org/abs/2002.03605v3) method.
38+
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,
39+
and retrieving the regressed energy and position of clustered particle candidates.
40+
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.
41+
42+
**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.
43+
44+
The **sequence** of the producer module is as follows:
45+
* In the constructor of the producer, the Triton client is started.
46+
* 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.
47+
* 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.
48+
* 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.
49+
* The Triton client is automatically closed in the destructor of the producer
50+
51+

RecoHGCal/GraphReco/plugins/BuildFile.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<use name="RecoLocalCalo/HGCalRecAlgos" />
77
<use name="PhysicsTools/TensorFlow" />
88
<use name="SimDataFormats/CaloAnalysis" />
9+
<use name="DataFormats/Candidate"/>
10+
<use name="DataFormats/ParticleFlowCandidate"/>
11+
<use name="DataFormats/HGCalReco"/>
912
<use name="HGCSimTruth/HGCSimTruth" />
1013
<use name="root"/>
1114

0 commit comments

Comments
 (0)