Project
Loading...
Searching...
No Matches
TrackReaderSpec.h
Go to the documentation of this file.
1// Copyright 2019-2026 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_ITS_TRACKREADER
15#define O2_ITS_TRACKREADER
16
17#include <TFile.h>
18#include <TTree.h>
19
21#include "Framework/Task.h"
22#include "Headers/DataHeader.h"
28
29namespace o2::its
30{
31
32class TrackReader final : public o2::framework::Task
33{
34 public:
35 TrackReader(bool useMC = true) : mUseMC(useMC) {}
36 ~TrackReader() final = default;
37 void init(o2::framework::InitContext& ic) final;
38 void run(o2::framework::ProcessingContext& pc) final;
39
41 void connectTree(const std::string& filename);
42
43 std::vector<o2::itsmft::ROFRecord> mROFRec, *mROFRecInp = &mROFRec;
44 std::vector<o2::its::TrackITS> mTracks, *mTracksInp = &mTracks;
47 std::vector<int> mClusInd, *mClusIndInp = &mClusInd;
50
51 o2::header::DataOrigin mOrigin = o2::header::gDataOriginITS;
52
53 bool mUseMC = true; // use MC truth
54
55 std::unique_ptr<TFile> mFile;
56 std::unique_ptr<TTree> mTree;
58 std::string mTrackTreeName = "o2sim";
59 std::string mROFBranchName = "ITSTracksROF";
60 std::string mTrackBranchName = "ITSTrack";
61 std::string mClusIdxBranchName = "ITSTrackClusIdx";
62 std::string mVertexBranchName = "Vertices";
63 std::string mVertexROFBranchName = "VerticesROF";
64 std::string mTrackMCTruthBranchName = "ITSTrackMCTruth";
65 std::string mTrackMCVertTruthBranchName = "ITSVertexMCTruth";
66};
67
71
72} // namespace o2::its
73
74#endif /* O2_ITS_TRACKREADER */
Definition of the ITSMFT ROFrame (trigger) record.
Definition of a container to keep Monte Carlo truth external to simulation objects.
#define protected
Definition of the ITS track.
TrackReader(bool useMC=true)
std::vector< o2::MCCompLabel > mMCVertTruth
std::vector< int > mClusInd
void init(o2::framework::InitContext &ic) final
std::vector< o2::itsmft::ROFRecord > mROFRec
std::vector< o2::itsmft::ROFRecord > * mROFRecInp
o2::header::DataOrigin mOrigin
std::vector< o2::MCCompLabel > * mMCTruthInp
~TrackReader() final=default
std::string mTrackMCTruthBranchName
std::vector< o2::itsmft::ROFRecord > mVerticesROFRec
std::string mTrackBranchName
std::string mVertexROFBranchName
std::string mClusIdxBranchName
std::vector< o2::itsmft::ROFRecord > * mVerticesROFRecInp
std::unique_ptr< TTree > mTree
std::vector< o2::MCCompLabel > * mMCVTruthInp
std::unique_ptr< TFile > mFile
std::vector< o2::its::TrackITS > mTracks
std::string mTrackMCVertTruthBranchName
std::vector< Vertex > mVertices
std::vector< Vertex > * mVerticesInp
void run(o2::framework::ProcessingContext &pc) final
void connectTree(const std::string &filename)
std::vector< o2::MCCompLabel > mMCTruth
std::string mVertexBranchName
std::vector< o2::its::TrackITS > * mTracksInp
std::vector< int > * mClusIndInp
constexpr o2::header::DataOrigin gDataOriginITS
Definition DataHeader.h:570
framework::DataProcessorSpec getITSTrackReaderSpec(bool useMC=true)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()