50 LogTrace(
"Reco|TrackingTools|SeedTransformer") <<
"SeedTransformer constructor called." << endl << endl;
53 theMuonRecHitBuilderName = iConfig.
getParameter<
string>(
"MuonRecHitBuilder");
56 nMinRecHits = iConfig.
getParameter<
unsigned int>(
"NMinRecHits");
57 errorRescale = iConfig.
getParameter<
double>(
"RescaleError");
58 useSubRecHits = iConfig.
getParameter<
bool>(
"UseSubRecHits");
63 LogTrace(
"Reco|TrackingTools|SeedTransformer") <<
"SeedTransformer destructor called." << endl << endl;
79 const string metname =
"Reco|TrackingTools|SeedTransformer";
81 LogTrace(metname) <<
" Number of valid RecHits: " << aSeed.
nHits() << endl;
83 if( aSeed.
nHits() < nMinRecHits ) {
84 LogTrace(metname) <<
" --- Too few RecHits, no refit performed! ---" << endl;
85 return vector<Trajectory>();
91 aTSOS.rescaleError(errorRescale);
93 vector<TransientTrackingRecHit::ConstRecHitPointer> recHits;
94 unsigned int countRH = 0;
96 for(TrajectorySeed::recHitContainer::const_iterator itRecHits=aSeed.
recHits().first; itRecHits!=aSeed.
recHits().second; ++itRecHits, ++countRH) {
97 if((*itRecHits).isValid()) {
103 copy(subHits.begin(),subHits.end(),back_inserter(recHits));
106 recHits.push_back(ttrh);
114 LogTrace(metname) <<
" --- Initial state for refit not valid! ---" << endl;
115 return vector<Trajectory>();
118 vector<Trajectory> refittedSeed = theFitter->fit(aSeed, recHits, aInitTSOS);
120 if(refittedSeed.empty()) {
121 LogTrace(metname) <<
" --- Seed fit failed! ---" << endl;
122 return vector<Trajectory>();
125 else if(!refittedSeed.front().isValid()) {
126 LogTrace(metname) <<
" --- Seed fitted, but trajectory not valid! ---" << endl;
127 return vector<Trajectory>();
131 LogTrace(metname) <<
" +++ Seed fit succeded! +++" << endl;
141 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