Skip to content

Commit bb457fe

Browse files
committed
adding MC ccdb objects for simulation and reconstruction
1 parent a26667b commit bb457fe

File tree

6 files changed

+151
-116
lines changed

6 files changed

+151
-116
lines changed

Detectors/TPC/base/include/TPCBase/ParameterGas.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ struct ParameterGas : public o2::conf::ConfigurableParamHelper<ParameterGas> {
3939
float Nprim = 14.f; ///< Number of primary electrons per MIP and cm [1/cm]
4040
float ScaleFactorG4 = 0.85f; ///< Scale factor to tune WION for GEANT4
4141
float FanoFactorG4 = 0.7f; ///< Parameter for smearing the number of ionizations (nel) using GEANT4
42+
float Pressure = 1013.25f; ///< Pressure [mbar]
43+
float Temperature = 20.0f; ///< Temperature [°C]
4244
float BetheBlochParam[5] = {0.820172e-1f, 9.94795f, 8.97292e-05f, 2.05873f, 1.65272f}; ///< Parametrization of Bethe-Bloch
4345

4446
O2ParamDef(ParameterGas, "TPCGasParam");

Detectors/TPC/workflow/src/tpc-reco-workflow.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@
3535
#include <stdexcept>
3636
#include <unordered_map>
3737
#include <regex>
38+
#include <cstdint>
3839

3940
// we need a global variable to propagate the type the message dispatching of the
4041
// publisher will trigger on. This is dependent on the input type
4142
static o2::framework::Output gDispatchTrigger{"", ""};
4243

4344
// Global variable used to transport data to the completion policy
4445
static o2::tpc::reco_workflow::CompletionPolicyData gPolicyData;
45-
static unsigned long gTpcSectorMask = 0xFFFFFFFFF;
46+
static uint64_t gTpcSectorMask = 0xFFFFFFFFF;
4647

4748
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
4849
{

GPU/Workflow/include/GPUWorkflow/GPUWorkflowSpec.h

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TStopwatch;
3434
namespace fair::mq
3535
{
3636
struct RegionInfo;
37-
enum class State : int;
37+
enum class State : int32_t;
3838
} // namespace fair::mq
3939
namespace o2
4040
{
@@ -58,9 +58,8 @@ class GeometryFlat;
5858

5959
namespace its
6060
{
61-
class Tracker;
62-
class Vertexer;
6361
class TimeFrame;
62+
class ITSTrackingInterface;
6463
} // namespace its
6564

6665
namespace itsmft
@@ -102,8 +101,8 @@ class GPURecoWorkflowSpec : public o2::framework::Task
102101
using CompletionPolicyData = std::vector<framework::InputSpec>;
103102

104103
struct Config {
105-
int itsTriggerType = 0;
106-
int lumiScaleMode = 0;
104+
int32_t itsTriggerType = 0;
105+
int32_t lumiScaleMode = 0;
107106
bool enableMShape = false;
108107
bool enableCTPLumi = false;
109108
int32_t enableDoublePipeline = 0;
@@ -126,21 +125,20 @@ class GPURecoWorkflowSpec : public o2::framework::Task
126125
bool runTPCTracking = false;
127126
bool runTRDTracking = false;
128127
bool readTRDtracklets = false;
129-
int lumiScaleType = 0; // 0=off, 1=CTP, 2=TPC scalers
128+
int32_t lumiScaleType = 0; // 0=off, 1=CTP, 2=TPC scalers
130129
bool outputErrorQA = false;
131130
bool runITSTracking = false;
132-
int itsTrackingMode = 0; // 0=sync, 1=async, 2=cosmics
133131
bool itsOverrBeamEst = false;
134132
bool tpcTriggerHandling = false;
135133
};
136134

137-
GPURecoWorkflowSpec(CompletionPolicyData* policyData, Config const& specconfig, std::vector<int> const& tpcsectors, unsigned long tpcSectorMask, std::shared_ptr<o2::base::GRPGeomRequest>& ggr, std::function<bool(o2::framework::DataProcessingHeader::StartTime)>** gPolicyOrder = nullptr);
135+
GPURecoWorkflowSpec(CompletionPolicyData* policyData, Config const& specconfig, std::vector<int32_t> const& tpcsectors, uint64_t tpcSectorMask, std::shared_ptr<o2::base::GRPGeomRequest>& ggr, std::function<bool(o2::framework::DataProcessingHeader::StartTime)>** gPolicyOrder = nullptr);
138136
~GPURecoWorkflowSpec() override;
139137
void init(o2::framework::InitContext& ic) final;
140138
void run(o2::framework::ProcessingContext& pc) final;
141139
void endOfStream(o2::framework::EndOfStreamContext& ec) final;
142-
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
143140
void stop() final;
141+
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
144142
o2::framework::Inputs inputs();
145143
o2::framework::Outputs outputs();
146144
o2::framework::Options options();
@@ -177,14 +175,15 @@ class GPURecoWorkflowSpec : public o2::framework::Task
177175
template <class D, class E, class F, class G, class H, class I, class J, class K>
178176
void processInputs(o2::framework::ProcessingContext&, D&, E&, F&, G&, bool&, H&, I&, J&, K&);
179177

180-
int runMain(o2::framework::ProcessingContext* pc, GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, int threadIndex = 0, GPUInterfaceInputUpdate* inputUpdateCallback = nullptr);
181-
int runITSTracking(o2::framework::ProcessingContext& pc);
178+
int32_t runMain(o2::framework::ProcessingContext* pc, GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, int32_t threadIndex = 0, GPUInterfaceInputUpdate* inputUpdateCallback = nullptr);
179+
int32_t runITSTracking(o2::framework::ProcessingContext& pc);
182180

183-
int handlePipeline(o2::framework::ProcessingContext& pc, GPUTrackingInOutPointers& ptrs, gpurecoworkflow_internals::GPURecoWorkflowSpec_TPCZSBuffers& tpcZSmeta, o2::gpu::GPUTrackingInOutZS& tpcZS, std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflow_QueueObject>& context);
181+
int32_t handlePipeline(o2::framework::ProcessingContext& pc, GPUTrackingInOutPointers& ptrs, gpurecoworkflow_internals::GPURecoWorkflowSpec_TPCZSBuffers& tpcZSmeta, o2::gpu::GPUTrackingInOutZS& tpcZS, std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflow_QueueObject>& context);
184182
void RunReceiveThread();
185-
void RunWorkerThread(int id);
183+
void RunWorkerThread(int32_t id);
186184
void ExitPipeline();
187185
void handlePipelineEndOfStream(o2::framework::EndOfStreamContext& ec);
186+
void handlePipelineStop();
188187
void initPipeline(o2::framework::InitContext& ic);
189188
void enqueuePipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context, bool inputFinal);
190189
void finalizeInputPipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context);
@@ -206,24 +205,23 @@ class GPURecoWorkflowSpec : public o2::framework::Task
206205
std::unique_ptr<GPUO2InterfaceConfiguration> mConfig;
207206
std::unique_ptr<GPUSettingsO2> mConfParam;
208207
std::unique_ptr<TStopwatch> mTimer;
209-
std::vector<std::array<unsigned int, 4>> mErrorQA;
210-
int mQATaskMask = 0;
208+
std::vector<std::array<uint32_t, 4>> mErrorQA;
209+
int32_t mQATaskMask = 0;
211210
std::unique_ptr<GPUO2InterfaceQA> mQA;
212-
std::vector<int> mClusterOutputIds;
213-
std::vector<int> mTPCSectors;
214-
std::unique_ptr<o2::its::Tracker> mITSTracker;
215-
std::unique_ptr<o2::its::Vertexer> mITSVertexer;
211+
std::vector<int32_t> mClusterOutputIds;
212+
std::vector<int32_t> mTPCSectors;
213+
std::unique_ptr<o2::its::ITSTrackingInterface> mITSTrackingInterface;
216214
std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflowSpec_PipelineInternals> mPipeline;
217215
o2::its::TimeFrame* mITSTimeFrame = nullptr;
218216
std::vector<fair::mq::RegionInfo> mRegionInfos;
219217
const o2::itsmft::TopologyDictionary* mITSDict = nullptr;
220218
const o2::dataformats::MeanVertexObject* mMeanVertex;
221-
unsigned long mTPCSectorMask = 0;
222-
long mCreationForCalib = -1; ///< creation time for calib manipulation
223-
int mVerbosity = 0;
224-
unsigned int mNTFs = 0;
225-
unsigned int mNDebugDumps = 0;
226-
unsigned int mNextThreadIndex = 0;
219+
uint64_t mTPCSectorMask = 0;
220+
int64_t mCreationForCalib = -1; ///< creation time for calib manipulation
221+
int32_t mVerbosity = 0;
222+
uint32_t mNTFs = 0;
223+
uint32_t mNDebugDumps = 0;
224+
uint32_t mNextThreadIndex = 0;
227225
bool mUpdateGainMapCCDB = true;
228226
std::unique_ptr<o2::gpu::GPUSettingsTF> mTFSettings;
229227
Config mSpecConfig;
@@ -235,8 +233,6 @@ class GPURecoWorkflowSpec : public o2::framework::Task
235233
bool mITSGeometryCreated = false;
236234
bool mTRDGeometryCreated = false;
237235
bool mPropagatorInstanceCreated = false;
238-
bool mITSRunVertexer = false;
239-
bool mITSCosmicsProcessing = false;
240236
};
241237

242238
} // end namespace gpu

0 commit comments

Comments
 (0)