11 #include <tracking/dataobjects/RecoTrack.h>
12 #include <framework/logging/Logger.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
15 #include <vxd/geometry/GeoCache.h>
16 #include <vxd/geometry/SensorInfoBase.h>
21 PXDInterceptor::PXDInterceptor(
const ROIinfo* theROIinfo,
double toleranceZ,
double tolerancePhi):
22 m_theROIinfo(*theROIinfo)
39 for (
int i = 0; i < trackList.
getEntries(); ++i) {
41 B2DEBUG(20,
" %%%%% track candidate Nr. : " << i + 1);
43 if (! trackList[i] ->wasFitSuccessful()) {
44 B2DEBUG(20,
"%%%%% Fit not successful! discard this RecoTrack");
49 for (
unsigned int pxdLayer = 0; pxdLayer < pxdLayers.size(); pxdLayer++) {
51 B2DEBUG(20,
" fill intercept List, Layer: " << pxdLayer);
58 B2DEBUG(20,
"extrapolation to cylinder failed");
62 std::list<ROIDetPlane> selectedPlanes;
63 B2DEBUG(20,
" append selected planes, position " << gfTrackState.getPos().X() <<
", " << gfTrackState.getPos().Y() <<
", " <<
64 gfTrackState.getPos().Z());
67 B2DEBUG(20,
" append intercepts for track " << i);
68 appendIntercepts(interceptList, selectedPlanes, trackList[i], i, recoTrackToPXDIntercepts);
84 std::list<ROIDetPlane>::iterator itPlanes = planeList.begin();
86 B2DEBUG(20,
"appendIntercepts, checking " << planeList.size() <<
" planes");
91 while (itPlanes != planeList.end()) {
97 lambda = state.extrapolateToPlane(itPlanes->getSharedPlanePtr());
99 B2DEBUG(20,
"extrapolation to plane failed");
104 const TVectorD& predictedIntersect = state.getState();
105 const TMatrixDSym& covMatrix = state.getCov();
107 tmpPXDIntercept.setCoorU(predictedIntersect[3]);
108 tmpPXDIntercept.setCoorV(predictedIntersect[4]);
109 tmpPXDIntercept.setSigmaU(sqrt(covMatrix(3, 3)));
110 tmpPXDIntercept.setSigmaV(sqrt(covMatrix(4, 4)));
111 tmpPXDIntercept.setSigmaUprime(sqrt(covMatrix(1, 1)));
112 tmpPXDIntercept.setSigmaVprime(sqrt(covMatrix(2, 2)));
113 tmpPXDIntercept.setLambda(lambda);
114 tmpPXDIntercept.setVxdID(itPlanes->getVxdID());
116 interceptList->
appendNew(tmpPXDIntercept);
118 recoTrackToPXDIntercepts->
add(recoTrackIndex, interceptList->
getEntries() - 1);