Belle II Software  release-06-01-15
SimpleTDCCountTranslator.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 #include <cdc/dataobjects/TDCCountTranslatorBase.h>
13 
14 #include <TVector3.h>
15 
16 namespace Belle2 {
21  namespace CDC {
24  public:
26  explicit SimpleTDCCountTranslator(bool useInWirePropagationDelay = false) :
27  m_useInWirePropagationDelay(useInWirePropagationDelay), m_eventTime(0)
28  {
29  B2FATAL("This translator is disabled; please use realisticTDCCountTranslator instead.");
30  }
31 
34 
36  void setEventTime(short eventTime = 0)
37  {
38  m_eventTime = eventTime;
39  }
40 
51  double getDriftLength(unsigned short tdcCount,
52  const WireID& wireID = WireID(),
53  double timeOfFlightEstimator = 0,
54  bool leftRight = false,
55  double z = 0,
56  double = 0,
57  double = 0,
58  unsigned short = 0) override;
59 
69  double getDriftTime(unsigned short tdcCount,
70  const WireID& wireID,
71  double timeOfFlightEstimator,
72  double z,
73  unsigned short) override;
74 
81  double getDriftLengthResolution(double,
82  const WireID& = WireID(),
83  bool = false,
84  double = 0,
85  double = 0,
86  double = 0) override;
87 
88  private:
95 
99  TVector3 m_backWirePos;
100 
105  double m_eventTime;
106  };
107  }
109 }
Translator mirroring the simple Digitization.
SimpleTDCCountTranslator(bool useInWirePropagationDelay=false)
Constructor, with the additional information, if propagation in the wire shall be considered.
double getDriftLengthResolution(double, const WireID &=WireID(), bool=false, double=0, double=0, double=0) override
Uncertainty corresponding to drift length from getDriftLength of this class.
void setEventTime(short eventTime=0)
If trigger jitter was simulated, in every event one has to give an estimate of the effect.
double getDriftLength(unsigned short tdcCount, const WireID &wireID=WireID(), double timeOfFlightEstimator=0, bool leftRight=false, double z=0, double=0, double=0, unsigned short=0) override
Get Drift length (cm).
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short) override
Get Drift time.
TVector3 m_backWirePos
Wire position at the cdc backward endplate.
bool m_useInWirePropagationDelay
Flag to activate the propagation delay of the sense wire.
Base class for translation of Drift Time into Drift Length.
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Abstract base class for different kinds of events.