47 LogTrace(
"Reco|TrackingTools|SeedTransformer") <<
"SeedTransformer constructor called." << endl << endl;
50 theMuonRecHitBuilderName = iConfig.
getParameter<
string>(
"MuonRecHitBuilder");
53 nMinRecHits = iConfig.
getParameter<
unsigned int>(
"NMinRecHits");
54 errorRescale = iConfig.
getParameter<
double>(
"RescaleError");
55 useSubRecHits = iConfig.
getParameter<
bool>(
"UseSubRecHits");
59 LogTrace(
"Reco|TrackingTools|SeedTransformer") <<
"SeedTransformer destructor called." << endl << endl;
71 const string metname =
"Reco|TrackingTools|SeedTransformer";
73 LogTrace(metname) <<
" Number of valid RecHits: " << aSeed.
nHits() << endl;
75 if (aSeed.
nHits() < nMinRecHits) {
76 LogTrace(metname) <<
" --- Too few RecHits, no refit performed! ---" << endl;
77 return vector<Trajectory>();
83 aTSOS.rescaleError(errorRescale);
85 vector<TransientTrackingRecHit::ConstRecHitPointer>
recHits;
86 unsigned int countRH = 0;
88 for (TrajectorySeed::recHitContainer::const_iterator itRecHits = aSeed.
recHits().first;
89 itRecHits != aSeed.
recHits().second;
90 ++itRecHits, ++countRH) {
91 if ((*itRecHits).isValid()) {
97 copy(subHits.begin(), subHits.end(), back_inserter(recHits));
99 recHits.push_back(ttrh);
107 LogTrace(metname) <<
" --- Initial state for refit not valid! ---" << endl;
108 return vector<Trajectory>();
111 vector<Trajectory> refittedSeed = theFitter->fit(aSeed, recHits, aInitTSOS);
113 if (refittedSeed.empty()) {
114 LogTrace(metname) <<
" --- Seed fit failed! ---" << endl;
115 return vector<Trajectory>();
118 else if (!refittedSeed.front().isValid()) {
119 LogTrace(metname) <<
" --- Seed fitted, but trajectory not valid! ---" << endl;
120 return vector<Trajectory>();
124 LogTrace(metname) <<
" +++ Seed fit succeded! +++" << endl;
132 const GeomDet* tmpGeomDet = theTrackingGeometry->idToDet(tmpDetId);
T getParameter(std::string const &) const
const std::string metname
static TransientTrackingRecHit::ConstRecHitContainer breakInSubRecHits(TransientTrackingRecHit::ConstRecHitPointer, int granularity)
takes a muon rechit and returns its sub-rechits given a certain granularity
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
unsigned int detId() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
PTrajectoryStateOnDet const & startingState() const
unsigned int nHits() const