#include <RecoMuon/DetLayers/interface/MuRingForwardLayer.h>
Public Member Functions | |
virtual const std::vector < const GeomDet * > & | basicComponents () const |
virtual std::vector< DetWithState > | compatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const |
Returns all Dets compatible with a trajectory state according to the estimator est. | |
virtual const std::vector < const GeometricSearchDet * > & | components () const |
Returns basic components, if any. | |
virtual std::vector< DetGroup > | groupedCompatibleDets (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const |
Similar to compatibleDets(), but the compatible Dets are grouped in one or more groups. | |
virtual bool | hasGroups () const |
MuRingForwardLayer (const std::vector< const ForwardDetRing * > &rings) | |
Constructor, takes ownership of pointers. | |
virtual const std::vector < const ForwardDetRing * > & | rings () const |
Return the vector of rings. | |
virtual SubDetector | subDetector () const |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap). | |
virtual | ~MuRingForwardLayer () |
Private Attributes | |
bool | isOverlapping |
std::vector< const GeomDet * > | theBasicComps |
BaseBinFinder< double > * | theBinFinder |
std::vector< const GeometricSearchDet * > | theComponents |
std::vector< const ForwardDetRing * > | theRings |
Represents forward muon CSC/RPC stations.
Definition at line 20 of file MuRingForwardLayer.h.
MuRingForwardLayer::MuRingForwardLayer | ( | const std::vector< const ForwardDetRing * > & | rings | ) |
Constructor, takes ownership of pointers.
MuRingForwardLayer::~MuRingForwardLayer | ( | ) | [virtual] |
Definition at line 83 of file MuRingForwardLayer.cc.
References i, theBinFinder, and theRings.
00083 { 00084 delete theBinFinder; 00085 for (vector <const ForwardDetRing*>::iterator i = theRings.begin(); 00086 i<theRings.end(); i++) {delete *i;} 00087 }
virtual const std::vector<const GeomDet*>& MuRingForwardLayer::basicComponents | ( | ) | const [inline, virtual] |
Implements GeometricSearchDet.
Definition at line 32 of file MuRingForwardLayer.h.
References theBasicComps.
Referenced by MuRingForwardDoubleLayer::selfTest().
00032 {return theBasicComps;}
vector< GeometricSearchDet::DetWithState > MuRingForwardLayer::compatibleDets | ( | const TrajectoryStateOnSurface & | startingState, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est | |||
) | const [virtual] |
Returns all Dets compatible with a trajectory state according to the estimator est.
The startingState should be propagated to the surface of each compatible Det using the Propagator passed as an argument. The default implementation should be overridden in dets with specific surface types to avoid propagation to a generic Surface
Reimplemented from GeometricSearchDet.
Definition at line 91 of file MuRingForwardLayer.cc.
References BaseBinFinder< T >::binIndex(), ForwardDetLayer::compatible(), GeometricSearchDet::compatibleDets(), lat::endl(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), BoundDisk::innerRadius(), TrajectoryStateOnSurface::localError(), LogTrace, BoundDisk::outerRadius(), PV3DBase< T, PVType, FrameType >::perp(), LocalTrajectoryError::positionError(), HLT_VtxMuL3::result, ForwardDetLayer::specificSurface(), ForwardDetRing::specificSurface(), funct::sqrt(), ForwardDetLayer::surface(), theBinFinder, theRings, toLocal(), LocalError::xx(), and LocalError::yy().
Referenced by MuRingForwardDoubleLayer::groupedCompatibleDets().
00093 { 00094 00095 const std::string metname = "Muon|RecoMuon|RecoMuonDetLayers|MuRingForwardLayer"; 00096 vector<DetWithState> result; 00097 00098 00099 LogTrace(metname) << "MuRingForwardLayer::compatibleDets," 00100 << " R1 " << specificSurface().innerRadius() 00101 << " R2: " << specificSurface().outerRadius() 00102 << " FTS at R: " << startingState.globalPosition().perp(); 00103 00104 pair<bool, TrajectoryStateOnSurface> compat = 00105 compatible(startingState, prop, est); 00106 00107 if (!compat.first) { 00108 00109 LogTrace(metname) << " MuRingForwardLayer::compatibleDets: not compatible" 00110 << " (should not have been selected!)"; 00111 return result; 00112 } 00113 00114 00115 TrajectoryStateOnSurface& tsos = compat.second; 00116 00117 int closest = theBinFinder->binIndex(tsos.globalPosition().perp()); 00118 const ForwardDetRing* closestRing = theRings[closest]; 00119 00120 // Check the closest ring 00121 00122 LogTrace(metname) << " MuRingForwardLayer::fastCompatibleDets, closestRing: " 00123 << closest 00124 << " R1 " << closestRing->specificSurface().innerRadius() 00125 << " R2: " << closestRing->specificSurface().outerRadius() 00126 << " FTS R: " << tsos.globalPosition().perp(); 00127 if (tsos.hasError()) { 00128 LogTrace(metname) << " sR: " << sqrt(tsos.localError().positionError().yy()) 00129 << " sX: " << sqrt(tsos.localError().positionError().xx()); 00130 } 00131 LogTrace(metname) << endl; 00132 00133 00134 result = closestRing->compatibleDets(tsos, prop, est); 00135 00136 int nclosest = result.size(); int nnextdet=0; // MDEBUG counters 00137 00138 //FIXME: if closest is not compatible next cannot be either? 00139 00140 // Use state on layer surface. Note that local coordinates and errors 00141 // are the same on the layer and on all rings surfaces, since 00142 // all BoundDisks are centered in 0,0 and have the same rotation. 00143 // CAVEAT: if the rings are not at the same Z, the local position and error 00144 // will be "Z-projected" to the rings. This is a fairly good approximation. 00145 // However in this case additional propagation will be done when calling 00146 // compatibleDets. 00147 GlobalPoint startPos = tsos.globalPosition(); 00148 LocalPoint nextPos(surface().toLocal(startPos)); 00149 00150 for (unsigned int idet=closest+1; idet < theRings.size(); idet++) { 00151 bool inside = false; 00152 if (tsos.hasError()) { 00153 inside=theRings[idet]->specificSurface().bounds().inside(nextPos,tsos.localError().positionError()); 00154 } else { 00155 inside=theRings[idet]->specificSurface().bounds().inside(nextPos); 00156 } 00157 if (inside){ 00158 LogTrace(metname) << " MuRingForwardLayer::fastCompatibleDets:NextRing" << idet 00159 << " R1 " << theRings[idet]->specificSurface().innerRadius() 00160 << " R2: " << theRings[idet]->specificSurface().outerRadius() 00161 << " FTS R " << nextPos.perp(); 00162 nnextdet++; 00163 vector<DetWithState> nextRodDets = 00164 theRings[idet]->compatibleDets(tsos, prop, est); 00165 if (nextRodDets.size()!=0) { 00166 result.insert( result.end(), 00167 nextRodDets.begin(), nextRodDets.end()); 00168 } else { 00169 break; 00170 } 00171 } 00172 } 00173 00174 for (int idet=closest-1; idet >= 0; idet--) { 00175 bool inside = false; 00176 if (tsos.hasError()) { 00177 inside=theRings[idet]->specificSurface().bounds().inside(nextPos,tsos.localError().positionError()); 00178 } else { 00179 inside=theRings[idet]->specificSurface().bounds().inside(nextPos); 00180 } 00181 if (inside){ 00182 LogTrace(metname) << " MuRingForwardLayer::fastCompatibleDets:PreviousRing:" << idet 00183 << " R1 " << theRings[idet]->specificSurface().innerRadius() 00184 << " R2: " << theRings[idet]->specificSurface().outerRadius() 00185 << " FTS R " << nextPos.perp(); 00186 nnextdet++; 00187 vector<DetWithState> nextRodDets = 00188 theRings[idet]->compatibleDets(tsos, prop, est); 00189 if (nextRodDets.size()!=0) { 00190 result.insert( result.end(), 00191 nextRodDets.begin(), nextRodDets.end()); 00192 } else { 00193 break; 00194 } 00195 } 00196 } 00197 00198 LogTrace(metname) << " MuRingForwardLayer::fastCompatibleDets: found: " 00199 << result.size() 00200 << " on closest: " << nclosest 00201 << " # checked rings: " << 1 + nnextdet; 00202 00203 return result; 00204 }
const vector< const GeometricSearchDet * > & MuRingForwardLayer::components | ( | ) | const [virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 228 of file MuRingForwardLayer.cc.
References theComponents.
00228 { 00229 return theComponents; 00230 }
vector< DetGroup > MuRingForwardLayer::groupedCompatibleDets | ( | const TrajectoryStateOnSurface & | startingState, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est | |||
) | const [virtual] |
Similar to compatibleDets(), but the compatible Dets are grouped in one or more groups.
Dets are put in the same group if they are mutually exclusive for track crossing, i.e. a reconstructible track cannot cross more than one Det from a group. Pathological tracks (spirals etc.) can of course violate this rule.
The DetGroups are sorted in the sequence of crossing by a track. In order to define the direction of crossing the Propagator used in this method should have a defined direction() : either "alongMomentum" or "oppositeToMomentum" but not "anyDirection".
The three signatures of this method differ by the input trajectory state arguments: the starting state can be a TrajectoryStateOnSurface or a FreeTrajectoryState, and the state on this CompositeDet may be already known or not. The last two arguments are as for the method compatibleDets().
First signature: The first argument is a TrajectoryStateOnSurface, usually not on the surface of this CompositeDet.
Reimplemented from GeometricSearchDet.
Definition at line 208 of file MuRingForwardLayer.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00210 { 00211 // FIXME should return only 1 group 00212 cout << "dummy implementation of MuRingForwardLayer::groupedCompatibleDets()" << endl; 00213 return vector<DetGroup>(); 00214 }
bool MuRingForwardLayer::hasGroups | ( | ) | const [virtual] |
virtual const std::vector<const ForwardDetRing*>& MuRingForwardLayer::rings | ( | ) | const [inline, virtual] |
Return the vector of rings.
Definition at line 57 of file MuRingForwardLayer.h.
References theRings.
Referenced by MuRingForwardDoubleLayer::isCrack().
00057 {return theRings;}
GeomDetEnumerators::SubDetector MuRingForwardLayer::subDetector | ( | ) | const [virtual] |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap).
Implements DetLayer.
Definition at line 223 of file MuRingForwardLayer.cc.
References theBasicComps.
Referenced by MuRingForwardDoubleLayer::subDetector().
00223 { 00224 return theBasicComps.front()->subDetector(); 00225 }
bool MuRingForwardLayer::isOverlapping [private] |
Definition at line 65 of file MuRingForwardLayer.h.
std::vector<const GeomDet*> MuRingForwardLayer::theBasicComps [private] |
Definition at line 63 of file MuRingForwardLayer.h.
Referenced by basicComponents(), and subDetector().
BaseBinFinder<double>* MuRingForwardLayer::theBinFinder [private] |
Definition at line 64 of file MuRingForwardLayer.h.
Referenced by compatibleDets(), and ~MuRingForwardLayer().
std::vector<const GeometricSearchDet*> MuRingForwardLayer::theComponents [private] |
std::vector<const ForwardDetRing*> MuRingForwardLayer::theRings [private] |
Definition at line 61 of file MuRingForwardLayer.h.
Referenced by compatibleDets(), rings(), and ~MuRingForwardLayer().