Belle II Software  release-05-01-25
RealisticTDCCountTranslator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: CDC group *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef REALISTICTDCCOUNTTRANSLATOR_H
12 #define REALISTICTDCCOUNTTRANSLATOR_H
13 
14 #include <cdc/dataobjects/TDCCountTranslatorBase.h>
15 #include <cdc/geometry/CDCGeometryPar.h>
16 #include <cdc/geometry/CDCGeoControlPar.h>
17 #include <cdc/simulation/CDCSimControlPar.h>
18 
19 #include <framework/dataobjects/EventT0.h>
20 
21 namespace Belle2 {
26  namespace CDC {
28  class RealisticTDCCountTranslator : public TDCCountTranslatorBase {
29 
30  public:
32  explicit RealisticTDCCountTranslator(bool useInWirePropagationDelay = false);
33 
36 
41  void setEventTime(double eventTime = 0) __attribute__((deprecated))
42  {
43  if (not m_eventTimeStoreObject.isValid()) {
44  m_eventTimeStoreObject.create();
45  }
46 
47  m_eventTimeStoreObject->setEventT0(eventTime, 0, Const::CDC);
48  }
49 
62  double getDriftLength(unsigned short tdcCount,
63  const WireID& wireID = WireID(),
64  double timeOfFlightEstimator = 0,
65  bool leftRight = false,
66  double z = 0,
67  double alpha = 0,
68  double theta = static_cast<double>(TMath::Pi() / 2.),
69  unsigned short adcCount = 0) override;
70 
80  double getDriftTime(unsigned short tdcCount,
81  const WireID& wireID,
82  double timeOfFlightEstimator,
83  double z,
84  unsigned short adcCount) override;
85 
97  double getDriftLengthResolution(double driftLength,
98  const WireID& wireID = WireID(),
99  bool leftRight = false,
100  double z = 0,
101  double alpha = 0,
102  double = static_cast<double>(TMath::Pi() / 2.)) override;
103 
104  private:
111 
115  bool m_realData = false;
116 
121 
125  const CDCGeoControlPar& m_gcp;
126 
130  const CDCSimControlPar& m_scp;
131 
135  const CDCGeometryPar& m_cdcp;
136 
137  // /**
138  // * Hit timing offset value.
139  // */
140  // unsigned short m_tdcOffset;
141 
146  const double m_tdcBinWidth;
147 
151  double m_fudgeFactor = 1.;
152  };
153  }
155 }
156 #endif /* RealisticTDCCountTranslator_H_ */
Belle2::WireID
Class to identify a wire inside the CDC.
Definition: WireID.h:44
Belle2::CDC::RealisticTDCCountTranslator::getDriftLengthResolution
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.
Definition: RealisticTDCCountTranslator.cc:140
Belle2::CDC::RealisticTDCCountTranslator::m_fudgeFactor
double m_fudgeFactor
Cached fudge factor for space resol.
Definition: RealisticTDCCountTranslator.h:159
Belle2::CDC::RealisticTDCCountTranslator::setEventTime
void setEventTime(double eventTime=0) __attribute__((deprecated))
If trigger jitter was simulated, in every event one has to give an estimate of the effect.
Definition: RealisticTDCCountTranslator.h:49
Belle2::CDC::RealisticTDCCountTranslator::~RealisticTDCCountTranslator
~RealisticTDCCountTranslator()
Destructor.
Definition: RealisticTDCCountTranslator.h:43
Belle2::CDC::RealisticTDCCountTranslator::m_eventTimeStoreObject
StoreObjPtr< EventT0 > m_eventTimeStoreObject
Event timing.
Definition: RealisticTDCCountTranslator.h:128
Belle2::CDC::RealisticTDCCountTranslator::m_cdcp
const CDCGeometryPar & m_cdcp
Cached reference to CDC GeometryPar object.
Definition: RealisticTDCCountTranslator.h:143
Belle2::CDC::RealisticTDCCountTranslator::m_gcp
const CDCGeoControlPar & m_gcp
Cached reference to CDC GeoControlPar object.
Definition: RealisticTDCCountTranslator.h:133
Belle2::CDC::CDCGeometryPar
The Class for CDC Geometry Parameters.
Definition: CDCGeometryPar.h:75
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDC::CDCSimControlPar
The Class for CDC Simulation Control Parameters.
Definition: CDCSimControlPar.h:31
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::CDC::RealisticTDCCountTranslator::RealisticTDCCountTranslator
RealisticTDCCountTranslator(bool useInWirePropagationDelay=false)
Constructor, with the additional information, if propagation in the wire shall be considered.
Definition: RealisticTDCCountTranslator.cc:21
Belle2::CDC::RealisticTDCCountTranslator::getDriftLength
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.
Definition: RealisticTDCCountTranslator.cc:106
Belle2::CDC::RealisticTDCCountTranslator::getDriftTime
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
Get Drift time.
Definition: RealisticTDCCountTranslator.cc:53
Belle2::CDC::RealisticTDCCountTranslator::m_scp
const CDCSimControlPar & m_scp
Cached reference to CDC SimControlPar object.
Definition: RealisticTDCCountTranslator.h:138
Belle2::CDC::RealisticTDCCountTranslator::m_useInWirePropagationDelay
bool m_useInWirePropagationDelay
Flag to activate the propagation delay of the sense wire.
Definition: RealisticTDCCountTranslator.h:118
Belle2::CDC::RealisticTDCCountTranslator::m_realData
bool m_realData
Flag to distinguish betw.
Definition: RealisticTDCCountTranslator.h:123
Belle2::CDC::CDCGeoControlPar
The Class for CDC Geometry Control Parameters.
Definition: CDCGeoControlPar.h:33
Belle2::CDC::RealisticTDCCountTranslator::m_tdcBinWidth
const double m_tdcBinWidth
Cached TDC bin width (ns).
Definition: RealisticTDCCountTranslator.h:154