Belle II Software  release-05-02-19
SimHitBase.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Peter Kvasnicka, Marko staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/dataobjects/BackgroundMetaData.h>
14 #include <framework/datastore/RelationsObject.h>
15 
16 
17 namespace Belle2 {
30  class SimHitBase : public RelationsObject {
31  public:
35  SimHitBase(): m_backgroundTag(BackgroundMetaData::bg_none) {}
36 
41  virtual void setBackgroundTag(unsigned int backgroundTag)
42  { m_backgroundTag = static_cast<unsigned short>(backgroundTag); }
43 
48  virtual unsigned short getBackgroundTag() const { return m_backgroundTag; }
49 
56  virtual void shiftInTime(float /*delta*/) {}
57 
63  virtual float getGlobalTime() const { return 0; }
64 
65 
66  private:
67 
68  unsigned short m_backgroundTag;
71  };
72 
73 
75 } // end namespace Belle2
76 
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::SimHitBase::setBackgroundTag
virtual void setBackgroundTag(unsigned int backgroundTag)
Set background tag.
Definition: SimHitBase.h:49
Belle2::SimHitBase::shiftInTime
virtual void shiftInTime(float)
The method to shift the SimHit in time.
Definition: SimHitBase.h:64
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::SimHitBase::getBackgroundTag
virtual unsigned short getBackgroundTag() const
Get background tag.
Definition: SimHitBase.h:56
Belle2::SimHitBase::m_backgroundTag
unsigned short m_backgroundTag
Background tag.
Definition: SimHitBase.h:76
Belle2::SimHitBase::getGlobalTime
virtual float getGlobalTime() const
Get time of the hit.
Definition: SimHitBase.h:71