-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIT: add RecPoint reader and writer workflows for FV0 and FDD
The main purpose of the commit: - Adding workflows for reading RecPoints for FV0 and FDD, these are needed for MC aQC Secondary purposes that arose during development: - ROOT macro for comparing two RecPoint files - Workflows for writing RecPoints added for FT0, FV0 and FDD (i.e. simply standalone RecPoint writers, not related to reconstrucion) - The two items above were needed to verify the new RecPoint reader workflows, namely by: reconstructing CTFs -> writing RecPoints to file -> Reading RecPoints from file -> Writing RecPoints to new file -> Comparing the two files - Minor cosmetics (e.g. reordering of includes) and utility functions (print and == operator functions)
- Loading branch information
1 parent
64c47f6
commit 768f585
Showing
20 changed files
with
494 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2019-2024 CERN and copyright holders of ALICE O2. | ||
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
// All rights not expressly granted are reserved. | ||
// | ||
// This software is distributed under the terms of the GNU General Public | ||
// License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file RecPoint.cxx | ||
/// \brief Implementation of the FDD RecPoint class | ||
/// \author Andreas Molander [email protected] | ||
|
||
#include "DataFormatsFDD/RecPoint.h" | ||
#include "Framework/Logger.h" | ||
|
||
using namespace o2::fdd; | ||
|
||
void ChannelDataFloat::print() const | ||
{ | ||
LOG(info) << "ChannelDataFloat data:"; | ||
LOG(info) << "Channel ID: " << mPMNumber << ", Time (ps): " << mTime << ", Charge (ADC): " << mChargeADC << ", QTC chain: " << adcId; | ||
} | ||
|
||
void RecPoint::print() const | ||
{ | ||
LOG(info) << "RecPoint data:"; | ||
LOG(info) << "Collision times: A: " << getCollisionTimeA() << ", C: " << getCollisionTimeC(); | ||
LOG(info) << "Ref first: " << mRef.getFirstEntry() << ", Ref entries: " << mRef.getEntries(); | ||
LOG(info) << "Triggers: " << mTriggers.print(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Detectors/FIT/FDD/workflow/src/recpoints-reader-workflow.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2019-2024 CERN and copyright holders of ALICE O2. | ||
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
// All rights not expressly granted are reserved. | ||
// | ||
// This software is distributed under the terms of the GNU General Public | ||
// License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file recpoints-reader-workflow.cxx | ||
/// \brief FDD RecPoints reader workflow | ||
/// | ||
/// \author Andreas Molander [email protected] | ||
|
||
#include "FDDWorkflow/RecPointReaderSpec.h" | ||
|
||
#include "CommonUtils/ConfigurableParam.h" | ||
#include "DetectorsRaw/HBFUtilsInitializer.h" | ||
#include "Framework/CallbacksPolicy.h" | ||
#include "Framework/ConfigParamSpec.h" | ||
#include "Framework/Variant.h" | ||
|
||
#include <vector> | ||
|
||
using namespace o2::framework; | ||
|
||
void customize(std::vector<CallbacksPolicy>& policies) | ||
{ | ||
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies); | ||
} | ||
|
||
// we need to add workflow options before including Framework/runDataProcessing | ||
void customize(std::vector<ConfigParamSpec>& workflowOptions) | ||
{ | ||
std::vector<ConfigParamSpec> options{ | ||
{"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}}, | ||
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}}; | ||
o2::raw::HBFUtilsInitializer::addConfigOption(options); | ||
std::swap(workflowOptions, options); | ||
} | ||
|
||
#include "Framework/runDataProcessing.h" | ||
|
||
WorkflowSpec defineDataProcessing(const ConfigContext& ctx) | ||
{ | ||
o2::conf::ConfigurableParam::updateFromString(ctx.options().get<std::string>("configKeyValues")); | ||
bool disableMC = ctx.options().get<bool>("disable-mc"); | ||
WorkflowSpec specs; | ||
DataProcessorSpec producer = o2::fdd::getFDDRecPointReaderSpec(!disableMC); | ||
specs.push_back(producer); | ||
|
||
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit | ||
o2::raw::HBFUtilsInitializer hbfIni(ctx, specs); | ||
return specs; | ||
} |
47 changes: 47 additions & 0 deletions
47
Detectors/FIT/FDD/workflow/src/recpoints-writer-workflow.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2019-2024 CERN and copyright holders of ALICE O2. | ||
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
// All rights not expressly granted are reserved. | ||
// | ||
// This software is distributed under the terms of the GNU General Public | ||
// License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file recpoints-writer-workflow.cxx | ||
/// \brief FDD RecPoints writer workflow | ||
/// | ||
/// \author Andreas Molander [email protected] | ||
|
||
#include "FDDWorkflow/RecPointWriterSpec.h" | ||
|
||
#include "CommonUtils/ConfigurableParam.h" | ||
#include "Framework/ConfigParamSpec.h" | ||
#include "Framework/Variant.h" | ||
|
||
#include <vector> | ||
|
||
using namespace o2::framework; | ||
|
||
// we need to add workflow options before including Framework/runDataProcessing | ||
void customize(std::vector<ConfigParamSpec>& workflowOptions) | ||
{ | ||
std::vector<ConfigParamSpec> options{ | ||
{"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}}, | ||
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}}; | ||
workflowOptions.insert(workflowOptions.end(), options.begin(), options.end()); | ||
} | ||
|
||
#include "Framework/runDataProcessing.h" | ||
|
||
WorkflowSpec defineDataProcessing(const ConfigContext& ctx) | ||
{ | ||
o2::conf::ConfigurableParam::updateFromString(ctx.options().get<std::string>("configKeyValues")); | ||
bool disableMC = ctx.options().get<bool>("disable-mc"); | ||
|
||
WorkflowSpec specs; | ||
DataProcessorSpec producer = o2::fdd::getFDDRecPointWriterSpec(!disableMC); | ||
specs.push_back(producer); | ||
return specs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.