ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PESA::T2VertexBeamSpotTool Class Reference

This class uses primary vertex reconstruction to measure and monitor the LHC beam as seen by the ATLAS detector. More...

#include <T2VertexBeamSpotTool.h>

Inheritance diagram for PESA::T2VertexBeamSpotTool:
Collaboration diagram for PESA::T2VertexBeamSpotTool:

Public Types

using TrackVector = std::vector< const Trk::Track * >
 

Public Member Functions

 T2VertexBeamSpotTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override final
 
void updateBS (const TrackCollection &tracks, const EventContext &ctx) const
 Update beam spot data with new track information. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

unsigned numHighPTTrack (const TrackVector &tracks) const
 Return count of high pT track in the track list, the total number of these high pT tracks is checked in the selectTracks function and the threshold can be set via TrackSeedPt (by default 1 GeV) More...
 
unsigned int reconstructVertices (TrackVector &tracks, TrigVertexCollection &myVertexCollection, DataVector< TrigVertexCollection > &mySplitVertexCollections, const EventContext &) const
 
bool isGoodVertex (const T2Vertex &vertex) const
 
bool isGoodVertexBCID (const T2Vertex &vertex) const
 
void reconstructSplitVertices (TrackVector &tracks, DataVector< TrigVertexCollection > &mySplitVertexCollections, T2TrackClusterer &trackClusterer, const InDet::BeamSpotData *indetBeamSpot, const EventContext &) const
 
void monitor_cluster (const T2TrackClusterer &clusterer) const
 
void monitor_cluster_tracks (T2TrackClusterer &clusterer, const Trk::Track &track) const
 
void monitor_vertex (const std::string &prefix, const std::string &suffix, const T2Vertex &vertex, int bcid=-1) const
 
void monitor_split_vertex (const std::string &prefix, const std::string &suffix, const T2SplitVertex &vertex) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

double m_trackClusDZ
 
bool m_weightSeed
 
bool m_splitWholeCluster
 
bool m_reclusterSplit
 
double m_trackSeedPt
 
std::string m_clusterPerigee = "original"
 
T2TrackClusterer::TrackPerigee m_clusterTrackPerigee = T2TrackClusterer::perigee_original
 
unsigned m_totalNTrkMin
 
unsigned int m_vtxNTrkMin
 
unsigned int m_vtxNTrkMax
 
double m_vtxQualMin
 
double m_vtxQualMax
 
double m_vtxChi2ProbMin
 
double m_vtxMassMin
 
double m_vtxSumPtMin
 
double m_vtxXposMax
 
double m_vtxXerrMax
 
double m_vtxYposMax
 
double m_vtxYerrMax
 
double m_vtxZposMax
 
double m_vtxZerrMax
 
unsigned int m_vtxBCIDNTrkMin
 Additional vertex selection criteria for BCID measurements. More...
 
unsigned m_nSplitVertices
 
bool m_filterBS
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
 
SG::WriteHandleKey< TrigVertexCollectionm_outputVertexCollectionKey {this, "OutputVertexCollection", "myVertices", "SG key for output vertex collection"}
 
ToolHandle< ITrigPrimaryVertexFitterm_primaryVertexFitterTool
 Primary Vertex Fitter Tool. More...
 
ToolHandle< T2BSTrackFilterToolm_trackFilterTool {this, "TrackFilter", "PESA::T2BSTrackFilterTool/T2BSTrackFilterTool" }
 
