Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MdcSeg Class Reference

#include <MdcSeg.h>

Inheritance diagram for MdcSeg:

GmsListLink GmsListLink List of all members.

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
MdcHitUsehit (int i) const
MdcHitUsehit (int i) const
MdcSegInfoinfo () const
MdcSegInfoinfo () 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)
GmsListLinknext () const
GmsListLinknext () const
int nHit () const
int nHit () const
MdcSegoperator= (const MdcSeg &)
MdcSegoperator= (const MdcSeg &)
double phi () const
double phi () const
void plotSeg () const
void plotSeg () const
void plotSegAll () const
void plotSegAll () const
GmsListLinkprev () const
GmsListLinkprev () 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 MdcSuperLayersuperlayer () const
const MdcSuperLayersuperlayer () const
double testCombSeg (const MdcSeg *) const
double testCombSeg (const MdcSeg *) const
virtual ~MdcSeg ()
virtual ~MdcSeg ()

Static Public Member Functions

MdcSegParamssegPar ()
MdcSegParamssegPar ()
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

MdcSegParamssegParam
MdcSegParamssegParam = 0

Constructor & Destructor Documentation

MdcSeg::MdcSeg double  bunchT  ) 
 

00031                         {
00032 //------------------------------------------------------------------------
00033   _info = 0;
00034   _bunchTime = bt;
00035 }

MdcSeg::~MdcSeg  )  [virtual]
 

00038                 {
00039 //------------------------------------------------------------------------
00040   if (_info != 0) delete _info;
00041   reset();  // delete Hots
00042 }

MdcSeg::MdcSeg const MdcSeg  ) 
 

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 }

MdcSeg::MdcSeg double  bunchT  ) 
 

virtual MdcSeg::~MdcSeg  )  [virtual]
 

MdcSeg::MdcSeg const MdcSeg  ) 
 


Member Function Documentation

int MdcSeg::addHits MdcLine span,
MdcHit hits[],
const MdcHitMap ,
double  corr
 

int MdcSeg::addHits MdcLine span,
MdcHit hits[],
const MdcHitMap ,
double  corr
 

void MdcSeg::append MdcHitUse  ) 
 

void MdcSeg::append MdcHitUse  ) 
 

00334                                    {
00335   //------------------------------------------------------------------------
00336   _theList.append(theHitUse);
00337 }

double MdcSeg::bunchTime void   )  [inline]
 

00062 {return _bunchTime;}

double MdcSeg::bunchTime  )  [inline]
 

00062 {return _bunchTime;}

double MdcSeg::chisq  )  const [inline]
 

00048 {return _chisq;}

double MdcSeg::chisq  )  const [inline]
 

00048 {return _chisq;}

const double* MdcSeg::errmat  )  const [inline]
 

00050 {return _errmat;}

const double* MdcSeg::errmat  )  const [inline]
 

00050 {return _errmat;}

MdcHitUse* MdcSeg::hit int  i  )  const [inline]
 

00077 {return _theList[i];}

MdcHitUse* MdcSeg::hit int  i  )  const [inline]
 

00077 {return _theList[i];}

MdcSegInfo* MdcSeg::info  )  const [inline]
 

00052 {return _info;}

MdcSegInfo* MdcSeg::info  )  const [inline]
 

00052 {return _info;}

void MdcSeg::markHits const MdcMap< const MdcHit *, MdcSegUsage * > &  usedHits  )  const
 

void MdcSeg::markHits const MdcMap< const MdcHit *, MdcSegUsage * > &  usedHits  )  const
 

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 }

GmsListLink* GmsListLink::next void   )  const [inline, inherited]
 

00038 { return _next; }

GmsListLink* GmsListLink::next void   )  const [inline, inherited]
 

00038 { return _next; }

int MdcSeg::nHit  )  const
 

int MdcSeg::nHit  )  const
 

00349                    {
00350   //------------------------------------------------------------------------
00351   return _theList.length();
00352 }

MdcSeg& MdcSeg::operator= const MdcSeg  ) 
 

MdcSeg & MdcSeg::operator= const MdcSeg  ) 
 

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 }

double MdcSeg::phi void   )  const [inline]
 

00046 {return _phi;}

double MdcSeg::phi void   )  const [inline]
 

00046 {return _phi;}

void MdcSeg::plotSeg  )  const
 

void MdcSeg::plotSeg  )  const
 

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 }

void MdcSeg::plotSegAll  )  const
 

void MdcSeg::plotSegAll  )  const
 

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 }

GmsListLink* GmsListLink::prev void   )  const [inline, inherited]
 

00039 { return _prev; }

GmsListLink* GmsListLink::prev void   )  const [inline, inherited]
 

00039 { return _prev; }

unsigned int MdcSeg::quality void   )  const [inline]
 

00049 {return _qual;}

unsigned int MdcSeg::quality  )  const [inline]
 

00049 {return _qual;}

void MdcSeg::remove MdcHitUse  ) 
 

void MdcSeg::remove MdcHitUse  ) 
 

00341                                    {
00342   //------------------------------------------------------------------------
00343   _theList.remove(theHitUse);
00344   delete theHitUse;
00345 }

