Skip to content

Commit 31f3651

Browse files
committed
Update
1 parent 044cbd9 commit 31f3651

4 files changed

Lines changed: 113 additions & 1 deletion

File tree

Steer/DigitizerWorkflow/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ o2_add_executable(digitizer-workflow
2929
src/TOFDigitizerSpec.cxx
3030
$<$<BOOL:${ENABLE_UPGRADES}>:src/ITS3DigitizerSpec.cxx>
3131
$<$<BOOL:${ENABLE_UPGRADES}>:src/TRKDigitizerSpec.cxx>
32+
$<$<BOOL:${ENABLE_UPGRADES}>:src/IOTOFDigitizerSpec.cxx>
3233
PUBLIC_LINK_LIBRARIES O2::Framework
3334
O2::Steer
3435
O2::CommonConstants
@@ -69,7 +70,10 @@ o2_add_executable(digitizer-workflow
6970
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Simulation>
7071
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Workflow>
7172
$<$<BOOL:${ENABLE_UPGRADES}>:O2::TRKSimulation>
72-
$<$<BOOL:${ENABLE_UPGRADES}>:O2::TRKWorkflow>)
73+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::TRKWorkflow>
74+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::IOTOFSimulation>
75+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::IOTOFWorkflow>
76+
)
7377

7478

7579
o2_add_executable(mctruth-testworkflow
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#include "IOTOFDigitizerSpec.h"
13+
#include "Framework/ControlService.h"
14+
#include "Framework/ConfigParamRegistry.h"
15+
#include "Framework/CCDBParamSpec.h"
16+
#include "Framework/DataProcessorSpec.h"
17+
#include "Framework/DataRefUtils.h"
18+
#include "Framework/Lifetime.h"
19+
#include "Framework/Task.h"
20+
#include "Steer/HitProcessingManager.h"
21+
#include "DataFormatsITSMFT/Digit.h"
22+
#include "SimulationDataFormat/ConstMCTruthContainer.h"
23+
#include "DetectorsBase/BaseDPLDigitizer.h"
24+
#include "DetectorsRaw/HBFUtils.h"
25+
#include "DetectorsCommonDataFormats/DetID.h"
26+
#include "DetectorsCommonDataFormats/SimTraits.h"
27+
#include "DataFormatsParameters/GRPObject.h"
28+
#include "DataFormatsITSMFT/ROFRecord.h"
29+
#include "IOTOFSimulation/Digitizer.h"
30+
31+
#include <TChain.h>
32+
#include <TStopwatch.h>
33+
34+
#include <algorithm>
35+
#include <memory>
36+
#include <string>
37+
38+
namespace o2::iotof
39+
{
40+
41+
class IOTOFDPLDigitizerTask : o2::base::BaseDPLDigitizer
42+
{
43+
public:
44+
using BaseDPLDigitizer::init;
45+
46+
IOTOFDPLDigitizerTask(bool mctruth = true) : BaseDPLDigitizer(o2::base::InitServices::FIELD | o2::base::InitServices::GEOM),
47+
mWithMCTruth(mctruth) {}
48+
49+
void initDigitizerTask(framework::InitContext& ic) override
50+
{
51+
}
52+
53+
void run(framework::ProcessingContext& pc)
54+
{
55+
}
56+
57+
private:
58+
bool mWithMCTruth{true};
59+
};
60+
61+
DataProcessorSpec getIOTOFDigitizerSpec(int channel, bool mctruth)
62+
{
63+
std::string detStr = o2::detectors::DetID::getName(o2::detectors::DetID::TF3);
64+
auto detOrig = o2::header::gDataOriginIOTOF;
65+
std::vector<InputSpec> inputs;
66+
inputs.emplace_back("collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe);
67+
inputs.emplace_back("IOTOF_aptsresp", "TF3", "APTSRESP", 0, Lifetime::Condition, ccdbParamSpec("IT3/Calib/APTSResponse"));
68+
69+
return DataProcessorSpec{detStr + "Digitizer",
70+
inputs, makeOutChannels(detOrig, mctruth),
71+
AlgorithmSpec{adaptFromTask<IOTOFDPLDigitizerTask>(mctruth)},
72+
Options{
73+
{"disable-qed", o2::framework::VariantType::Bool, false, {"disable QED handling"}},
74+
{"local-response-file", o2::framework::VariantType::String, "", {"use response file saved locally at this path/filename"}}}};
75+
}
76+
77+
} // namespace o2::iotof
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef STEER_DIGITIZERWORKFLOW_IOTOFDIGITIZER_H_
13+
#define STEER_DIGITIZERWORKFLOW_IOTOFDIGITIZER_H_
14+
15+
#include "Framework/DataProcessorSpec.h"
16+
17+
namespace o2::iotof
18+
{
19+
o2::framework::DataProcessorSpec getIOTOFDigitizerSpec(int channel, bool mctruth = true);
20+
} // namespace o2::iotof
21+
22+
#endif

Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,15 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
664664
// connect the ALICE 3 TRK digit writer
665665
specs.emplace_back(o2::trk::getTRKDigitWriterSpec(mctruth));
666666
}
667+
668+
// the ALICE 3 IOTOF part
669+
if (isEnabled(o2::detectors::DetID::IOTOF)) {
670+
detList.emplace_back(o2::detectors::DetID::IOTOF);
671+
// connect the ALICE 3 IOTOF digitization
672+
specs.emplace_back(o2::iotof::getIOTOFDigitizerSpec(fanoutsize++, mctruth));
673+
// connect the ALICE 3 IOTOF digit writer
674+
specs.emplace_back(o2::iotof::getIOTOFDigitWriterSpec(mctruth));
675+
}
667676
#endif
668677

669678
// the MFT part

0 commit comments

Comments
 (0)