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 m_theROIinfo(*theROIinfo)
36 for (
int i = 0; i < trackList.
getEntries(); ++i) {
38 B2DEBUG(20,
" %%%%% track candidate Nr. : " << i + 1);
40 if (! trackList[i] ->wasFitSuccessful()) {
41 B2DEBUG(20,
"%%%%% Fit not successful! discard this RecoTrack");
46 for (
unsigned int pxdLayer = 0; pxdLayer < pxdLayers.size(); pxdLayer++) {
48 B2DEBUG(20,
" fill intercept List, Layer: " << pxdLayer);
55 B2DEBUG(20,
"extrapolation to cylinder failed");
59 std::list<ROIDetPlane> selectedPlanes;
60 B2DEBUG(20,
" append selected planes, position " << gfTrackState.getPos().X() <<
", " << gfTrackState.getPos().Y() <<
", " <<
61 gfTrackState.getPos().Z());
64 B2DEBUG(20,
" append intercepts for track " << i);
65 appendIntercepts(interceptList, selectedPlanes, trackList[i], i, recoTrackToPXDIntercepts);
81 std::list<ROIDetPlane>::iterator itPlanes = planeList.begin();
83 B2DEBUG(20,
"appendIntercepts, checking " << planeList.size() <<
" planes");
88 while (itPlanes != planeList.end()) {
94 lambda = state.extrapolateToPlane(itPlanes->getSharedPlanePtr());
96 B2DEBUG(20,
"extrapolation to plane failed");
101 const TVectorD& predictedIntersect = state.getState();
102 const TMatrixDSym& covMatrix = state.getCov();
104 tmpPXDIntercept.
setCoorU(predictedIntersect[3]);
105 tmpPXDIntercept.
setCoorV(predictedIntersect[4]);
111 tmpPXDIntercept.
setVxdID(itPlanes->getVxdID());
113 interceptList->
appendNew(tmpPXDIntercept);
115 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.
PXDInterceptor(const ROIinfo *user_theROIinfo, double toleranceZ, double tolerancePhi)
Class Constructor.
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, ROOT::Math::XYZVector 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.
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.