Belle II Software development
WireHit.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//-----------------------------------------------------------------------------
10// Description : A class to represent a wire hit in CDC.
11//-----------------------------------------------------------------------------
12
13#ifndef TRGCDCWireHit_FLAG_
14#define TRGCDCWireHit_FLAG_
15
16#include <vector>
17#include "trg/cdc/CellHit.h"
18
19#ifdef TRGCDC_SHORT_NAMES
20#define TCWHit TRGCDCWireHit
21#endif
22
23namespace Belle2 {
29 class TRGCDCWire;
30 class TRGCDCWireHitMC;
31
34
35 public:
37 explicit TRGCDCWireHit(const TRGCDCWire&,
38 unsigned indexCDCHit = 0,
39 unsigned indexCDCSimHit = 0,
40 unsigned indexMCParticle = 0,
41 float driftLeft = 0,
42 float driftLeftError = 0,
43 float driftRight = 0,
44 float driftRightError = 0,
45 int mcLRflag = 1,
46 float fudgeFacgtor = 1);
47
49 virtual ~TRGCDCWireHit();
50
52 static void removeAll(void);
53
55 static void* operator new (size_t);
56
58 static void operator delete (void*);
59
60 public:// Selectors
61
63 const TRGCDCWire& wire(void) const;
64
66 const TRGCDCWireHitMC* mc(void) const;
67
70
72 unsigned iCDCSimHit(void) const;
73
74 public:// Static utility functions
75
77 static int sortByWireId(const TRGCDCWireHit** a,
78 const TRGCDCWireHit** b);
79
80 private:
81
83 static std::vector<TRGCDCWireHit*> _all;
84
87
89 unsigned _iCDCSimHit;
90
91 };
92
93//-----------------------------------------------------------------------------
94
95 inline
96 const TRGCDCWireHitMC*
98 {
99 return _mc;
100 }
101
102 inline
103 const TRGCDCWireHitMC*
105 {
106 return _mc = a;
107 }
108
109 inline
110 unsigned
112 {
113 return _iCDCSimHit;
114 }
115
117} // namespace Belle2
118
119#endif /* TRGCDCWireHit_FLAG_ */
A class to represent a wire hit in CDC.
Definition: CellHit.h:74
A class to represent a MC wire hit in CDC.
Definition: WireHitMC.h:34
A class to represent a wire hit in CDC.
Definition: WireHit.h:33
const TRGCDCWireHitMC * _mc
This will be removed.
Definition: WireHit.h:86
unsigned _iCDCSimHit
index of CDCSimHit
Definition: WireHit.h:89
A class to represent a wire in CDC.
Definition: Wire.h:56
static int sortByWireId(const TRGCDCWireHit **a, const TRGCDCWireHit **b)
Sort function. This will be removed.
Definition: WireHit.cc:66
static std::vector< TRGCDCWireHit * > _all
Keeps all TRGCDCWireHit created by new().
Definition: WireHit.h:83
const TRGCDCWire & wire(void) const
returns a pointer to a TRGCDCWire.
Definition: WireHit.cc:60
static void removeAll(void)
destructs all TRGCDCCellHit objects. (Called by TRGCDC)
Definition: WireHit.cc:78
virtual ~TRGCDCWireHit()
Destructor.
Definition: WireHit.cc:55
const TRGCDCWireHitMC * mc(void) const
This will be removed.
Definition: WireHit.h:97
unsigned iCDCSimHit(void) const
return index of CDCSimHit
Definition: WireHit.h:111
Abstract base class for different kinds of events.