-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to run TPC track interpolation as DPL workflow
- Loading branch information
Showing
11 changed files
with
664 additions
and
1 deletion.
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
28 changes: 28 additions & 0 deletions
28
Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/CMakeLists.txt
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,28 @@ | ||
# Copyright CERN and copyright holders of ALICE O2. This software is distributed | ||
# under the terms of the GNU General Public License v3 (GPL Version 3), copied | ||
# verbatim in the file "COPYING". | ||
# | ||
# See http://alice-o2.web.cern.ch/license for full licensing information. | ||
# | ||
# 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. | ||
|
||
#TODO Does the O2::GlobalTracking library need to be linked? | ||
o2_add_library(TPCInterpolationWorkflow | ||
SOURCES src/TPCInterpolationSpec.cxx | ||
src/TPCResidualWriterSpec.cxx | ||
src/TrackInterpolationReaderSpec.cxx | ||
src/TrackInterpolationWorkflow.cxx | ||
PUBLIC_LINK_LIBRARIES O2::GlobalTracking | ||
O2::ITSWorkflow | ||
O2::SpacePoints | ||
O2::GlobalTrackingWorkflow | ||
O2::TOFWorkflow | ||
O2::Framework | ||
) | ||
|
||
o2_add_executable(scdcalib-interpolation-workflow | ||
COMPONENT_NAME tpc | ||
SOURCES src/tpc-interpolation-workflow.cxx | ||
PUBLIC_LINK_LIBRARIES O2::TPCInterpolationWorkflow) |
49 changes: 49 additions & 0 deletions
49
...Workflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h
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,49 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// 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. | ||
|
||
#ifndef O2_TPC_INTERPOLATION_SPEC_H | ||
#define O2_TPC_INTERPOLATION_SPEC_H | ||
|
||
/// @file TPCInterpolationSpec.h | ||
|
||
#include "DataFormatsTPC/Constants.h" | ||
#include "SpacePoints/TrackInterpolation.h" | ||
#include "Framework/DataProcessorSpec.h" | ||
#include "Framework/Task.h" | ||
|
||
using namespace o2::framework; | ||
|
||
namespace o2 | ||
{ | ||
namespace tpc | ||
{ | ||
class TPCInterpolationDPL : public Task | ||
{ | ||
public: | ||
TPCInterpolationDPL(bool useMC, const std::vector<int>& tpcClusLanes) : mUseMC(useMC), mTPCClusLanes(tpcClusLanes) {} | ||
~TPCInterpolationDPL() override = default; | ||
void init(InitContext& ic) final; | ||
void run(ProcessingContext& pc) final; | ||
|
||
private: | ||
o2::tpc::TrackInterpolation mInterpolation; // track interpolation engine | ||
std::vector<int> mTPCClusLanes; | ||
std::array<std::vector<char>, o2::tpc::Constants::MAXSECTOR> mBufferedTPCClusters; | ||
|
||
bool mUseMC{false}; ///< MC flag | ||
}; | ||
|
||
/// create a processor spec | ||
framework::DataProcessorSpec getTPCInterpolationSpec(bool useMC, const std::vector<int>& tpcClusLanes); | ||
|
||
} // namespace tpc | ||
} // namespace o2 | ||
|
||
#endif |
53 changes: 53 additions & 0 deletions
53
...orkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCResidualWriterSpec.h
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,53 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// 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. | ||
|
||
#ifndef O2_TPC_RESIDUAL_WRITER_H | ||
#define O2_TPC_RESIDUAL_WRITER_H | ||
|
||
/// @file TPCResidualWriterSpec.h | ||
|
||
#include "TFile.h" | ||
#include "TTree.h" | ||
|
||
#include "Framework/DataProcessorSpec.h" | ||
#include "Framework/Task.h" | ||
#include <string> | ||
|
||
namespace o2 | ||
{ | ||
namespace tpc | ||
{ | ||
|
||
class ResidualWriterTPC : public o2::framework::Task | ||
{ | ||
public: | ||
ResidualWriterTPC(bool useMC = false) : mUseMC(useMC) {} | ||
~ResidualWriterTPC() override = default; | ||
void init(o2::framework::InitContext& ic) final; | ||
void run(o2::framework::ProcessingContext& pc) final; | ||
void endOfStream(o2::framework::EndOfStreamContext& ec) final; | ||
|
||
private: | ||
bool mUseMC = false; ///< MC flag | ||
std::string mOutFileName = "o2residuals_tpc.root"; ///< name of output file | ||
std::string mTreeName = "residualsTPC"; ///< name of tree containing output | ||
std::string mOutTracksBranchName = "tracks"; ///< name of branch containing output used tracks | ||
std::string mOutResidualsBranchName = "residuals"; ///< name of branch containing output used residuals | ||
std::unique_ptr<TFile> mFile = nullptr; | ||
std::unique_ptr<TTree> mTree = nullptr; | ||
}; | ||
|
||
/// create a processor spec | ||
framework::DataProcessorSpec getTPCResidualWriterSpec(bool useMC); | ||
|
||
} // namespace tpc | ||
} // namespace o2 | ||
|
||
#endif |
26 changes: 26 additions & 0 deletions
26
.../tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TrackInterpolationReaderSpec.h
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,26 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// 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. | ||
|
||
#ifndef O2_TPC_INTERPOLATION_READER_H | ||
#define O2_TPC_INTERPOLATION_READER_H | ||
|
||
/// @file TrackInterpolationReaderSpec.h | ||
|
||
namespace o2 | ||
{ | ||
namespace tpc | ||
{ | ||
|
||
// TODO add specification for reading TPC cluster residuals and reference tracks | ||
|
||
} // namespace tpc | ||
} // namespace o2 | ||
|
||
#endif |
28 changes: 28 additions & 0 deletions
28
...ow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TrackInterpolationWorkflow.h
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,28 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// 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. | ||
|
||
#ifndef O2_TPC_INTERPOLATION_WORKFLOW_H | ||
#define O2_TPC_INTERPOLATION_WORKFLOW_H | ||
|
||
/// @file TrackInterpolationWorkflow.h | ||
|
||
#include "Framework/WorkflowSpec.h" | ||
|
||
namespace o2 | ||
{ | ||
namespace tpc | ||
{ | ||
|
||
framework::WorkflowSpec getTPCInterpolationWorkflow(bool useMC); | ||
|
||
} // namespace tpc | ||
} // namespace o2 | ||
|
||
#endif |
Oops, something went wrong.