-
Notifications
You must be signed in to change notification settings - Fork 494
Expand file tree
/
Copy pathClustererTask.h
More file actions
85 lines (68 loc) · 3.1 KB
/
ClustererTask.h
File metadata and controls
85 lines (68 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file ClustererTask.h
/// \brief Definition of the ITS cluster finder task
#ifndef ALICEO2_ITS_CLUSTERERTASK
#define ALICEO2_ITS_CLUSTERERTASK
#include "ITSMFTReconstruction/ChipMappingITS.h"
#include "ITSMFTReconstruction/PixelReader.h"
#include "ITSMFTReconstruction/RawPixelReader.h"
#include "ITSMFTReconstruction/DigitPixelReader.h"
#include "ITSMFTReconstruction/Clusterer.h"
#include "DataFormatsITSMFT/CompCluster.h"
#include "DataFormatsITSMFT/ROFRecord.h"
#include "SimulationDataFormat/MCTruthContainer.h"
#include "SimulationDataFormat/MCCompLabel.h"
#include <memory>
#include <limits>
namespace o2
{
class MCCompLabel;
namespace dataformats
{
template <typename T>
class MCTruthContainer;
}
namespace its
{
class ClustererTask
{
using Clusterer = o2::itsmft::Clusterer;
using CompCluster = o2::itsmft::CompCluster;
using CompClusterExt = o2::itsmft::CompClusterExt;
using MCTruth = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;
public:
ClustererTask(bool useMC = true, bool raw = false);
~ClustererTask();
void Init();
Clusterer& getClusterer() { return mClusterer; }
void run(const std::string inpName, const std::string outName);
o2::itsmft::PixelReader* getReader() const { return (o2::itsmft::PixelReader*)mReader; }
void writeTree(std::string basename, int i);
void setMaxROframe(int max) { maxROframe = max; }
int getMaxROframe() const { return maxROframe; }
private:
int maxROframe = std::numeric_limits<int>::max(); ///< maximal number of RO frames per a file
bool mRawDataMode = false; ///< input from raw data or MC digits
bool mUseMCTruth = true; ///< flag to use MCtruth if available
o2::itsmft::PixelReader* mReader = nullptr; ///< Pointer on the relevant Pixel reader
std::unique_ptr<o2::itsmft::DigitPixelReader> mReaderMC; ///< reader for MC data
std::unique_ptr<o2::itsmft::RawPixelReader<o2::itsmft::ChipMappingITS>> mReaderRaw; ///< reader for raw data
Clusterer mClusterer; ///< Cluster finder
std::vector<CompClusterExt> mCompClus; //!< vector of compact clusters
std::vector<o2::itsmft::ROFRecord> mROFRecVec; //!< vector of ROFRecord references
MCTruth mClsLabels; //! MC labels
std::vector<unsigned char> mPatterns;
ClassDefNV(ClustererTask, 2);
};
} // namespace its
} // namespace o2
#endif /* ALICEO2_ITS_CLUSTERERTASK */