Belle II Software  release-06-00-14
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/dataobjects/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 
38  void setEventTime(double eventTime = 0) __attribute__((deprecated))
39  {
40  if (not m_eventTimeStoreObject.isValid()) {
41  m_eventTimeStoreObject.create();
42  }
43 
44  m_eventTimeStoreObject->setEventT0(eventTime, 0, Const::CDC);
45  }
46 
59  double getDriftLength(unsigned short tdcCount,
60  const WireID& wireID = WireID(),
61  double timeOfFlightEstimator = 0,
62  bool leftRight = false,
63  double z = 0,
64  double alpha = 0,
65  double theta = static_cast<double>(TMath::Pi() / 2.),
66  unsigned short adcCount = 0) override;
67 
77  double getDriftTime(unsigned short tdcCount,
78  const WireID& wireID,
79  double timeOfFlightEstimator,
80  double z,
81  unsigned short adcCount) override;
82 
94  double getDriftLengthResolution(double driftLength,
95  const WireID& wireID = WireID(),
96  bool leftRight = false,
97  double z = 0,
98  double alpha = 0,
99  double = static_cast<double>(TMath::Pi() / 2.)) override;
100 
101  private:
108 
112  bool m_realData = false;
113 
118 
123 
128 
133 
134  // /**
135  // * Hit timing offset value.
136  // */
137  // unsigned short m_tdcOffset;
138 
143  const double m_tdcBinWidth;
144 
148  double m_fudgeFactor = 1.;
149  };
150  }
152 }
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.
void setEventTime(double eventTime=0)
If trigger jitter was simulated, in every event one has to give an estimate of the effect.
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:95
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Abstract base class for different kinds of events.