Project
Loading...
Searching...
No Matches
TrackReaderSpec.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_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
30{
31namespace its
32{
33
35{
37
38 public:
39 TrackReader(bool useMC = true);
40 ~TrackReader() override = default;
41 void init(o2::framework::InitContext& ic) final;
43
44 protected:
45 void connectTree(const std::string& filename);
46
47 std::vector<o2::itsmft::ROFRecord> mROFRec, *mROFRecInp = &mROFRec;
48 std::vector<o2::itsmft::ROFRecord> mVerticesROFRec, *mVerticesROFRecInp = &mVerticesROFRec;
49 std::vector<o2::its::TrackITS> mTracks, *mTracksInp = &mTracks;
50 std::vector<Vertex> mVertices, *mVerticesInp = &mVertices;
51 std::vector<int> mClusInd, *mClusIndInp = &mClusInd;
52 std::vector<o2::MCCompLabel> mMCTruth, *mMCTruthInp = &mMCTruth;
53 std::vector<o2::MCCompLabel> mMCVertTruth, *mMCVTruthInp = &mMCTruth;
54
56
57 bool mUseMC = true; // use MC truth
58
59 std::unique_ptr<TFile> mFile;
60 std::unique_ptr<TTree> mTree;
61 std::string mInputFileName = "";
62 std::string mTrackTreeName = "o2sim";
63 std::string mROFBranchName = "ITSTracksROF";
64 std::string mTrackBranchName = "ITSTrack";
65 std::string mClusIdxBranchName = "ITSTrackClusIdx";
66 std::string mVertexBranchName = "Vertices";
67 std::string mVertexROFBranchName = "VerticesROF";
68 std::string mTrackMCTruthBranchName = "ITSTrackMCTruth";
69 std::string mTrackMCVertTruthBranchName = "ITSVertexMCTruth";
70};
71
75
76} // namespace its
77} // namespace o2
78
79#endif /* O2_ITS_TRACKREADER */
Definition of the ITSMFT ROFrame (trigger) record.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Definition of the ITS track.
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
std::string mTrackMCTruthBranchName
std::vector< o2::itsmft::ROFRecord > mVerticesROFRec
~TrackReader() override=default
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()