/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/src/TMLink.cxx File Reference

#include "TrkReco/TMLink.h"
#include "TrkReco/TMDCWireHit.h"
#include "TrkReco/TMDCWireHitMC.h"
#include "TrkReco/TMDCUtil.h"
#include "TrkReco/TTrackHEP.h"
#include "CLHEP/Alist/ConstAList.h"

Go to the source code of this file.

Defines

#define MCC_MAX   1000

Functions

unsigned NLayers (const AList< TMLink > &list)
 returns # of layers.
void NHits (const AList< TMLink > &links, unsigned nHits[43])
void NHitsSuperLayer (const AList< TMLink > &links, unsigned nHits[11])
 returns # of hits per super layer.
void Dump (const CAList< TMLink > &links, const std::string &msg, const std::string &pre)
 dumps TMLinks.
void Dump (const TMLink &link, const std::string &msg, const std::string &pre)
unsigned NStereoHits (const AList< TMLink > &links)
 returns # of stereo hits.
unsigned NAxialHits (const AList< TMLink > &links)
 returns # of axial hits.
AList< TMLinkAxialHits (const AList< TMLink > &links)
 returns axial hits.
AList< TMLinkStereoHits (const AList< TMLink > &links)
 returns stereo hits.
TMLinkInnerMost (const AList< TMLink > &a)
 returns the inner(outer)-most link.
TMLinkOuterMost (const AList< TMLink > &a)
void SeparateCores (const AList< TMLink > &input, AList< TMLink > &cores, AList< TMLink > &nonCores)
 separate cores and non-cores.
AList< TMLinkCores (const AList< TMLink > &input)
int SortByWireId (const void *av, const void *bv)
 Sorter.
int SortByX (const void *av, const void *bv)
unsigned Width (const AList< TMLink > &list)
 returns width(wire cell unit) of given AList<TMLink>. This function assumes that all TMLink's are in the same super layer.
AList< TMLinkEdges (const AList< TMLink > &list)
 returns links which are edges. This function assumes that all TMLink's are in the same super layer.
AList< TMLinkSameLayer (const AList< TMLink > &list, const TMLink &a)
 returns links which are in the same layer as 'a' or 'id'.
AList< TMLinkSameSuperLayer (const AList< TMLink > &list, const TMLink &a)
 returns links which are in the same super layer as 'a' or 'id'.
AList< TMLinkSameLayer (const AList< TMLink > &list, unsigned id)
AList< TMLinkSameSuperLayer (const AList< TMLink > &list, unsigned id)
AList< TMLinkInOut (const AList< TMLink > &list)
 returns links which are in the inner most and outer most layer. This function assumes that all TMLink's are in the same super layer.
unsigned SuperLayer (const AList< TMLink > &list)
 returns super layer pattern.
unsigned SuperLayer (const AList< TMLink > &links, unsigned minN)
unsigned NSuperLayers (const AList< TMLink > &list)
 returns # of layers.
unsigned NSuperLayers (const AList< TMLink > &links, unsigned minN)
unsigned NMissingAxialSuperLayers (const AList< TMLink > &links)
const TTrackHEPLinks2HEP (const AList< TMLink > &links)
 returns TTrackHEP


Define Documentation

#define MCC_MAX   1000

Referenced by Dump().


Function Documentation

AList<TMLink> AxialHits ( const AList< TMLink > &  links  ) 

returns axial hits.

Definition at line 314 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by THelixFitter::main().

00314                                        {
00315     AList<TMLink> a;
00316     unsigned n = links.length();
00317     for (unsigned i = 0; i < n; i++) {
00318         if (links[i]->wire()->axial())
00319             a.append(links[i]);
00320     }
00321     return a;
00322 }

AList<TMLink> Cores ( const AList< TMLink > &  input  ) 

Definition at line 381 of file TMLink.cxx.

References genRecEmupikp::i, TMDCWireHit::state(), t(), and WireHitFittingValid.

Referenced by TConformalFinder::removeBadSegments().

