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);
48 bool mMFTTriggered = false;
49
51 void setMFTROFrameLengthMUS(float fums);
53 void setMFTROFrameLengthInBC(int nbc);
54 int mMFTROFrameLengthInBC = 0;
55 float mMFTROFrameLengthMUS = -1.;
56 float mMFTROFrameLengthMUSInv = -1.;
57 bool mUseMC = false;
58 bool mFieldOn = true;
59 int mNThreads = 4;
60 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
61 const o2::itsmft::TopologyDictionary* mDict = nullptr;
62 std::unique_ptr<o2::parameters::GRPObject> mGRP = nullptr;
63 std::vector<std::unique_ptr<o2::mft::Tracker<TrackLTF>>> mTrackerVec;
64 std::vector<std::unique_ptr<o2::mft::Tracker<TrackLTFL>>> mTrackerLVec;
65
66 enum TimerIDs { SWTot,
67 SWLoadData,
68 SWFindMFTTracks,
69 SWFitTracks,
70 SWComputeLabels,
71 NStopWatches };
72 static constexpr std::string_view TimerName[] = {"TotalProcessing",
73 "LoadData",
74 "FindTracks",
75 "FitTracks",
76 "ComputeLabels"};
77 TStopwatch mTimer[NStopWatches];
78
79 ROFFilter createIRFrameFilter(gsl::span<const o2::dataformats::IRFrame> irframes)
80 {
81 return [this, irframes](const ROFRecord& rof) {
82 InteractionRecord rofStart{rof.getBCData()};
83 InteractionRecord rofEnd = rofStart + mMFTROFrameLengthInBC - 1;
84 IRFrame ref(rofStart, rofEnd);
85 for (const auto& ir : irframes) {
86 if (ir.info > 0) {
87 auto overlap = ref.getOverlap(ir);
88 if (overlap.isValid()) {
89 return true;
90 }
91 }
92 }
93 return false;
94 };
95 }
96};
97
99o2::framework::DataProcessorSpec getTrackerSpec(bool useMC, bool useGeom, int nThreads);
100
101} // namespace mft
102} // namespace o2
103
104#endif /* O2_MFT_TRACKERDPL */
Definition of the ClusterTopology class.
Helper for geometry and GRP related CCDB requests.
Header of the General Run Parameters object.
Class for the standalone track finding.
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)