|
| 1 | +<!-- |
| 2 | +Copyright (c) 2020-2024 Key4hep-Project. |
| 3 | +
|
| 4 | +This file is part of Key4hep. |
| 5 | +See https://key4hep.github.io/key4hep-doc/ for further info. |
| 6 | +
|
| 7 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +you may not use this file except in compliance with the License. |
| 9 | +You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | +Unless required by applicable law or agreed to in writing, software |
| 14 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +See the License for the specific language governing permissions and |
| 17 | +limitations under the License. |
| 18 | +--> |
| 19 | +# BIBUtils |
| 20 | + |
| 21 | +Gaudi-native ports of the beam-induced-background (BIB) cleaning processors used |
| 22 | +in the Muon Collider reconstruction. They were originally Marlin processors: |
| 23 | + |
| 24 | +| Gaudi algorithm | Original Marlin processor | Original package | |
| 25 | +|-------------------|---------------------------|------------------| |
| 26 | +| `FilterConeHits` | `FilterConeHits` | [MarlinTrkProcessors](https://github.com/MuonColliderSoft/MarlinTrkProcessors) | |
| 27 | +| `CaloConer` | `CaloConer` | [MyBIBUtils](https://github.com/madbaron/MyBIBUtils) | |
| 28 | +| `CaloHitSelector` | `CaloHitSelector` | [MyBIBUtils](https://github.com/madbaron/MyBIBUtils) | |
| 29 | + |
| 30 | +All three are functional `k4FWCore::MultiTransformer`s. Selected hits are written |
| 31 | +to **subset** collections that reference the original hits, accompanied by a |
| 32 | +freshly built reco-to-sim link collection. The simulated hit of a given |
| 33 | +reconstructed hit is resolved through the input link collection rather than by |
| 34 | +relying on positional alignment between the hit and relation collections. |
| 35 | + |
| 36 | +## FilterConeHits |
| 37 | + |
| 38 | +Keeps the tracker hits that lie inside a cone around the trajectory of a |
| 39 | +generator-level MC particle. For each selected MC particle a helix is built from |
| 40 | +its production vertex, momentum and charge in the detector field (taken from the |
| 41 | +`GeoSvc`). A hit is kept when its angular distance to the helix is below |
| 42 | +`DeltaRCut` and/or its 3D distance to the helix is below `Dist3DCut`. |
| 43 | + |
| 44 | +The helix math lives in the self-contained, header-only `TrackHelix` (see |
| 45 | +`include/TrackHelix.h`); it reproduces the point-to-helix distance and |
| 46 | +cylinder-crossing operations of MarlinUtil's `HelixClass` so the package carries |
| 47 | +no dependency on MarlinUtil or any other Marlin-era package. |
| 48 | + |
| 49 | +Each instance handles a single tracker subdetector — configure one instance per |
| 50 | +collection (vertex/inner/outer × barrel/endcap), as in the original steering. |
| 51 | + |
| 52 | +| Property | Default | Description | |
| 53 | +|---|---|---| |
| 54 | +| `MCParticleCollection` | `MCParticle` | input MC particles | |
| 55 | +| `TrackerHitInputCollections` | `VBTrackerHits` | input reco tracker hits | |
| 56 | +| `TrackerHitInputRelations` | `VBTrackerHitsRelations` | input reco→sim links | |
| 57 | +| `TrackerHitOutputCollections` | `VBTrackerHitsConed` | output reco hits (subset) | |
| 58 | +| `TrackerSimHitOutputCollections` | `VertexBarrelCollectionConed` | output sim hits (subset) | |
| 59 | +| `TrackerHitOutputRelations` | `VBTrackerHitsRelationsConed` | output reco→sim links | |
| 60 | +| `DeltaRCut` | `-1` | max angular distance to the helix [rad] (disabled if ≤ 0) | |
| 61 | +| `Dist3DCut` | `-1` | max 3D distance to the helix [mm] (disabled if ≤ 0) | |
| 62 | +| `ConeAroundStatus` | `[1]` | MC generator statuses to cone around | |
| 63 | +| `FillHistograms` | `false` | fill diagnostic histograms | |
| 64 | +| `TrackerOuterRadius` | `1500` | tracker barrel outer radius used to clip the helix [mm] | |
| 65 | + |
| 66 | +## CaloConer |
| 67 | + |
| 68 | +Keeps the calorimeter hits within a fixed angular cone (`ConeWidth`, in radians) |
| 69 | +around the direction of any generator-level (`generatorStatus == 1`) MC particle. |
| 70 | + |
| 71 | +| Property | Default | Description | |
| 72 | +|---|---|---| |
| 73 | +| `MCParticleCollectionName` | `MCParticle` | input MC particles | |
| 74 | +| `CaloHitCollectionName` | `EcalBarrelCollectionRec` | input reco calo hits | |
| 75 | +| `CaloRelationCollectionName` | `EcalBarrelRelationsSimRec` | input reco→sim links | |
| 76 | +| `GoodHitCollection` | `EcalBarrelCollectionConed` | output reco hits (subset) | |
| 77 | +| `GoodRelationCollection` | `EcalBarrelRelationsSimConed` | output reco→sim links | |
| 78 | +| `ConeWidth` | `0.2` | half-opening angle of the cone [rad] | |
| 79 | + |
| 80 | +## CaloHitSelector |
| 81 | + |
| 82 | +Applies a per-cell energy threshold and a time-window selection to calorimeter |
| 83 | +hits. The threshold is read as a function of polar angle and layer from two ROOT |
| 84 | +histograms (`th_2dmode_sym`, `stddev_sym`) in `ThresholdsFilePath`: |
| 85 | +`threshold = mode + Nsigma * stddev`. A constant `FlatThreshold` (GeV) can be |
| 86 | +used instead. Surviving hits must fall inside `[TimeWindowMin, TimeWindowMax]` |
| 87 | +after a time-of-flight correction. The `GeoSvc` is used to decode the layer from |
| 88 | +the cellID. |
| 89 | + |
| 90 | +| Property | Default | Description | |
| 91 | +|---|---|---| |
| 92 | +| `CaloHitCollectionName` | `EcalBarrelCollectionRec` | input reco calo hits | |
| 93 | +| `CaloRelationCollectionName` | `EcalBarrelRelationsSimRec` | input reco→sim links | |
| 94 | +| `GoodHitCollection` | `EcalBarrelCollectionSel` | output reco hits (subset) | |
| 95 | +| `GoodRelationCollection` | `EcalBarrelRelationsSimSel` | output reco→sim links | |
| 96 | +| `ThresholdsFilePath` | `""` | ROOT file with the threshold maps | |
| 97 | +| `Nsigma` | `3` | number of BIB-energy sigmas above the modal threshold | |
| 98 | +| `FlatThreshold` | `0` | constant threshold [GeV]; overrides the maps if > 0 | |
| 99 | +| `TimeWindowMin` / `TimeWindowMax` | `-0.5` / `10` | TOF-corrected time window [ns] | |
| 100 | +| `DoBIBsubtraction` | `false` | subtract the modal BIB energy from each cell | |
| 101 | + |
| 102 | +See `options/` for runnable example steering files. |
0 commit comments