9 #include <tracking/dataobjects/RecoTrack.h>
10 #include <genfit/AbsTrackRep.h>
11 #include <framework/logging/Logger.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <tracking/svdROIFinder/SVDInterceptor.h>
14 #include <vxd/geometry/GeoCache.h>
15 #include <vxd/geometry/SensorInfoBase.h>
20 SVDInterceptor::SVDInterceptor(
const ROIinfo* theROIinfo,
double toleranceZ,
double tolerancePhi):
21 m_theROIinfo(*theROIinfo)
38 for (
int i = 0; i < trackList.
getEntries(); ++i) {
40 B2DEBUG(20,
" %%%%% track candidate Nr. : " << i + 1);
42 if (! trackList[i] ->wasFitSuccessful()) {
43 B2DEBUG(20,
"%%%%% Fit not successful! discard this RecoTrack");
48 for (
unsigned int svdLayer = 0; svdLayer < svdLayers.size(); svdLayer++) {
50 B2DEBUG(20,
" .fill intercept List, Layer: " << svdLayer + 3);
57 B2DEBUG(20,
" .-extrapolation to cylinder failed");
61 std::list<ROIDetPlane> selectedPlanes;
62 B2DEBUG(20,
" ..append selected planes, position " << gfTrackState.getPos().X() <<
", " << gfTrackState.getPos().Y() <<
", " <<
63 gfTrackState.getPos().Z());
66 B2DEBUG(20,
" ...append intercepts for track " << i);
67 appendIntercepts(interceptList, selectedPlanes, trackList[i], i, recoTrackToSVDIntercepts);
84 std::list<ROIDetPlane>::iterator itPlanes = planeList.begin();
86 B2DEBUG(20,
" ...-appendIntercepts, checking " << planeList.size() <<
" planes");
91 for (
int propDir = -1; propDir <= 1; propDir += 2) {
94 while (itPlanes != planeList.end()) {
100 lambda = state.extrapolateToPlane(itPlanes->getSharedPlanePtr());
102 B2DEBUG(20,
" ...-extrapolation to plane failed");
107 const TVectorD& predictedIntersect = state.getState();
108 const TMatrixDSym& covMatrix = state.getCov();
110 tmpSVDIntercept.
setCoorU(predictedIntersect[3]);
111 tmpSVDIntercept.
setCoorV(predictedIntersect[4]);
117 tmpSVDIntercept.
setVxdID(itPlanes->getVxdID());
118 tmpSVDIntercept.
setUprime(predictedIntersect[1]);
119 tmpSVDIntercept.
setVprime(predictedIntersect[2]);
121 B2DEBUG(20,
"coordinates with getPos = " << state.getPos().X()
122 <<
", " << state.getPos().Y()
123 <<
", " << state.getPos().Z());
124 B2DEBUG(20,
"coordinates with predInter = " << predictedIntersect[3]
125 <<
", " << predictedIntersect[4]);
126 B2DEBUG(20,
"momentum with getMom = " << state.getMom().X()
127 <<
", " << state.getMom().Y()
128 <<
", " << state.getMom().Z());
129 B2DEBUG(20,
"U/V prime momentum with getMom = " << state.getMom().Z() / state.getMom().X()
130 <<
", " << state.getMom().Z() / state.getMom().Y());
131 B2DEBUG(20,
"U/V prime momentum with predInter = " << predictedIntersect[1]
132 <<
", " << predictedIntersect[2]);
134 interceptList->
appendNew(tmpSVDIntercept);
136 recoTrackToSVDIntercepts->
add(recoTrackIndex, interceptList->
getEntries() - 1);
static genfit::Track & getGenfitTrack(RecoTrack &recoTrack)
Give access to the RecoTrack's genfit::Track.
This is the Reconstruction Event-Data Model Track.
Low-level class to create/modify relations between StoreArrays.
void add(index_type from, index_type to, weight_type weight=1.0)
Add a new element to the relation.
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
void setUprime(double user_Uprime)
set the U direction tangent of the track extrapolated to the sensor
void setVprime(double user_Vprime)
set the V direction tangent of the track extrapolated to the sensor
virtual ~SVDInterceptor()
Destructor.
void fillInterceptList(StoreArray< SVDIntercept > *listToBeFilled, const StoreArray< RecoTrack > &trackList, RelationArray *recoTrackToSVDIntercepts)
Fill the list of PXD intecepts corresponding to the list of track candidates.
const float m_svdLayerRadius[4]
mean SVD layer radius for both layers
SVDROIGeometry m_theROIGeometry
the geometry of the Region Of Interest
void appendIntercepts(StoreArray< SVDIntercept > *interceptList, std::list< ROIDetPlane > planeList, RecoTrack *recoTrack, int recoTrackIndex, RelationArray *recoTrackToSVDIntercepts)
Append the SVDIntercept infos related to the track theTrack to the listToBeFilled.
void appendSelectedPlanes(std::list< ROIDetPlane > *selectedPlanes, ROOT::Math::XYZVector recoTrackPosition, int layer)
appends the interesting planes
void fillPlaneList(double toleranceZ, double tolerancePhi)
fill the list of planes
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
void setLambda(double user_lambda)
set the length of the track
void setVxdID(VxdID::baseType user_vxdID)
set the sensor ID
void setSigmaVprime(double user_sigmaVprime)
set the statistical error of the extrapolation of V prime
void setSigmaU(double user_sigmaU)
set the statistical error on the U coordinate of the intercept
void setCoorU(double user_coorU)
set the U coordinate of the intercept
void setCoorV(double user_coorV)
set the V coordinate of the intercept
void setSigmaV(double user_sigmaV)
set the statistical error on the V coordinate of the intercept
void setSigmaUprime(double user_sigmaUprime)
set the statistical error of the extrapolation of U prime
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
static GeoCache & getInstance()
Return a reference to the singleton instance.
void setPropDir(int dir)
Set propagation direction. (-1, 0, 1) -> (backward, auto, forward).
#StateOnPlane with additional covariance matrix.
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
const MeasuredStateOnPlane & getFittedState(int id=0, const AbsTrackRep *rep=nullptr, bool biased=true) const
Shortcut to get FittedStates.
AbsTrackRep * getCardinalRep() const
Get cardinal track representation.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.
ROIinfo contains the parameters that can be changed by the user in the python script.