25: _perfectFitting(perfectFitting),
26 _builder(
"conformal builder",
33 _fitter(
"helix fitter") {
59 hits.append(axialHits);
60 hits.append(stereoHits);
64 const unsigned nHits = hits.length();
65 for (
unsigned i = 0; i < nHits; i++) {
77 const unsigned nHitsMC = mcHits.length();
78 const unsigned nHeps = heps.length();
79 for (
unsigned i = 0; i < nHeps; i++) {
88 unsigned lastLayer = 0;
89 for (
unsigned j = 0; j < mcHits.length(); j++) {
92 if (! mc->
hit())
continue;
93 if (& hep != mc->
hep())
continue;
94 if (! hits.hasMember(mc->
hit()))
continue;
103 if ((ent.unit()).dot(dir.unit()) < 0.5)
continue;
112 const float r = ent.mag();
125 if (_links.length() == 0)
continue;
130 Helix h(posOut, momOut, chg);
151 if (_perfectFitting == 0) {
152 std::cout <<
"special test in perfect finder" << std::endl;
154 for (
unsigned i = 0; i <
t->nLinks(); i++) {
156 if (
t->links()[i]->wire()->name() ==
"0-56")
158 else if (
t->links()[i]->wire()->name() ==
"2-56")
160 else if (
t->links()[i]->wire()->name() ==
"5-57")
162 else if (
t->links()[i]->wire()->name() ==
"6=68")
164 else if (
t->links()[i]->wire()->name() ==
"7=69")
166 else if (
t->links()[i]->wire()->name() ==
"8=68")
168 else if (
t->links()[i]->wire()->name() ==
"10-85")
170 else if (
t->links()[i]->wire()->name() ==
"20-126")
172 else if (
t->links()[i]->wire()->name() ==
"39-210")
174 else if (
t->links()[i]->wire()->name() ==
"41=221")
176 else if (
t->links()[i]->wire()->name() ==
"43=221")
178 else if (
t->links()[i]->wire()->name() ==
"46-251")
180 else if (
t->links()[i]->wire()->name() ==
"48-251")
183 std::cout <<
t->links()[i]->wire()->name() <<
" removed" << std::endl;
184 tmp.append(*
t->links()[i]);
188 t->dump(
"detail",
"@lastHit");
191 t->dump(
"detail",
"@origin ");
193 t->dump(
"detail",
"fitted ");
195 std::cout <<
"Pdif mag=" << (
t->p() - p0).mag() << std::endl;
205 HepAListDeleteAll(_links);
209TPerfectFinder::charge(
int pType)
const {
212 if (pType == 11) chg = -1;
213 else if (pType == -11) chg = 1;
214 else if (pType == 13) chg = -1;
215 else if (pType == -13) chg = 1;
216 else if (pType == 211) chg = 1;
217 else if (pType == -211) chg = -1;
218 else if (pType == 321) chg = 1;
219 else if (pType == -321) chg = -1;
220 else if (pType == 2212) chg = 1;
221 else if (pType == -2212) chg = -1;
223 std::cout <<
"TPerfectFinder !!! charge of particle type=";
224 std::cout << pType <<
" is unknown" << std::endl;
HepGeom::Vector3D< double > HepVector3D
const HepPoint3D & pivot(void) const
returns pivot position.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
int fit(TTrackBase &) const
A class to represent a MC wire hit in MDC.
const Hep3Vector & momentum(void) const
returns momentum vector at the entrance.
const TTrackHEP *const hep(void) const
returns a pointer to a GEN_HEPEVT.
const HepVector3D & direction(void) const
returns vector from entrance to exit point.
const TMDCWire *const wire(void) const
returns a pointer to a TMDCWire.
const HepPoint3D & entrance(void) const
returns an entrance point.
const TMDCWireHit *const hit(void) const
returns a pointer to a TMDCWireHit.
int leftRight(void) const
returns left or right.
unsigned layerId(void) const
returns layer id.
const HepPoint3D & xyPosition(void) const
returns middle position of a wire. z componet is 0.
static TMDC * getTMDC(void)
const AList< TMDCWireHitMC > & hitsMC(void) const
returns a list of TMDCWireHitMC. 'updateMC()' must be called before calling this function.
A class to relate TMDCWireHit and TTrack objects.
unsigned leftRight(void) const
returns left-right. 0:left, 1:right, 2:wire
const TMDCWire *const wire(void) const
returns a pointer to a wire.
std::string version(void) const
returns version.
virtual ~TPerfectFinder()
Destructor.
void clear(void)
clear internal information.
TPerfectFinder(int perfectFitting, float maxSigma, float maxSigmaStereo, unsigned fittingFlag)
Constructor.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
int doit(const AList< TMDCWireHit > &axialHits, const AList< TMDCWireHit > &stereoHits, AList< TTrack > &tracks, AList< TTrack > &tracks2D)
finds tracks.
A class to represent a GEN_HEPEVT particle in tracking.
int pType(void) const
returns particle type.
A class to represent a track in tracking.