00381                                    {
00382     AList<TMLink> a;
00383     unsigned n = input.length();
00384     for (unsigned i = 0; i < n; i++) {
00385         TMLink & t = * input[i];
00386         const TMDCWireHit & h = * t.hit();
00387         if (h.state() & WireHitFittingValid)
00388             a.append(t);
00389     }
00390     return a;
00391 }

void Dump ( const TMLink link,
const std::string msg,
const std::string pre 
)

Definition at line 287 of file TMLink.cxx.

References Dump().

00287                                                                         {
00288     CAList<TMLink> tmp;
00289     tmp.append(link);
00290     Dump(tmp, msg, pre);
00291 }

void Dump ( const CAList< TMLink > &  links,
const std::string msg,
const std::string pre 
)

dumps TMLinks.

Definition at line 185 of file TMLink.cxx.

Referenced by TBuilder0::buildRphi(), TBuilder0::buildStereo(), TBuilder::buildStereo(), TBuilder0::buildStereo0(), TTrackManager::dump(), TTrackBase::dump(), Dump(), BesView::Dump(), BesHeader::Dump(), Bes2DView::Dump(), TConformalFinder0::findSegments(), G__BesVisLib_rootcint_182_0_34(), G__BesVisLib_rootcint_242_0_137(), G__BesVisLib_rootcint_935_0_28(), TTrackManager::mask(), TTrackManager::maskCurl(), TTrackManager::maskOut(), TTrackManager::merge(), TTrackBase::refine(), TBuilder::salvage(), TBuilder0::selectHits(), TConformalFinder0::specialFinding(), and TConformalFinder0::standardFinding().

00185                                                                                  {
00186     bool mc = (msg.find("mc") != std::string::npos);
00187     bool pull = (msg.find("pull") != std::string::npos);
00188     bool flag = (msg.find("flag") != std::string::npos);
00189     bool sort = (msg.find("sort") != std::string::npos);
00190     bool stereo = (msg.find("stereo") != std::string::npos);
00191     bool detail = (msg.find("detail") != std::string::npos);
00192     bool pos = (msg.find("position") != std::string::npos);
00193     if (detail)
00194         mc = pull = flag = sort = true;
00195 
00196     CAList<TMLink> tmp = links;
00197     if (sort)
00198         tmp.sort(SortByWireId);
00199     unsigned n = tmp.length();
00200     unsigned nForFit = 0;
00201 #define MCC_MAX 1000
00202     unsigned MCC0[MCC_MAX];
00203     unsigned MCC1[MCC_MAX];
00204     for (unsigned i = 0; i < MCC_MAX; i++) {
00205         MCC0[i] = 0;
00206         MCC1[i] = 0;
00207     }
00208     bool MCCOverFlow = false;
00209 
00210     std::cout << pre;
00211     for (unsigned i = 0; i < n; i++) {
00212         const TMLink & l = * tmp[i];
00213         std::cout << l.wire()->name();
00214 
00215         double a = l.pull();
00216         unsigned mcId = 0;
00217         if (mc)
00218             if (l.hit()->mc())
00219                 if (l.hit()->mc()->hep())
00220                     mcId = l.hit()->mc()->hep()->id();
00221         if (pull) {
00222             std::cout << "[" << a << "]";
00223         }
00224         if (mc) {
00225             std::cout << "(" << mcId << ")";
00226             if (mcId < MCC_MAX) {
00227                 ++MCC0[mcId];
00228                 if (l.hit()->state() & WireHitFittingValid) {
00229                     if (! (l.hit()->state() & WireHitInvalidForFit))
00230                         ++MCC1[mcId];
00231                 }
00232             }
00233             else {
00234                 MCCOverFlow = true;
00235             }
00236         }
00237         if (flag) {
00238             if (l.hit()->state() & WireHitFindingValid)
00239                 std::cout << "o";
00240             if (l.hit()->state() & WireHitFittingValid) {
00241                 std::cout << "+";
00242                 if (! (l.hit()->state() & WireHitInvalidForFit))
00243                     ++nForFit;
00244             }
00245             if (l.hit()->state() & WireHitInvalidForFit)
00246                 std::cout << "x";
00247         }
00248         if (stereo) {
00249             std::cout << "{" << l.leftRight() << "," << l.zStatus() << "}";
00250         }
00251         if (pos) {
00252             std::cout << ",pos=" << l.position();
00253         }
00254         std::cout << ",";
00255     }
00256     std::cout << " " << n << " l(s)";
00257     if (flag) std::cout << ", fv " << nForFit << " l(s)";
00258     if (mc) {
00259         unsigned nMC = 0;
00260         std::cout << ", mc";
00261         for (unsigned i = 0; i < MCC_MAX; i++) {
00262             if (MCC0[i] > 0) {
00263                 ++nMC;
00264                 std::cout << i << ":" << MCC0[i] << ",";
00265             }
00266         }
00267         std::cout << " total " << nMC << " contributions";
00268         if (flag) {
00269             nMC = 0;
00270             std::cout << ", fv mc";
00271             for (unsigned i = 0; i < MCC_MAX; i++) {
00272                 if (MCC1[i] > 0) {
00273                     ++nMC;
00274                     std::cout << i << ":" << MCC1[i] << ",";
00275                 }
00276             }
00277             std::cout << " total " << nMC << " contributions";
00278         }
00279 
00280         if (MCCOverFlow)
00281             std::cout << "(counter overflow)";
00282     }
00283     std::cout << std::endl;
00284 }

