27 if (cleaner ==
"CachingSeedCleanerBySharedInput") {
29 }
else if (cleaner ==
"none") {
32 throw cms::Exception(
"OutInRedundantSeedCleaner 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;
81 std::vector<Trajectory> theTmpTrajectories;
82 for (TrajectorySeedCollection::const_iterator iSeed = outInSeeds.begin(); iSeed != outInSeeds.end(); iSeed++) {
83 theTmpTrajectories.clear();
88 DetId tmpId =
DetId(iSeed->startingState().detId());
90 GlobalVector gv = tmpDet->surface().toGlobal(iSeed->startingState().parameters().momentum());
93 LogDebug(
"OutInConversionTrackFinder") <<
" OutInConversionTrackFinder::tracks seed starting state position "
94 << iSeed->startingState().parameters().position() <<
" momentum "
95 << iSeed->startingState().parameters().momentum() <<
" charge "
96 << iSeed->startingState().parameters().charge() <<
" R " << gv.
perp()
97 <<
" eta " << gv.
eta() <<
" phi " << gv.
phi() <<
"\n";
101 LogDebug(
"OutInConversionTrackFinder")
102 <<
"OutInConversionTrackFinder::track returned " << theTmpTrajectories.size() <<
" trajectories"
107 for (std::vector<Trajectory>::const_iterator it = theTmpTrajectories.begin(); it != theTmpTrajectories.end();
110 rawResult.push_back(*it);
117 LogDebug(
"OutInConversionTrackFinder") <<
" OutInConversionTrackFinder::track Good seeds " << goodSeed <<
"\n";
118 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder::track rawResult size after cleaning "
119 << rawResult.size() <<
"\n";
124 std::vector<Trajectory> unsmoothedResult;
127 for (std::vector<Trajectory>::const_iterator itraw = rawResult.begin(); itraw != rawResult.end(); itraw++) {
128 if ((*itraw).isValid()) {
129 tmpO.push_back(*itraw);
130 LogDebug(
"OutInConversionTrackFinder") <<
" rawResult num hits " << (*itraw).foundHits() <<
"\n";
134 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder tmpO size " << tmpO.size()
135 <<
" before sorting "
143 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder tmpO after sorting "
149 for (
int i = tmpO.size() - 1;
i >= 0;
i--) {
150 unsmoothedResult.push_back(tmpO[
i]);
152 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder unsmoothedResult size "
153 << unsmoothedResult.size() <<
"\n";
161 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder tmpO size " << tmpO.size()
162 <<
" after clearing "
164 for (std::vector<Trajectory>::const_iterator it = unsmoothedResult.begin(); it != unsmoothedResult.end(); it++) {
168 std::pair<TrajectoryStateOnSurface, const GeomDet*> initState =
theInitialState_->innerState(*it);
172 if (!initState.first.isValid() || initState.second ==
nullptr) {
173 LogDebug(
"OutInConversionTrackFinder") <<
"invalid innerState, will not make TrackCandidate"
181 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder tmpO size " << tmpO.size() <<
" after filling "
184 std::vector<Trajectory>::iterator it = tmpO.begin();
189 result.push_back(*(++it));
198 for (std::vector<Trajectory>::const_iterator it =
result.begin(); it !=
result.end(); it++) {
201 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConv along momentum... " << std::endl;
204 std::pair<TrajectoryStateOnSurface, const GeomDet*> initState =
theInitialState_->innerState(*it);
209 if (!initState.first.isValid() || initState.second ==
nullptr) {
210 LogDebug(
"OutInConversionTrackFinder") <<
"invalid innerState, will not make TrackCandidate" << std::endl;
224 LogDebug(
"OutInConversionTrackFinder") <<
"OutInConversionTrackFinder Number of hits for the track candidate "
225 <<
recHits.size() <<
" TSOS charge " << initState.first.charge() <<
"\n";