Project
Loading...
Searching...
No Matches
ClusterReaderSpec.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_ITSMFT_CLUSTERREADER
15#define O2_ITSMFT_CLUSTERREADER
16
17#include "TFile.h"
18#include "TTree.h"
19
21#include "Framework/Task.h"
22#include "Headers/DataHeader.h"
27
28using namespace o2::framework;
29
30namespace o2::its3
31{
32
33class ClusterReader : public Task
34{
35 public:
36 ClusterReader(bool useMC, bool usePatterns = true);
37
38 void init(InitContext& ic) final;
39 void run(ProcessingContext& pc) final;
40
41 protected:
42 void connectTree(const std::string& filename);
43
44 std::vector<o2::itsmft::ROFRecord> mClusROFRec, *mClusROFRecPtr = &mClusROFRec;
45 std::vector<o2::itsmft::CompClusterExt> mClusterCompArray, *mClusterCompArrayPtr = &mClusterCompArray;
46 std::vector<unsigned char> mPatternsArray, *mPatternsArrayPtr = &mPatternsArray;
48 std::vector<o2::itsmft::MC2ROFRecord> mClusMC2ROFs, *mClusMC2ROFsPtr = &mClusMC2ROFs;
49
51
52 std::unique_ptr<TFile> mFile;
53 std::unique_ptr<TTree> mTree;
54
55 bool mUseMC = true; // use MC truth
56 bool mUsePatterns = true; // send patterns
57
58 std::string mDetName = "ITS"; // pretending to be ITS
59 std::string mDetNameLC = "its";
60 std::string mDetNameReal = "IT3";
61 std::string mFileName = "";
62 std::string mClusTreeName = "o2sim";
63 std::string mClusROFBranchName = "ClustersROF";
64 std::string mClusterPattBranchName = "ClusterPatt";
65 std::string mClusterCompBranchName = "ClusterComp";
66 std::string mClustMCTruthBranchName = "ClusterMCTruth";
67 std::string mClustMC2ROFBranchName = "ClustersMC2ROF";
68};
69
72framework::DataProcessorSpec getITS3ClusterReaderSpec(bool useMC = true, bool usePatterns = true);
73
74} // namespace o2::its3
75
76#endif /* O2_ITSMFT_CLUSTERREADER */
Definition of the ITSMFT compact cluster.
Definition of the ITSMFT ROFrame (trigger) record.
Definition of a container to keep Monte Carlo truth external to simulation objects.
A container to hold and manage MC truth information/labels.
void connectTree(const std::string &filename)
std::unique_ptr< TTree > mTree
std::unique_ptr< TFile > mFile
std::vector< o2::itsmft::ROFRecord > mClusROFRec
void run(ProcessingContext &pc) final
std::vector< unsigned char > mPatternsArray
void init(InitContext &ic) final
std::vector< o2::itsmft::CompClusterExt > mClusterCompArray
std::vector< o2::itsmft::MC2ROFRecord > mClusMC2ROFs
std::vector< o2::itsmft::ROFRecord > * mClusROFRecPtr
o2::dataformats::MCTruthContainer< o2::MCCompLabel > * mClusterMCTruthPtr
std::vector< o2::itsmft::CompClusterExt > * mClusterCompArrayPtr
o2::dataformats::MCTruthContainer< o2::MCCompLabel > mClusterMCTruth
std::vector< o2::itsmft::MC2ROFRecord > * mClusMC2ROFsPtr
std::vector< unsigned char > * mPatternsArrayPtr
o2::header::DataOrigin mOrigin
constexpr o2::header::DataOrigin gDataOriginITS
Definition DataHeader.h:570
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
framework::DataProcessorSpec getITS3ClusterReaderSpec(bool useMC=true, bool usePatterns=true)
std::string filename()