AList<TMLink> Edges ( const AList< TMLink > &  list  ) 

returns links which are edges. This function assumes that all TMLink's are in the same super layer.

Definition at line 477 of file TMLink.cxx.

References genRecEmupikp::i, and w.

Referenced by TSegment0::splitAV(), TSegment::splitAV(), TSegment0::splitParallel(), and TSegment::splitParallel().

00477                                   {
00478     AList<TMLink> a;
00479 
00480     unsigned n = list.length();
00481     if (n < 2) return a;
00482     else if (n == 2) return list;
00483 
00484     const TMDCWire * w = list[0]->wire();
00485     unsigned nWires = w->layer()->nWires();
00486     unsigned center = w->localId();
00487 
00488     unsigned left = 0;
00489     unsigned right = 0;
00490     TMLink * leftL = list[0];
00491     TMLink * rightL = list[0];
00492     for (unsigned i = 1; i < n; i++) {
00493         w = list[i]->wire();
00494         unsigned id = w->localId();
00495 
00496         unsigned distance0, distance1;
00497         if (id > center) {
00498             distance0 = id - center;
00499             distance1 = nWires - distance0;
00500         }
00501         else {
00502             distance1 = center - id;
00503             distance0 = nWires - distance1;
00504         }
00505 
00506         if (distance0 < distance1) {
00507             if (distance0 > right) {
00508                 right = distance0;
00509                 rightL = list[i];
00510             }
00511         }
00512         else {
00513             if (distance1 > left) {
00514                 left = distance1;
00515                 leftL = list[i];
00516             }
00517         }
00518     }
00519 
00520     a.append(leftL);
00521     a.append(rightL);
00522     return a;
00523 }

TMLink* InnerMost ( const AList< TMLink > &  a  ) 

returns the inner(outer)-most link.

Definition at line 336 of file TMLink.cxx.

References genRecEmupikp::i, and t().

Referenced by TTrackMC::compare(), TTrackManager::maskNormal(), and TTrackManager::merge().

00336                                    {
00337     unsigned n = a.length();
00338     unsigned minId = 9999;
00339     TMLink * t = 0;
00340     for (unsigned i = 0; i < n; i++) {
00341         unsigned id = a[i]->wire()->id();
00342         if (id < minId) {
00343             minId = id;
00344             t = a[i];
00345         }
00346     }
00347     return t;
00348 }

AList<TMLink> InOut ( const AList< TMLink > &  list  ) 

returns links which are in the inner most and outer most layer. This function assumes that all TMLink's are in the same super layer.

Definition at line 568 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TSegment0::solveDualHits(), and TSegment::solveDualHits().

