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

#include <MdcSegList.h>

Public Member Functions

 MdcSegList (int nSupers, const MdcSegParams segParms)
 ~MdcSegList ()
void setPlot (int lPlt)
void plot () const
const GmsListoneList (int slayIndex) const
void append (MdcSeg *aSeg)
int count () const
void destroySegs ()
MdcSeggetSeed (int iview, int goodOnly)
void resetSeed (const MdcDetector *gm)
MdcSegParamssegPar ()
 MdcSegList (int nSupers, const MdcSegParams segParms)
 ~MdcSegList ()
void setPlot (int lPlt)
void plot () const
const GmsListoneList (int slayIndex) const
void append (MdcSeg *aSeg)
int count () const
void destroySegs ()
MdcSeggetSeed (int iview, int goodOnly)
void resetSeed (const MdcDetector *gm)
MdcSegParamssegPar ()
 MdcSegList (int nSupers, const MdcSegParams segParms)
 ~MdcSegList ()
void setPlot (int lPlt)
void plot () const
const GmsListoneList (int slayIndex) const
void append (MdcSeg *aSeg)
int count () const
void destroySegs ()
MdcSeggetSeed (int iview, int goodOnly)
void resetSeed (const MdcDetector *gm)
MdcSegParamssegPar ()

Friends

class MdcSegFinder

Detailed Description

Constructor & Destructor Documentation

◆ MdcSegList() [1/3]

MdcSegList::MdcSegList ( int nSupers,
const MdcSegParams segParms )

Definition at line 35 of file MdcSegList.cxx.

35 {
36 /**************************************************************************/
37 segParam = segP; // bit-wise copy
38 MdcSeg::setParam( &segParam );
39 zeroSeed();
40 segList = new GmsList[nSlayer];
41 _nsupers = nSlayer;
42}

◆ ~MdcSegList() [1/3]

MdcSegList::~MdcSegList ( )

Definition at line 45 of file MdcSegList.cxx.

45 {
46 /**************************************************************************/
47 delete[] segList;
48}

◆ MdcSegList() [2/3]

MdcSegList::MdcSegList ( int nSupers,
const MdcSegParams segParms )

◆ ~MdcSegList() [2/3]

MdcSegList::~MdcSegList ( )

◆ MdcSegList() [3/3]

MdcSegList::MdcSegList ( int nSupers,
const MdcSegParams segParms )

◆ ~MdcSegList() [3/3]

MdcSegList::~MdcSegList ( )

Member Function Documentation

◆ append() [1/3]

void MdcSegList::append ( MdcSeg * aSeg)

Definition at line 271 of file MdcSegList.cxx.

271 {
272 /****************************************************************************/
273 segList[aSeg->superlayer()->index()].append( aSeg );
274}

◆ append() [2/3]

void MdcSegList::append ( MdcSeg * aSeg)

◆ append() [3/3]

void MdcSegList::append ( MdcSeg * aSeg)

◆ count() [1/3]

int MdcSegList::count ( ) const

Definition at line 458 of file MdcSegList.cxx.

458 {
459 //-------------------------------------------------------------------------
460 int cnt = 0;
461 for ( int i = 0; i < _nsupers; i++ ) cnt += segList[i].count();
462 return cnt;
463}
int count() const

Referenced by count(), MdcTrackList::createFromSegs(), and MdcSegFinder::createSegs().

◆ count() [2/3]

int MdcSegList::count ( ) const

◆ count() [3/3]

int MdcSegList::count ( ) const

◆ destroySegs() [1/3]

void MdcSegList::destroySegs ( )

Definition at line 95 of file MdcSegList.cxx.

95 {
96 /****************************************************************************/
97
98 zeroSeed();
99 MdcSeg *aSeg, *bSeg;
100 for ( int i = 0; i < _nsupers; i++ )
101 {
102 aSeg = (MdcSeg*)segList[i].first();
103 while ( aSeg != 0 )
104 {
105 bSeg = (MdcSeg*)aSeg->next();
106 segList[i].remove( aSeg );
107 delete aSeg;
108 aSeg = bSeg;
109 }
110 }
111 return;
112}
Index first(Pair i)

