Belle II Software  release-05-02-19
SegmentHit.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : SegmentHit.h
5 // Section : TRG CDC
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to represent a track segment hit in CDC.
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #ifndef TRGCDCSegmentHit_FLAG_
15 #define TRGCDCSegmentHit_FLAG_
16 
17 #include "trg/cdc/CellHit.h"
18 
19 #ifdef TRGCDC_SHORT_NAMES
20 #define TCSHit TRGCDCSegmentHit
21 #endif
22 
23 namespace Belle2 {
29  class TRGCDCSegment;
30 
33 
34  public:
35 
37  explicit TRGCDCSegmentHit(const TRGCDCSegment&);
38 
40  virtual ~TRGCDCSegmentHit();
41 
43  static void removeAll(void);
44 
46  static void* operator new(size_t);
47 
49  static void operator delete(void*);
50 
51  public:// Selectors
52 
54  virtual void dump(const std::string& message = std::string(""),
55  const std::string& prefix = std::string("")) const override;
56 
58  const TRGCDCSegment& segment(void) const;
59 
61  const TRGSignal& signal(void) const;
62 
63  public:// Modifiers
64 
65  public:// Static utility functions
66 
68  static int sortById(const TRGCDCSegmentHit** a,
69  const TRGCDCSegmentHit** b);
70 
71  private:
72 
74  static std::vector<TRGCDCSegmentHit*> _all;
75 
76  };
77 
78 //-----------------------------------------------------------------------------
79 
80  inline
81  const TRGSignal&
83  {
84  return cell().signal();
85  }
86 
88 } // namespace Belle2
89 
90 #endif /* TRGCDCSegmentHit_FLAG_ */
Belle2::TRGCDCSegmentHit::signal
const TRGSignal & signal(void) const
returns trigger output. Null will returned if no signal.
Definition: SegmentHit.h:82
Belle2::TRGSignal
A class to represent a digitized signal. Unit is nano second.
Definition: Signal.h:28
Belle2::TRGCDCSegmentHit::sortById
static int sortById(const TRGCDCSegmentHit **a, const TRGCDCSegmentHit **b)
Sorting funnction.
Definition: SegmentHit.cc:60
Belle2::TRGCDCSegmentHit::~TRGCDCSegmentHit
virtual ~TRGCDCSegmentHit()
Destructor.
Definition: SegmentHit.cc:55
Belle2::TRGCDCCell::signal
virtual const TRGSignal & signal(void) const =0
returns trigger output. Null will returned if no signal.
Belle2::TRGCDCSegmentHit::TRGCDCSegmentHit
TRGCDCSegmentHit(const TRGCDCSegment &)
Constructor.
Definition: SegmentHit.cc:33
Belle2::TRGCDCSegmentHit::segment
const TRGCDCSegment & segment(void) const
returns a pointer to a track segment.
Definition: SegmentHit.cc:79
Belle2::TRGCDCSegmentHit::dump
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dumps debug information.
Definition: SegmentHit.cc:72
Belle2::TRGCDCCellHit
A class to represent a wire hit in CDC.
Definition: CellHit.h:75
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGCDCSegmentHit
A class to represent a track segment hit in CDC.
Definition: SegmentHit.h:32
Belle2::TRGCDCSegment
A class to represent a wire in CDC.
Definition: Segment.h:40
Belle2::TRGCDCCellHit::cell
virtual const TRGCDCCell & cell(void) const
returns a pointer to a TRGCDCWire.
Definition: CellHit.h:253
Belle2::TRGCDCSegmentHit::_all
static std::vector< TRGCDCSegmentHit * > _all
Keeps all TRGCDCSegmentHit created by new().
Definition: SegmentHit.h:74
Belle2::TRGCDCSegmentHit::removeAll
static void removeAll(void)
destructs all TRGCDCCellHit objects. (Called by TRGCDC)
Definition: SegmentHit.cc:85