ToolHandle< GenericMonitoringToolm_monTool {this,"MonTool","","Monitoring tool"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

This class uses primary vertex reconstruction to measure and monitor the LHC beam as seen by the ATLAS detector.

Fast, online vertexing is implemented using Dmitry Emeliyanov's (D.Eme.nosp@m.liya.nosp@m.nov@r.nosp@m.l.ac.nosp@m..uk) TrigPrimaryVertexFitter.

Author
Ignacio Aracena ignac.nosp@m.io.a.nosp@m.racen.nosp@m.a@ce.nosp@m.rn.ch
Rainer Bartoldus barto.nosp@m.ldu@.nosp@m.slac..nosp@m.stan.nosp@m.ford..nosp@m.edu
Su Dong sudon.nosp@m.g@sl.nosp@m.ac.st.nosp@m.anfo.nosp@m.rd.ed.nosp@m.u
David W. Miller David.nosp@m..W.M.nosp@m.iller.nosp@m.@cer.nosp@m.n.ch

Definition at line 69 of file T2VertexBeamSpotTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TrackVector

Definition at line 72 of file T2VertexBeamSpotTool.h.

Constructor & Destructor Documentation

◆ T2VertexBeamSpotTool()

PESA::T2VertexBeamSpotTool::T2VertexBeamSpotTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 67 of file T2VertexBeamSpotTool.cxx.

68  : AthAlgTool( type, name, parent),
69  m_primaryVertexFitterTool("TrigInDetToolInterfaces/ITrigPrimaryVertexFitter", this){
70 
71 
72  //Declare properties in here
73  declareProperty( "PrimaryVertexFitter", m_primaryVertexFitterTool);
74 
75  //Declare variables:
76  declareProperty("TotalNTrackMin", m_totalNTrkMin = 2 );
77 
78  // Track clustering parameters
79  declareProperty("TrackSeedPt", m_trackSeedPt = 1.0*GeV );
80  declareProperty("TrackClusterDZ", m_trackClusDZ = 10.0*mm );
81  declareProperty("WeightClusterZ", m_weightSeed = true );
82  declareProperty("ReclusterSplit", m_reclusterSplit = true );
83  declareProperty("SplitWholeCluster", m_splitWholeCluster = false );
84  declareProperty("ClusterPerigee", m_clusterPerigee = "beamspot" );
85 
86  // Vertex Selection criteria
87  declareProperty("VertexMinNTrk", m_vtxNTrkMin = 2 );
88  declareProperty("VertexMaxNTrk", m_vtxNTrkMax = 100 );
89  declareProperty("VertexMinQual", m_vtxQualMin = 0.0 );
90  declareProperty("VertexMaxQual", m_vtxQualMax = 5. );
91  declareProperty("VertexMinChi2Prob", m_vtxChi2ProbMin = -10.0 );
92  declareProperty("VertexMinMass", m_vtxMassMin = -1.*GeV );
93  declareProperty("VertexMinSumPt", m_vtxSumPtMin = 0.*GeV );
94  declareProperty("VertexMaxX", m_vtxXposMax = 10.*mm );
95  declareProperty("VertexMaxXerr", m_vtxXerrMax = 1.*mm );
96  declareProperty("VertexMaxY", m_vtxYposMax = 10.*mm );
97  declareProperty("VertexMaxYerr", m_vtxYerrMax = 1.*mm );
98  declareProperty("VertexMaxZ", m_vtxZposMax = 200.*mm );
99  declareProperty("VertexMaxZerr", m_vtxZerrMax = 1.*mm );
100 
101  // Vertex selection for use in BCID measurements
102  declareProperty("VertexBCIDMinNTrk", m_vtxBCIDNTrkMin = 2 );
103 
104  declareProperty("nSplitVertices", m_nSplitVertices = 1);
105 
106  declareProperty("filterBS", m_filterBS = true);
107 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode T2VertexBeamSpotTool::initialize ( )
finaloverridevirtual

Definition at line 109 of file T2VertexBeamSpotTool.cxx.

109  {
110  ATH_MSG_INFO( "Initialising BeamSpot tool" );
111 
112  //Initialize data Handles
115 
116  // Retrieve tools
117  ATH_CHECK(m_trackFilterTool.retrieve());
118  if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
119  ATH_CHECK( m_primaryVertexFitterTool.retrieve() );
120 
122 
123  return StatusCode::SUCCESS;
124 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isGoodVertex()

bool T2VertexBeamSpotTool::isGoodVertex ( const T2Vertex vertex) const
private

Definition at line 473 of file T2VertexBeamSpotTool.cxx.

473  {
474  // Vertex quality cuts
475  return
476  (
477  vertex.NTrks() >= m_vtxNTrkMin && // FIXME: harmonize spelling
478  abs( vertex.X() ) <= m_vtxXposMax &&
479  abs( vertex.Y() ) <= m_vtxYposMax &&
480  abs( vertex.Z() ) <= m_vtxZposMax &&
481  abs( vertex.Xerr() ) <= m_vtxXerrMax && // FIXME: do we have negative errors?
482  abs( vertex.Yerr() ) <= m_vtxYerrMax &&
483  abs( vertex.Zerr() ) <= m_vtxZerrMax &&
484  vertex.Mass() >= m_vtxMassMin &&
485  vertex.SumPt() >= m_vtxSumPtMin &&
486  vertex.Qual() >= m_vtxQualMin &&
487  vertex.Qual() <= m_vtxQualMax &&
488  vertex.Chi2Prob() >= m_vtxChi2ProbMin &&
489  true
490  );
491 }

◆ isGoodVertexBCID()

bool T2VertexBeamSpotTool::isGoodVertexBCID ( const T2Vertex vertex) const
private

Definition at line 494 of file T2VertexBeamSpotTool.cxx.

494  {
495  // Track quality cuts
496  return
497  (
498  vertex.NTrks() >= m_vtxBCIDNTrkMin && // FIXME: harmonize spelling
499  true
500  );
501 }

◆ monitor_cluster()

void T2VertexBeamSpotTool::monitor_cluster ( const T2TrackClusterer clusterer) const
private

Definition at line 504 of file T2VertexBeamSpotTool.cxx.

504  {
505  auto clusterZ = Monitored::Scalar<double>("ClusterZ", clusterer.seedZ0() );
506  auto clusterNtracks = Monitored::Scalar<int>("ClusterNTracks", clusterer.clusterTracks().size() );
507  auto clusterNUnusedTracks = Monitored::Scalar<int>("ClusterNTracksUnused", clusterer.unusedTracks().size() );
508 
509  auto mon = Monitored::Group(m_monTool, clusterZ, clusterNtracks, clusterNUnusedTracks );
510 }

◆ monitor_cluster_tracks()

void T2VertexBeamSpotTool::monitor_cluster_tracks ( T2TrackClusterer clusterer,
const Trk::Track track 
) const
private

Definition at line 513 of file T2VertexBeamSpotTool.cxx.

513  {
514  const double deltaZ0 = track.perigeeParameters()->parameters()[Trk::z0] - clusterer.seedZ0();
515  const AmgSymMatrix(5)& perigeeCov = *track.perigeeParameters()->covariance();
516  const double z0Error = std::sqrt(perigeeCov(Trk::z0,Trk::z0));
517  const double z0Pull = ( z0Error > 0. ) ? deltaZ0 / z0Error : 0.;
518 
519  auto mon_deltaZ0 = Monitored::Scalar<double>("ClusterDeltaZ0", deltaZ0 );
520  auto mon_z0Pull = Monitored::Scalar<double>("ClusterZ0Pull", z0Pull );
521  auto mon = Monitored::Group(m_monTool, mon_deltaZ0, mon_z0Pull );
522 }

◆ monitor_split_vertex()

void T2VertexBeamSpotTool::monitor_split_vertex ( const std::string &  prefix,
const std::string &  suffix,
const T2SplitVertex vertex 
) const
private

Definition at line 556 of file T2VertexBeamSpotTool.cxx.

556  {
557 
558  auto ntrk1 = Monitored::Scalar<unsigned>( prefix + "1NTrks" + suffix, vertex.vertex1().NTrks());
559  auto x1 = Monitored::Scalar<double>( prefix + "1X" + suffix, vertex.vertex1().X());
560  auto y1 = Monitored::Scalar<double>( prefix + "1Y" + suffix, vertex.vertex1().Y());
561  auto z1 = Monitored::Scalar<double>( prefix + "1Z" + suffix, vertex.vertex1().Z());
562  auto x1err = Monitored::Scalar<double>( prefix + "1Xerr" + suffix, vertex.vertex1().Xerr());
563  auto y1err = Monitored::Scalar<double>( prefix + "1Yerr" + suffix, vertex.vertex1().Yerr());
564  auto z1err = Monitored::Scalar<double>( prefix + "1Zerr" + suffix, vertex.vertex1().Zerr());
565  auto ntrk2 = Monitored::Scalar<unsigned>( prefix + "2NTrks" + suffix, vertex.vertex2().NTrks());
566  auto x2 = Monitored::Scalar<double>( prefix + "2X" + suffix, vertex.vertex2().X());
567  auto y2 = Monitored::Scalar<double>( prefix + "2Y" + suffix, vertex.vertex2().Y());
568  auto z2 = Monitored::Scalar<double>( prefix + "2Z" + suffix, vertex.vertex2().Z());
569  auto x2err = Monitored::Scalar<double>( prefix + "2Xerr" + suffix, vertex.vertex2().Xerr());
570  auto y2err = Monitored::Scalar<double>( prefix + "2Yerr" + suffix, vertex.vertex2().Yerr());
571  auto z2err = Monitored::Scalar<double>( prefix + "2Zerr" + suffix, vertex.vertex2().Zerr());
572  auto dntrk = Monitored::Scalar<double>( prefix + "DNTrks" + suffix, vertex.DNTrks());
573  auto dx = Monitored::Scalar<double>( prefix + "DX" + suffix, vertex.DX());
574  auto dy = Monitored::Scalar<double>( prefix + "DY" + suffix, vertex.DY());
575  auto dz = Monitored::Scalar<double>( prefix + "DZ" + suffix, vertex.DZ());
576  auto dxerr = Monitored::Scalar<double>( prefix + "DXerr" + suffix, vertex.DXerr());
577  auto dyerr = Monitored::Scalar<double>( prefix + "DYerr" + suffix, vertex.DYerr());
578  auto dzerr = Monitored::Scalar<double>( prefix + "DZerr" + suffix, vertex.DZerr());
579  auto dxpull = Monitored::Scalar<double>( prefix + "DXpull" + suffix, vertex.DXpull());
580  auto dypull = Monitored::Scalar<double>( prefix + "DYpull" + suffix, vertex.DYpull());
581  auto dzpull = Monitored::Scalar<double>( prefix + "DZpull" + suffix, vertex.DZpull());
582 
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);
585 }

◆ monitor_vertex()

void T2VertexBeamSpotTool::monitor_vertex ( const std::string &  prefix,
const std::string &  suffix,
const T2Vertex vertex,
int  bcid = -1 
) const
private

Definition at line 526 of file T2VertexBeamSpotTool.cxx.

526  {
527 
528  auto ntrk = Monitored::Scalar<int> ( prefix + "NTrks" + suffix, vertex.NTrks() );
529  auto sumpt = Monitored::Scalar<double>( prefix + "SumPt" + suffix, vertex.SumPt() );
530  auto sumpt2 = Monitored::Scalar<double>( prefix + "SumPt2" + suffix, vertex.SumPt2() );
531  auto mass = Monitored::Scalar<double>( prefix + "Mass" + suffix, vertex.Mass() );
532  auto qual = Monitored::Scalar<double>( prefix + "Qual" + suffix, vertex.Qual() );
533  auto chi2 = Monitored::Scalar<double>( prefix + "Chi2Prob" + suffix, vertex.Chi2Prob() );
534  auto x = Monitored::Scalar<double>( prefix + "X" + suffix, vertex.X() );
535  auto y = Monitored::Scalar<double>( prefix + "Y" + suffix, vertex.Y() );
536  auto z = Monitored::Scalar<double>( prefix + "Z" + suffix, vertex.Z() );
537  auto xzoom = Monitored::Scalar<double>( prefix + "XZoom" + suffix, vertex.XZoom() );
538  auto yzoom = Monitored::Scalar<double>( prefix + "YZoom" + suffix, vertex.YZoom() );
539  auto zzoom = Monitored::Scalar<double>( prefix + "ZZoom" + suffix, vertex.ZZoom() );
540  auto xerr = Monitored::Scalar<double>( prefix + "Xerr" + suffix, vertex.Xerr() );
541  auto yerr = Monitored::Scalar<double>( prefix + "Yerr" + suffix, vertex.Yerr() );
542  auto zerr = Monitored::Scalar<double>( prefix + "Zerr" + suffix, vertex.Zerr() );
543  auto xy = Monitored::Scalar<double>( prefix + "XY" + suffix, vertex.XY() );
544  auto pull = Monitored::Scalar<double>( prefix + "Pull" + suffix, vertex.Pull() );
545  auto ntrkInVtx = Monitored::Scalar<double>( prefix + "NTrksInVtx" + suffix, vertex.NTrksInVtx() );
546 
547  if (bcid >= 0) {
548  auto BCID = Monitored::Scalar<unsigned>("BCID", unsigned(bcid));
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 );
550  } else {
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 );
552  }
553 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ numHighPTTrack()

unsigned T2VertexBeamSpotTool::numHighPTTrack ( const TrackVector tracks) const
private

Return count of high pT track in the track list, the total number of these high pT tracks is checked in the selectTracks function and the threshold can be set via TrackSeedPt (by default 1 GeV)

Definition at line 176 of file T2VertexBeamSpotTool.cxx.

177 {
178  unsigned count = 0;
179  for (auto&& track: tracks) {
180  const Trk::TrackParameters* trackPars = track->perigeeParameters();
181  if (trackPars) {
182  float qOverP = trackPars->parameters()[Trk::qOverP];
183  float theta = trackPars->parameters()[Trk::theta];
184  double pt = std::abs(std::sin(theta)/qOverP)/Gaudi::Units::GeV;
185  if (pt > m_trackSeedPt) {
186  ++count;
187  }
188  }
189  }
190  return count;
191 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ reconstructSplitVertices()

void T2VertexBeamSpotTool::reconstructSplitVertices ( TrackVector tracks,
DataVector< TrigVertexCollection > &  mySplitVertexCollections,
T2TrackClusterer trackClusterer,
const InDet::BeamSpotData indetBeamSpot,
const EventContext &  ctx 
) const
private

Definition at line 379 of file T2VertexBeamSpotTool.cxx.

385 {
386  auto timerVertexRec = Monitored::Timer("TIME_SplitVertexReconstruction");
387 
388  // Sort the tracks in phi for splitting in the most independent, uniform variable
389  {
390  auto timeToSortTracks = Monitored::Timer("TIME_toSortSplitTracks");
391  std::sort(myFullTrackCollection.begin(), myFullTrackCollection.end(), Beamspot::TrackPhiSort());
392  auto mon = Monitored::Group(m_monTool, timeToSortTracks );
393  }
394 
395  // This returns m_nSplitVertices (ideally) or fewer (if clustering fails) track collections
396  T2TrackManager trackManager(m_nSplitVertices);
397  vector<TrackVector> splitTrackCollections = trackManager.split(myFullTrackCollection, ctx);
398 
399  // Add a new track collection for the split vertices corresponding to this primary vertex
400  // There can be anywhere between zero and m_nSplitVertices entries in the collection
401  TrigVertexCollection* splitVertices = new TrigVertexCollection();
402  mySplitVertexCollections.push_back(splitVertices); // passes ownership
403 
404  // Loop over the split track collections to perform clustering and vertex fitting
405  for (auto&& tracks: splitTrackCollections) {
406  TrigVertex* splitVertex = nullptr;
407  ATH_MSG_DEBUG( "split vertex # of tracks " << tracks.size());
408 
409  if ( m_reclusterSplit ) {
410  // Sort the tracks in pT for clustering around the highest-pT seed
411  {
412  std::sort(tracks.begin(), tracks.end(), Beamspot::TrackPTSort());
413  }
414 
415  // Cluster in z
416  {
417  auto timeToZClusterSplit = Monitored::Timer("TIME_toZClusterSplit");
418  trackClusterer.cluster(tracks, indetBeamSpot);
419  auto mon = Monitored::Group(m_monTool, timeToZClusterSplit );
420  }
421 
422  // Check for a good cluster
423  if ( trackClusterer.clusterTracks().size() < m_totalNTrkMin ) continue;
424 
425  // Fit a vertex to this split track cluster
426  {
427  auto timeToVertexFitSplit = Monitored::Timer("TIME_toVertexFitSplit");
428  TrackCollection vertexTracks;
429  ConstDataVector<TrackCollection> cluster(trackClusterer.clusterTracks().begin(), trackClusterer.clusterTracks().end());
430  splitVertex = m_primaryVertexFitterTool->fit(cluster.asDataVector(), vertexTracks, trackClusterer.seedZ0());
431  auto mon = Monitored::Group(m_monTool, timeToVertexFitSplit );
432  }
433 
434  }
435  else
436  {
437  // Alternatively: Fit a vertex to the unclustered split track
438  // collection, using the seed Z0 from the primary vertex
439  {
440  auto timeToVertexFitSplit = Monitored::Timer("TIME_toVertexFitSplit");
441  TrackCollection vertexTracks;
442  ConstDataVector<TrackCollection> cluster(tracks.begin(), tracks.end());
443  splitVertex = m_primaryVertexFitterTool->fit(cluster.asDataVector(), vertexTracks, trackClusterer.seedZ0() );
444  auto mon = Monitored::Group(m_monTool, timeToVertexFitSplit );
445  }
446  }
447 
448  if ( splitVertex ) {
449  ATH_MSG_DEBUG( "Reconstructed a split vertex");
450  // Add split vertex to collection
451  splitVertices->push_back( splitVertex ); // passes ownership to split vertex collection
452  } else {
453  ATH_MSG_DEBUG( "Could not reconstruct a split vertex");
454  }
455  }
456 
457  // Monitor split vertex distributions (if we found all of them)
458  if ( m_nSplitVertices > 1 && splitVertices->size() == m_nSplitVertices ) {
459  ATH_MSG_DEBUG( "Split vertexing is ON." << "Attempting to split N = " << m_nSplitVertices << " vertices. ");
460 
461  // Store information on the first two vertices
462  // There shouldn't be more, unless it's for systematic studies anyway
463  const T2SplitVertex splitVertex( *(*splitVertices)[0], *(*splitVertices)[1] );
464 
465  monitor_split_vertex("SplitVertex", "Pass", splitVertex);
466  }
467 
468  //Monitor timing
469  auto mon = Monitored::Group(m_monTool, timerVertexRec );
470 }

◆ reconstructVertices()

unsigned int T2VertexBeamSpotTool::reconstructVertices ( TrackVector tracks,
TrigVertexCollection myVertexCollection,
DataVector< TrigVertexCollection > &  mySplitVertexCollections,
const EventContext &  ctx 
) const
private

Definition at line 193 of file T2VertexBeamSpotTool.cxx.

198 {
199  ATH_MSG_DEBUG( "Reconstructing vertices" );
200 
201  unsigned bcid = ctx.eventID().bunch_crossing_id();
202 
203  //Monitoring counters and timers
204  auto timerVertexRec = Monitored::Timer("TIME_VertexReconstruction");
205  auto nClusters = Monitored::Scalar<unsigned>("NClusters", 0);
206  auto nVtx = Monitored::Scalar<unsigned>("Nvtx", 0);
207  auto nPassVtx = Monitored::Scalar<unsigned>("NvtxPass", 0);
208  auto nPassBCIDVtx = Monitored::Scalar<unsigned>("NvtxPassBCID", 0);
209  auto BCID = Monitored::Scalar<unsigned>("BCID", bcid);
210 
211  // Sort tracks by track pT
212  {
213  auto timeToSortTracks = Monitored::Timer("TIME_toSortTracks");
214  std::sort(tracks.begin(), tracks.end(), Beamspot::TrackPTSort());
215  auto mon = Monitored::Group(m_monTool, timeToSortTracks );
216  }
217 
218  // Extract beam spot parameters
220  const InDet::BeamSpotData* indetBeamSpot(*beamSpotHandle);
221  const T2BeamSpot beamSpot(indetBeamSpot);
222  ATH_MSG_DEBUG( "Beamspot from BeamCondSvc: " << beamSpot);
223 
224  // Prepare a track clustering algorithm with the given parameters
225  // Should we leave this as a standalone class or merge with the tool?
228 
229  std::vector<double> clusterZ0; // Z0 for each cluster, for monitoring only
230 
231  // Create clusters from the track collection until all its tracks are used
232  while ( ! tracks.empty() ) {
233 
234  const Trk::TrackParameters* params = (*tracks.begin())->perigeeParameters();
235  float pT = std::abs(sin(params->parameters()[Trk::theta])/params->parameters()[Trk::qOverP]);
236  ATH_MSG_DEBUG( "Number of tracks remaining = " << tracks.size() );
237  ATH_MSG_DEBUG( "pT of first (seed) track (GeV) = " << pT/GeV );
238 
239 
240  // Cluster tracks in z around the first (highest-pT track) in the collection, which is taken
241  // as the seed.
242  {
243  auto timeToZCluster = Monitored::Timer("TIME_toZCluster");
244  trackClusterer.cluster(tracks, indetBeamSpot);
245  auto mon = Monitored::Group(m_monTool, timeToZCluster);
246  }
247 
248  // Sanity check:
249  if ( trackClusterer.clusterTracks().size() + trackClusterer.unusedTracks().size()
250  != tracks.size() ) {
251  ATH_MSG_DEBUG( "Track clustering check sum failed: "
252  << "cluster().size()=" << trackClusterer.clusterTracks().size()
253  << " + unusedTracks().size()=" << trackClusterer.unusedTracks().size()
254  << " != tracks.size()=" << tracks.size()
255  );
256  }
257 
258  // Continue with the remaining tracks - still pT-sorted
259  tracks = trackClusterer.unusedTracks();
260 
261  // This always uses at least one track (the seed), so we are sure to reduce the track
262  // selection and terminate the loop
263 
264  // Make sure we have enough tracks in the cluster
265  if ( trackClusterer.clusterTracks().size() < m_totalNTrkMin ) {
266  ATH_MSG_DEBUG( "Not enough tracks in cluster!" );
267  continue;
268  }
269 
270  // Event has a good cluster
271  nClusters++;
272 
273  // Monitor properties of of the cluster
274  monitor_cluster( trackClusterer );
275 
276  // Monitor properties of tracks inside the cluster
277  for (auto&& track: trackClusterer.clusterTracks()) {
278  monitor_cluster_tracks( trackClusterer, *track);
279  }
280 
281  ATH_MSG_DEBUG( "Number of tracks remaining after cluster #(" << nClusters << ") = " << tracks.size());
282  ATH_MSG_DEBUG( "Total number of tracks to fit = " << trackClusterer.clusterTracks().size() );
283  ATH_MSG_DEBUG( "Average Z position (from trk Z0) = " << trackClusterer.seedZ0() );
284  ATH_MSG_DEBUG( "Fitting tracks");
285 
286  // Fit a primary vertex to this cluster around its seed track
287  TrackCollection vertexTracks;
288  ConstDataVector<TrackCollection> cluster(trackClusterer.clusterTracks().begin(), trackClusterer.clusterTracks().end());
289  TrigVertex* primaryVertex = m_primaryVertexFitterTool->fit(cluster.asDataVector(), vertexTracks, trackClusterer.seedZ0());
290 
291  // Check to see if the fit succeeded / converged
292  if ( ! primaryVertex ) {
293  ATH_MSG_DEBUG( "Vertex fit failed");
294  continue;
295  }
296 
297  // Update vertex counter
298  nVtx++;
299 
300  const T2Vertex myVertex(*primaryVertex, vertexTracks, beamSpot, trackClusterer.seedZ0());
301 
302  // Monitor all vertices parameters
303  monitor_vertex( "Vertex", "", myVertex );
304  ATH_MSG_DEBUG( "Vertex fit: " << '\n' << myVertex);
305 
306  // Query for vertex selection
307  const bool passVertex = isGoodVertex( myVertex );
308 
309  if ( ! passVertex ) {
310  ATH_MSG_DEBUG( "Vertex failed selection" );
311  continue;
312  }
313 
314  // Add primary vertex to collection
315  myVertexCollection.push_back(primaryVertex); // passes ownership to vertex collection
316 
317  //Monitor parameters of the passed vertex
318  monitor_vertex( "Vertex", "Pass", myVertex );
319 
320  //Update good vertex counter
321  nPassVtx++;
322 
323  // Learn something more about the cluster that ended up in this vertex
324  auto deltaVtxZ = Monitored::Scalar<double>("ClusterDeltaVertexZ", trackClusterer.seedZ0() - myVertex.Z());
325  auto mon = Monitored::Group(m_monTool, deltaVtxZ);
326 
327  // monitor cluster-cluster delta Z0
328  for (double prevClusterZ0: clusterZ0) {
329  auto clusterClusterDeltaZ = Monitored::Scalar<double>("ClusterClusterDeltaZ0", trackClusterer.seedZ0() - prevClusterZ0);
330  auto mon = Monitored::Group(m_monTool, clusterClusterDeltaZ);
331  }
332  clusterZ0.push_back(trackClusterer.seedZ0());
333 
334  // If the vertex is good, splits are requested, and we have enough tracks to split, split them!
335  if ( passVertex && m_nSplitVertices > 1 ) {
336 
337  TrackVector mySplitTrackCollection;
338 
339  if ( m_splitWholeCluster ) {
340  ATH_MSG_DEBUG( "Splitting the entire cluster of tracks into two");
341  // Alternative 1: Split the entire cluster of track into two
342  mySplitTrackCollection = trackClusterer.clusterTracks();
343  } else {
344  ATH_MSG_DEBUG( "Splitting only tracks succesfully fitted to a vertex");
345  // Alternative 2: Split only the tracks that were successfully fit to a vertex
346  mySplitTrackCollection.assign(vertexTracks.begin(), vertexTracks.end());
347  }
348 
349  if (mySplitTrackCollection.size() >= m_nSplitVertices * m_totalNTrkMin) {
350  // Split, optinally re-cluster, and fit separate vertices
351  ATH_MSG_DEBUG( "Reconstruct split vertices");
352  reconstructSplitVertices( mySplitTrackCollection, mySplitVertexCollections, trackClusterer, indetBeamSpot, ctx );
353  }
354  // Alternative 3: Split all the tracks and iterate with the remaining tracks
355  // mySplitTrackCollection = tracks;
356  }
357 
358  ATH_MSG_DEBUG( "Number of tracks remaining = " << tracks.size() );
359 
360  // Now check if this vertex passed the higher multiplicity cut to be used for per-BCID measurements
361  const bool passVertexBCID = isGoodVertexBCID( myVertex );
362 
363  if ( passVertexBCID ) {
364  // Fill accepted per-BCID vertex histograms
365  monitor_vertex( "Vertex", "PassBCID", myVertex, bcid );
366 
367  // Update good per-BCID vertex counter
368  nPassBCIDVtx++;
369  }
370 
371  }//End looping over tracks
372 
373  //monitor number of (passed) vertices, clusters, etc
374  auto mon = Monitored::Group(m_monTool, nVtx, nPassVtx, nPassBCIDVtx, nClusters, timerVertexRec, BCID);
375  return static_cast<unsigned int>(nPassVtx);
376 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateBS()

void T2VertexBeamSpotTool::updateBS ( const TrackCollection tracks,
const EventContext &  ctx 
) const

Update beam spot data with new track information.

Parameter provides a lists of tracks.

Definition at line 127 of file T2VertexBeamSpotTool.cxx.

128 {
129  // Monitor how long does it take to loop over all collections
130  auto tSelectingTracks = Monitored::Timer("TIME_SelectingTracks");
131 
132  // Select tracks
133  auto selectedTracks = m_trackFilterTool->filter(tracks);
134  if (m_filterBS) {
135  auto& eventID = ctx.eventID();
136  bool has_bs = m_trackFilterTool->updateBS(selectedTracks, eventID.lumi_block(),
137  eventID.bunch_crossing_id());
138  if (has_bs) {
139  selectedTracks = m_trackFilterTool->filterBS(selectedTracks);
140  }
141  }
142 
143  //Monitor total all/passed/highPt track numbers
144  tSelectingTracks.stop();
145  auto nTotalTracks = Monitored::Scalar<unsigned>("nTotalTracks", tracks.size());
146  auto nTotalPassedTracks = Monitored::Scalar<unsigned>("nTotalPassedTracks", selectedTracks.size());
147  auto nTotalHighPTTracks = Monitored::Scalar<unsigned>("nTotalHighPTTracks", numHighPTTrack(selectedTracks));
148 
149  //Monitor total number of tracks
150  auto monitor = Monitored::Group(m_monTool, tSelectingTracks, nTotalTracks,
151  nTotalPassedTracks, nTotalHighPTTracks);
152  ATH_MSG_DEBUG("Number of all Tracks: " << nTotalTracks << " Selected Tracks: " << nTotalPassedTracks <<
153  " highPt Tracks: " << nTotalHighPTTracks );
154 
155  // Check for seed tracks (= high-pT tracks)
156  if (nTotalHighPTTracks == 0) {
157  ATH_MSG_DEBUG("No seed tracks for vertexing");
158  return;
159  }
160 
161  // Check for the total number of available tracks
162  if (nTotalPassedTracks < m_totalNTrkMin) {
163  ATH_MSG_DEBUG( "Not enough total passed tracks to vertex");
164  return;
165  }
166 
168  myVertexCollection = std::make_unique<TrigVertexCollection>();
169  DataVector<TrigVertexCollection> mySplitVertexCollections;
170 
171  ATH_MSG_DEBUG( "Reconstruct vertices" );
172  reconstructVertices(selectedTracks, *myVertexCollection, mySplitVertexCollections, ctx);
173 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> PESA::T2VertexBeamSpotTool::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 152 of file T2VertexBeamSpotTool.h.

◆ m_clusterPerigee

std::string PESA::T2VertexBeamSpotTool::m_clusterPerigee = "original"
private

Definition at line 123 of file T2VertexBeamSpotTool.h.

◆ m_clusterTrackPerigee

T2TrackClusterer::TrackPerigee PESA::T2VertexBeamSpotTool::m_clusterTrackPerigee = T2TrackClusterer::perigee_original
private

Definition at line 124 of file T2VertexBeamSpotTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filterBS

bool PESA::T2VertexBeamSpotTool::m_filterBS
private

Definition at line 149 of file T2VertexBeamSpotTool.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> PESA::T2VertexBeamSpotTool::m_monTool {this,"MonTool","","Monitoring tool"}
private

Definition at line 162 of file T2VertexBeamSpotTool.h.

◆ m_nSplitVertices

unsigned PESA::T2VertexBeamSpotTool::m_nSplitVertices
private

Definition at line 147 of file T2VertexBeamSpotTool.h.

◆ m_outputVertexCollectionKey

SG::WriteHandleKey<TrigVertexCollection> PESA::T2VertexBeamSpotTool::m_outputVertexCollectionKey {this, "OutputVertexCollection", "myVertices", "SG key for output vertex collection"}
private

Definition at line 155 of file T2VertexBeamSpotTool.h.

◆ m_primaryVertexFitterTool

ToolHandle<ITrigPrimaryVertexFitter> PESA::T2VertexBeamSpotTool::m_primaryVertexFitterTool
private

Primary Vertex Fitter Tool.

Definition at line 159 of file T2VertexBeamSpotTool.h.

◆ m_reclusterSplit

bool PESA::T2VertexBeamSpotTool::m_reclusterSplit
private

Definition at line 121 of file T2VertexBeamSpotTool.h.

◆ m_splitWholeCluster

bool PESA::T2VertexBeamSpotTool::m_splitWholeCluster
private

Definition at line 120 of file T2VertexBeamSpotTool.h.

◆ m_totalNTrkMin

unsigned PESA::T2VertexBeamSpotTool::m_totalNTrkMin
private

Definition at line 127 of file T2VertexBeamSpotTool.h.

◆ m_trackClusDZ

double PESA::T2VertexBeamSpotTool::m_trackClusDZ
private

Definition at line 118 of file T2VertexBeamSpotTool.h.

◆ m_trackFilterTool

ToolHandle<T2BSTrackFilterTool> PESA::T2VertexBeamSpotTool::m_trackFilterTool {this, "TrackFilter", "PESA::T2BSTrackFilterTool/T2BSTrackFilterTool" }
private

Definition at line 161 of file T2VertexBeamSpotTool.h.

◆ m_trackSeedPt

double PESA::T2VertexBeamSpotTool::m_trackSeedPt
private

Definition at line 122 of file T2VertexBeamSpotTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vtxBCIDNTrkMin

unsigned int PESA::T2VertexBeamSpotTool::m_vtxBCIDNTrkMin
private

Additional vertex selection criteria for BCID measurements.

Definition at line 145 of file T2VertexBeamSpotTool.h.

◆ m_vtxChi2ProbMin

double PESA::T2VertexBeamSpotTool::m_vtxChi2ProbMin
private

Definition at line 134 of file T2VertexBeamSpotTool.h.

◆ m_vtxMassMin

double PESA::T2VertexBeamSpotTool::m_vtxMassMin
private

Definition at line 135 of file T2VertexBeamSpotTool.h.

◆ m_vtxNTrkMax

unsigned int PESA::T2VertexBeamSpotTool::m_vtxNTrkMax
private

Definition at line 131 of file T2VertexBeamSpotTool.h.

◆ m_vtxNTrkMin

unsigned int PESA::T2VertexBeamSpotTool::m_vtxNTrkMin
private

Definition at line 130 of file T2VertexBeamSpotTool.h.

◆ m_vtxQualMax

double PESA::T2VertexBeamSpotTool::m_vtxQualMax
private

Definition at line 133 of file T2VertexBeamSpotTool.h.

◆ m_vtxQualMin

double PESA::T2VertexBeamSpotTool::m_vtxQualMin
private

Definition at line 132 of file T2VertexBeamSpotTool.h.

◆ m_vtxSumPtMin

double PESA::T2VertexBeamSpotTool::m_vtxSumPtMin
private

Definition at line 136 of file T2VertexBeamSpotTool.h.

◆ m_vtxXerrMax

double PESA::T2VertexBeamSpotTool::m_vtxXerrMax
private

Definition at line 138 of file T2VertexBeamSpotTool.h.

◆ m_vtxXposMax

double PESA::T2VertexBeamSpotTool::m_vtxXposMax
private

Definition at line 137 of file T2VertexBeamSpotTool.h.

◆ m_vtxYerrMax

double PESA::T2VertexBeamSpotTool::m_vtxYerrMax
private

Definition at line 140 of file T2VertexBeamSpotTool.h.

◆ m_vtxYposMax

double PESA::T2VertexBeamSpotTool::m_vtxYposMax
private

Definition at line 139 of file T2VertexBeamSpotTool.h.

◆ m_vtxZerrMax

double PESA::T2VertexBeamSpotTool::m_vtxZerrMax
private

Definition at line 142 of file T2VertexBeamSpotTool.h.

◆ m_vtxZposMax

double PESA::T2VertexBeamSpotTool::m_vtxZposMax
private

Definition at line 141 of file T2VertexBeamSpotTool.h.

◆ m_weightSeed

bool PESA::T2VertexBeamSpotTool::m_weightSeed
private

Definition at line 119 of file T2VertexBeamSpotTool.h.


The documentation for this class was generated from the following files:
PESA::T2VertexBeamSpotTool::isGoodVertex
bool isGoodVertex(const T2Vertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:473
PESA::T2VertexBeamSpotTool::TrackVector
std::vector< const Trk::Track * > TrackVector
Definition: T2VertexBeamSpotTool.h:72
PESA::T2VertexBeamSpotTool::m_filterBS
bool m_filterBS
Definition: T2VertexBeamSpotTool.h:149
PESA::T2VertexBeamSpotTool::m_trackFilterTool
ToolHandle< T2BSTrackFilterTool > m_trackFilterTool
Definition: T2VertexBeamSpotTool.h:161
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
PESA::T2VertexBeamSpotTool::m_vtxMassMin
double m_vtxMassMin
Definition: T2VertexBeamSpotTool.h:135
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
PESA::T2TrackClusterer::seedZ0
double seedZ0() const
Z0 position of a seed track that was used for clustering.
Definition: T2TrackClusterer.h:78
PESA::T2VertexBeamSpotTool::m_vtxQualMax
double m_vtxQualMax
Definition: T2VertexBeamSpotTool.h:133
PESA::T2VertexBeamSpotTool::m_vtxQualMin
double m_vtxQualMin
Definition: T2VertexBeamSpotTool.h:132
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PESA::T2TrackClusterer::clusterTracks
const TrackVector & clusterTracks() const
This is the same vector as returned from clustering method, have to be called after return from a clu...
Definition: T2TrackClusterer.h:85
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
PESA::T2Vertex
Definition: T2Vertex.h:100
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
PESA::T2VertexBeamSpotTool::numHighPTTrack
unsigned numHighPTTrack(const TrackVector &tracks) const
Return count of high pT track in the track list, the total number of these high pT tracks is checked ...
Definition: T2VertexBeamSpotTool.cxx:176
Trk::z0
@ z0
Definition: ParamDefs.h:64
PESA::T2VertexBeamSpotTool::monitor_split_vertex
void monitor_split_vertex(const std::string &prefix, const std::string &suffix, const T2SplitVertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:556
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PESA::T2VertexBeamSpotTool::m_vtxNTrkMin
unsigned int m_vtxNTrkMin
Definition: T2VertexBeamSpotTool.h:130
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
x
#define x
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
PESA::T2TrackClusterer::trackPerigeeFromString
static TrackPerigee trackPerigeeFromString(const std::string &perigeeStr)
Definition: T2TrackClusterer.cxx:28
Beamspot::TrackPTSort
Definition: T2VertexBeamSpotTool.cxx:44
PESA::T2VertexBeamSpotTool::isGoodVertexBCID
bool isGoodVertexBCID(const T2Vertex &vertex) const
Definition: T2VertexBeamSpotTool.cxx:494
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
PESA::T2VertexBeamSpotTool::m_reclusterSplit
bool m_reclusterSplit
Definition: T2VertexBeamSpotTool.h:121
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PESA::T2VertexBeamSpotTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: T2VertexBeamSpotTool.h:152
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
PESA::T2TrackClusterer::cluster
const TrackVector & cluster(const TrackVector &tracks, const InDet::BeamSpotData *beamspot=nullptr)
Find one cluster in a set of tracks.
Definition: T2TrackClusterer.cxx:50
PESA::T2BeamSpot
Definition: T2BeamSpot.h:32
PESA::T2VertexBeamSpotTool::m_vtxXposMax
double m_vtxXposMax
Definition: T2VertexBeamSpotTool.h:137
PESA::T2VertexBeamSpotTool::m_vtxYposMax
double m_vtxYposMax
Definition: T2VertexBeamSpotTool.h:139
PESA::T2VertexBeamSpotTool::monitor_cluster
void monitor_cluster(const T2TrackClusterer &clusterer) const
Definition: T2VertexBeamSpotTool.cxx:504
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PESA::T2VertexBeamSpotTool::m_clusterTrackPerigee
T2TrackClusterer::TrackPerigee m_clusterTrackPerigee
Definition: T2VertexBeamSpotTool.h:124
PESA::T2VertexBeamSpotTool::m_vtxZerrMax
double m_vtxZerrMax
Definition: T2VertexBeamSpotTool.h:142
TrackCollection
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
Definition: TrackCollection.h:19
z
#define z
PESA::T2VertexBeamSpotTool::m_primaryVertexFitterTool
ToolHandle< ITrigPrimaryVertexFitter > m_primaryVertexFitterTool
Primary Vertex Fitter Tool.
Definition: T2VertexBeamSpotTool.h:159
Trk::theta
@ theta
Definition: ParamDefs.h:66
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PESA::T2VertexBeamSpotTool::m_vtxBCIDNTrkMin
unsigned int m_vtxBCIDNTrkMin
Additional vertex selection criteria for BCID measurements.
Definition: T2VertexBeamSpotTool.h:145
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
PESA::T2VertexBeamSpotTool::m_splitWholeCluster
bool m_splitWholeCluster
Definition: T2VertexBeamSpotTool.h:120
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PESA::T2VertexBeamSpotTool::reconstructVertices
unsigned int reconstructVertices(TrackVector &tracks, TrigVertexCollection &myVertexCollection, DataVector< TrigVertexCollection > &mySplitVertexCollections, const EventContext &) const
Definition: T2VertexBeamSpotTool.cxx:193
TrigVertexCollection
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigVertexCollection
Definition: TrigInDetEventTPCnv.cxx:236
PESA::T2TrackClusterer
Definition: T2TrackClusterer.h:42
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
PESA::T2VertexBeamSpotTool::m_trackSeedPt
double m_trackSeedPt
Definition: T2VertexBeamSpotTool.h:122
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Beamspot::TrackPhiSort
Definition: T2VertexBeamSpotTool.cxx:56
PESA::T2VertexBeamSpotTool::m_vtxNTrkMax
unsigned int m_vtxNTrkMax
Definition: T2VertexBeamSpotTool.h:131
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
PESA::T2SplitVertex
Definition: T2SplitVertex.h:52
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
PESA::T2VertexBeamSpotTool::m_vtxZposMax
double m_vtxZposMax
Definition: T2VertexBeamSpotTool.h:141
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::perigeeParameters
@ perigeeParameters
Definition: MeasurementType.h:19
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
PESA::T2TrackManager
Definition: T2TrackManager.h:34
PESA::T2VertexBeamSpotTool::m_vtxYerrMax
double m_vtxYerrMax
Definition: T2VertexBeamSpotTool.h:140
TrigVertexCollection
Definition: TrigVertexCollection.h:13
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
PESA::T2VertexBeamSpotTool::m_vtxChi2ProbMin
double m_vtxChi2ProbMin
Definition: T2VertexBeamSpotTool.h:134
PESA::T2VertexBeamSpotTool::reconstructSplitVertices
void reconstructSplitVertices(TrackVector &tracks, DataVector< TrigVertexCollection > &mySplitVertexCollections, T2TrackClusterer &trackClusterer, const InDet::BeamSpotData *indetBeamSpot, const EventContext &) const
Definition: T2VertexBeamSpotTool.cxx:379
InDet::BeamSpotData
Definition: BeamSpotData.h:21
PESA::T2VertexBeamSpotTool::m_weightSeed
bool m_weightSeed
Definition: T2VertexBeamSpotTool.h:119
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
PESA::T2VertexBeamSpotTool::m_totalNTrkMin
unsigned m_totalNTrkMin
Definition: T2VertexBeamSpotTool.h:127
h
PESA::T2VertexBeamSpotTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: T2VertexBeamSpotTool.h:162
TrigVertex
Definition: TrigVertex.h:28
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
PESA::T2VertexBeamSpotTool::m_vtxXerrMax
double m_vtxXerrMax
Definition: T2VertexBeamSpotTool.h:138
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
plotBeamSpotMon.mon
mon
Definition: plotBeamSpotMon.py:67
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
PESA::T2TrackClusterer::unusedTracks
const TrackVector & unusedTracks() const
Tracks that were not included into cluster, have to be called after return from a clustering method.
Definition: T2TrackClusterer.h:89
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:454
beamspotman.qual
qual
Definition: beamspotman.py:481
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
PESA::T2VertexBeamSpotTool::m_trackClusDZ
double m_trackClusDZ
Definition: T2VertexBeamSpotTool.h:118
PESA::T2VertexBeamSpotTool::m_outputVertexCollectionKey
SG::WriteHandleKey< TrigVertexCollection > m_outputVertexCollectionKey
Definition: T2VertexBeamSpotTool.h:155
PESA::T2VertexBeamSpotTool::m_vtxSumPtMin
double m_vtxSumPtMin
Definition: T2VertexBeamSpotTool.h:136
PESA::T2VertexBeamSpotTool::m_clusterPerigee
std::string m_clusterPerigee
Definition: T2VertexBeamSpotTool.h:123
PESA::T2VertexBeamSpotTool::monitor_vertex
void monitor_vertex(const std::string &prefix, const std::string &suffix, const T2Vertex &vertex, int bcid=-1) const
Definition: T2VertexBeamSpotTool.cxx:526
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
PESA::T2VertexBeamSpotTool::m_nSplitVertices
unsigned m_nSplitVertices
Definition: T2VertexBeamSpotTool.h:147
PESA::T2VertexBeamSpotTool::monitor_cluster_tracks
void monitor_cluster_tracks(T2TrackClusterer &clusterer, const Trk::Track &track) const
Definition: T2VertexBeamSpotTool.cxx:513
Monitored::Timer
A monitored timer.
Definition: MonitoredTimer.h:32
fitman.k
k
Definition: fitman.py:528