Skip to content

Commit bea0eac

Browse files
aphecetchedavidrohr
authored andcommitted
✨ [MCH] Add cluster transformation workflow.
Test usage : o2-mch-clusters-sampler-workflow --nEventsPerTF 1000 -b --infile clusters.O2 | o2-mch-clusters-transformer-workflow --geometry Detectors/MUON/MCH/Geometry/Test/ideal-geometry-o2.json -b | o2-mch-clusters-sink-workflow -b --txt --outfile global-clusters.txt --no-digits --global Also, the clusters- sampler and sink workflow have been squeezed into one source file per workflow, instead of 3 per workflow previously, to simplify a bit the Workflow directory that is becoming a bit crowded.
1 parent a8719b6 commit bea0eac

9 files changed

Lines changed: 507 additions & 457 deletions

Detectors/MUON/MCH/Workflow/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ o2_add_executable(
7272

7373
o2_add_executable(
7474
clusters-sink-workflow
75-
SOURCES src/ClusterSinkSpec.cxx src/clusters-sink-workflow.cxx
75+
SOURCES src/clusters-sink-workflow.cxx
7676
COMPONENT_NAME mch
7777
PUBLIC_LINK_LIBRARIES O2::Framework O2::DataFormatsMCH O2::MCHBase O2::MCHMappingImpl3)
7878

7979
o2_add_executable(
8080
clusters-sampler-workflow
81-
SOURCES src/ClusterSamplerSpec.cxx src/clusters-sampler-workflow.cxx
81+
SOURCES src/clusters-sampler-workflow.cxx
8282
COMPONENT_NAME mch
8383
PUBLIC_LINK_LIBRARIES O2::Framework O2::DataFormatsMCH O2::MCHBase)
8484

@@ -123,3 +123,10 @@ o2_add_executable(
123123
SOURCES src/TrackFitterSpec.cxx src/tracks-to-tracks-workflow.cxx
124124
COMPONENT_NAME mch
125125
PUBLIC_LINK_LIBRARIES O2::Framework O2::DataFormatsMCH O2::MCHTracking)
126+
127+
o2_add_executable(
128+
clusters-transformer-workflow
129+
SOURCES src/clusters-transformer-workflow.cxx
130+
COMPONENT_NAME mch
131+
PUBLIC_LINK_LIBRARIES O2::MCHWorkflow O2::MCHGeometryTransformer)
132+

Detectors/MUON/MCH/Workflow/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Raw to digits](#raw-to-digits)
1010
* [Preclustering](#preclustering)
1111
* [Clustering](#clustering)
12+
* [Local to global cluster transformation](#local-to-global-cluster-transformation)
1213
* [Tracking](#tracking)
1314
* [Original track finder](#original-track-finder)
1415
* [New track finder](#new-track-finder)
@@ -76,6 +77,23 @@ o2-mch-preclusters-to-clusters-original-workflow
7677

7778
Take as input the list of all preclusters ([PreCluster](../Base/include/MCHBase/PreCluster.h)) in the current time frame, the list of all associated digits ([Digit](../Base/include/MCHBase/Digit.h)) and the list of ROF records ([ROFRecord](../../../../DataFormats/Detectors/MUON/MCH/include/DataFormatsMCH/ROFRecord.h)) pointing to the preclusters associated to each interaction, with the data description "PRECLUSTERS", "PRECLUSTERDIGITS" and "PRECLUSTERROFS", respectively. Send the list of all clusters ([ClusterStruct](../Base/include/MCHBase/ClusterBlock.h)) in the time frame, the list of all associated digits ([Digit](../Base/include/MCHBase/Digit.h)) and the list of ROF records ([ROFRecord](../../../../DataFormats/Detectors/MUON/MCH/include/DataFormatsMCH/ROFRecord.h)) pointing to the clusters associated to each interaction in three separate messages with the data description "CLUSTERS", "CLUSTERDIGITS" and "CLUSTERROFS", respectively.
7879

80+
## Local to global cluster transformation
81+
82+
The `o2-mch-clusters-transformer-workflow` takes as as input the list of all clusters ([ClusterStruct](../Base/include/MCHBase/ClusterBlock.h)), in local reference frame, in the current time frame, with the data description "CLUSTERS".
83+
84+
It sends the list of the same clusters, but converted in global reference frame, with the data description "GLOBALCLUSTERS".
85+
86+
To test it one can use e.g. a sampler-transformer-sink pipeline as such :
87+
88+
```
89+
o2-mch-clusters-sampler-workflow
90+
-b --nEventsPerTF 1000 --infile someclusters.data |
91+
o2-mch-clusters-transformer-workflow
92+
-b --geometry Detectors/MUON/MCH/Geometry/Test/ideal-geometry-o2.json |
93+
o2-mch-clusters-sink-workflow
94+
-b --txt --outfile global-clusters.txt --no-digits --global
95+
```
96+
7997
## Tracking
8098

8199
### Original track finder
@@ -224,15 +242,15 @@ Option `--useRun2DigitUID` allows to convert the run3 pad ID stored in the digit
224242
### Cluster sink
225243

226244
```shell
227-
o2-mch-clusters-sink-workflow --outfile "clusters.out"
245+
o2-mch-clusters-sink-workflow --outfile "clusters.out" [--txt] [--no-digits] [--global]
228246
```
229247

230-
Take as input the list of all clusters ([ClusterStruct](../Base/include/MCHBase/ClusterBlock.h)) in the current time frame, the list of all associated digits ([Digit](../Base/include/MCHBase/Digit.h)) and the list of ROF records ([ROFRecord](../../../../DataFormats/Detectors/MUON/MCH/include/DataFormatsMCH/ROFRecord.h)) pointing to the clusters associated to each interaction, with the data description "CLUSTERS", "CLUSTERDIGITS" and "CLUSTERROFS", respectively, and write them event-by-event in the binary file `clusters.out` with the following format for each event:
248+
Take as input the list of all clusters ([ClusterStruct](../Base/include/MCHBase/ClusterBlock.h)) in the current time frame, and, optionnally, the list of all associated digits ([Digit](../Base/include/MCHBase/Digit.h)) and the list of ROF records ([ROFRecord](../../../../DataFormats/Detectors/MUON/MCH/include/DataFormatsMCH/ROFRecord.h)) pointing to the clusters associated to each interaction, with the data description "CLUSTERS" (or "GLOBALCLUSTERS" if `--global` option is used), "CLUSTERDIGITS" (unless `--no-digits` option is used) and "CLUSTERROFS", respectively, and write them event-by-event in the binary file `clusters.out` with the following format for each event:
231249

232250
* number of clusters (int)
233-
* number of associated digits (int)
251+
* number of associated digits (int) (unless option `--no-digits` is used)
234252
* list of clusters ([ClusterStruct](../Base/include/MCHBase/ClusterBlock.h))
235-
* list of associated digits ([Digit](../Base/include/MCHBase/Digit.h))
253+
* list of associated digits ([Digit](../Base/include/MCHBase/Digit.h))(unless option `--no-digits` is used)
236254

237255
Option `--txt` allows to write the clusters in the output file in text format.
238256

Detectors/MUON/MCH/Workflow/src/ClusterSamplerSpec.cxx

Lines changed: 0 additions & 165 deletions
This file was deleted.

Detectors/MUON/MCH/Workflow/src/ClusterSamplerSpec.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)