◆ destroySegs() [2/3]

void MdcSegList::destroySegs ( )

◆ destroySegs() [3/3]

void MdcSegList::destroySegs ( )

◆ getSeed() [1/3]

MdcSeg * MdcSegList::getSeed ( int iview,
int goodOnly )

Definition at line 143 of file MdcSegList.cxx.

143 {
144 //***************************************************************************
145
146 // Find a suitable segment for starting a track. If goodOnly=1, look for
147 // isolated, unambiguous segments; unambiguous is
148 // defined as being the only segment within a band in phiseg (typically
149 // 2 cell widths wide), or as differing only slightly from nearby
150 // segments in phi and slope. When these have been exhausted, take any
151 // unused segment. Return pointer to seed seg, or 0 if none found.
152
153 int viewIndex = iview + 1;
154 if ( seedSlay[viewIndex] == 0 ) return 0;
155 while ( 1 )
156 {
157 // if(seedSeg[viewIndex] != 0){
158 // seedSeg[viewIndex]->plotSeg(0,0);//yzhang debug
159 // std::cout<<__FILE__<<" "<<__LINE__<<" goodOnly "<<goodOnly<< std::endl;
160 //}
161 if ( seedSeg[viewIndex] == 0 )
162 {
163 // seedSlay[viewIndex] = seedSlay[viewIndex]->nextInView();//yzhang temp
164 seedSlay[viewIndex] = seedSlay[viewIndex]->prevInView(); // yzhang del
165 if ( seedSlay[viewIndex] == 0 ) return 0;
166 seedSeg[viewIndex] = (MdcSeg*)oneList( seedSlay[viewIndex]->index() )->first();
167 } // We have a segment; is it a viable seed?
168 else if ( seedSeg[viewIndex]->segUsed() )
169 {
170 // std::cout<<__FILE__<<" segUsed " << std::endl;
171 seedSeg[viewIndex] = (MdcSeg*)seedSeg[viewIndex]->next();
172 }
173 else if ( seedSeg[viewIndex]->segAmbig() && goodOnly )
174 {
175 // std::cout<<__FILE__<<" segAmbig && goodOnly" << std::endl;
176 seedSeg[viewIndex] = (MdcSeg*)seedSeg[viewIndex]->next();
177 // yzhang delete 09-10-10
178 // delete (!seedSeg[viewIndex]->segAmbig() && !goodOnly)
179 } // yzhang add 09-09-28
180 else if ( !seedSeg[viewIndex]->segFull() && goodOnly )
181 {
182 // std::cout<<__FILE__<<" segFull && goodOnly" << std::endl;
183 seedSeg[viewIndex] = (MdcSeg*)seedSeg[viewIndex]->next();
184 // zhangy add
185 }
186 else
187 {
188 // Reject segments with a lot of used hits
189 int nused = 0;
190 int navail = seedSeg[viewIndex]->nHit();
191 for ( int ihit = 0; ihit < seedSeg[viewIndex]->nHit(); ihit++ )
192 {
193 MdcHitUse* ahit = seedSeg[viewIndex]->hit( ihit );
194 if ( ahit->mdcHit()->usedHit() ) nused++;
195 }
196 // Minimum 2 unused hits (but allow special-purpose segs w/ 0 hits)
197 if ( navail - nused < 2 && navail > 0 )
198 { seedSeg[viewIndex] = (MdcSeg*)seedSeg[viewIndex]->next(); }
199 else
200 {
201 // std::cout<<__FILE__<<" Reject segments with a lot of used hits" << std::endl;
202 break;
203 }
204 }
205 /*
206 if(seedSeg[viewIndex]!=0){
207 seedSeg[viewIndex]->plotSeg();
208 std::cout<< __FILE__ << " " << __LINE__ << " goodOnly "
209 <<goodOnly<<" viewIndex "<<viewIndex<< " full "<<seedSeg[viewIndex]->segFull()
210 <<std::endl;
211 }
212 */
213 }
214
215 // We have a seed
216 MdcSeg* theSeed = seedSeg[viewIndex];
217 seedSeg[viewIndex] = (MdcSeg*)seedSeg[viewIndex]->next();
218
219 return theSeed;
220}
const MdcHit * mdcHit() const
Definition MdcHitUse.cxx:62
const GmsList * oneList(int slayIndex) const
Index next(Index i)

