Generate and assign the variables from the VXD-CDC object.
90{
91 const std::vector<TrackFindingCDC::WithWeight<const CKFToSVDState*>>& previousStates = pair->first;
93
94 const RecoTrack* cdcTrack = previousStates.front()->getSeed();
95 B2ASSERT("Path without seed?", cdcTrack);
96
98 B2ASSERT("Path without hit?", spacePoint);
99
100 std::vector<TrackFindingCDC::WithWeight<const CKFToSVDState*>> allStates = previousStates;
101 allStates.emplace_back(state, 0);
102
104
105 var<
named(
"seed_cdc_hits")>() = cdcHits.size();
106 var<
named(
"seed_lowest_cdc_layer")>() = cdcHits.front()->getICLayer();
107
108 genfit::MeasuredStateOnPlane firstMeasurement;
111 } else {
112 B2ASSERT("Previous state was not fitted?", previousStates.back()->mSoPSet());
113 firstMeasurement = previousStates.back()->getMeasuredStateOnPlane();
114 }
115
118
120
122
123 const double arcLength = trajectory.calcArcLength2D(hitPosition);
124 const Vector2D& trackPositionAtHit2D = trajectory.getTrajectory2D().getPos2DAtArcLength2D(arcLength);
125 const double trackPositionAtHitZ = trajectory.getTrajectorySZ().mapSToZ(arcLength);
126
127 Vector3D trackPositionAtHit(trackPositionAtHit2D, trackPositionAtHitZ);
128
129 const auto calculateCharge = [](const auto & s) {
130 return s.getCharge();
131 };
132 const auto calculateSeedCharge = [](const auto & s) {
133 return s.getSeedCharge();
134 };
135 const auto calculateSize = [](const auto & s) {
136 return s.getSize();
137 };
138 const auto calculateSNR = [](const auto & s) {
139 return s.getSNR();
140 };
141 const auto calculateChargeSizeRatio = [](const auto & s) {
142 return s.getCharge() / s.getSize();
143 };
144
147
148 B2ASSERT("Must be related to exactly 2 clusters", clusters.size() == 2);
150 const SVDCluster* secondCluster = clusters[1];
151
152 var<
named(
"cluster_1_charge")>() = calculateCharge(*firstCluster);
153 var<
named(
"cluster_2_charge")>() = calculateCharge(*secondCluster);
154 var<
named(
"mean_rest_cluster_charge")>() = meanOver(allStates, calculateCharge);
155 var<
named(
"min_rest_cluster_charge")>() = minOver(allStates, calculateCharge);
156 var<
named(
"std_rest_cluster_charge")>() = stdOver(allStates, calculateCharge);
157
158 var<
named(
"cluster_1_seed_charge")>() = calculateSeedCharge(*firstCluster);
159 var<
named(
"cluster_2_seed_charge")>() = calculateSeedCharge(*secondCluster);
160 var<
named(
"mean_rest_cluster_seed_charge")>() = meanOver(allStates, calculateSeedCharge);
161 var<
named(
"min_rest_cluster_seed_charge")>() = minOver(allStates, calculateSeedCharge);
162 var<
named(
"std_rest_cluster_seed_charge")>() = stdOver(allStates, calculateSeedCharge);
163
164 var<
named(
"cluster_1_size")>() = calculateSize(*firstCluster);
165 var<
named(
"cluster_2_size")>() = calculateSize(*secondCluster);
166 var<
named(
"mean_rest_cluster_size")>() = meanOver(allStates, calculateSize);
167 var<
named(
"min_rest_cluster_size")>() = minOver(allStates, calculateSize);
168 var<
named(
"std_rest_cluster_size")>() = stdOver(allStates, calculateSize);
169
170 var<
named(
"cluster_1_snr")>() = calculateSNR(*firstCluster);
171 var<
named(
"cluster_2_snr")>() = calculateSNR(*secondCluster);
172 var<
named(
"mean_rest_cluster_snr")>() = meanOver(allStates, calculateSNR);
173 var<
named(
"min_rest_cluster_snr")>() = minOver(allStates, calculateSNR);
174 var<
named(
"std_rest_cluster_snr")>() = stdOver(allStates, calculateSNR);
175
176 var<
named(
"cluster_1_charge_over_size")>() = calculateChargeSizeRatio(*firstCluster);
177 var<
named(
"cluster_2_charge_over_size")>() = calculateChargeSizeRatio(*secondCluster);
178 var<
named(
"mean_rest_cluster_charge_over_size")>() = meanOver(allStates, calculateChargeSizeRatio);
179 var<
named(
"min_rest_cluster_charge_over_size")>() = minOver(allStates, calculateChargeSizeRatio);
180 var<
named(
"std_rest_cluster_charge_over_size")>() = stdOver(allStates, calculateChargeSizeRatio);
181 }
182
183 std::vector<const SpacePoint*> spacePoints;
186 if (sp) {
187 spacePoints.push_back(sp);
188 }
189 }
190
191 if (spacePoints.size() >= 3) {
195 } else {
196 var<
named(
"quality_index_triplet")>() = 0;
197 var<
named(
"quality_index_circle")>() = 0;
198 var<
named(
"quality_index_helix")>() = 0;
199 }
200
201 return true;
202}
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane() const
Get the mSoP if already set during extrapolation (or fitting)
const Hit * getHit() const
Return the SP this state is related to. May be nullptr.
bool mSoPSet() const
Is the mSoP already set? (= state was already extrapolated)
Specialized CKF State for extrapolating into the SVD.
virtual double estimateQuality(std::vector< SpacePoint const * > const &measurements) final
Minimal implementation of the quality estimation Calculates quality indicator in range [0,...
virtual double estimateQuality(std::vector< SpacePoint const * > const &measurements) final
Minimal implementation of the quality estimation Calculates quality indicator in range [0,...
virtual double estimateQuality(std::vector< SpacePoint const * > const &measurements) final
Calculating the quality estimate using a triplet fit.
This is the Reconstruction Event-Data Model Track.
std::vector< Belle2::RecoTrack::UsedCDCHit * > getSortedCDCHitList() const
Return a sorted list of cdc hits. Sorted by the sortingParameter.
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
QualityEstimatorRiemannHelixFit m_qualityHelix
Instance of the Riemann helix-fit class.
QualityEstimatorTripletFit m_qualityTriplet
Instance of the triplet-fit class.
QualityEstimatorCircleFit m_qualityCircle
Instance of the circle-fit class.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Belle2::VXD::SensorInfoBase::SensorType getType() const
Return SensorType (PXD, SVD, ...) on which the SpacePoint lives.
const B2Vector3D & getPosition() const
return the position vector in global coordinates
Particle full three dimensional trajectory.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
A three dimensional vector.
HepGeom::Vector3D< double > Vector3D
3D Vector