Project
Loading...
Searching...
No Matches
TrackerSpec.h
Go to the documentation of this file.
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
13
14#ifndef O2_MFT_TRACKERDPL_H_
15#define O2_MFT_TRACKERDPL_H_
16
17#include "MFTTracking/Tracker.h"
20
22#include "MFTTracking/TrackCA.h"
23#include "Framework/Task.h"
26#include "TStopwatch.h"
27
28namespace o2
29{
30namespace mft
31{
33
35{
36
37 public:
38 TrackerDPL(std::shared_ptr<o2::base::GRPGeomRequest> gr, bool useMC, int nThreads = 1) : mGGCCDBRequest(gr), mUseMC(useMC), mNThreads(nThreads) {}
39 ~TrackerDPL() override = default;
40 void init(framework::InitContext& ic) final;
41 void run(framework::ProcessingContext& pc) final;
43 void finaliseCCDB(framework::ConcreteDataMatcher& matcher, void* obj) final;
44
45 private:
46 void updateTimeDependentParams(framework::ProcessingContext& pc);
47 void storeConfigs(framework::ProcessingContext& pc);
49 bool mMFTTriggered = false;
50
52 void setMFTROFrameLengthMUS(float fums);
54 void setMFTROFrameLengthInBC(int nbc);
55 int mMFTROFrameLengthInBC = 0;
56 float mMFTROFrameLengthMUS = -1.;
57 float mMFTROFrameLengthMUSInv = -1.;
58 bool mUseMC = false;
59 bool mFieldOn = true;
60 int mNThreads = 4;
61 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
62 const o2::itsmft::TopologyDictionary* mDict = nullptr;
63 std::unique_ptr<o2::parameters::GRPObject> mGRP = nullptr;
64 std::vector<std::unique_ptr<o2::mft::Tracker<TrackLTF>>> mTrackerVec;
65 std::vector<std::unique_ptr<o2::mft::Tracker<TrackLTFL>>> mTrackerLVec;
66
67 enum TimerIDs { SWTot,
68 SWLoadData,
69 SWFindMFTTracks,
70 SWFitTracks,
71 SWComputeLabels,
72 NStopWatches };
73 static constexpr std::string_view TimerName[] = {"TotalProcessing",
74 "LoadData",
75 "FindTracks",
76 "FitTracks",
77 "ComputeLabels"};
78 TStopwatch mTimer[NStopWatches];
79
80 ROFFilter createIRFrameFilter(gsl::span<const o2::dataformats::IRFrame> irframes)
81 {
82 return [this, irframes](const ROFRecord& rof) {
83 InteractionRecord rofStart{rof.getBCData()};
84 InteractionRecord rofEnd = rofStart + mMFTROFrameLengthInBC - 1;
85 IRFrame ref(rofStart, rofEnd);
86 for (const auto& ir : irframes) {
87 if (ir.info > 0) {
88 auto overlap = ref.getOverlap(ir);
89 if (overlap.isValid()) {
90 return true;
91 }
92 }
93 }
94 return false;
95 };
96 }
97};
98
100o2::framework::DataProcessorSpec getTrackerSpec(bool useMC, bool useGeom, int nThreads);
101
102} // namespace mft
103} // namespace o2
104
105#endif /* O2_MFT_TRACKERDPL */
Definition of the ClusterTopology class.
Helper for geometry and GRP related CCDB requests.
Header of the General Run Parameters object.
Standalone classes for the track found by the Linear-Track-Finder (LTF) and by the Cellular-Automaton...
void init(framework::InitContext &ic) final
~TrackerDPL() override=default
void run(framework::ProcessingContext &pc) final
TrackerDPL(std::shared_ptr< o2::base::GRPGeomRequest > gr, bool useMC, int nThreads=1)
Definition TrackerSpec.h:38
void endOfStream(framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void finaliseCCDB(framework::ConcreteDataMatcher &matcher, void *obj) final
GLint ref
Definition glcorearb.h:291
o2::framework::DataProcessorSpec getTrackerSpec(bool useMC, bool useGeom, int nThreads)
create a processor spec
std::function< bool(const ROFRecord &)> ROFFilter
Definition Tracker.h:40
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)