Project
Loading...
Searching...
No Matches
Clusters.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
16
17#ifndef AliceO2_TPC_CLUSTERS_H
18#define AliceO2_TPC_CLUSTERS_H
19
20//root includes
21#include "TCanvas.h"
22
23//o2 includes
24#include "TPCBase/CalDet.h"
25#include "TPCBase/Sector.h"
26#include "DataFormatsTPC/Defs.h"
27
28namespace o2
29{
30namespace tpc
31{
32
33class ClusterNative;
34
35namespace qc
36{
37
41{
42 public:
43 Clusters() = default;
44
45 Clusters(std::string_view nclName) : mNClusters{nclName} {};
46
47 template <class T>
48 bool processCluster(const T& cluster, const o2::tpc::Sector sector, const int row);
49
50 void fillADCValue(int cru, int rowInSector, int padInRow, int timeBin, float adcValue);
51
52 void normalize();
53
54 inline void analyse() { Clusters::normalize(); }
55
56 void denormalize();
57
58 void reset();
59
60 void merge(Clusters& clusters);
61
62 void dumpToFile(std::string filename, int type = 0);
63
64 const CalPad& getNClusters() const { return mNClusters; }
65 const CalPad& getQMax() const { return mQMax; }
66 const CalPad& getQTot() const { return mQTot; }
67 const CalPad& getSigmaTime() const { return mSigmaTime; }
68 const CalPad& getSigmaPad() const { return mSigmaPad; }
69 const CalPad& getTimeBin() const { return mTimeBin; }
70
71 CalPad& getNClusters() { return mNClusters; }
72 CalPad& getQMax() { return mQMax; }
73 CalPad& getQTot() { return mQTot; }
74 CalPad& getSigmaTime() { return mSigmaTime; }
75 CalPad& getSigmaPad() { return mSigmaPad; }
76 CalPad& getTimeBin() { return mTimeBin; }
77
78 void endTF() { ++mProcessedTFs; }
79
80 size_t getProcessedTFs() { return mProcessedTFs; }
81
82 private:
83 CalPad mNClusters{"N_Clusters"};
84 CalPad mQMax{"Q_Max"};
85 CalPad mQTot{"Q_Tot"};
86 CalPad mSigmaTime{"Sigma_Time"};
87 CalPad mSigmaPad{"Sigma_Pad"};
88 CalPad mTimeBin{"Time_Bin"};
89 size_t mProcessedTFs{0};
90 bool mIsNormalized{false};
91
92 ClassDefNV(Clusters, 1)
93};
94} // namespace qc
95} // namespace tpc
96} // namespace o2
97
98#endif
const CalPad & getNClusters() const
Definition Clusters.h:64
CalPad & getQMax()
Definition Clusters.h:72
const CalPad & getTimeBin() const
Definition Clusters.h:69
Clusters(std::string_view nclName)
Definition Clusters.h:45
CalPad & getQTot()
Definition Clusters.h:73
size_t getProcessedTFs()
Definition Clusters.h:80
void fillADCValue(int cru, int rowInSector, int padInRow, int timeBin, float adcValue)
Definition Clusters.cxx:90
CalPad & getNClusters()
Definition Clusters.h:71
void merge(Clusters &clusters)
Definition Clusters.cxx:156
const CalPad & getQTot() const
Definition Clusters.h:66
bool processCluster(const T &cluster, const o2::tpc::Sector sector, const int row)
Definition Clusters.cxx:34
const CalPad & getQMax() const
Definition Clusters.h:65
const CalPad & getSigmaTime() const
Definition Clusters.h:67
CalPad & getTimeBin()
Definition Clusters.h:76
const CalPad & getSigmaPad() const
Definition Clusters.h:68
void dumpToFile(std::string filename, int type=0)
Definition Clusters.cxx:184
CalPad & getSigmaTime()
Definition Clusters.h:74
CalPad & getSigmaPad()
Definition Clusters.h:75
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
CalDet< float > CalPad
Definition CalDet.h:492
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()
std::vector< Cluster > clusters
std::vector< int > row