BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSegData Class Reference

#include <MdcSegData.h>

Public Types

typedef MdcMap< const MdcHit *, MdcSegUsage * > MdcHitDict
typedef MdcMap< const MdcHit *, MdcSegUsage * > MdcHitDict
typedef MdcMap< const MdcHit *, MdcSegUsage * > MdcHitDict

Public Member Functions

 MdcSegData (bool skipUsedHit)
virtual ~MdcSegData ()
int nevent () const
int nhits () const
int runNumber () const
const MdcHithit (int hitno) const
const MdcHitDictsegUsage () const
const MdcHitMaphitMap () const
void loadevent (MdcHitCol *col, MdcHitMap *hmap, double tbunch)
double bunchTime (void) const
bool skippingUsed () const
void poisonHits (const MdcDetector *gm, int debug=0)
 MdcSegData (bool skipUsedHit)
virtual ~MdcSegData ()
int nevent () const
int nhits () const
int runNumber () const
const MdcHithit (int hitno) const
const MdcHitDictsegUsage () const
const MdcHitMaphitMap () const
void loadevent (MdcHitCol *col, MdcHitMap *hmap, double tbunch)
double bunchTime (void) const
bool skippingUsed () const
void poisonHits (const MdcDetector *gm, int debug=0)
 MdcSegData (bool skipUsedHit)
virtual ~MdcSegData ()
int nevent () const
int nhits () const
int runNumber () const
const MdcHithit (int hitno) const
const MdcHitDictsegUsage () const
const MdcHitMaphitMap () const
void loadevent (MdcHitCol *col, MdcHitMap *hmap, double tbunch)
double bunchTime (void) const
bool skippingUsed () const
void poisonHits (const MdcDetector *gm, int debug=0)

Detailed Description

Member Typedef Documentation

◆ MdcHitDict [1/3]

◆ MdcHitDict [2/3]

◆ MdcHitDict [3/3]

Constructor & Destructor Documentation

◆ MdcSegData() [1/3]

MdcSegData::MdcSegData ( bool skipUsedHit)

Definition at line 16 of file MdcSegData.cxx.

18{
19 eventNumber = 0;
20 _segUsage = 0;
21 _hitMap = 0;
22 _bunchTime = 0;
23 _skipUsed = skip;
24
25 _theHits = 0;
26}

Referenced by poisonHits().

◆ ~MdcSegData() [1/3]

MdcSegData::~MdcSegData ( void )
virtual

Definition at line 29 of file MdcSegData.cxx.

29 {
30 //------------------------------------------------------------------------
31 delete[] _segUsage;
32}

◆ MdcSegData() [2/3]

MdcSegData::MdcSegData ( bool skipUsedHit)

◆ ~MdcSegData() [2/3]

virtual MdcSegData::~MdcSegData ( )
virtual

◆ MdcSegData() [3/3]

MdcSegData::MdcSegData ( bool skipUsedHit)

◆ ~MdcSegData() [3/3]

virtual MdcSegData::~MdcSegData ( )
virtual

Member Function Documentation

◆ bunchTime() [1/3]

double MdcSegData::bunchTime ( void ) const
inline

Definition at line 39 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

39{ return _bunchTime; }

◆ bunchTime() [2/3]

double MdcSegData::bunchTime ( void ) const
inline

Definition at line 39 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

39{ return _bunchTime; }

◆ bunchTime() [3/3]

double MdcSegData::bunchTime ( void ) const
inline

Definition at line 39 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

39{ return _bunchTime; }

◆ hit() [1/3]

const MdcHit * MdcSegData::hit ( int hitno) const

Definition at line 72 of file MdcSegData.cxx.

72 {
73 //------------------------------------------------------------------------
74 return ( *_theHits )[hitno];
75}

◆ hit() [2/3]

const MdcHit * MdcSegData::hit ( int hitno) const

◆ hit() [3/3]

const MdcHit * MdcSegData::hit ( int hitno) const

◆ hitMap() [1/3]

const MdcHitMap * MdcSegData::hitMap ( ) const
inline

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

37{ return _hitMap; }

Referenced by poisonHits().

◆ hitMap() [2/3]

const MdcHitMap * MdcSegData::hitMap ( ) const
inline

Definition at line 37 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

37{ return _hitMap; }

◆ hitMap() [3/3]

const MdcHitMap * MdcSegData::hitMap ( ) const
inline

Definition at line 37 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

37{ return _hitMap; }

◆ loadevent() [1/3]

void MdcSegData::loadevent ( MdcHitCol * col,
MdcHitMap * hmap,
double tbunch )

Definition at line 41 of file MdcSegData.cxx.

41 {
42 //------------------------------------------------------------------------
43 _bunchTime = tb;
44 _theHits = hitcol;
45 _hitMap = hitmap;
46 assert( _hitMap != 0 );
47
48 _segUsageDict.clear();
49 delete[] _segUsage;
50 _segUsage = 0;
51 eventNumber++;
52
53 _segUsage = new MdcSegUsage[nhits()];
54
55 MdcHit* aHit = 0;
56 MdcHitCol::iterator iter = _theHits->begin();
57 int index = 0;
58 for ( ; iter != _theHits->end(); iter++ )
59 {
60 aHit = *iter;
61 _segUsageDict.put( aHit, &( _segUsage[index] ) );
62 if ( skippingUsed() && aHit->usedHit() )
63 {
64 // Mark for later skipping
65 _segUsage[index].killHit();
66 }
67 index++;
68 }
69}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
int nhits() const

