30 #include "GaudiKernel/SystemOfUnits.h"
62 return std::abs(phi1) > std::abs(phi2);
69 m_primaryVertexFitterTool(
"TrigInDetToolInterfaces/ITrigPrimaryVertexFitter", this){
123 return StatusCode::SUCCESS;
135 auto& eventID = ctx.eventID();
137 eventID.bunch_crossing_id());
144 tSelectingTracks.stop();
151 nTotalPassedTracks, nTotalHighPTTracks);
152 ATH_MSG_DEBUG(
"Number of all Tracks: " << nTotalTracks <<
" Selected Tracks: " << nTotalPassedTracks <<
153 " highPt Tracks: " << nTotalHighPTTracks );
156 if (nTotalHighPTTracks == 0) {
168 myVertexCollection = std::make_unique<TrigVertexCollection>();
179 for (
auto&&
track: tracks) {
183 float theta = trackPars->parameters()[
Trk::theta];
197 const EventContext& ctx)
const
201 unsigned bcid = ctx.eventID().bunch_crossing_id();
229 std::vector<double> clusterZ0;
232 while ( ! tracks.empty() ) {
236 ATH_MSG_DEBUG(
"Number of tracks remaining = " << tracks.size() );
244 trackClusterer.
cluster(tracks, indetBeamSpot);
252 <<
"cluster().size()=" << trackClusterer.
clusterTracks().size()
253 <<
" + unusedTracks().size()=" << trackClusterer.
unusedTracks().size()
254 <<
" != tracks.size()=" << tracks.size()
281 ATH_MSG_DEBUG(
"Number of tracks remaining after cluster #(" << nClusters <<
") = " << tracks.size());
292 if ( ! primaryVertex ) {
309 if ( ! passVertex ) {
315 myVertexCollection.
push_back(primaryVertex);
328 for (
double prevClusterZ0: clusterZ0) {
332 clusterZ0.push_back(trackClusterer.
seedZ0());
340 ATH_MSG_DEBUG(
"Splitting the entire cluster of tracks into two");
344 ATH_MSG_DEBUG(
"Splitting only tracks succesfully fitted to a vertex");
346 mySplitTrackCollection.assign(vertexTracks.begin(), vertexTracks.end());
358 ATH_MSG_DEBUG(
"Number of tracks remaining = " << tracks.size() );
363 if ( passVertexBCID ) {
375 return static_cast<unsigned int>(nPassVtx);
384 const EventContext& ctx )
const
397 vector<TrackVector> splitTrackCollections = trackManager.
split(myFullTrackCollection, ctx);
402 mySplitVertexCollections.
push_back(splitVertices);
405 for (
auto&& tracks: splitTrackCollections) {
407 ATH_MSG_DEBUG(
"split vertex # of tracks " << tracks.size());
418 trackClusterer.
cluster(tracks, indetBeamSpot);
463 const T2SplitVertex splitVertex( *(*splitVertices)[0], *(*splitVertices)[1] );
514 const double deltaZ0 =
track.perigeeParameters()->parameters()[
Trk::z0] - clusterer.
seedZ0();
517 const double z0Pull = ( z0Error > 0. ) ? deltaZ0 / z0Error : 0.;
549 auto mon =
Monitored::Group(
m_monTool, ntrk, sumpt, sumpt2,
mass,
qual,
chi2,
x,
y,
z, xzoom, yzoom, zzoom, xerr, yerr, zerr, xy,
pull, ntrkInVtx,
BCID );
551 auto mon =
Monitored::Group(
m_monTool, ntrk, sumpt, sumpt2,
mass,
qual,
chi2,
x,
y,
z, xzoom, yzoom, zzoom, xerr, yerr, zerr, xy,
pull, ntrkInVtx );
583 auto mon =
Monitored::Group(
m_monTool, ntrk1,
x1,
y1, z1, x1err, y1err, z1err, ntrk2,
x2,
y2, z2, x2err, y2err, z2err,
584 dntrk,
dx,
dy, dz, dxerr, dyerr, dzerr, dxpull, dypull, dzpull);