CA Configuration
You can configure the running of Component Accumulator based code using "blocks".
Each block is a Python class that holds configuration keys as constructor arguments, and implements a to_ca()
function that returns a ComponentAccumulator
object.
Blocks are defined in the FTagDumper/python/blocks/
directory, and inherit from the BaseBlock
class.
Blocks are configured inside an optional "ca_blocks": []
list in the top-level JSON configuration.
Each block is a dict with a "block"
key that specifies the block name, and any other keys that are passed to the block constructor.
This page contains automatically generated documentation for the different CA blocks that can be configured with the dumpster.
BTagJetLinker
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Matches a jet collection to a b-tagging collection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jet_collection |
str
|
The name of the jet collection to match. If not provided, it will be taken from the dumper config. |
None
|
old_link |
str
|
The name of the old link to match. If not provided, it will be set to |
None
|
new_link |
str
|
The name of the new link to match. If not provided, it will be set to |
None
|
Source code in FTagDumper/python/blocks/BTagJetLinker.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
EventSelector
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Performs event cleaning, pileup reweighting, object calibration,
overlap removal, and a subsequent event selection.
This is based on the TopCPToolkit, see makeRecoConfiguration
in
TtbarCPalgoConfigBlocksAnalysis.py
Note that this block can and should drop events from being being processed
in the dumper algorithm, but processing can only be stopped when using
setMainAlgSeqToSeqAND
from
dumper.py
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selections |
dict[str, list[str]]
|
A list of selection cuts to apply, as documented in the TopCPToolkit. These selections should only use basic cuts that rely on electron, muon, jet or MET information. For example, we could add the following to our json config to do an e+mu ttbar selection: "selections": [ "SUM_EL_N_MU_N 27000 >= 1", "EL_N 27000 == 1", "MU_N 27000 == 1", "JET_N 20000 >= 1", "JET_N 20000 >= 2", "EL_N 28000 == 1", "MU_N 28000 == 1", "JET_N 20000 == 2" ] |
required |
Source code in FTagDumper/python/blocks/EventSelector.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
|
ExampleDecorator
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Example starting point to add info to objects
Parameters:
Name | Type | Description | Default |
---|---|---|---|
decorator_value |
float
|
The value to decorate to a jet |
None
|
target_collection |
str
|
The name of the target jet collection to match to. If not provided, it will be taken from the dumper config. |
None
|
decorator_name |
str
|
Name of decoration to add |
'exampleDecorator'
|
Source code in FTagDumper/python/blocks/ExampleDecorator.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
FixedConeAssociation
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Run a fixed cone track association. The fixed cone association is used for the training of the nntc model.
To run the nntc, you can use the following configuration: EMPFlow_fixedcone.json. The size of the cone is parametrized by the fixedConeRadius parameter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
radius |
float
|
The radius of the fixed cone. |
0.5
|
Source code in FTagDumper/python/blocks/FixedConeAssociation.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
FlowSelector
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Matches a jet collection to a b-tagging collection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jet_collection |
str
|
The name of the jet collection to match. If not provided, it will be taken from the dumper config. |
None
|
Source code in FTagDumper/python/blocks/FlowSelector.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
FoldHashDecorator
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Decorate jets with a hash for kfold training and evaluation.
See FoldDecoratorAlg.cxx and FoldDecoratorConfig.py
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jet_collection |
str
|
Name of the jet collection to decorate. Use the dumper's jet_collection if not provided. |
None
|
prefix |
str
|
Prefix to add to the hash. |
''
|
Source code in FTagDumper/python/blocks/FoldHashDecorator.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
GNNAuxTaskMapper
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Schedule GNNAuxTaskDecoratorAlg. This alg reads aux task decos from the btagging object and copies them over to the tracks. For technical reasons (AFT-686) we can't decorate the track directly.
Note that track_aux_tasks must be provided and the destination variable name must be different from the source variable name, which is used to decorate the btagging object, otherwise the scheduler gets confused about the types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
btagging_container |
str | None
|
BTagging container name to read the aux-task outputs from. |
'BTagging_AntiKt4EMPFlow'
|
track_container |
str
|
Track container name to decorate with the aux-task outputs. |
'InDetTrackParticles'
|
track_links |
str
|
TrackLinks name associated with the BTagging object. |
'GN2v01_TrackLinks'
|
track_aux_tasks |
dict(str, str)
|
Map between aux-task decorations for jets and decorations for tracks. |
required |
Source code in FTagDumper/python/blocks/GNNAuxTaskMapper.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
GeneratorWeights
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Add truth weights to EventInfo
Source code in FTagDumper/python/blocks/GeneratorWeights.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
JetMatcher
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Matches jets from a single source collection to jets in a target collection. For more details, see JetMatcherAlg.cxx
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_jets |
list[str]
|
The name of the source collections to match. |
required |
source_name |
str
|
The name of a singular jet in the source collection. Used for generating the variables
|
None
|
target_collection |
str
|
The name of the target jet collection to match to. If not provided, it will be taken from the dumper config. |
None
|
floats_to_copy |
list[str]
|
List of float variables to copy from the source jets to the target jets |
None
|
ints_to_copy |
list[str]
|
List of int variables to copy from the source jets to the target jets |
None
|
pt_priority_with_delta_r |
float
|
The priority of the pt variable when matching jets based on deltaR. Disabled by default. |
-1
|
particle_link_name |
str
|
Name of the vector of links to matched particles. |
None
|
Source code in FTagDumper/python/blocks/JetMatcher.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
JetReco
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Reconstructs a jet collection
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Duplicate_EMTopojets |
(bool,)
|
The jet collection to be reconstructed already exists in the AOD but links are broken. Need to duplicate to reconstruct jets with a new name |
''
|
Source code in FTagDumper/python/blocks/JetReco.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
MultifoldTagger
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Run a multifold tagger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nn_paths |
list[str]
|
List of paths to the neural network files. |
required |
target |
str
|
Whether to tag the BTagging object or the Jet. |
'BTagging'
|
jet_collection |
str | None
|
Name of the jet collection to decorate. If None, uses the jet collection from the dumper configuration. |
None
|
remap |
dict
|
Remap input and output variable names. |
None
|
fold_hash_name |
str
|
Name of the fold hash variable. |
'jetFoldHash'
|
constituents |
str
|
Name of the constituent container. |
'InDetTrackParticles'
|
Source code in FTagDumper/python/blocks/MultifoldTagger.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
MuonCorrDecorator
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Do Muon Correction with BJetCalibrationTool .
Source code in FTagDumper/python/blocks/MuonCorrDecorator.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
ShrinkingConeAssociation
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Associate tracks to jets using the shrinking cone algorithm.
More info: https://ftag.docs.cern.ch/algorithms/taggers/inputs/
Source code in FTagDumper/python/blocks/ShrinkingConeAssociation.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
SoftElectronsDecorator
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Do electrons decoration and jet association.
See SoftElectronDecoratorAlg.h See SoftElectronTruthDecoratorAlg.h See FTagGhostElectronAssociationAlg.h
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jet_collection |
str
|
The name of the jet collection to which the electrons are associated. If not provided, it will be taken from the dumper config. |
None
|
electrons_collection |
str
|
The name of the electron collection to decorate. Default is "GhostFTagElectrons". |
'GhostFTagElectrons'
|
decorate_vars |
bool
|
Whether to decorate the variables. Default is False. |
False
|
decorate_truth_vars |
bool
|
Whether to decorate the truth variables. Default is False. |
False
|
link_electrons |
bool
|
Whether to link the electrons to the jet collection. Default is False. |
False
|
Source code in FTagDumper/python/blocks/SoftElectronsDecorator.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
TrackFlowOverlapRemoval
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Matches a jet collection to a b-tagging collection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jet_collection |
str
|
The name of the jet collection to match. If not provided, it will be taken from the dumper config. |
None
|
Source code in FTagDumper/python/blocks/TrackFlowOverlapRemoval.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Trackless
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Source code in FTagDumper/python/blocks/Trackless.py
9 10 11 12 13 14 15 16 17 18 |
|
TruthLabelling
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Re-run the FTAG truth labelling.
Detailed FTAG truth variables, such as ftagTruthOriginLabel
and ftagTruthVertexIndex
are normally produced when running derivations. With this block you can reproduce these
labels as part of your dumping job, for example if the labelling code has been updated
and you don't want to run expensive derivations.
For more info see TruthParticleDecoratorAlg
and TrackTruthDecoratorAlg
in Athena,
and this page in the
FTAG docs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
suffix |
str
|
Suffix to append to the truth labelling variables. |
required |
Examples:
{
"ca_blocks": [{"block": "TruthLabelling", "suffix": "tdd"}]
}
Remember to add the new ftagTruthOriginLabelTDD
etc variables to your output variables,
or alternatively if you want to avoid the presence of new variable names in your h5 you
can remap variable names as follows:
"tracks": [
{
...
"edm_names": {
"ftagTruthOriginLabel": "ftagTruthOriginLabelTDD",
"ftagTruthVertexIndex": "ftagTruthVertexIndexTDD"
}
}
]
Source code in FTagDumper/python/blocks/TruthLabelling.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
TruthTauMatcher
dataclass
#
Bases: FTagDumper.python.blocks.BaseBlock.BaseBlock
Matches truth taus to reco. jets and copies variables from truth taus to the matched reco. jets. For more details, see TruthTauMatcher.cxx
Parameters:
Name | Type | Description | Default |
---|---|---|---|
truth_tau_collection |
str
|
The name of the truth tau collection to use. By default "TruthTaus" |
'TruthTaus'
|
reco_jet_collection |
str
|
The name of the reco jet collection to which the truth taus are matched. By default the "jet_collection" from the config file used is taken. |
None
|
floats_to_copy |
list[str]
|
List of float variables to copy from the truth taus to the matched reco. jets. By default None |
None
|
ints_to_copy |
list[str]
|
List of integer variables to copy from the truth taus to the matched reco. jets. By default None |
None
|
uints_to_copy |
list[str]
|
List of unsigned integer variables to copy from the truth taus to the matched reco. jets. By default None |
None
|
chars_to_copy |
list[str]
|
List of character variables to copy from the truth taus to the matched reco. jets. By default None |
None
|
particle_link_name |
str
|
Name of the vector of links to matched particles. |
None
|
Source code in FTagDumper/python/blocks/TruthTauMatcher.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|