◆ loadevent() [2/3]

void MdcSegData::loadevent ( MdcHitCol * col,
MdcHitMap * hmap,
double tbunch )

◆ loadevent() [3/3]

void MdcSegData::loadevent ( MdcHitCol * col,
MdcHitMap * hmap,
double tbunch )

◆ nevent() [1/3]

int MdcSegData::nevent ( ) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

32{ return eventNumber; }

◆ nevent() [2/3]

int MdcSegData::nevent ( ) const
inline

Definition at line 32 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

32{ return eventNumber; }

◆ nevent() [3/3]

int MdcSegData::nevent ( ) const
inline

Definition at line 32 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

32{ return eventNumber; }

◆ nhits() [1/3]

int MdcSegData::nhits ( ) const

Definition at line 35 of file MdcSegData.cxx.

35 {
36 //------------------------------------------------------------------------
37 return _theHits->size();
38}

Referenced by loadevent().

◆ nhits() [2/3]

int MdcSegData::nhits ( ) const

◆ nhits() [3/3]

int MdcSegData::nhits ( ) const

◆ poisonHits() [1/3]

void MdcSegData::poisonHits ( const MdcDetector * gm,
int debug = 0 )

Definition at line 78 of file MdcSegData.cxx.

78 {
79 //------------------------------------------------------------------------
80 // Mark hits as poor candidates for segment-finding, if they are located
81 // within a string of consecutive hits in the same layer (end hits are
82 // not marked).
83 for ( int ilayer = 0; ilayer < gm->nLayer(); ilayer++ )
84 {
85 int nwire = gm->Layer( ilayer )->nWires();
86 for ( int iwire = 0; iwire < nwire; ++iwire )
87 {
88 int wireNext = mdcWrapWire( iwire + 1, nwire );
89 if ( 0 == hitMap()->hitWire( ilayer, wireNext ) )
90 {
91 // 0 1 2 3 4
92 // next wire not there: ? o ? ? ?
93 // so the next-to-next wire shouldn't be poisened
94 // (it's left neighbour is empty)
95 // and the next candidate to check is + 3
96 iwire += 2;
97 continue;
98 }
99
100 MdcHit* theHit = hitMap()->hitWire( ilayer, iwire );
101 if ( theHit == 0 )
102 {
103 // 0 1 2 3 4
104 // next wire is there, this one isn't : o x ? ? ?
105 // and the next candidate to check is + 2
106 ++iwire;
107 continue;
108 }
109
110 int wirePrev = mdcWrapWire( iwire - 1, nwire );
111 if ( 0 != hitMap()->hitWire( ilayer, wirePrev ) )
112 {
113 segUsage().get( theHit )->killHit();
114 if ( debug > 1 )
115 {
116 theHit->print( std::cout );
117 std::cout << " killed " << std::endl;
118 }
119 }
120 else
121 {
122 if ( debug > 1 )
123 {
124 theHit->print( std::cout );
125 std::cout << " ok " << std::endl;
126 }
127 }
128 } // end wire loop
129 } // end layer loop
130
131 return;
132}
void print(std::ostream &o) const
bool get(const K &theKey, V &theAnswer) const

◆ poisonHits() [2/3]

void MdcSegData::poisonHits ( const MdcDetector * gm,
int debug = 0 )

◆ poisonHits() [3/3]

void MdcSegData::poisonHits ( const MdcDetector * gm,
int debug = 0 )

◆ runNumber() [1/3]

int MdcSegData::runNumber ( ) const
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

34{ return _runNumber; }

◆ runNumber() [2/3]

int MdcSegData::runNumber ( ) const
inline

Definition at line 34 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

34{ return _runNumber; }

◆ runNumber() [3/3]

int MdcSegData::runNumber ( ) const
inline

Definition at line 34 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

34{ return _runNumber; }

◆ segUsage() [1/3]

const MdcHitDict & MdcSegData::segUsage ( ) const
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

36{ return _segUsageDict; }

Referenced by poisonHits().

◆ segUsage() [2/3]

const MdcHitDict & MdcSegData::segUsage ( ) const
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

36{ return _segUsageDict; }

◆ segUsage() [3/3]

const MdcHitDict & MdcSegData::segUsage ( ) const
inline

Definition at line 36 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

36{ return _segUsageDict; }

◆ skippingUsed() [1/3]

bool MdcSegData::skippingUsed ( ) const
inline

Definition at line 40 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcTrkRecon/MdcSegData.h.

40{ return _skipUsed; }

Referenced by loadevent().

◆ skippingUsed() [2/3]

bool MdcSegData::skippingUsed ( ) const
inline

Definition at line 40 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcTrkRecon/MdcSegData.h.

40{ return _skipUsed; }

◆ skippingUsed() [3/3]

bool MdcSegData::skippingUsed ( ) const
inline

Definition at line 40 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegData.h.

40{ return _skipUsed; }

The documentation for this class was generated from the following files: