Belle II Software  release-08-01-10
SVDTimeGroupingConfiguration.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 <framework/logging/Logger.h>
12 
13 #include "TObject.h"
14 #include "TString.h"
15 
16 #include <vector>
17 
18 namespace Belle2 {
28  struct SVDTimeGroupingParameters: public TObject {
30  Float_t tRange[2];
34  Float_t fillSigmaN;
36  Float_t limitSigma[2];
40  Float_t removeSigmaN;
42  Float_t fracThreshold;
44  Int_t maxGroups;
46  Float_t expectedSignalTime[3];
48  Float_t signalLifetime;
54  Float_t acceptSigmaN;
65  std::vector<Float_t> clsSigma[3][2];
66 
67  TString _COMMENT;
69  };
70 
74  class SVDTimeGroupingConfiguration: public TObject {
75  public:
76 
80  SVDTimeGroupingConfiguration(const TString& uniqueID = "",
81  const std::vector<TString>& description = {})
82  : m_uniqueID(uniqueID), m_description(description)
83  {
84 
85  setTimeGroupingParameters("CoG3", 6).tRange[0] = -160;
86  setTimeGroupingParameters("CoG3", 6).tRange[1] = 160;
89  setTimeGroupingParameters("CoG3", 6).limitSigma[0] = 1;
90  setTimeGroupingParameters("CoG3", 6).limitSigma[1] = 15;
93  setTimeGroupingParameters("CoG3", 6).fracThreshold = 0.05;
94  setTimeGroupingParameters("CoG3", 6).maxGroups = 20;
102  setTimeGroupingParameters("CoG3", 6).writeGroupInfo = true;
104  setTimeGroupingParameters("CoG3", 6).clsSigma[0][0] = {3.49898, 2.94008, 3.46766, 5.3746, 6.68848, 7.35446, 7.35983, 7.71601, 10.6172, 13.4805};
105  setTimeGroupingParameters("CoG3", 6).clsSigma[0][1] = {6.53642, 3.76216, 3.30086, 3.95969, 5.49408, 7.07294, 8.35687, 8.94839, 9.23135, 10.485};
106  setTimeGroupingParameters("CoG3", 6).clsSigma[1][0] = {3.49898, 2.94008, 3.46766, 5.3746, 6.68848, 7.35446, 7.35983, 7.71601, 10.6172, 13.4805};
107  setTimeGroupingParameters("CoG3", 6).clsSigma[1][1] = {6.53642, 3.76216, 3.30086, 3.95969, 5.49408, 7.07294, 8.35687, 8.94839, 9.23135, 10.485};
108  setTimeGroupingParameters("CoG3", 6).clsSigma[2][0] = {3.49898, 2.94008, 3.46766, 5.3746, 6.68848, 7.35446, 7.35983, 7.71601, 10.6172, 13.4805};
109  setTimeGroupingParameters("CoG3", 6).clsSigma[2][1] = {6.53642, 3.76216, 3.30086, 3.95969, 5.49408, 7.07294, 8.35687, 8.94839, 9.23135, 10.485};
110 
111 
112  // initialize all other algorithms same as CoG3-6sample.
113  // values must be checked in the globaltag before use
114 
117 
121  };
122 
126  TString get_uniqueID() const {return m_uniqueID;}
127 
132  const Int_t& numberOfAcquiredSamples) const
133  {
134  if (numberOfAcquiredSamples == 6) {
135  if (alg == "CoG3")
137  else if (alg == "ELS3")
139  else if (alg == "CoG6")
141  } else if (numberOfAcquiredSamples == 3) {
142  if (alg == "CoG3")
144  else if (alg == "ELS3")
146  else if (alg == "CoG6")
148  }
149  B2FATAL("This state is forbidden");
150  };
151 
152 
153 
158  const Int_t& numberOfAcquiredSamples)
159  {
160  if (numberOfAcquiredSamples == 6) {
161  if (alg == "CoG3")
163  else if (alg == "ELS3")
165  else if (alg == "CoG6")
167  } else if (numberOfAcquiredSamples == 3) {
168  if (alg == "CoG3")
170  else if (alg == "ELS3")
172  else if (alg == "CoG6")
174  }
175  B2FATAL("This state is forbidden");
176  };
177 
179  static std::string name;
180 
181  private:
182 
184  TString m_uniqueID;
186  std::vector<TString> m_description;
187 
194 
201 
204  };
205 
207 }
This class store the reconstruction configuration of SVDTimeGrouping module.
TString m_uniqueID
unique identifier of the payload
ClassDef(SVDTimeGroupingConfiguration, 1)
needed by root
SVDTimeGroupingConfiguration(const TString &uniqueID="", const std::vector< TString > &description={})
Default constructor.
SVDTimeGroupingParameters m_parsForCoG3In3Samples
parameters for CoG3 time-algorithm in 3-sample DAQ mode
SVDTimeGroupingParameters m_parsForCoG6In6Samples
parameters for CoG6 time-algorithm in 6-sample DAQ mode
SVDTimeGroupingParameters & setTimeGroupingParameters(const TString &alg, const Int_t &numberOfAcquiredSamples)
Sets all the parameters.
SVDTimeGroupingParameters m_parsForELS3In3Samples
parameters for ELS3 time-algorithm in 3-sample DAQ mode
std::vector< TString > m_description
short descrition of the payload
SVDTimeGroupingParameters m_parsForELS3In6Samples
parameters for ELS3 time-algorithm in 6-sample DAQ mode
SVDTimeGroupingParameters getTimeGroupingParameters(const TString &alg, const Int_t &numberOfAcquiredSamples) const
Returns the reference to the parameters.
TString get_uniqueID() const
Get the unique ID of the calibration.
SVDTimeGroupingParameters m_parsForCoG3In6Samples
parameters for CoG3 time-algorithm in 6-sample DAQ mode
static std::string name
name of the payload
SVDTimeGroupingParameters m_parsForCoG6In3Samples
parameters for CoG6 time-algorithm in 3-sample DAQ mode
Abstract base class for different kinds of events.
structure containing the relevant informations of SVDTimeGrouping module
Float_t removeSigmaN
Remove upto this sigma of fitted gaus from histogram.
Float_t signalLifetime
Group prominence is weighted with exponential weight with a lifetime defined by this parameter [ns].
Int_t rebinningFactor
Time bin width is 1/rebinningFactor [ns].
Float_t fillSigmaN
Number of Gaussian sigmas used to fill the time histogram for each cluster.
Float_t acceptSigmaN
Clusters are tagged within this of fitted group.
Float_t fitRangeHalfWidth
Half width of the range in which the fit for the peak-search is performed [ns].
Float_t fracThreshold
Minimum fraction of candidates in a peak (wrt to the highest peak) considered for fitting in the peak...
ClassDef(SVDTimeGroupingParameters, 1)
needed by root
Float_t limitSigma[2]
Limit of cluster time sigma for the fit for the peak-search [ns].
Bool_t formSingleSignalGroup
Assign groupID = 0 to all clusters belonging to the signal groups.
Float_t tRange[2]
Expected range of svd time histogram [ns].
Bool_t writeGroupInfo
Write group info in SVDCluster, otherwise kept empty.
Int_t numberOfSignalGroups
Number of groups expected to contain the signal clusters.
std::vector< Float_t > clsSigma[3][2]
Cls-time resolution based on sensor side and type, types -> 0: L3, 1: Barrel, 2: Forward.
Bool_t includeOutOfRangeClusters
Assign groups to under and overflow.
Int_t maxGroups
maximum number of groups to be accepted.
Float_t expectedSignalTime[3]
Expected time-range and mean of the signal [ns].