Belle II Software  release-05-01-25
SimpleTDCCountTranslator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Heck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef SIMPLETDCCOUNTTRANSLATOR_H
12 #define SIMPLETDCCOUNTTRANSLATOR_H
13 
14 #include <framework/logging/Logger.h>
15 #include <cdc/dataobjects/TDCCountTranslatorBase.h>
16 
17 #include <TVector3.h>
18 
19 namespace Belle2 {
24  namespace CDC {
26  class SimpleTDCCountTranslator : public TDCCountTranslatorBase {
27  public:
29  explicit SimpleTDCCountTranslator(bool useInWirePropagationDelay = false) :
30  m_useInWirePropagationDelay(useInWirePropagationDelay), m_eventTime(0)
31  {
32  B2FATAL("This translator is disabled; please use realisticTDCCountTranslator instead.");
33  }
34 
37 
39  void setEventTime(short eventTime = 0)
40  {
41  m_eventTime = eventTime;
42  }
43 
54  double getDriftLength(unsigned short tdcCount,
55  const WireID& wireID = WireID(),
56  double timeOfFlightEstimator = 0,
57  bool leftRight = false,
58  double z = 0,
59  double = 0,
60  double = 0,
61  unsigned short = 0) override;
62 
72  double getDriftTime(unsigned short tdcCount,
73  const WireID& wireID,
74  double timeOfFlightEstimator,
75  double z,
76  unsigned short) override;
77 
84  double getDriftLengthResolution(double,
85  const WireID& = WireID(),
86  bool = false,
87  double = 0,
88  double = 0,
89  double = 0) override;
90 
91  private:
98 
102  TVector3 m_backWirePos;
103 
108  double m_eventTime;
109  };
110  }
112 }
113 #endif /* SimpleTDCCountTranslator_H_ */
Belle2::WireID
Class to identify a wire inside the CDC.
Definition: WireID.h:44
Belle2::CDC::SimpleTDCCountTranslator::getDriftLength
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).
Definition: SimpleTDCCountTranslator.cc:18
Belle2::CDC::SimpleTDCCountTranslator::getDriftTime
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short) override
Get Drift time.
Definition: SimpleTDCCountTranslator.cc:35
Belle2::CDC::SimpleTDCCountTranslator::setEventTime
void setEventTime(short eventTime=0)
If trigger jitter was simulated, in every event one has to give an estimate of the effect.
Definition: SimpleTDCCountTranslator.h:47
Belle2::CDC::SimpleTDCCountTranslator::SimpleTDCCountTranslator
SimpleTDCCountTranslator(bool useInWirePropagationDelay=false)
Constructor, with the additional information, if propagation in the wire shall be considered.
Definition: SimpleTDCCountTranslator.h:37
Belle2::CDC::SimpleTDCCountTranslator::m_eventTime
double m_eventTime
Event timing.
Definition: SimpleTDCCountTranslator.h:116
Belle2::CDC::SimpleTDCCountTranslator::getDriftLengthResolution
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.
Definition: SimpleTDCCountTranslator.cc:70
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDC::SimpleTDCCountTranslator::m_useInWirePropagationDelay
bool m_useInWirePropagationDelay
Flag to activate the propagation delay of the sense wire.
Definition: SimpleTDCCountTranslator.h:105
Belle2::CDC::SimpleTDCCountTranslator::~SimpleTDCCountTranslator
~SimpleTDCCountTranslator()
Destructor.
Definition: SimpleTDCCountTranslator.h:44
Belle2::CDC::SimpleTDCCountTranslator::m_backWirePos
TVector3 m_backWirePos
Wire position at the cdc backward endplate.
Definition: SimpleTDCCountTranslator.h:110