Referenced by MdcTrackList::createFromSegs(), and MdcTrackListCsmc::createFromSegs().

◆ getSeed() [2/3]

MdcSeg * MdcSegList::getSeed ( int iview,
int goodOnly )

◆ getSeed() [3/3]

MdcSeg * MdcSegList::getSeed ( int iview,
int goodOnly )

◆ oneList() [1/3]

const GmsList * MdcSegList::oneList ( int slayIndex) const

Definition at line 452 of file MdcSegList.cxx.

452 {
453 //-------------------------------------------------------------------------
454 return &segList[slayIndex];
455}

Referenced by MdcSegGrouperAx::fillWithSegs(), MdcSegGrouperCsmc::fillWithSegs(), MdcSegGrouperSt::fillWithSegs(), getSeed(), and resetSeed().

◆ oneList() [2/3]

const GmsList * MdcSegList::oneList ( int slayIndex) const

◆ oneList() [3/3]

const GmsList * MdcSegList::oneList ( int slayIndex) const

◆ plot() [1/3]

void MdcSegList::plot ( ) const

Definition at line 76 of file MdcSegList.cxx.

76 {
77 /**************************************************************************/
78
79 MdcSeg* aSeg;
80 for ( int i = 0; i < _nsupers; i++ )
81 {
82 std::cout << " ---------------MdcSeg of Slayer " << i << "-------------" << std::endl;
83
84 aSeg = (MdcSeg*)segList[i].first();
85 while ( aSeg != 0 )
86 {
87 aSeg->plotSegAll();
88 std::cout << endl;
89 aSeg = (MdcSeg*)aSeg->next();
90 }
91 }
92}
void plotSegAll() const
Definition MdcSeg.cxx:157

◆ plot() [2/3]

void MdcSegList::plot ( ) const

◆ plot() [3/3]

void MdcSegList::plot ( ) const

◆ resetSeed() [1/3]

void MdcSegList::resetSeed ( const MdcDetector * gm)

Definition at line 57 of file MdcSegList.cxx.

57 {
58 /**************************************************************************/
59
60 for ( int iview = -1; iview <= 1; iview++ )
61 {
62 int viewIndex = iview + 1;
63 /*
64 if(0 == iview){
65 seedSlay[viewIndex] = gm->firstSlayInView(iview);
66 }else{
67 seedSlay[viewIndex] = gm->lastSlayInView(iview);
68 }
69 */
70 seedSlay[viewIndex] = gm->lastSlayInView( iview );
71 if ( seedSlay[viewIndex] != 0 )
72 seedSeg[viewIndex] = (MdcSeg*)oneList( seedSlay[viewIndex]->index() )->first();
73 }
74}
const MdcSuperLayer * lastSlayInView(int iview) const

Referenced by MdcTrackList::createFromSegs(), MdcTrackListCsmc::createFromSegs(), and MdcSegFinder::createSegs().

◆ resetSeed() [2/3]

void MdcSegList::resetSeed ( const MdcDetector * gm)

◆ resetSeed() [3/3]

void MdcSegList::resetSeed ( const MdcDetector * gm)

◆ segPar() [1/3]

MdcSegParams * MdcSegList::segPar ( )
inline

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

38{ return &segParam; }

Referenced by MdcSegFinder::createSegs().

◆ segPar() [2/3]

MdcSegParams * MdcSegList::segPar ( )
inline

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

38{ return &segParam; }

◆ segPar() [3/3]

MdcSegParams * MdcSegList::segPar ( )
inline

Definition at line 38 of file Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSegList.h.

38{ return &segParam; }

◆ setPlot() [1/3]

void MdcSegList::setPlot ( int lPlt)

◆ setPlot() [2/3]

void MdcSegList::setPlot ( int lPlt)

◆ setPlot() [3/3]

void MdcSegList::setPlot ( int lPlt)

◆ MdcSegFinder


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