44 theTrackerRecHitBuilderName = parameterSet.
getParameter<
string>(
"TrackerRecHitBuilder");
45 theMuonRecHitBuilderName = parameterSet.
getParameter<
string>(
"MuonRecHitBuilder");
47 theRPCInTheFit = parameterSet.
getParameter<
bool>(
"RefitRPCHits");
49 theCacheId_TC = theCacheId_GTG = theCacheId_MG = theCacheId_TRH = 0;
50 theSkipStationDT = parameterSet.
getParameter<
int>(
"SkipStationDT");
51 theSkipStationCSC = parameterSet.
getParameter<
int>(
"SkipStationCSC");
52 theSkipWheelDT = parameterSet.
getParameter<
int>(
"SkipWheelDT");
53 theTrackerSkipSystem = parameterSet.
getParameter<
int>(
"TrackerSkipSystem");
54 theTrackerSkipSection = parameterSet.
getParameter<
int>(
"TrackerSkipSection");
63 const std::string
metname =
"Reco|TrackingTools|TrackTransformer";
72 if ( newCacheId_TC != theCacheId_TC ){
73 LogTrace(metname) <<
"Tracking Component changed!";
74 theCacheId_TC = newCacheId_TC;
82 if ( newCacheId_GTG != theCacheId_GTG ) {
83 LogTrace(metname) <<
"GlobalTrackingGeometry changed!";
84 theCacheId_GTG = newCacheId_GTG;
90 if ( newCacheId_MG != theCacheId_MG ) {
91 LogTrace(metname) <<
"Magnetic Field changed!";
92 theCacheId_MG = newCacheId_MG;
98 if ( newCacheId_TRH != theCacheId_TRH ) {
99 theCacheId_TRH = newCacheId_TRH;
100 LogTrace(metname) <<
"TransientRecHitRecord changed!";
114 if((*hit)->isValid()) {
115 if ( (*hit)->geographicalId().det() ==
DetId::Tracker && TrackerKeep((*hit)->geographicalId())) {
116 tkHits.push_back(theTrackerRecHitBuilder->build(&**
hit));
117 }
else if ( (*hit)->geographicalId().det() ==
DetId::Muon && MuonKeep((*hit)->geographicalId())){
118 if( (*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit){
119 LogTrace(
"Reco|TrackingTools|TrackTransformer") <<
"RPC Rec Hit discarged";
122 staHits.push_back(theMuonRecHitBuilder->build(&**
hit));
127 if(staHits.empty())
return staHits;
137 copy(staHits.begin(),staHits.end(),back_inserter(tkHits));
139 for(TransientTrackingRecHit::ConstRecHitContainer::const_iterator
hit = tkHits.begin();
140 hit !=tkHits.end(); ++
hit){
142 DetId hitId = (*hit)->geographicalId();
143 GlobalPoint glbpoint = trackingGeometry()->idToDet(hitId)->position();
161 LogTrace(
"TrackFitters") <<
" UNKNOWN TRACKER HIT TYPE ";
170 LogTrace(
"TrackFitters") <<
" UNKNOWN MUON HIT TYPE ";
172 LogTrace(
"TrackFitters") <<
" UNKNOWN HIT TYPE ";
181 if(up)
return theFitterOI;
182 else return theFitterIO;
187 if(up)
return theSmootherOI;
188 else return theSmootherIO;
192 if(up)
return thePropagatorIO;
193 else return thePropagatorOI;
201 const std::string
metname =
"Reco|TrackingTools|TrackTransformer";
208 if(recHitsForReFit.size() < 2)
return vector<Trajectory>();
210 bool up = recHitsForReFit.back()->globalPosition().y()>0 ?
true :
false;
217 LogTrace(metname) <<
"Prop Dir: " << propagationDirection <<
" FirstId " << innerId <<
" firstTSOS " << firstTSOS;
222 if(recHitsForReFit.front()->geographicalId() !=
DetId(innerId)){
223 LogTrace(metname)<<
"Propagation occurring"<<endl;
224 firstTSOS =
propagator(up)->propagate(firstTSOS, recHitsForReFit.front()->det()->surface());
225 LogTrace(metname)<<
"Final destination: " << recHitsForReFit.front()->det()->surface().position() << endl;
226 if(!firstTSOS.isValid()){
227 LogTrace(metname)<<
"Propagation error!"<<endl;
228 return vector<Trajectory>();
233 vector<Trajectory> trajectories = fitter(up)->fit(seed,recHitsForReFit,firstTSOS);
235 if(trajectories.empty()){
236 LogTrace(metname)<<
"No Track refitted!"<<endl;
237 return vector<Trajectory>();
240 Trajectory trajectoryBW = trajectories.front();
242 vector<Trajectory> trajectoriesSM = smoother(up)->trajectories(trajectoryBW);
244 if(trajectoriesSM.empty()){
245 LogTrace(metname)<<
"No Track smoothed!"<<endl;
246 return vector<Trajectory>();
249 return trajectoriesSM;
260 if (theTrackerSkipSystem < 0 )
return true;
267 if (
id.subdetId() == theTrackerSkipSystem){
297 if (theTrackerSkipSection > -998 && layer == theTrackerSkipSection) retVal =
false;
298 if (theTrackerSkipSection > -998 && disk == theTrackerSkipSection) retVal =
false;
299 if (theTrackerSkipSection > -998 && wheel == theTrackerSkipSection) retVal =
false;
309 if (theSkipStationDT < 0 && theSkipStationCSC < 0)
return true;
332 if (isRPC && (station == theSkipStationCSC || station == theSkipStationDT))
return false;
333 if (isDT && station == theSkipStationDT )
return false;
334 if (isCSC && station == theSkipStationCSC )
return false;
336 if (isDT && theSkipWheelDT > -998 && wheel == theSkipWheelDT)
return false;
T getParameter(std::string const &) const
unsigned int layer() const
layer id
const std::string metname
unsigned int layer() const
layer id
TrajectoryStateOnSurface innermostMeasurementState() const
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
TrajectoryStateOnSurface outermostMeasurementState() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int disk() const
disk id
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
std::vector< ConstRecHitPointer > ConstRecHitContainer
const Track & track() const
unsigned int wheel() const
wheel id
unsigned int layer() const
layer id
int station() const
Return the station number.
Detector det() const
get the detector field from this detid
int wheel() const
Return the wheel number.
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
unsigned int wheel() const
wheel id