27 if (cleaner ==
"CachingSeedCleanerBySharedInput") {
29 }
else if (cleaner ==
"none") {
32 throw cms::Exception(
"InOutRedundantSeedCleaner not found, please use CachingSeedCleanerBySharedInput or none",
47 std::vector<Trajectory> tmpO;
48 tmpO.erase(tmpO.begin(), tmpO.end());
50 std::vector<Trajectory>
result;
53 std::vector<Trajectory> rawResult;
59 for (TrajectorySeedCollection::const_iterator iSeed = inOutSeeds.begin(); iSeed != inOutSeeds.end(); iSeed++) {
63 LogDebug(
"InOutConversionTrackFinder")
64 <<
" InOutConversionTrackFinder::tracks hits in the seed " << iSeed->nHits() <<
"\n";
65 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::tracks seed starting state position "
66 << iSeed->startingState().parameters().position() <<
" momentum "
67 << iSeed->startingState().parameters().momentum() <<
" charge "
68 << iSeed->startingState().parameters().charge() <<
"\n";
69 LogDebug(
"InOutConversionTrackFinder")
70 <<
" InOutConversionTrackFinder::tracks seed starting state para, vector "
71 << iSeed->startingState().parameters().vector() <<
"\n";
73 std::vector<Trajectory> theTmpTrajectories;
77 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::track returned "
78 << theTmpTrajectories.size() <<
" trajectories for this seed "
83 for (std::vector<Trajectory>::const_iterator it = theTmpTrajectories.begin(); it != theTmpTrajectories.end();
86 rawResult.push_back(*it);
94 LogDebug(
"InOutConversionTrackFinder") <<
"InOutConversionTrackFinder::track Good seeds " << goodSeed <<
"\n";
95 LogDebug(
"InOutConversionTrackFinder") <<
"InOutConversionTrackFinder::track rawResult size after cleaning "
96 << rawResult.size() <<
"\n";
101 std::vector<Trajectory> unsmoothedResult;
102 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::track Start second cleaning "
105 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::track rawResult size after cleaning "
106 << rawResult.size() <<
"\n";
109 for (std::vector<Trajectory>::const_iterator itraw = rawResult.begin(); itraw != rawResult.end(); itraw++) {
111 LogDebug(
"InOutConversionTrackFinder")
112 <<
" InOutConversionTrackFinder looping of rawResult after cleaning " << tra <<
"\n";
113 if ((*itraw).isValid()) {
115 tmpO.push_back(*itraw);
116 LogDebug(
"InOutConversionTrackFinder")
117 <<
" InOutConversionTrackFinder::track rawResult num of valid recHits per trajectory " << (*itraw).foundHits()
122 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder tmpO size " << tmpO.size()
123 <<
" before sorting "
131 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder tmpO after sorting "
137 for (
int i = tmpO.size() - 1;
i >= 0;
i--) {
138 unsmoothedResult.push_back(tmpO[
i]);
140 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder unsmoothedResult size "
141 << unsmoothedResult.size() <<
"\n";
149 for (std::vector<Trajectory>::const_iterator it = unsmoothedResult.begin(); it != unsmoothedResult.end(); it++) {
152 LogDebug(
"InOutConversionTrackFinder") <<
"InOutConv not along momentum... " << std::endl;
156 std::pair<TrajectoryStateOnSurface, const GeomDet*> initState =
theInitialState_->innerState(*it);
159 if ((!initState.first.isValid()) | (initState.second ==
nullptr)) {
160 LogDebug(
"InOutConversionTrackFinder") <<
"invalid innerState, will not make TrackCandidate" << std::endl;
174 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::track Making the result: seed position "
175 << it->seed().startingState().parameters().position() <<
" seed momentum "
176 << it->seed().startingState().parameters().momentum() <<
" charge "
177 << it->seed().startingState().parameters().charge() <<
"\n";
178 LogDebug(
"InOutConversionTrackFinder")
179 <<
" InOutConversionTrackFinder::track TSOS charge " << initState.first.charge() <<
"\n";
181 LogDebug(
"InOutConversionTrackFinder")
182 <<
" InOutConversionTrackFinder::track PTrajectoryStateOnDet* state position "
183 <<
state.parameters().position() <<
" momentum " <<
state.parameters().momentum() <<
" charge "
184 <<
state.parameters().charge() <<
"\n";
190 LogDebug(
"InOutConversionTrackFinder") <<
" InOutConversionTrackFinder::track Returning " <<
result.size()
191 <<
" valid In Out Trajectories "