Project
Loading...
Searching...
No Matches
FilteringSpec.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_DATA_FILTERING_SPEC
15#define O2_DATA_FILTERING_SPEC
16
18
32#include "Framework/Task.h"
41#include "TMap.h"
42#include "TStopwatch.h"
43
45
46#include <boost/functional/hash.hpp>
47#include <boost/tuple/tuple.hpp>
48#include <boost/unordered_map.hpp>
49#include <string>
50#include <vector>
51
52using namespace o2::framework;
56
57namespace o2::filtering
58{
59
60class FilteringSpec : public Task
61{
62 public:
63 FilteringSpec(GID::mask_t src, std::shared_ptr<DataRequest> dataRequest, bool enableSV, bool useMC = true)
64 : mInputSources(src), mDataRequest(dataRequest), mEnableSV(enableSV), mUseMC(useMC) {}
65 ~FilteringSpec() override = default;
66 void init(InitContext& ic) final;
67 void run(ProcessingContext& pc) final;
69 void finaliseCCDB(ConcreteDataMatcher&, void*) final;
70
71 private:
72 void fillData(const o2::globaltracking::RecoContainer& recoData);
73 void processTracksOfVertex(const o2::dataformats::VtxTrackRef& vtxref, const o2::globaltracking::RecoContainer& recoData);
74 int processBarrelTrack(GIndex idx, const o2::globaltracking::RecoContainer& recoData);
75 bool selectTrack(GIndex id, const o2::globaltracking::RecoContainer& recoData);
76 void updateTimeDependentParams(ProcessingContext& pc);
77 void clear();
78
80
81 bool mUseMC = true;
82 bool mEnableSV = true; // enable secondary vertices
83
84 o2::InteractionRecord mStartIR{};
85 GID::mask_t mInputSources;
86 TStopwatch mTimer;
87
88 bool mNeedToSave = false; // flag that there was something selected to save
89 std::map<int, int> mITSTrackIDCache{}; // cache for selected ITS track IDS
90 std::map<int, int> mITSClusterIDCache{}; // cache for selected ITS clusters
91
92 // unordered map connects global indices and table indices of barrel tracks
93 std::unordered_map<GIndex, int> mGIDToTableID;
94
95 std::shared_ptr<DataRequest> mDataRequest;
96
97 // CCDB conditions
98 const o2::itsmft::TopologyDictionary* mDictITS = nullptr;
99};
100
103
104} // namespace o2::filtering
105
106#endif /* O2_DATA_FILTERING_SPEC */
Class to refer to the reconstructed information.
Wrapper container for different reconstructed object types.
Definition of the ClusterTopology class.
Definition of the FIT RecPoints class.
Definition of the FV0 RecPoints class.
Information filtered out from single TF.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Definition of the FDD RecPoint class.
Definition of the ITS track.
Definition of the MCH track.
Result of refitting TPC-ITS matched track.
Extention of GlobalTrackID by flags relevant for verter-track association.
~FilteringSpec() override=default
void init(InitContext &ic) final
FilteringSpec(GID::mask_t src, std::shared_ptr< DataRequest > dataRequest, bool enableSV, bool useMC=true)
void finaliseCCDB(ConcreteDataMatcher &, void *) final
void run(ProcessingContext &pc) final
void endOfStream(framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
GLenum src
Definition glcorearb.h:1767
DataProcessorSpec getDataFilteringSpec(GID::mask_t src, bool enableSV, bool useMC)
create a processor spec
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20