24 inline double square(
const double tosquare) {
25 return std::pow(tosquare,2);
27 double dist(
const std::pair<Amg::Vector3D,Amg::Vector3D>& pairofpos) {
29 return std::sqrt(square(
diff.x())+square(
diff.y())+square(
diff.z()));
41 const std::string& name,
42 const IInterface* parent)
45 declareInterface<TrackPairsSelector>(
this);
59 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
71 return StatusCode::SUCCESS;
76 return StatusCode::SUCCESS;
115 if(nclusNeg>0 && nclusPos>0) sCase = 0;
116 if((nclusNeg>0 && nclusPos==0) || (nclusNeg==0 && nclusPos>0)) sCase = 1;
117 if(nclusNeg==0 && nclusPos==0) sCase = 2;
133 ATH_MSG_WARNING(
"Track Particle does not contain first Measurement track parameters");
147 ATH_MSG_WARNING(
"Track Particle does not contain first Measurement track parameters");
151 double firstRpos = parPos.
position().perp();
152 double firstRneg = parNeg.
position().perp();
155 double detaCut = 0.0;
158 }
else if(sCase == 1) {
160 }
else if(sCase == 2) {
161 if(fabs(perPos->
eta())<0.6 && fabs(perNeg->
eta())<0.6) detaCut = 10000.;
171 double dinit = 1000.;
174 }
else if(sCase == 1) {
176 }
else if(sCase == 2) {
184 double maxDist = 1000.;
187 }
else if(sCase == 1) {
189 }
else if(sCase == 2) {
194 std::optional<Trk::ITrkDistanceFinder::TwoPoints>
result
197 if (!
result)
return false;
222 double init_pos = 0.;
double init_neg = 0.;
225 if(!mb_pos || !mb_neg) {pass =
false;
return pass;}
227 init_pos = (*itp_pos)->globalPosition().perp();
229 init_neg = (*itp_neg)->globalPosition().perp();
232 if ((init_neg<=m_maxR && init_pos>
m_maxR) || (init_neg>
m_maxR && init_pos<=
m_maxR)) sCase = 1;
236 double detaCut = 0.0;
239 }
else if(sCase == 1) {
241 }
else if(sCase == 2) {
245 if (fabs(1. / tan(perPos->parameters()[
Trk::theta]) -
246 1. / tan(perNeg->parameters()[
Trk::theta])) > detaCut)
250 double dinit = 1000.;
253 }
else if(sCase == 1) {
255 }
else if(sCase == 2) {
258 if(fabs(init_pos - init_neg) > dinit) pass =
false;
261 double maxDist = 1000.;
264 }
else if(sCase == 1) {
266 }
else if(sCase == 2) {
270 double newDistance = 1000000.;
271 std::optional<Trk::ITrkDistanceFinder::TwoPoints>
result
277 newDistance = dist (
result.value());
278 if (newDistance>maxDist) pass =
false;
290 std::map<std::string, float>
294 return {{
"minimumDistanceTrk", cache.
m_distance},
Scalar mag() const
mag method
#define ATH_MSG_WARNING(x)
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
static double momFraction(const Trk::TrackParameters *per1, const Trk::TrackParameters *per2)
helper functions
double eta() const
Access method for pseudorapidity - from momentum.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
const Perigee * perigeeParameters() const
return Perigee.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Eigen::Matrix< double, 3, 1 > Vector3D
static const InterfaceID IID_ITrackPairsSelector("InDet::TrackPairsSelector", 1, 0)
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.