 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/filters/stereoHits/StereoHitVarSet.h>
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
13 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit3D.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
16 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
18 #include <tracking/trackFindingCDC/topology/CDCWire.h>
20 #include <tracking/trackFindingCDC/numerics/ToFinite.h>
22 #include <cdc/dataobjects/CDCHit.h>
27 using namespace TrackFindingCDC;
32 const CDCTrack* track = testPair->getFrom();
34 if (not testPair or not rlWireHit or not track)
return false;
37 const CDCTrajectory2D& trajectory2D = track->getStartTrajectory3D().getTrajectory2D();
43 const double size = track->size();
49 const double backArcLength2D = track->back().getArcLength2D();
50 const double frontArcLength2D = track->front().getArcLength2D();
51 const double arcLength2DSum = std::accumulate(track->begin(), track->end(), 0.0, [](
const double sum,
52 const CDCRecoHit3D & listRecoHit) { return sum + listRecoHit.getArcLength2D();});
56 Vector2D disp2D = reconstructedPosition.
xy() - wirePos;
57 const double xyDistance = disp2D.
norm();
59 const auto nearestAxialHit = std::min_element(track->begin(), track->end(), [&reconstructedS](
const CDCRecoHit3D & lhs,
61 return std::abs(lhs.getArcLength2D() - reconstructedS) < std::abs(rhs.getArcLength2D() - reconstructedS);
66 var<
named(
"reco_s")>() = toFinite(reconstructedS, 0);
67 var<
named(
"reco_z")>() = toFinite(reconstructedPosition.
z(), 0);
68 var<
named(
"phi_track")>() = toFinite(startMomentum.
phi(), 0);
69 var<
named(
"phi_hit")>() = reconstructedPosition.
phi();
71 var<
named(
"drift_length")>() = reconstructedDriftLength;
72 var<
named(
"adc_count")>() = adcCount;
73 var<
named(
"xy_distance_zero_z")>() = toFinite(xyDistance, 0);
74 var<
named(
"right_hit")>() = rlInformation == ERightLeft::c_Right;
75 var<
named(
"track_back_s")>() = toFinite(backArcLength2D, 0);
76 var<
named(
"track_front_s")>() = toFinite(frontArcLength2D, 0);
77 var<
named(
"track_mean_s")>() = toFinite(arcLength2DSum / size, 0);
78 var<
named(
"s_distance")>() = toFinite(nearestAxialHit->getArcLength2D() - reconstructedS, 0);
79 var<
named(
"track_radius")>() = toFinite(radius, 0);
Class representing a three dimensional reconstructed hit.
Class representing a sequence of three dimensional reconstructed hits.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the cirlce in local coordinates.
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
ISuperLayer getISuperLayer() const
Getter for the superlayer id.
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
double getArcLength2D() const
Getter for the travel distance in the xy projection.
double phi() const
Gives the azimuth angle being the angle to the x axes ( range -M_PI to M_PI )
Particle trajectory as it is seen in xy projection represented as a circle.
double radius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
Vector2D getWirePos2DAtZ(const double z) const
Gives the xy projected position of the wire at the given z coordinate.
unsigned short getADCCount() const
Getter for integrated charge.
ERightLeft getRLInfo() const
Getter for the right left passage information.
Abstract base class for different kinds of events.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
double theta() const
Getter for the polar angle.
A three dimensional vector.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
bool extract(const BaseStereoHitFilter::Object *testPair) override
Generate and assign the contained variables.
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
double norm() const
Calculates the length of the vector.
Class representing a sense wire in the central drift chamber.
double getSignedRecoDriftLength() const
Returns the drift length next to the reconstructed position.
constexpr static int named(const char *name)
Getter for the index from the name.
double z() const
Getter for the z coordinate.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
static CDCRecoHit3D reconstruct(const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D)
Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory.
const Vector3D & getRecoPos3D() const
Getter for the 3d position of the hit.
Vector2D getMom2DAtSupport(const double bZ) const
Get the momentum at the support point of the trajectory.
AObject Object
Type of the object to be analysed.
double phi() const
Getter for the azimuth angle.
double getAbsMom2D(double bZ) const
Get the estimation for the absolute value of the transvers momentum.