Skip to content

Commit 19831fc

Browse files
committed
Uniform naming of EMCALCluster*/EMCALCell* brunches (avoid mix of EMC.. and EMCAL..)
1 parent 287bc53 commit 19831fc

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

Detectors/EMCAL/reconstruction/src/ClusterizerTask.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ void ClusterizerTask<InputType>::process(const std::string inputFileName, const
8383

8484
// Create output tree
8585
std::unique_ptr<TTree> outTree = std::make_unique<TTree>("o2sim", "EMCAL clusters");
86-
outTree->Branch("EMCCluster", &mClustersArray);
87-
outTree->Branch("EMCClusterInputIndex", &mClustersInputIndices);
88-
outTree->Branch("EMCClusterTRGR", &mClusterTriggerRecordsClusters);
86+
outTree->Branch("EMCALCluster", &mClustersArray);
87+
outTree->Branch("EMCALClusterInputIndex", &mClustersInputIndices);
88+
outTree->Branch("EMCALClusterTRGR", &mClusterTriggerRecordsClusters);
8989
outTree->Branch("EMCIndicesTRGR", &mClusterTriggerRecordsIndices);
9090

9191
mClustersArray->clear();

Detectors/EMCAL/workflow/src/RecoWorkflow.cxx

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,34 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC,
235235
"digitmc-branch-name"})());
236236
}
237237

238-
if (isEnabled(OutputType::Cells) && inputType == InputType::Digits) {
239-
using DigitOutputType = std::vector<o2::emcal::Cell>;
240-
using TriggerOutputType = std::vector<o2::emcal::TriggerRecord>;
241-
using MCLabelContainer = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;
242-
specs.push_back(makeWriterSpec("emcal-cells-writer",
243-
inputType == InputType::Cells ? "emc-filtered-cells.root" : "emccells.root",
244-
"o2sim",
245-
BranchDefinition<DigitOutputType>{o2::framework::InputSpec{"data", "EMC", "CELLS", 0},
246-
"EMCCell",
247-
"cell-branch-name"},
248-
BranchDefinition<TriggerOutputType>{o2::framework::InputSpec{"trigger", "EMC", "CELLSTRGR", 0},
249-
"EMCACellTRGR",
250-
"celltrigger-branch-name"},
251-
BranchDefinition<MCLabelContainer>{o2::framework::InputSpec{"mc", "EMC", "CELLSMCTR", 0},
252-
"EMCCellMCTruth",
253-
"cellmc-branch-name"})());
238+
if (isEnabled(OutputType::Cells) && !disableRootOutput) {
239+
if (inputType == InputType::Digits) {
240+
using DigitOutputType = std::vector<o2::emcal::Cell>;
241+
using TriggerOutputType = std::vector<o2::emcal::TriggerRecord>;
242+
using MCLabelContainer = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;
243+
specs.push_back(makeWriterSpec("emcal-cells-writer", "emccells.root", "o2sim",
244+
BranchDefinition<DigitOutputType>{o2::framework::InputSpec{"data", "EMC", "CELLS", 0},
245+
"EMCALCell",
246+
"cell-branch-name"},
247+
BranchDefinition<TriggerOutputType>{o2::framework::InputSpec{"trigger", "EMC", "CELLSTRGR", 0},
248+
"EMCALCellTRGR",
249+
"celltrigger-branch-name"},
250+
BranchDefinition<MCLabelContainer>{o2::framework::InputSpec{"mc", "EMC", "CELLSMCTR", 0},
251+
"EMCALCellMCTruth",
252+
"cellmc-branch-name"})());
253+
} else {
254+
using CellsDataType = std::vector<o2::emcal::Cell>;
255+
using TriggerRecordDataType = std::vector<o2::emcal::TriggerRecord>;
256+
specs.push_back(makeWriterSpec_CellsTR("emcal-cells-writer",
257+
"emccells.root",
258+
"o2sim",
259+
BranchDefinition<CellsDataType>{o2::framework::InputSpec{"data", "EMC", "CELLS", 0},
260+
"EMCALCell",
261+
"cell-branch-name"},
262+
BranchDefinition<TriggerRecordDataType>{o2::framework::InputSpec{"trigger", "EMC", "CELLSTRGR", 0},
263+
"EMCALCellTRGR",
264+
"celltrigger-branch-name"})());
265+
}
254266
}
255267

256268
if (isEnabled(OutputType::Clusters)) {

0 commit comments

Comments
 (0)