00568                                   {
00569     AList<TMLink> inners;
00570     AList<TMLink> outers;
00571     unsigned n = list.length();
00572     unsigned innerMostLayer = 999;
00573     unsigned outerMostLayer = 0;
00574     for (unsigned i = 0; i < n; i++) {
00575         unsigned id = list[i]->wire()->layerId();
00576         if (id < innerMostLayer) innerMostLayer = id;
00577         else if (id > outerMostLayer) outerMostLayer = id;
00578     }
00579     for (unsigned i = 0; i < n; i++) {
00580         unsigned id = list[i]->wire()->layerId();
00581         if (id == innerMostLayer) inners.append(list[i]);
00582         else if (id == outerMostLayer) outers.append(list[i]);
00583     }
00584     inners.append(outers);
00585     return inners;
00586 }

const TTrackHEP& Links2HEP ( const AList< TMLink > &  links  ) 

returns TTrackHEP

Definition at line 662 of file TMLink.cxx.

References genRecEmupikp::i, ganga-rec::j, TTrackHEP::list(), and TrigConf::N.

00662                                        {
00663     const TTrackHEP * best = NULL;
00664     const AList<TTrackHEP> & list = TTrackHEP::list();
00665     unsigned nHep = list.length();
00666 
00667     if (! nHep) return * best;
00668 
00669     unsigned * N = (unsigned *) malloc(nHep * sizeof(unsigned));
00670     for (unsigned i = 0; i < nHep; i++) N[i] = 0;
00671 
00672     for (unsigned i = 0; i < links.length(); i++) {
00673         const TMLink & l = * links[i];
00674         const TTrackHEP & hep = * l.hit()->mc()->hep();
00675         for (unsigned j = 0; j < nHep; j++)
00676             if (list[j] == & hep)
00677                 ++N[j];
00678     }
00679 
00680     unsigned nMax = 0;
00681     for (unsigned i = 0; i < nHep; i++) {
00682         if (N[i] > nMax) {
00683             best = list[i];
00684             nMax = N[i];
00685         }
00686     }
00687 
00688     return * best;
00689 }

unsigned NAxialHits ( const AList< TMLink > &  links  ) 

returns # of axial hits.

Definition at line 304 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TTrackManager::checkNumberOfHits().

00304                                         {
00305     unsigned nLinks = links.length();
00306     unsigned n = 0;
00307     for (unsigned i = 0; i < nLinks; i++)
00308         if (links[i]->wire()->axial())
00309             ++n;
00310     return n;
00311 }

void NHits ( const AList< TMLink > &  links,
unsigned  nHits[43] 
)

Definition at line 169 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by BesMdcDigitizer::Digitize(), and TTrackManager::mask().

00169                                                        {
00170     for (unsigned i = 0; i < 43; i++) nHits[i] = 0;
00171     unsigned nLinks = links.length();
00172     for (unsigned i = 0; i < nLinks; i++)
00173         ++nHits[links[i]->wire()->layerId()];
00174 }

void NHitsSuperLayer ( const AList< TMLink > &  links,
unsigned  nHits[11] 
)

returns # of hits per super layer.

Definition at line 177 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TrackLayerUsage().

00177                                                                  {
00178     for (unsigned i = 0; i < 11; i++) nHits[i] = 0;
00179     unsigned nLinks = links.length();
00180     for (unsigned i = 0; i < nLinks; i++)
00181         ++nHits[links[i]->wire()->superLayerId()];
00182 }

unsigned NLayers ( const AList< TMLink > &  list  ) 

returns # of layers.

Definition at line 150 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TBuilder0::buildRphi(), and TTrackManager::maskNormal().

00150                                     {
00151     unsigned l0 = 0;
00152     unsigned l1 = 0;
00153     unsigned n = list.length();
00154     for (unsigned i = 0; i < n; i++) {
00155         unsigned id = list[i]->wire()->layerId();
00156         if (id < 32) l0 |= (1 << id);
00157         else         l1 |= (1 << (id - 32));
00158     }
00159 
00160     unsigned l = 0;
00161     for (unsigned i = 0; i < 32; i++) {
00162         if (l0 & (1 << i)) ++l;
00163         if (l1 & (1 << i)) ++l;
00164     }
00165     return l;
00166 }

