BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitSuper_Mdc.cxx
Go to the documentation of this file.
1//
2#include "KalFitAlg/KalFitList.h"
3#include "KalFitAlg/KalFitLayer_Mdc.h"
4#include "KalFitAlg/KalFitSuper_Mdc.h"
5#include "KalFitAlg/KalFitWire.h"
6
7//...Globals...
8const unsigned int
9KalFitSuper_Mdc::_neighborsMask[6] = {452,420,340,172,92,60};
10// [0] = 452 = FTWireHitAppended + FTWireNeighbor345
11// [1] = 420 = FTWireHitAppended + FTWireNeighbor245
12// definitions of [2] = 340 = FTWireHitAppended + FTWireNeighbor135
13// _neighborsMask[] [3] = 172 = FTWireHitAppended + FTWireNeighbor024
14// [4] = 92 = FTWireHitAppended + FTWireNeighbor013
15// [5] = 60 = FTWireHitAppended + FTWireNeighbor012
16
17KalFitSuper_Mdc::KalFitSuper_Mdc(const int firstWireID,const int NWire,
18 const int firstLayerID,const int NLayer,
19 const int superLayerID)
20 : _superLayerId(superLayerID),
21 _firstWireId(firstWireID),
22 _Nwire(NWire),
23 _firstLayerId(firstLayerID),
24 _Nlayer(NLayer),
25 _wireHits(*(new KalFitList<KalFitWire *>(500))),
26 _singleHits(*(new KalFitList<KalFitWire *>(100)))
27{
28
29}
30
32{
33 clear();
34 delete &_wireHits;
35 delete &_singleHits;
36}
37
38void
40{
41 if(_wireHits.length()){
42 register KalFitWire ** hptr = _wireHits.firstPtr();
43 KalFitWire ** const last = _wireHits.lastPtr();
44 do {(**hptr).state(WireHitInvalid);}while((long)(hptr++)^(long)last);
45 _wireHits.clear();
46 }
47}
48
49const int
51 return _Nwire;
52}
53
54
55const int
57 return _Nlayer;
58}
59
60
61const int
63 return (_Nwire - 1);
64}
65
66
67const int
69 return (_Nlayer - 1);
70}
71
72
73const int
75 return _superLayerId;
76}
77
T * lastPtr(void) const
returns the pointer of last object
int length(void) const
returns the length of the list
T * firstPtr(void) const
returns the pointer of first object
void clear(void)
clear lists but the allocated memory remains same
const int localMaxId(void) const
returns local max ID
KalFitSuper_Mdc(const int firstWireID, const int NWire, const int firstLayerID, const int NLayer, const int superLayerID)
Constructors and destructor.
const int superLayerId(void) const
returns super-layer ID
const int nLayer(void) const
returns number of layers
const int nWire(void) const
returns number of wires
const int layerMaxId(void) const
returns layer max ID
void clear(void)
clear object