#include <MdcSeg.h>
Inheritance diagram for MdcSeg:
Public Member Functions | |
int | addHits (MdcLine *span, MdcHit *hits[], const MdcHitMap *, double corr) |
int | addHits (MdcLine *span, MdcHit *hits[], const MdcHitMap *, double corr) |
void | append (MdcHitUse *) |
void | append (MdcHitUse *) |
double | bunchTime () |
double | bunchTime () |
double | chisq () const |
double | chisq () const |
const double * | errmat () const |
const double * | errmat () const |
MdcHitUse * | hit (int i) const |
MdcHitUse * | hit (int i) const |
MdcSegInfo * | info () const |
MdcSegInfo * | info () const |
void | markHits (const MdcMap< const MdcHit *, MdcSegUsage * > &usedHits) const |
void | markHits (const MdcMap< const MdcHit *, MdcSegUsage * > &usedHits) const |
MdcSeg (const MdcSeg &) | |
MdcSeg (double bunchT) | |
MdcSeg (const MdcSeg &) | |
MdcSeg (double bunchT) | |
GmsListLink * | next () const |
GmsListLink * | next () const |
int | nHit () const |
int | nHit () const |
MdcSeg & | operator= (const MdcSeg &) |
MdcSeg & | operator= (const MdcSeg &) |
double | phi () const |
double | phi () const |
void | plotSeg () const |
void | plotSeg () const |
void | plotSegAll () const |
void | plotSegAll () const |
GmsListLink * | prev () const |
GmsListLink * | prev () const |
unsigned int | quality () const |
unsigned int | quality () const |
void | remove (MdcHitUse *) |
void | remove (MdcHitUse *) |
int | segAmbig () |
int | segAmbig () |
int | segFull () |
int | segFull () |
unsigned | segPattern () const |
unsigned | segPattern () const |
int | segUsed () |
int | segUsed () |
void | setAmbig () |
void | setAmbig () |
void | setFull () |
void | setFull () |
void | setInfo (MdcSegInfo *ptr) |
void | setInfo (MdcSegInfo *ptr) |
void | setPattern (unsigned thePatt) |
void | setPattern (unsigned thePatt) |
void | setUsed () |
void | setUsed () |
void | setValues (int nInPatt, double inPhi, double inSlope, double chi2, double inError[3], const MdcSuperLayer *slay) |
void | setValues (int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, const MdcSuperLayer *slay, int ambig[]) |
void | setValues (int nInPatt, double inPhi, double inSlope, double chi2, double inError[3], const MdcSuperLayer *slay) |
void | setValues (int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, const MdcSuperLayer *slay, int ambig[]) |
double | slope () const |
double | slope () const |
const MdcSuperLayer * | superlayer () const |
const MdcSuperLayer * | superlayer () const |
double | testCombSeg (const MdcSeg *) const |
double | testCombSeg (const MdcSeg *) const |
virtual | ~MdcSeg () |
virtual | ~MdcSeg () |
Static Public Member Functions | |
MdcSegParams * | segPar () |
MdcSegParams * | segPar () |
void | setParam (MdcSegParams *segpar) |
void | setParam (MdcSegParams *segpar) |
Protected Attributes | |
GmsListLink * | _next |
GmsListLink * | _next |
GmsListLink * | _prev |
GmsListLink * | _prev |
Private Member Functions | |
void | reset () |
void | reset () |
Private Attributes | |
double | _bunchTime |
double | _chisq |
double | _errmat [3] |
MdcSegInfo * | _info |
MdcSegInfo * | _info |
unsigned int | _pattern |
double | _phi |
unsigned int | _qual |
const MdcSuperLayer * | _slayer |
const MdcSuperLayer * | _slayer |
double | _slope |
HepAList< MdcHitUse > | _theList |
HepAList< MdcHitUse > | _theList |
Static Private Attributes | |
MdcSegParams * | segParam |
MdcSegParams * | segParam = 0 |
|
00031 { 00032 //------------------------------------------------------------------------ 00033 _info = 0; 00034 _bunchTime = bt; 00035 }
|
|
00038 { 00039 //------------------------------------------------------------------------ 00040 if (_info != 0) delete _info; 00041 reset(); // delete Hots 00042 }
|
|
00045 : 00046 GmsListLink(), _slayer(other._slayer), _phi(other._phi), _slope(other._slope), _chisq(other._chisq), _qual(other._qual), _pattern(other._pattern), _info(other._info), _bunchTime(other._bunchTime) 00047 //------------------------------------------------------------------------ 00048 { 00049 HepAListDeleteAll(_theList); 00050 for(int i=0; i<other.nHit(); i++){ 00051 _theList.append(other.hit(i)); 00052 } 00053 for(int j=0; j<3; j++){ 00054 _errmat[0] = other._errmat[0]; 00055 _errmat[1] = other._errmat[1]; 00056 _errmat[2] = other._errmat[2]; 00057 } 00058 segParam = other.segParam; 00059 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00334 { 00335 //------------------------------------------------------------------------ 00336 _theList.append(theHitUse); 00337 }
|
|
00062 {return _bunchTime;}
|
|
00062 {return _bunchTime;}
|
|
00048 {return _chisq;}
|
|
00048 {return _chisq;}
|
|
00050 {return _errmat;}
|
|
00050 {return _errmat;}
|
|
00077 {return _theList[i];}
|
|
00077 {return _theList[i];}
|
|
00052 {return _info;}
|
|
00052 {return _info;}
|
|
|
|
00144 { 00145 //------------------------------------------------------------------------ 00146 for (int i = 0; i < nHit(); i++) { 00147 MdcHitUse *alink = _theList[i]; 00148 MdcSegUsage *x ; 00149 if ( usedHits.get( alink->mdcHit() , x) ) x->setUsedAmbig( alink->ambig() ); 00150 } 00151 }
|
|
00038 { return _next; }
|
|
00038 { return _next; }
|
|
|
|
00349 { 00350 //------------------------------------------------------------------------ 00351 return _theList.length(); 00352 }
|
|
|
|
00063 { 00064 //------------------------------------------------------------------------ 00065 if(&other != this){ 00066 00067 HepAListDeleteAll(_theList); 00068 for(int i=0; i<other.nHit(); i++){ 00069 _theList.append(other.hit(i)); 00070 } 00071 _slayer = other._slayer; 00072 _phi = other._phi; 00073 _slope= other._slope; 00074 _errmat[0] = other._errmat[0]; 00075 _errmat[1] = other._errmat[1]; 00076 _errmat[2] = other._errmat[2]; 00077 _chisq = other._chisq; 00078 _qual = other._qual; 00079 _pattern = other._pattern; 00080 _info = other._info; 00081 _bunchTime = other._bunchTime; 00082 segParam = other.segParam; 00083 } 00084 00085 return *this; 00086 }
|
|
00046 {return _phi;}
|
|
00046 {return _phi;}
|
|
|
|
00177 { 00178 //------------------------------------------------------------------------ 00179 std::cout<<std::setw(2)<<segPattern()<<":"; 00180 for (int ihit=0 ; ihit< nHit() ; ihit++){ 00181 hit(ihit)->mdcHit()->print(std::cout);//print hit 00182 std::cout <<std::setw(2)<<hit(ihit)->ambig()<<" "; 00183 } 00184 if (info()!=NULL){ 00185 if(superlayer()->whichView()==0){ 00186 std::cout <<"phi0="<<std::setw(7) <<info()->par(0) 00187 <<" cpa="<<std::setw(6)<<info()->par(1); 00188 }else{ 00189 std::cout <<"z0="<<std::setw(7) <<info()->par(0) 00190 <<" ct="<<std::setw(6)<<info()->par(1); 00191 } 00192 if(fabs(info()->arc())>0.0001){ 00193 std::cout<<" arc="<<std::setw(6)<<info()->arc(); 00194 } 00195 } 00196 std::cout << std::endl; 00197 }
|
|
|
|
00155 { 00156 //------------------------------------------------------------------------ 00157 //print hit 00158 for (int ihit=0 ; ihit< nHit() ; ihit++){ 00159 hit(ihit)->mdcHit()->print(std::cout); 00160 std::cout << hit(ihit)->ambig()<<";"; 00161 } 00162 std::cout<<std::endl 00163 << " phi "<<std::setw(8)<< phi() 00164 << " slope " <<std::setw(8)<< slope() 00165 << " chi2 "<<std::setw(8)<<chisq() 00166 << " quality "<< std::setw(8)<<quality(); 00167 00168 if (info()!=NULL){ 00169 std::cout <<" phiz0 "<<std::setw(8) <<info()->par(0) 00170 <<" cpa/ct "<<std::setw(8)<<info()->par(1) 00171 <<" arc "<< std::setw(8)<<info()->arc(); 00172 } 00173 std::cout << std::endl; 00174 }
|
|
00039 { return _prev; }
|
|
00039 { return _prev; }
|
|
00049 {return _qual;}
|
|
00049 {return _qual;}
|
|
|
|
00341 { 00342 //------------------------------------------------------------------------ 00343 _theList.remove(theHitUse); 00344 delete theHitUse; 00345 }
|
|
|
|
00327 {
00328 //------------------------------------------------------------------------
00329 HepAListDeleteAll( _theList );
00330 }
|
|
00058 {return (_qual & segAmbigFlag);}
|
|
00058 {return (_qual & segAmbigFlag);}
|
|
00060 {return (_qual & segFullFlag);}
|
|
00060 {return (_qual & segFullFlag);}
|
|
00079 {return segParam;}
|
|
00079 {return segParam;}
|
|
00061 {return _pattern;}
|
|
00061 {return _pattern;}
|
|
00059 {return (_qual & segUsedFlag);}
|
|
00059 {return (_qual & segUsedFlag);}
|
|
00054 {_qual |= segAmbigFlag;}
|
|
00054 {_qual |= segAmbigFlag;}
|
|
00056 {_qual |= segFullFlag;}
|
|
00056 {_qual |= segFullFlag;}
|
|
|
|
00092 { 00093 //------------------------------------------------------------------------ 00094 delete _info; // if any 00095 _info = newInfo; 00096 }
|
|
00080 {segParam = segpar;}
|
|
00080 {segParam = segpar;}
|
|
00057 {_pattern = thePatt;}
|
|
00057 {_pattern = thePatt;}
|
|
00055 {_qual |= segUsedFlag;}
|
|
00055 {_qual |= segUsedFlag;}
|
|
|
|
|
|
00125 { 00126 //------------------------------------------------------------------------ 00127 // Sets segment values with no associated hits 00128 _qual = 0; 00129 if (nInPatt == 4) _qual |= segFullFlag; 00130 _phi = inPhi; 00131 _slope = inSlope; 00132 _chisq = chi2; 00133 _errmat[0] = inError[0]; 00134 _errmat[1] = inError[1]; 00135 _errmat[2] = inError[2]; 00136 _slayer = slay; 00137 reset(); // clears hit list 00138 00139 return; 00140 }
|
|
00101 { 00102 //------------------------------------------------------------------------ 00103 _qual = 0; 00104 if (nInPatt == 4) _qual |= segFullFlag; 00105 _phi = BesAngle(span->intercept); 00106 _slope = span->slope; 00107 _chisq = span->chisq; 00108 _errmat[0] = span->errmat[0]; 00109 _errmat[1] = span->errmat[1]; 00110 _errmat[2] = span->errmat[2]; 00111 reset(); 00112 _slayer = slay; 00113 for (int i = 0; i < nhit; i++) { 00114 MdcHitUse *alink = new MdcHitUse(*(hits[i]), superlayer()->rad0(), 00115 ambig[i]); 00116 append(alink); 00117 } 00118 00119 return; 00120 }
|
|
00047 {return _slope;}
|
|
00047 {return _slope;}
|
|
00051 {return _slayer;}
|
|
00051 {return _slayer;}
|
|
|
|
00357 { 00358 //------------------------------------------------------------------------ 00359 int tkId= -1; 00360 for (int i=0; i<nHit(); i++){ 00361 const MdcHit* h = hit(i)->mdcHit(); 00362 unsigned int l = h->layernumber(); 00363 unsigned int w = h->wirenumber(); 00364 if (i==0){ 00365 tkId = haveDigi[l][w]; 00366 }else if (haveDigi[l][w] != tkId){ 00367 return -1;//hits in this seg not in same mc track 00368 } 00369 }//end for 00370 00371 double nSame = 0.; 00372 for (int i=0; i<testSeg->nHit(); i++){ 00373 const MdcHit* h = testSeg->hit(i)->mdcHit(); 00374 unsigned int l = h->layernumber(); 00375 unsigned int w = h->wirenumber(); 00376 if (haveDigi[l][w] == tkId){ 00377 ++nSame; 00378 } 00379 } 00380 00381 return nSame/testSeg->nHit(); 00382 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|