Belle II Software  release-08-01-10
RawCluster.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <vxd/dataobjects/VxdID.h>
12 #include <svd/dataobjects/SVDShaperDigit.h>
13 #include <vector>
14 
15 namespace Belle2::SVD {
22  int cellID;
23  int maxSample;
24  float noise;
26  double charge;
27  double time;
28  };
29 
33  class RawCluster {
34 
35  public:
36 
40  RawCluster() {};
41 
49  RawCluster(VxdID vxdID, bool isUside, double cutSeed, double cutAdjacent);
50 
60  RawCluster(VxdID vxdID, bool isUside, double cutSeed, double cutAdjacent, const std::string& storeShaperDigitsName);
61 
70  bool add(VxdID vxdID, bool isUside, struct StripInRawCluster& aStrip);
71 
75  bool isGoodRawCluster();
76 
80  VxdID getSensorID() const {return m_vxdID;}
81 
85  bool isUSide() const {return m_isUside;}
86 
93 
100  std::pair<int, std::vector<float>> getMaxSum3Samples(bool inElectrons = false) const;
101 
105  int getSize() const { return m_strips.size(); }
106 
110  const std::vector<StripInRawCluster> getStripsInRawCluster() const { return m_strips; };
111 
115  int getSeedMaxSample() const {return m_seedMaxSample;};
116 
121 
127  void setStripCharge(int index, double charge) {m_strips.at(index).charge = charge;}
133  void setStripTime(int index, double time) {m_strips.at(index).time = time;}
134 
135  protected:
136 
139 
141  bool m_isUside;
142 
144  double m_cutSeed = 5;
145 
147  double m_cutAdjacent = 3;
148 
150  int m_seedMaxSample = -1;
151 
153  float m_seedSNR = -1;
154 
156  int m_seedIndex = -1;
157 
160 
162  std::vector<StripInRawCluster> m_strips;
163 
166 
167  };
168 
169 }
170 
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
Class representing a raw cluster candidate during clustering of the SVD.
Definition: RawCluster.h:33
RawCluster()
Default Constructor to create an empty RawCluster.
Definition: RawCluster.h:40
int getSeedInternalIndex() const
Definition: RawCluster.h:120
std::pair< int, std::vector< float > > getMaxSum3Samples(bool inElectrons=false) const
Definition: RawCluster.cc:137
int getSeedMaxSample() const
Definition: RawCluster.h:115
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
Definition: RawCluster.h:165
Belle2::SVDShaperDigit::APVFloatSamples getClsSamples(bool inElectrons) const
Definition: RawCluster.cc:104
int m_seedInternalIndex
stripsInRawCluster index of the seed strip of the cluster
Definition: RawCluster.h:159
bool add(VxdID vxdID, bool isUside, struct StripInRawCluster &aStrip)
Add a Strip to the current cluster.
Definition: RawCluster.cc:54
bool m_isUside
side of the cluster
Definition: RawCluster.h:141
void setStripCharge(int index, double charge)
set the strip charge
Definition: RawCluster.h:127
VxdID m_vxdID
VxdID of the cluster.
Definition: RawCluster.h:138
float m_seedSNR
SNR (using MaxSample) of the seed strip.
Definition: RawCluster.h:153
bool isUSide() const
Definition: RawCluster.h:85
int m_seedMaxSample
ADC MaxSample of the seed strip.
Definition: RawCluster.h:150
VxdID getSensorID() const
Definition: RawCluster.h:80
double m_cutSeed
SNR above which the strip can be considered as seed.
Definition: RawCluster.h:144
const std::vector< StripInRawCluster > getStripsInRawCluster() const
Definition: RawCluster.h:110
int m_seedIndex
SVDShaperDigit index of the seed strip of the cluster.
Definition: RawCluster.h:156
std::vector< StripInRawCluster > m_strips
vector containing the strips in the cluster
Definition: RawCluster.h:162
double m_cutAdjacent
SNR above which the strip can be considered for clustering.
Definition: RawCluster.h:147
void setStripTime(int index, double time)
set the strip time
Definition: RawCluster.h:133
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Definition: GeoSVDCreator.h:23
structure containing the relevant informations of each strip of the raw cluster
Definition: RawCluster.h:20
double charge
strip charge
Definition: RawCluster.h:26
Belle2::SVDShaperDigit::APVFloatSamples samples
ADC of the acquired samples.
Definition: RawCluster.h:25
int shaperDigitIndex
index of the shaper digit
Definition: RawCluster.h:21
int maxSample
ADC max of the acquired samples.
Definition: RawCluster.h:23