Belle II Software  release-08-01-10
RealisticTDCCountTranslator.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 <cdc/translators/TDCCountTranslatorBase.h>
12 #include <cdc/geometry/CDCGeometryPar.h>
13 #include <cdc/geometry/CDCGeoControlPar.h>
14 #include <cdc/simulation/CDCSimControlPar.h>
15 
16 #include <framework/dataobjects/EventT0.h>
17 
18 namespace Belle2 {
23  namespace CDC {
26 
27  public:
29  explicit RealisticTDCCountTranslator(bool useInWirePropagationDelay = false);
30 
33 
46  double getDriftLength(unsigned short tdcCount,
47  const WireID& wireID = WireID(),
48  double timeOfFlightEstimator = 0,
49  bool leftRight = false,
50  double z = 0,
51  double alpha = 0,
52  double theta = static_cast<double>(TMath::Pi() / 2.),
53  unsigned short adcCount = 0) override;
54 
64  double getDriftTime(unsigned short tdcCount,
65  const WireID& wireID,
66  double timeOfFlightEstimator,
67  double z,
68  unsigned short adcCount) override;
69 
81  double getDriftLengthResolution(double driftLength,
82  const WireID& wireID = WireID(),
83  bool leftRight = false,
84  double z = 0,
85  double alpha = 0,
86  double = static_cast<double>(TMath::Pi() / 2.)) override;
87 
88  private:
95 
99  bool m_realData = false;
100 
105 
110 
115 
120 
121  // /**
122  // * Hit timing offset value.
123  // */
124  // unsigned short m_tdcOffset;
125 
130  const double m_tdcBinWidth;
131 
135  double m_fudgeFactor = 1.;
136  };
137  }
139 }
The Class for CDC Geometry Control Parameters.
The Class for CDC Geometry Parameters.
The Class for CDC Simulation Control Parameters.
Translator mirroring the realistic Digitization.
StoreObjPtr< EventT0 > m_eventTimeStoreObject
Event timing.
double getDriftLength(unsigned short tdcCount, const WireID &wireID=WireID(), double timeOfFlightEstimator=0, bool leftRight=false, double z=0, double alpha=0, double theta=static_cast< double >(TMath::Pi()/2.), unsigned short adcCount=0) override
Get Drift length.
const double m_tdcBinWidth
Cached TDC bin width (ns).
RealisticTDCCountTranslator(bool useInWirePropagationDelay=false)
Constructor, with the additional information, if propagation in the wire shall be considered.
double m_fudgeFactor
Cached fudge factor for space resol.
const CDCSimControlPar & m_scp
Cached reference to CDC SimControlPar object.
const CDCGeometryPar & m_cdcp
Cached reference to CDC GeometryPar object.
double getDriftLengthResolution(double driftLength, const WireID &wireID=WireID(), bool leftRight=false, double z=0, double alpha=0, double=static_cast< double >(TMath::Pi()/2.)) override
Get position resolution^2 corresponding to the drift length from getDriftLength of this class.
bool m_useInWirePropagationDelay
Flag to activate the propagation delay of the sense wire.
const CDCGeoControlPar & m_gcp
Cached reference to CDC GeoControlPar object.
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
Get Drift time.
Base class for translation of Drift Time into Drift Length.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Abstract base class for different kinds of events.