void MdcSeg::reset  )  [private]
 

void MdcSeg::reset  )  [private]
 

00327               {
00328   //------------------------------------------------------------------------
00329   HepAListDeleteAll( _theList );
00330 }

int MdcSeg::segAmbig  )  [inline]
 

00058 {return (_qual & segAmbigFlag);}

int MdcSeg::segAmbig  )  [inline]
 

00058 {return (_qual & segAmbigFlag);}

int MdcSeg::segFull  )  [inline]
 

00060 {return (_qual & segFullFlag);}

int MdcSeg::segFull  )  [inline]
 

00060 {return (_qual & segFullFlag);}

MdcSegParams* MdcSeg::segPar  )  [inline, static]
 

00079 {return segParam;}

MdcSegParams* MdcSeg::segPar  )  [inline, static]
 

00079 {return segParam;}

unsigned MdcSeg::segPattern  )  const [inline]
 

00061 {return _pattern;}

unsigned MdcSeg::segPattern  )  const [inline]
 

00061 {return _pattern;}

int MdcSeg::segUsed  )  [inline]
 

00059 {return (_qual & segUsedFlag);}

int MdcSeg::segUsed  )  [inline]
 

00059 {return (_qual & segUsedFlag);}

void MdcSeg::setAmbig  )  [inline]
 

00054 {_qual |= segAmbigFlag;}

void MdcSeg::setAmbig  )  [inline]
 

00054 {_qual |= segAmbigFlag;}

void MdcSeg::setFull  )  [inline]
 

00056 {_qual |= segFullFlag;}

void MdcSeg::setFull  )  [inline]
 

00056 {_qual |= segFullFlag;}

void MdcSeg::setInfo MdcSegInfo ptr  ) 
 

void MdcSeg::setInfo MdcSegInfo ptr  ) 
 

00092                                    {
00093   //------------------------------------------------------------------------
00094   delete _info;  // if any
00095   _info = newInfo;
00096 }

void MdcSeg::setParam MdcSegParams segpar  )  [inline, static]
 

00080 {segParam = segpar;}

void MdcSeg::setParam MdcSegParams segpar  )  [inline, static]
 

00080 {segParam = segpar;}

void MdcSeg::setPattern unsigned  thePatt  )  [inline]
 

00057 {_pattern = thePatt;}

void MdcSeg::setPattern unsigned  thePatt  )  [inline]
 

00057 {_pattern = thePatt;}

void MdcSeg::setUsed  )  [inline]
 

00055 {_qual |= segUsedFlag;}

void MdcSeg::setUsed  )  [inline]
 

00055 {_qual |= segUsedFlag;}

void MdcSeg::setValues int  nInPatt,
double  inPhi,
double  inSlope,
double  chi2,
double  inError[3],
const MdcSuperLayer slay
 

void MdcSeg::setValues int  nInPatt,
int  nhit,
MdcHit hits[],
MdcLine span,
const MdcSuperLayer slay,
int  ambig[]
 

void MdcSeg::setValues int  nInPatt,
double  inPhi,
double  inSlope,
double  chi2,
double  inError[3],
const MdcSuperLayer slay
 

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 }

void MdcSeg::setValues int  nInPatt,
int  nhit,
MdcHit hits[],
MdcLine span,
const MdcSuperLayer slay,
int  ambig[]
 

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 }

double MdcSeg::slope void   )  const [inline]
 

00047 {return _slope;}

double MdcSeg::slope  )  const [inline]
 

00047 {return _slope;}

const MdcSuperLayer* MdcSeg::superlayer  )  const [inline]
 

00051 {return _slayer;}

const MdcSuperLayer* MdcSeg::superlayer  )  const [inline]
 

00051 {return _slayer;}

double MdcSeg::testCombSeg const MdcSeg  )  const
 

double MdcSeg::testCombSeg const MdcSeg  )  const
 

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 }


Member Data Documentation

double MdcSeg::_bunchTime [private]
 

double MdcSeg::_chisq [private]
 

double MdcSeg::_errmat [private]
 

MdcSegInfo* MdcSeg::_info [private]
 

MdcSegInfo* MdcSeg::_info [private]
 

GmsListLink* GmsListLink::_next [protected, inherited]
 

GmsListLink* GmsListLink::_next [protected, inherited]
 

unsigned int MdcSeg::_pattern [private]
 

double MdcSeg::_phi [private]
 

GmsListLink* GmsListLink::_prev [protected, inherited]
 

GmsListLink* GmsListLink::_prev [protected, inherited]
 

unsigned int MdcSeg::_qual [private]
 

const MdcSuperLayer* MdcSeg::_slayer [private]
 

const MdcSuperLayer* MdcSeg::_slayer [private]
 

double MdcSeg::_slope [private]
 

HepAList<MdcHitUse> MdcSeg::_theList [private]
 

HepAList<MdcHitUse> MdcSeg::_theList [private]
 

MdcSegParams* MdcSeg::segParam [static, private]
 

MdcSegParams * MdcSeg::segParam = 0 [static, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:28:15 2011 for BOSS6.5.5 by  doxygen 1.3.9.1