20#include "MdcGeom/BesAngle.h"
21#include "CLHEP/Alist/AList.h"
22#include "MdcGeom/MdcSuperLayer.h"
23#include "MdcGeom/MdcDetector.h"
24#include "MdcTrkRecon/MdcSegGrouperCsmc.h"
25#include "MdcTrkRecon/MdcSegList.h"
26#include "MdcTrkRecon/MdcSeg.h"
27#include "MdcTrkRecon/MdcSegInfoCsmc.h"
28#include "MdcTrkRecon/mdcWrapAng.h"
29#include "MdcTrkRecon/MdcTrack.h"
30#include "MdcTrkRecon/GmsList.h"
31#include "TrkBase/TrkExchangePar.h"
43 for (
int j = 0; j <
nPly(); j++) {
54 for (
int isuper = 0; isuper <
_gm->
nSuper(); isuper++) {
56 if (inList->
count() == 0)
continue;
71 for (
int iseg = 0; iseg < (int)
segList[isuper].length(); iseg++) {
75 segList[isuper].insert(inSeg, iseg);
79 if (isInserted == 0)
segList[isuper].append(inSeg);
96 if (testSeg == 0)
return 0;
103 double refPhi0 = refInfo->
phi0();
104 double testPhi0 = testInfo->
phi0();
105 double corrPhi0 =
mdcWrapAng(refPhi0, testPhi0);
106 if (refPhi0 - corrPhi0 > 6. * sigPhi0)
return -1;
107 if (corrPhi0 - refPhi0 > 6. * sigPhi0) {
108 if (testPhi0 > refPhi0)
return 1;
114 double sigD0 = (refInfo->
sigD0() > testInfo->
sigD0() ?
116 double refD0 = refInfo->
d0();
117 double testD0 = testInfo->
d0();
118 if (fabs(refD0 - testD0) > 6. * sigD0)
return -2;
139 for (i = 0; i <
nDeep; i++) {
156 thisSlay = thisSlay->
next()) {
157 bool noGoodYet =
true;
160 if (thisSlay == seedSlay)
continue;
161 if (thisSlay->whichView() != 0)
continue;
165 if (
segList[islay-1].length() != 0)
167 for (
int i = 0; i < (int)
segList[islay-1].length(); i++) {
176 else if (invalid > 0) {
179 for (
int j = i; j < (int)
segList[islay-1].length(); j++)
double mdcWrapAng(double phi1, double phi2)
GmsListLink * next() const
GmsListLink * first() const
unsigned int count() const
const MdcSuperLayer * firstSlay(void) const
void resetComb(const class MdcSeg *)
MdcSegGrouperCsmc(const MdcDetector *gm, int debug)
void fillWithSegs(const MdcSegList *inSegs)
virtual MdcTrack * storePar(MdcTrack *trk, double parms[2], double chisq, TrkContext &, double trackT0)
virtual int incompWithSeg(const MdcSeg *refSeg, const MdcSeg *testSeg)
virtual int incompWithGroup(MdcSeg **segGroup, const MdcSeg *testSeg, int iply)
HepAList< MdcSeg > * segList
HepAList< MdcSeg > ** combList
void calcStraight(double phi, double slope, double rad, const double *inErr)
const GmsList * oneList(int slayIndex) const
const MdcSuperLayer * superlayer() const
MdcSegInfo * info() const
void setInfo(MdcSegInfo *ptr)
const MdcSuperLayer * next(void) const
int whichView(void) const