Project
Loading...
Searching...
No Matches
TrackWriterTPCITSSpec.cxx
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#include <vector>
21
22using namespace o2::framework;
23
24namespace o2
25{
26namespace globaltracking
27{
28
29template <typename T>
31using TracksType = std::vector<o2::dataformats::TrackTPCITS>;
32using ABRefType = std::vector<o2::itsmft::TrkClusRef>;
33using ABCLIDType = std::vector<int>;
34using LabelsType = std::vector<o2::MCCompLabel>;
35
37{
38 // A spectator for logging
39 auto logger = [](TracksType const& tracks) {
40 LOG(info) << "Writing " << tracks.size() << " TPC-ITS matches";
41 };
42 return MakeRootTreeWriterSpec("itstpc-track-writer",
43 "o2match_itstpc.root",
44 "matchTPCITS",
45 BranchDefinition<TracksType>{InputSpec{"match", "GLO", "TPCITS", 0}, "TPCITS", logger},
46 BranchDefinition<ABRefType>{InputSpec{"ABRefs", "GLO", "TPCITSAB_REFS", 0}, "TPCITSABRefs"},
47 BranchDefinition<ABCLIDType>{InputSpec{"ABCLID", "GLO", "TPCITSAB_CLID", 0}, "TPCITSABCLID"},
48 BranchDefinition<LabelsType>{InputSpec{"matchMC", "GLO", "TPCITS_MC", 0}, "MatchMCTruth", (useMC ? 1 : 0), ""}, // one branch if mc labels enabled
49 BranchDefinition<LabelsType>{InputSpec{"matchABMC", "GLO", "TPCITSAB_MC", 0}, "MatchABMCTruth", (useMC ? 1 : 0), ""} // one branch if mc labels enabled
50 )();
51}
52
53} // namespace globaltracking
54} // namespace o2
Definition of a container to keep Monte Carlo truth external to simulation objects.
Configurable generator for RootTreeWriter processor spec.
Result of refitting TPC-ITS matched track.
Reference on ITS/MFT clusters set.
Generate a processor spec for the RootTreeWriter utility.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< o2::itsmft::TrkClusRef > ABRefType
framework::DataProcessorSpec getTrackWriterTPCITSSpec(bool useMC)
std::vector< o2::dataformats::GlobalFwdTrack > TracksType
std::vector< int > ABCLIDType
std::vector< o2::MCCompLabel > LabelsType
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"