Belle II Software development
SimpleClusterCandidate.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#ifndef SVD_SIMPLECLUSTERCANDIDATE_H
10#define SVD_SIMPLECLUSTERCANDIDATE_H
11
12#include <vxd/dataobjects/VxdID.h>
13#include <svd/dataobjects/SVDShaperDigit.h>
14#include <vector>
15
16namespace Belle2 {
22 namespace SVD {
23
30 float charge;
31 float noise;
32 int cellID;
33 float time;
34 float timeError;
35 };
36
41
42 public:
43
45 SimpleClusterCandidate(VxdID vxdID, bool isUside, int sizeHeadTail, double cutSeed, double cutAdjacent, double cutSNR,
46 int timeAlgorithm);
47
50 SimpleClusterCandidate(VxdID vxdID, bool isUside, int sizeHeadTail, double cutSeed, double cutAdjacent, double cutSNR,
51 int timeAlgorithm,
52 const std::string& storeShaperDigitsName,
53 const std::string& storeRecoDigitsName);
54
63 bool add(VxdID vxdID, bool isUside, struct stripInCluster& aStrip);
64
68 void finalizeCluster();
69
73 bool isGoodCluster();
74
79
83 bool isUSide() {return m_isUside;}
84
88 float getCharge() const { return m_charge; }
89
93 float getChargeError() const { return m_chargeError; }
94
98 float getSeedCharge() const { return m_seedCharge; }
99
103 float getTime() const;
107 float get6SampleCoGTime() const { return m_6SampleTime; }
111 float get3SampleCoGRawTime() const;
115 float get3SampleELSRawTime() const;
116
121 float getTimeError() const;
129 float get3SampleCoGTimeError() const;
133 float get3SampleELSTimeError() const;
134
140
146 std::pair<int, std::vector<float>> getMaxSum3Samples() const;
147
153 {
154 if (m_timeAlgorithm == 0)
155 return 0;
156 return getMaxSum3Samples().first;
157 }
158
162 float getPosition() const { return m_position; }
163
167 float getPositionError() const { return m_positionError; }
168
172 float getSNR() const { return m_SNR; }
173
177 int size() const { return m_strips.size(); }
178
180 const std::vector<stripInCluster> getStripsInCluster() const { return m_strips; };
181
182 protected:
183
186
189
192
195
197 double m_cutSeed;
198
201
204
211
213 float m_charge;
214
217
220
223
226
229
232
234 float m_SNR;
235
238
241
243 // int m_firstFrame = 0;
244
246 std::vector<stripInCluster> m_strips;
247
250
253
254 };
255
256 }
257
259}
260
261#endif //SVD_SIMPLECLUSTERCANDIDATE_H
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
Class representing a cluster candidate during simple clustering of the SVD.
float getPositionError() const
return the error on the position of the cluster
const std::vector< stripInCluster > getStripsInCluster() const
returns the vector of the strips in the cluster
int getFirstFrame()
return the first frame always 0 if 6-Sample CoG
std::string m_storeRecoDigitsName
Name of the collection to use for the SVDRecoDigits.
float m_position
Position of the cluster.
float m_6SampleTimeError
Error on Time of the cluster computed with the 6-sample CoG (not implemented yet)
float getChargeError() const
return the error of the charge of the cluster
float getTime() const
return the time of the cluster depending on the m_timeAlgorithm
float get3SampleELSRawTime() const
return the raw time of the cluster for the 3-sample ELS
bool m_stopCreationCluster
cluster is not good if something goes wrong
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
float getSNR() const
return the signal over noise ratio of the cluster
float getPosition() const
return the position of the cluster
double m_cutCluster
SNR above which the cluster is ok.
std::vector< stripInCluster > m_strips
first frame selected with the max-sum algorithm
float get6SampleCoGTime() const
return the time of the cluster for the 6-sample CoG
Belle2::SVDShaperDigit::APVFloatSamples getClsSamples() const
returns the APVFloatSamples obtained summing sample-by-sample all the strips on the cluster
bool add(VxdID vxdID, bool isUside, struct stripInCluster &aStrip)
Add a Strip to the current cluster.
void finalizeCluster()
compute the position, time and their error of the cluster
float m_6SampleTime
Time of the cluster computed with the 6-sample CoG.
bool isGoodCluster()
return true if the cluster candidate can be promoted to cluster
float get3SampleCoGTimeError() const
return the time of the cluster for the 3-sample CoG
float m_positionError
Error on Position of the cluster.
float get3SampleCoGRawTime() const
return the raw time of the cluster for the 3-sample CoG
float getCharge() const
return the charge of the cluster
float get6SampleCoGTimeError() const
return the time of the cluster for the 6-sample CoG
std::pair< int, std::vector< float > > getMaxSum3Samples() const
returns the float vector of clustered 3-samples selected by the MaxSum method with First Frame of the...
int m_sizeHeadTail
number of strips after which we switch from COG to HeadTail estimation of the position
int m_timeAlgorithm
selects the algorithm to compute the cluster tim 0 = 6-sample CoG (default) 1 = 3-sample CoG 2 = 3-sa...
bool isUSide()
return true if the cluster is on the U/P side
float m_chargeError
Error on Charge of the cluster.
VxdID getSensorID()
return the VxdID of the cluster sensor
double m_cutSeed
SNR above which the strip can be considered as seed.
float get3SampleELSTimeError() const
return the time of the cluster for the 3-sample ELS
float getSeedCharge() const
return the seed charge of the cluster
float m_seedCharge
Seed Charge of the cluster.
float getTimeError() const
return the error on the time of the cluster depending on the m_timeAlgorithm, implemented only for th...
int m_seedIndex
SVDRecoDigit index of the seed strip of the cluster.
double m_cutAdjacent
SNR above which the strip can be considered for clustering.
int size() const
return the cluster size (number of strips of the cluster
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.
structure containing the relevant informations of eachstrip of the cluster
float timeError
6-sample CoG strip time error
int recoDigitIndex
index of the reco digit
float time
6-sample CoG strip time