Project
Loading...
Searching...
No Matches
HMPMatchedWriterSpec.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
18#include "Headers/DataHeader.h"
24
27#include <sstream>
28
29using namespace o2::framework;
30
31namespace o2
32{
33namespace hmpid
34{
35
36template <typename T>
38using MatchInfo = std::vector<o2::dataformats::MatchInfoHMP>;
39using LabelsType = std::vector<o2::MCCompLabel>;
40using namespace o2::header;
41
42DataProcessorSpec getHMPMatchedWriterSpec(bool useMC, const char* outdef) //, bool writeTracks, int mode, bool strict)
43{
44
45 const char* taskName = "HMPMatchedWriter";
46
47 return MakeRootTreeWriterSpec(taskName,
48 outdef,
49 "matchHMP",
50 BranchDefinition<MatchInfo>{InputSpec{"hmpmatching", gDataOriginHMP, "MATCHES", 0},
51 "HMPMatchInfo",
52 "HMPMatchInfo-branch-name"},
53 BranchDefinition<LabelsType>{InputSpec{"matchhmplabels", gDataOriginHMP, "MCLABELS", 0},
54 "MatchHMPMCTruth",
55 "MatchHMPMCTruth-branch-name",
56 (useMC ? 1 : 0)})();
57}
58} // namespace hmpid
59} // namespace o2
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Definition of a container to keep Monte Carlo truth external to simulation objects.
Configurable generator for RootTreeWriter processor spec.
Class to store the output of the matching to HMPID.
Defintions for the inter-detector matching type.
Generate a processor spec for the RootTreeWriter utility.
constexpr o2::header::DataOrigin gDataOriginHMP
Definition DataHeader.h:569
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
O2 data header classes and API, v0.1.
Definition DetID.h:49
std::vector< o2::MCCompLabel > LabelsType
std::vector< o2::dataformats::MatchInfoHMP > MatchInfo
o2::framework::DataProcessorSpec getHMPMatchedWriterSpec(bool useMC, const char *outdef="o2match_hmpid.root")
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...