unsigned NMissingAxialSuperLayers ( const AList< TMLink > &  links  ) 

Definition at line 640 of file TMLink.cxx.

References genRecEmupikp::i, and ganga-rec::j.

Referenced by TConformalFinder::trackQuality().

00640                                                       {
00641     unsigned n = links.length();
00642 //Liuqg, change the following to BES.    unsigned nHits[6] = {0, 0, 0, 0, 0, 0};
00643     unsigned nHits[5] = {0, 0, 0, 0, 0};
00644     for (unsigned i = 0; i < n; i++)
00645         if (links[i]->wire()->axial())
00646             ++nHits[links[i]->wire()->axialStereoLayerId() / 4];
00647     unsigned j = 0;
00648     while (nHits[j] == 0) ++j;
00649     unsigned nMissing = 0;
00650     unsigned nMax = 0;
00651     for (unsigned i = j; i < 5; i++) {
00652         if (nHits[i] == 0) ++nMissing;
00653         else {
00654             if (nMax < nMissing) nMax = nMissing;
00655             nMissing = 0;
00656         }
00657     }
00658     return nMax;
00659 }

unsigned NStereoHits ( const AList< TMLink > &  links  ) 

returns # of stereo hits.

Definition at line 294 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TTrackManager::checkNumberOfHits(), TRungeFitter::fit(), T3DLineFitter::fit(), THelixFitter::main(), and TrackInformation().

00294                                          {
00295     unsigned nLinks = links.length();
00296     unsigned n = 0;
00297     for (unsigned i = 0; i < nLinks; i++)
00298         if (links[i]->wire()->stereo())
00299             ++n;
00300     return n;
00301 }

unsigned NSuperLayers ( const AList< TMLink > &  links,
unsigned  minN 
)

Definition at line 627 of file TMLink.cxx.

References genRecEmupikp::i.

