9 #include <tracking/dataobjects/RecoTrack.h>
10 #include <framework/logging/Logger.h>
11 #include <framework/datastore/StoreArray.h>
12 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
13 #include <vxd/geometry/GeoCache.h>
14 #include <vxd/geometry/SensorInfoBase.h>
19 PXDInterceptor::PXDInterceptor(
const ROIinfo* theROIinfo,
double toleranceZ,
double tolerancePhi):
20 m_theROIinfo(*theROIinfo)
37 for (
int i = 0; i < trackList.
getEntries(); ++i) {
39 B2DEBUG(20,
" %%%%% track candidate Nr. : " << i + 1);
41 if (! trackList[i] ->wasFitSuccessful()) {
42 B2DEBUG(20,
"%%%%% Fit not successful! discard this RecoTrack");
47 for (
unsigned int pxdLayer = 0; pxdLayer < pxdLayers.size(); pxdLayer++) {
49 B2DEBUG(20,
" fill intercept List, Layer: " << pxdLayer);
56 B2DEBUG(20,
"extrapolation to cylinder failed");
60 std::list<ROIDetPlane> selectedPlanes;
61 B2DEBUG(20,
" append selected planes, position " << gfTrackState.getPos().X() <<
", " << gfTrackState.getPos().Y() <<
", " <<
62 gfTrackState.getPos().Z());
65 B2DEBUG(20,
" append intercepts for track " << i);
66 appendIntercepts(interceptList, selectedPlanes, trackList[i], i, recoTrackToPXDIntercepts);
82 std::list<ROIDetPlane>::iterator itPlanes = planeList.begin();
84 B2DEBUG(20,
"appendIntercepts, checking " << planeList.size() <<
" planes");
89 while (itPlanes != planeList.end()) {
95 lambda = state.extrapolateToPlane(itPlanes->getSharedPlanePtr());
97 B2DEBUG(20,
"extrapolation to plane failed");
102 const TVectorD& predictedIntersect = state.getState();
103 const TMatrixDSym& covMatrix = state.getCov();
105 tmpPXDIntercept.
setCoorU(predictedIntersect[3]);
106 tmpPXDIntercept.
setCoorV(predictedIntersect[4]);
107 tmpPXDIntercept.
setSigmaU(sqrt(covMatrix(3, 3)));
108 tmpPXDIntercept.
setSigmaV(sqrt(covMatrix(4, 4)));
112 tmpPXDIntercept.
setVxdID(itPlanes->getVxdID());
114 interceptList->
appendNew(tmpPXDIntercept);
116 recoTrackToPXDIntercepts->
add(recoTrackIndex, interceptList->
getEntries() - 1);
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
ROIGeometry m_theROIGeometry
the geometry of the Region Of Interest
virtual ~PXDInterceptor()
Destructor.
void appendIntercepts(StoreArray< PXDIntercept > *interceptList, std::list< ROIDetPlane > planeList, RecoTrack *recoTrack, int recoTrackIndex, RelationArray *recoTrackToPXDIntercepts)
Append the PXDIntercept infos related to the track theTrack to the listToBeFilled.
const float m_pxdLayerRadius[2]
mean PXD layer radius for both layers
void fillInterceptList(StoreArray< PXDIntercept > *listToBeFilled, const StoreArray< RecoTrack > &trackList, RelationArray *recoTrackToPXDIntercepts)
Fill the list of PXD intecepts corresponding to the list of track candidates.
void appendSelectedPlanes(std::list< ROIDetPlane > *selectedPlanes, TVector3 recoTrackPosition, int layer)
Append to selectedPlanes those in the internal list for which a sensor is near the RecoTrack position...
void fillPlaneList(double toleranceZ, double tolerancePhi)
fill the list of planes
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.
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.
#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.
Abstract base class for different kinds of events.
ROIinfo contains the parameters that can be changed by the user in the python script.