00627                                                          {
00628     unsigned n = links.length();
00629     unsigned nHits[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
00630     for (unsigned i = 0; i < n; i++)
00631         ++nHits[links[i]->wire()->superLayerId()];
00632     unsigned sl = 0;
00633     for (unsigned i = 0; i < 11; i++)
00634         if (nHits[i] >= minN)
00635             ++sl;
00636     return sl;
00637 }

unsigned NSuperLayers ( const AList< TMLink > &  list  ) 

returns # of layers.

Definition at line 611 of file TMLink.cxx.

Referenced by TBuilder0::buildRphi(), TConformalFinder::fastFinding2D(), TBuilder::initialLine(), TBuilder::initialLineOld(), TTrackManager::maskCurl(), TTrackManager::maskNormal(), TTrackManager::merge(), TMSelector::preSelect(), TConformalFinder::quality2D(), and TConformalFinder::trackQuality().

00611                                          {
00612     unsigned l0 = 0;
00613     unsigned n = list.length();
00614     for (unsigned i = 0; i < n; i++) {
00615         unsigned id = list[i]->wire()->superLayerId();
00616         l0 |= (1 << id);
00617     }
00618 
00619     unsigned l = 0;
00620     for (unsigned i = 0; i < 11; i++) {
00621         if (l0 & (1 << i)) ++l;
00622     }
00623     return l;
00624 }

TMLink* OuterMost ( const AList< TMLink > &  a  ) 

Definition at line 351 of file TMLink.cxx.

References genRecEmupikp::i, and t().

Referenced by TTrackManager::copyTrack(), TTrackManager::divide(), TTrackManager::divideByIp(), and TTrackManager::makeTds().

00351                                    {
00352     unsigned n = a.length();
00353     unsigned maxId = 0;
00354     TMLink * t = 0;
00355     for (unsigned i = 0; i < n; i++) {
00356         unsigned id = a[i]->wire()->id();
00357         if (id > maxId) {
00358             maxId = id;
00359             t = a[i];
00360         }
00361     }
00362     return t;
00363 }

AList<TMLink> SameLayer ( const AList< TMLink > &  list,
unsigned  id 
)

Definition at line 548 of file TMLink.cxx.

References genRecEmupikp::i.

00548                                                    {
00549     AList<TMLink> same;
00550     unsigned n = list.length();
00551     for (unsigned i = 0; i < n; i++) {
00552         if (list[i]->wire()->layerId() == id) same.append(list[i]);
00553     }
00554     return same;
00555 }

AList<TMLink> SameLayer ( const AList< TMLink > &  list,
const TMLink a 
)

returns links which are in the same layer as 'a' or 'id'.

Definition at line 526 of file TMLink.cxx.

Referenced by TTrackManager::mask(), TTrackManager::maskMultiHits(), TSegment0::solveDualHits(), TSegment::solveDualHits(), TSegment0::splitDual(), TSegment::splitDual(), TSegment0::splitParallel(), TSegment::splitParallel(), TSegment0::updateDuality(), TSegment::updateDuality(), and TSegment::width().

00526                                                         {
00527     AList<TMLink> same;
00528     unsigned id = a.wire()->layerId();
00529     unsigned n = list.length();
00530     for (unsigned i = 0; i < n; i++) {
00531         if (list[i]->wire()->layerId() == id) same.append(list[i]);
00532     }
00533     return same;
00534 }

AList<TMLink> SameSuperLayer ( const AList< TMLink > &  list,
unsigned  id 
)

Definition at line 558 of file TMLink.cxx.

References genRecEmupikp::i.

00558                                                         {
00559     AList<TMLink> same;
00560     unsigned n = list.length();
00561     for (unsigned i = 0; i < n; i++) {
00562         if (list[i]->wire()->superLayerId() == id) same.append(list[i]);
00563     }
00564     return same;
00565 }

AList<TMLink> SameSuperLayer ( const AList< TMLink > &  list,
const TMLink a 
)

returns links which are in the same super layer as 'a' or 'id'.

Definition at line 537 of file TMLink.cxx.

Referenced by TBuilder0::buildRphi().

00537                                                              {
00538     AList<TMLink> same;
00539     unsigned id = a.wire()->superLayerId();
00540     unsigned n = list.length();
00541     for (unsigned i = 0; i < n; i++) {
00542         if (list[i]->wire()->superLayerId() == id) same.append(list[i]);
00543     }
00544     return same;
00545 }

void SeparateCores ( const AList< TMLink > &  input,
AList< TMLink > &  cores,
AList< TMLink > &  nonCores 
)

separate cores and non-cores.

Definition at line 366 of file TMLink.cxx.

References genRecEmupikp::i, TMDCWireHit::state(), t(), and WireHitFittingValid.

Referenced by TBuilder::buildRphi(), and TBuilder::buildStereo().

00368                                         {
00369     unsigned n = input.length();
00370     for (unsigned i = 0; i < n; i++) {
00371         TMLink & t = * input[i];
00372         const TMDCWireHit & h = * t.hit();
00373         if (h.state() & WireHitFittingValid)
00374             cores.append(t);
00375         else
00376             nonCores.append(t);
00377     }
00378 }

int SortByWireId ( const void *  av,
const void *  bv 
)

Sorter.

Definition at line 411 of file TMLink.cxx.

Referenced by TBuilderCosmic::buildStereo(), Dump(), TBuilderCurl::makeLine(), TCurlFinder::mask3DTrack(), TTrackManager::maskMultiHits(), TMLine::refine(), TLine0::refine(), TSegment0::splitComplicated(), TSegment::splitComplicated(), TSegment::TSegment(), and TSegment0::TSegment0().

00411                                                {
00412   const TMLink ** a((const TMLink**)av);
00413   const TMLink ** b((const TMLink**)bv);
00414     if ((* a)->wire()->id() > (* b)->wire()->id()) return 1;
00415     else if
00416         ((* a)->wire()->id() == (* b)->wire()->id()) return 0;
00417     else return -1;
00418 }

int SortByX ( const void *  av,
const void *  bv 
)

Definition at line 421 of file TMLink.cxx.

00421                                         {
00422   const TMLink ** a((const TMLink**)av);
00423   const TMLink ** b((const TMLink**)bv);
00424     if ((* a)->position().x() > (* b)->position().x()) return 1;
00425     else if ((* a)->position().x() == (* b)->position().x()) return 0;
00426     else return -1;
00427 }

AList<TMLink> StereoHits ( const AList< TMLink > &  links  ) 

returns stereo hits.

Definition at line 325 of file TMLink.cxx.

References genRecEmupikp::i.

Referenced by TBuilder::buildStereo(), and TBuilder::buildStereoNew().

00325                                         {
00326     AList<TMLink> a;
00327     unsigned n = links.length();
00328     for (unsigned i = 0; i < n; i++) {
00329         if (! links[i]->wire()->axial())
00330             a.append(links[i]);
00331     }
00332     return a;
00333 }

unsigned SuperLayer ( const AList< TMLink > &  links,
unsigned  minN 
)

Definition at line 598 of file TMLink.cxx.

00598                                                        {
00599     unsigned n = links.length();
00600     unsigned nHits[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
00601     for (unsigned i = 0; i < n; i++)
00602         ++nHits[links[i]->wire()->superLayerId()];
00603     unsigned sl = 0;
00604     for (unsigned i = 0; i < 11; i++)
00605         if (nHits[i] >= minN)
00606             sl |= (1 << i);
00607     return sl;
00608 }

unsigned SuperLayer ( const AList< TMLink > &  list  ) 

returns super layer pattern.

Definition at line 589 of file TMLink.cxx.

Referenced by TBuilder0::buildRphi(), TConformalFinder::expand(), MdcxFindTracks::process(), TConformalFinder::quality2D(), and TConformalFinder::refineSegments().

00589                                        {
00590     unsigned sl = 0;
00591     unsigned n = list.length();
00592     for (unsigned i = 0; i < n; i++)
00593         sl |= (1 << (list[i]->wire()->superLayerId()));
00594     return sl;
00595 }

unsigned Width ( const AList< TMLink > &  list  ) 

returns width(wire cell unit) of given AList<TMLink>. This function assumes that all TMLink's are in the same super layer.

Definition at line 432 of file TMLink.cxx.

References genRecEmupikp::i, and w.

Referenced by TConformalFinder::findSegmentsPerfect(), BesMucNoise::Initialize(), TTrackManager::mask(), TSegment0::solveDualHits(), TSegment::solveDualHits(), TSegment0::splitDual(), TSegment::splitDual(), TSegment0::update(), TSegment::update(), TSegment0::updateDuality(), TSegment::updateDuality(), TSegment0::updateType(), TSegment::updateType(), and TSegment::width().

00432                                   {
00433     unsigned n = list.length();
00434     if (n < 2) return n;
00435 
00436     const TMDCWire * w = list[0]->wire();
00437     unsigned nWires = w->layer()->nWires();
00438     unsigned center = w->localId();
00439 
00440 #ifdef TRKRECO_DEBUG_DETAIL
00441     unsigned sId = w->superLayerId();
00442 #endif
00443 
00444     unsigned left = 0;
00445     unsigned right = 0;
00446     for (unsigned i = 1; i < n; i++) {
00447         w = list[i]->wire();
00448         unsigned id = w->localId();
00449 
00450         unsigned distance0, distance1;
00451         if (id > center) {
00452             distance0 = id - center;
00453             distance1 = nWires - distance0;
00454         }
00455         else {
00456             distance1 = center - id;
00457             distance0 = nWires - distance1;
00458         }
00459 
00460         if (distance0 < distance1) {
00461             if (distance0 > right) right = distance0;
00462         }
00463         else {
00464             if (distance1 > left) left = distance1;
00465         }
00466 
00467 #ifdef TRKRECO_DEBUG_DETAIL
00468         if (w->superLayerId() != sId)
00469             std::cout << "::width !!! super layer assumption violation" << std::endl;
00470 #endif
00471     }
00472 
00473     return right + left + 1;
00474 }


Generated on Tue Nov 29 23:17:07 2016 for BOSS_7.0.2 by  doxygen 1.4.7