ATLAS Offline Software
JetSecVertexingAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 //general interface for secondary vertex finders
12 
17 
19 
21 
24 
25 #include "xAODBase/IParticle.h"
26 
28 
29 namespace Analysis {
30 
31  JetSecVertexingAlg::JetSecVertexingAlg(const std::string& name, ISvcLocator* pSvcLocator):
32  AthReentrantAlgorithm(name,pSvcLocator),
33  m_MSVvarFactory("Analysis::MSVVariablesFactory",this)
34  {
35  declareProperty("SecVtxFinderxAODBaseName", m_secVertexFinderBaseName);
36  declareProperty("MSVVariableFactory", m_MSVvarFactory);
37  }
38 
40  {
41  // This will check that the properties were initialized properly
42  // by job configuration.
43  ATH_CHECK( m_JetCollectionName.initialize() );
45  ATH_CHECK( m_VxSecVertexInfoName.initialize() );
46  ATH_CHECK( m_VertexCollectionName.initialize() );
47  ATH_CHECK( m_BTagSVCollectionName.initialize( (m_secVertexFinderBaseName == "SV1") || (m_secVertexFinderBaseName == "MSV") || (m_secVertexFinderBaseName == "SV1Flip") ) );
48  ATH_CHECK( m_BTagJFVtxCollectionName.initialize( (m_secVertexFinderBaseName == "JetFitter") || (m_secVertexFinderBaseName == "JetFitterFlip") ) );
49  ATH_CHECK( m_jetSVLinkName.initialize() );
50 
51  /* ----------------------------------------------------------------------------------- */
52  /* RETRIEVE SERVICES FROM STOREGATE */
53  /* ----------------------------------------------------------------------------------- */
54 
55  if ( m_MSVvarFactory.retrieve().isFailure() ) {
56  ATH_MSG_ERROR("#BTAG# Failed to retrieve " << m_MSVvarFactory);
57  } else {
58  ATH_MSG_DEBUG("#BTAG# Retrieved " << m_MSVvarFactory);
59  }
60 
61  return StatusCode::SUCCESS;
62  }
63 
64 
65  StatusCode JetSecVertexingAlg::execute(const EventContext& ctx) const{
66  //retrieve the Jet container
68  if (!h_JetCollectionName.isValid()) {
69  ATH_MSG_ERROR( " cannot retrieve jet container with key " << m_JetCollectionName.key() );
70  return StatusCode::FAILURE;
71  }
72 
73  SG::WriteHandle<xAOD::VertexContainer> h_BTagSVCollectionName;
74  SG::WriteHandle<xAOD::BTagVertexContainer> h_BTagJFVtxCollectionName;
75 
76  std::string basename = m_secVertexFinderBaseName;
77  /* Record the BTagging JF Vertex output container */
78  if ((basename == "JetFitter") || (basename == "JetFitterFlip")) {
79  ATH_MSG_DEBUG("#BTAG# Record the BTagging JF Vertex output container");
81  ATH_CHECK( h_BTagJFVtxCollectionName.record(std::make_unique<xAOD::BTagVertexContainer>(),
82  std::make_unique<xAOD::BTagVertexAuxContainer>()) );
83  }
84 
85  /* Record the BTagging Secondary Vertex output container */
86  if ((basename == "SV1") ||(basename == "SV1Flip") || (basename == "MSV")) {
87  ATH_MSG_DEBUG("#BTAG# Record the BTagging Secondary Vertex output container");
89  ATH_CHECK( h_BTagSVCollectionName.record(std::make_unique<xAOD::VertexContainer>(),
90  std::make_unique<xAOD::VertexAuxContainer>()) );
91  }
92 
93  if (h_JetCollectionName->empty()) {
94  ATH_MSG_DEBUG("#BTAG# Empty Jet collection");
95  return StatusCode::SUCCESS;
96  }
97 
99  if (!h_TrackCollectionName.isValid()) {
100  ATH_MSG_ERROR( " cannot retrieve track container with key " << m_TrackCollectionName.key() );
101  return StatusCode::FAILURE;
102  }
103 
104  const xAOD::TrackParticleContainer* theTrackParticleContainer = h_TrackCollectionName.ptr();
105 
106  const xAOD::Vertex* primaryVertex(nullptr);
107 
108  //retrieve primary vertex
110  if (!h_VertexCollectionName.isValid()) {
111  ATH_MSG_ERROR( " cannot retrieve primary vertex container with key " << m_VertexCollectionName.key() );
112  return StatusCode::FAILURE;
113  }
114 
115  //retrieve VxSecVertexInfo
117  if (!h_VxSecVertexInfoName.isValid()) {
118  ATH_MSG_ERROR( " cannot retrieve primary vertex container with key " << m_VxSecVertexInfoName.key() );
119  return StatusCode::FAILURE;
120  }
121  ATH_MSG_DEBUG("Size of VxSecVertexInfo: " << h_VxSecVertexInfoName->size());
122 
123  if (h_VxSecVertexInfoName->size() != h_JetCollectionName->size()) {
124  ATH_MSG_ERROR("Size of jet container different than size of VxSecVertexInfo");
125  return StatusCode::FAILURE;
126  }
127 
128  unsigned int nVertexes = h_VertexCollectionName->size();
129  if (nVertexes == 0) {
130  ATH_MSG_ERROR("#BTAG# Vertex container is empty");
131  return StatusCode::FAILURE;
132  }
133  for (const auto *fz : *h_VertexCollectionName) {
134  if (fz->vertexType() == xAOD::VxType::PriVtx) {
135  primaryVertex = fz;
136  break;
137  }
138  }
139 
140  if (! primaryVertex) {
141  ATH_MSG_DEBUG("#BTAG# No vertex labeled as VxType::PriVtx!");
142  xAOD::VertexContainer::const_iterator fz = h_VertexCollectionName->begin();
143  primaryVertex = *fz;
144  if (primaryVertex->nTrackParticles() == 0) {
145  ATH_MSG_DEBUG("#BTAG# PV==BeamSpot: probably poor tagging");
146  }
147  }
148 
149  const xAOD::Vertex& PrimaryVtx = *primaryVertex;
150 
151  Trk::VxSecVertexInfoContainer::const_iterator infoSVIter = h_VxSecVertexInfoName->begin();
152 
153  if(basename == "MSV") {
154  for (const xAOD::Jet* jetToTag : *h_JetCollectionName) {
155  const Trk::VxSecVertexInfo* myVertexInfo = *infoSVIter++;
156  if(myVertexInfo != nullptr) {
157  if(const Trk::VxSecVKalVertexInfo* myVertexInfoVKal = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(myVertexInfo)) {
158  ATH_MSG_DEBUG("#BTAG# Found VKalVertexInfo information");
159  StatusCode sc = m_MSVvarFactory->createMSVContainer(*jetToTag, myVertexInfoVKal, &(*h_BTagSVCollectionName), PrimaryVtx);
160  if(sc.isFailure()){
161  ATH_MSG_ERROR("#BTAG# error filling variables in MSVVariablesFactory" );
162  return sc;
163  }
164  }
165  else {
166  ATH_MSG_DEBUG("#BTAG# dynamic_cast failed for a non-nullptr myVertexInfo!");
167  }
168  }
169  }
170  }
171 
172  else if(basename == "SV1" || basename == "SV1Flip") { //SV1
174  for (const xAOD::Jet* jetToTag : *h_JetCollectionName) {
175  const Trk::VxSecVertexInfo* myVertexInfo = *infoSVIter++;
176  std::vector< ElementLink< xAOD::VertexContainer > > SVertexLinks;
177  if(myVertexInfo != nullptr) {
178  if(const Trk::VxSecVKalVertexInfo* myVertexInfoVKal = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(myVertexInfo)) {
179  ATH_MSG_DEBUG("#BTAG# Found VKalVertexInfo information");
180  StatusCode sc = createSecVkalContainer(&(*h_BTagSVCollectionName), &SVertexLinks, myVertexInfoVKal);
181  if(sc.isFailure()){
182  ATH_MSG_ERROR("#BTAG# error filling variables from VxSecVKalVertexInfo " << m_VxSecVertexInfoName.key());
183  return sc;
184  }
185  }
186  else {
187  ATH_MSG_DEBUG("#BTAG# dynamic_cast failed for a non-nullptr myVertexInfo!");
188  }
189  }
190  h_jetSVLinkName(*jetToTag) = SVertexLinks;
191  }
192  }
193 
194  else if(basename == "JetFitter" || basename == "JetFitterFlip") {
196  for (const xAOD::Jet* jetToTag : *h_JetCollectionName) {
197  const Trk::VxSecVertexInfo* myVertexInfo = *infoSVIter++;
198  std::vector< ElementLink< xAOD::BTagVertexContainer > > JFVtxLinks;
199  if(myVertexInfo != nullptr) {
200  if(const Trk::VxJetFitterVertexInfo* myVertexInfoJetFitter = dynamic_cast<const Trk::VxJetFitterVertexInfo*>(myVertexInfo)) {
201  ATH_MSG_DEBUG("#BTAG# Found VxJetFitterVertexInfo information");
202  StatusCode sc = createJFContainer(&(*h_BTagJFVtxCollectionName), &JFVtxLinks, myVertexInfoJetFitter, theTrackParticleContainer);
203  if(sc.isFailure()){
204  ATH_MSG_ERROR("#BTAG# error filling variables from VxJetFitterVertexInfo " << m_VxSecVertexInfoName.key());
205  return sc;
206  }
207  }
208  else {
209  ATH_MSG_DEBUG("#BTAG# dynamic_cast failed for a non-nullptr myVertexInfo!");
210  }
211  }
212  h_jetSVLinkName(*jetToTag) = JFVtxLinks;
213  }
214  }
215 
216  else {
217  ATH_MSG_ERROR("#BTAG# JetSecVertexingAlg encounters an unknown basename: " << basename);
218  }
219 
220  return StatusCode::SUCCESS;
221  }
222 
224  const Trk::VxSecVKalVertexInfo* myVertexInfoVKal) const {
225 
226  std::vector<xAOD::Vertex*>::const_iterator verticesBegin = myVertexInfoVKal->vertices().begin();
227  std::vector<xAOD::Vertex*>::const_iterator verticesEnd = myVertexInfoVKal->vertices().end();
228 
229  for (std::vector<xAOD::Vertex*>::const_iterator verticesIter=verticesBegin; verticesIter!=verticesEnd;++verticesIter) {
230  xAOD::Vertex* btagVtx = *verticesIter;
231  bTagVertexContainer->push_back(btagVtx);
232 
234  linkBTagVertex.toContainedElement(*bTagVertexContainer, btagVtx);
235  SVertexLinks->push_back(linkBTagVertex);
236  }
237  ATH_MSG_DEBUG("#BTAG# SV container size: " << bTagVertexContainer->size());
238 
239  return StatusCode::SUCCESS;
240  }
241 
242 
244  std::vector< ElementLink< xAOD::BTagVertexContainer > > * JFVerticesLinks,
245  const Trk::VxJetFitterVertexInfo* myVertexInfoJetFitter,
246  const xAOD::TrackParticleContainer* theTrackParticleContainer) const {
247 
248  //list of JFvertices
249  const std::vector<Trk::VxJetCandidate*>& JFvertices = myVertexInfoJetFitter->verticesJF();
250 
251  int nVtx = 0;
252  if (!JFvertices.empty()) {
253  Trk::VxJetCandidate* vxjetcand = dynamic_cast< Trk::VxJetCandidate*>(JFvertices[0]);
254  if (!vxjetcand) {
255  ATH_MSG_WARNING("#BTAG# bad VxCandidate is not a VxJetCandidate");
256  return StatusCode::SUCCESS;
257  }
258 
259  //compatibility with others SV
260  const Trk::VxClusteringTable* ClusteringTable = vxjetcand->getClusteringTable();
261  typedef std::map<Trk::VxVertexOnJetAxis*, std::vector<std::pair<Trk::VxVertexOnJetAxis*,float> > > map2vtx;
262  map2vtx inverseCompMap;
263 
264  if (ClusteringTable !=nullptr) {
265  const std::map<float,Trk::PairOfVxVertexOnJetAxis>& mapPairVtxOnJetAxis = ClusteringTable->getCompatibilityPairOfVertices();
266  std::map<float,Trk::PairOfVxVertexOnJetAxis>::const_iterator mapiter = mapPairVtxOnJetAxis.begin();
267  for(;mapiter != mapPairVtxOnJetAxis.end(); ++mapiter){
268 
269  Trk::VxVertexOnJetAxis* vtx1 = mapiter->second.first;
270  Trk::VxVertexOnJetAxis* vtx2 = mapiter->second.second;
271  float comp = mapiter->first;
272 
273  std::pair<Trk::VxVertexOnJetAxis*,float> pair1(vtx1, comp);
274  std::pair<Trk::VxVertexOnJetAxis*,float> pair2(vtx1, comp);
275 
276  inverseCompMap[vtx1].push_back(pair2);
277  inverseCompMap[vtx2].push_back(pair1);
278 
279  }
280  }
281 
282  //vtx on jet axis
283  const std::vector<Trk::VxVertexOnJetAxis*> Vtxonjetaxes = vxjetcand->getVerticesOnJetAxis();
284  ATH_MSG_DEBUG("#BTAG# VerticesOnJetAxis of VxJetCandidate size: " << Vtxonjetaxes.size());
285  std::vector<Trk::VxVertexOnJetAxis*>::const_iterator iterBegin = Vtxonjetaxes.begin();
286  std::vector<Trk::VxVertexOnJetAxis*>::const_iterator iterEnd = Vtxonjetaxes.end();
287  float comptoPV(0.);
288  double chi2(0.);
289  int ndf(0);
290  nVtx = Vtxonjetaxes.size();
291  std::map<Trk::VxVertexOnJetAxis*, ElementLink< xAOD::BTagVertexContainer> > oldnewmap;
292 
293  for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator it=iterBegin; it!=iterEnd; ++it) {
294  //ndf, chi2 , comptoPV
295  const Trk::FitQuality& fitquality = (*it)->fitQuality();
296  chi2 = fitquality.chiSquared();
297  ndf = fitquality.numberDoF();
298  comptoPV = (*it)->getCompatibilityToPrimaryVtx();
299  const std::vector<Trk::VxTrackAtVertex*> & trackatVtx = (*it)->getTracksAtVertex();
300  std::vector<Trk::VxTrackAtVertex*>::const_iterator itrBegin = trackatVtx.begin();
301  std::vector<Trk::VxTrackAtVertex*>::const_iterator itrEnd = trackatVtx.end();
302  std::vector< float> tmpchi2;
303  std::vector< float> tmpndf;
304  std::vector< ElementLink< xAOD::TrackParticleContainer > > trkLinks;
305  std::vector< float> tmpRefPx;
306  std::vector< float> tmpRefPy;
307  std::vector< float> tmpRefPz;
308 
309  //loop in trks
310  for (std::vector<Trk::VxTrackAtVertex*>::const_iterator itr=itrBegin; itr!=itrEnd; ++itr) {
311  //ndf, chi2
312  const Trk::FitQuality& trkquality = (*itr)->trackQuality();
313  double tpchi2 = trkquality.chiSquared();
314  int tpndf = trkquality.numberDoF();
315  tmpchi2.push_back(float(tpchi2));
316  tmpndf.push_back(float(tpndf));
317  //tracks links
318  Trk::ITrackLink* trklinks = (*itr)->trackOrParticleLink();
319  const Trk::LinkToXAODTrackParticle* trkLinkTPxAOD=dynamic_cast<const Trk::LinkToXAODTrackParticle *>(trklinks);
320  if (!trkLinkTPxAOD) {
321  ATH_MSG_WARNING("#BTAG# bad ITrackLink is not a LinkToXAODTrackParticle");
322  continue;
323  }
324  const xAOD::TrackParticle* myTrklink = **trkLinkTPxAOD;
326 
327  tpel.toContainedElement(*theTrackParticleContainer, myTrklink);
328  trkLinks.push_back(tpel);
329 
330  //reffited momentum
331  const Trk::TrackParameters* trkperigee = (*itr)->perigeeAtVertex();
332  Amg::Vector3D mytrack = trkperigee->momentum();
333  tmpRefPx.push_back(mytrack.x());
334  tmpRefPy.push_back(mytrack.y());
335  tmpRefPz.push_back(mytrack.z());
336 
337  }
338 
339  xAOD::BTagVertex* newbtagVtx = new xAOD::BTagVertex();
340  bTagJFVertexContainer->push_back(newbtagVtx);
341 
342  newbtagVtx->setNDF(ndf);
343  newbtagVtx->setChi2(chi2);
344  newbtagVtx->setPV_compatibility(comptoPV);
345  newbtagVtx->setTrack_chi2(tmpchi2);
346  newbtagVtx->setTrack_NDF(tmpndf);
347  newbtagVtx->setTrack_links(trkLinks);
348  newbtagVtx->setTrack_refPx(tmpRefPx);
349  newbtagVtx->setTrack_refPy(tmpRefPy);
350  newbtagVtx->setTrack_refPz(tmpRefPz);
351 
353  linkBTagVertex.toContainedElement(*bTagJFVertexContainer, newbtagVtx);
354  JFVerticesLinks->push_back(linkBTagVertex);
355  oldnewmap.insert(std::make_pair(*it,linkBTagVertex));
356  }
357 
358  if(ClusteringTable !=nullptr){
359  for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator it=iterBegin; it!=iterEnd; ++it) {
360  std::vector< ElementLink< xAOD::BTagVertexContainer > > JFCompLinks;
361  std::vector<float> JFCompValues;
362 
363  bool foundmap=true;
364  map2vtx::iterator itmap = inverseCompMap.find(*it);
365  if(itmap == inverseCompMap.end()){
366  ATH_MSG_DEBUG("#BTAG# JF compatibility value in map2vtx map not found ");
367  foundmap=false;
368  }
369 
370  if(foundmap){
371 
372  std::vector<std::pair<Trk::VxVertexOnJetAxis*,float> > tmpvectpair = itmap->second;
373 
374  for(auto & icomppair : tmpvectpair){
375  std::map<Trk::VxVertexOnJetAxis*, ElementLink< xAOD::BTagVertexContainer> >::iterator JFOlNewIter = oldnewmap.find(icomppair.first);
376 
377  if(JFOlNewIter == oldnewmap.end()){
378  ATH_MSG_DEBUG("#BTAG# JF compatibility vector not found ");
379  continue;
380  }
381 
382  JFCompLinks.push_back(JFOlNewIter->second);
383  JFCompValues.push_back(icomppair.second);
384  }
385  }
386  }
387  }
388 
389  const Trk::RecVertexPositions& recVtxposition = vxjetcand->getRecVertexPositions();
390  const Amg::VectorX& vtxPositions = recVtxposition.position();
391  const Amg::MatrixX& vtxCovMatrix = recVtxposition.covariancePosition();
392  ATH_MSG_DEBUG("#BTAGJF# size vtxPosition "<<vtxPositions.size());
393  std::vector< float > fittedPosition = std::vector<float>(nVtx+5,-1);
394  std::vector< float > fittedCov = std::vector<float>(nVtx+5,-1); //only store the diagonal terms
395  if(vtxPositions.rows()>4 ) {
396  fittedPosition[0] = vtxPositions[Trk::jet_xv]; //position x,y,z of PV
397  fittedPosition[1] = vtxPositions[Trk::jet_yv];
398  fittedPosition[2] = vtxPositions[Trk::jet_zv];
399  fittedPosition[3] = vtxPositions[Trk::jet_phi]; // direction of the jet axis
400  fittedPosition[4] = vtxPositions[Trk::jet_theta];
401 
402  fittedCov[0] = vtxCovMatrix(0,0);
403  fittedCov[1] = vtxCovMatrix(1,1);
404  fittedCov[2] = vtxCovMatrix(2,2);
405  fittedCov[3] = vtxCovMatrix(3,3);
406  fittedCov[4] = vtxCovMatrix(4,4);
407 
408  }
409 
410  for(int i=0; i<nVtx; ++i){
411  fittedPosition[i+5] = vtxPositions[i+5]; //dist of vtxi on jet axis from PV
412  fittedCov[i+5] = vtxCovMatrix(i+5,i+5);
413  }
414 
415  //trks at PV
416  const std::vector<Trk::VxTrackAtVertex*> & trackatPV = vxjetcand->getPrimaryVertex()->getTracksAtVertex();
417  std::vector<Trk::VxTrackAtVertex*>::const_iterator irBegin = trackatPV.begin();
418  std::vector<Trk::VxTrackAtVertex*>::const_iterator irEnd = trackatPV.end();
419  std::vector< float > tracksAtPVchi2;
420  std::vector< float > tracksAtPVndf;
421  std::vector< ElementLink< xAOD::TrackParticleContainer > > tracksAtPVlinks;
422 
423  for (std::vector<Trk::VxTrackAtVertex*>::const_iterator it=irBegin; it!=irEnd; ++it) {
424  const Trk::FitQuality& trkquality = (*it)->trackQuality();
425  double tmpchi2 = trkquality.chiSquared();
426  int tmpndf = trkquality.numberDoF();
427  tracksAtPVchi2.push_back(float(tmpchi2));
428  tracksAtPVndf.push_back(float(tmpndf));
429  //links
430 
431  Trk::ITrackLink* trklinks = (*it)->trackOrParticleLink();
432  const Trk::LinkToXAODTrackParticle* trkLinkTPxAOD = dynamic_cast<const Trk::LinkToXAODTrackParticle *>(trklinks);
433  if (!trkLinkTPxAOD) {
434  ATH_MSG_WARNING("#BTAG# bad ITrackLink is not a LinkToXAODTrackParticle");
435  continue;
436  }
437  const xAOD::TrackParticle* myTrklink = **trkLinkTPxAOD;
439  tpel.toContainedElement(*theTrackParticleContainer, myTrklink);
440  tracksAtPVlinks.push_back(tpel);
441  }
442  }
443  else { //No JF vertices
444  ATH_MSG_ERROR("#BTAG# No JF vertices. Minimum 1");
445  }
446 
447  return StatusCode::SUCCESS;
448  }
449 
450 } // namespace
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::VertexPositions::position
const Amg::VectorX & position() const
return position of vertex
Definition: VertexPositions.cxx:95
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
plotting.yearwise_luminosity_vs_mu.comp
comp
Definition: yearwise_luminosity_vs_mu.py:23
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Trk::VxJetCandidate::getVerticesOnJetAxis
const std::vector< VxVertexOnJetAxis * > & getVerticesOnJetAxis(void) const
Definition: VxJetCandidate.cxx:543
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
Analysis::JetSecVertexingAlg::m_VxSecVertexInfoName
SG::ReadHandleKey< Trk::VxSecVertexInfoContainer > m_VxSecVertexInfoName
Definition: JetSecVertexingAlg.h:64
IParticle.h
JetSecVertexingAlg.h
Trk::VxVertexOnJetAxis::getTracksAtVertex
const std::vector< VxTrackAtVertex * > & getTracksAtVertex(void) const
get Tracks At Vertex Method
Definition: VxVertexOnJetAxis.cxx:102
Trk::jet_theta
@ jet_theta
Definition: JetVtxParamDefs.h:28
xAOD::BTagVertex_v1::setTrack_refPx
void setTrack_refPx(const std::vector< float > &values)
set track momentum x components
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::VxSecVertexInfo::vertices
const std::vector< xAOD::Vertex * > & vertices() const
Definition: VxSecVertexInfo.cxx:100
Analysis::JetSecVertexingAlg::m_secVertexFinderBaseName
std::string m_secVertexFinderBaseName
Definition: JetSecVertexingAlg.h:59
VxVertexOnJetAxis.h
VxJetCandidate.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
xAOD::BTagVertex_v1::setTrack_chi2
void setTrack_chi2(const std::vector< float > &values)
set track chi2 values
Trk::VxVertexOnJetAxis
VxVertexOnJetAxis inherits from Vertex.
Definition: VxVertexOnJetAxis.h:79
Trk::jet_xv
@ jet_xv
Definition: JetVtxParamDefs.h:27
MuonSimDataDict::pair2
std::pair< HepMcParticleLink, CscMcData > pair2
Definition: MuonSimDataDict.h:15
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
Trk::VxJetCandidate::getRecVertexPositions
const Trk::RecVertexPositions & getRecVertexPositions() const
Definition: VxJetCandidate.cxx:519
VxClusteringTable.h
xAOD::BTagVertex_v1::setTrack_links
void setTrack_links(const TPELinks_t &links)
set track ElementLinks
Definition: BTagVertex_v1.cxx:41
Analysis::JetSecVertexingAlg::m_JetCollectionName
SG::ReadHandleKey< xAOD::JetContainer > m_JetCollectionName
Definition: JetSecVertexingAlg.h:61
Trk::VxJetCandidate::getPrimaryVertex
const VxVertexOnJetAxis * getPrimaryVertex(void) const
Definition: VxJetCandidate.cxx:551
PairOfVxVertexOnJetAxis.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LinkToXAODTrackParticle.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::BTagVertex_v1::setNDF
void setNDF(float value)
set fit NDF
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
xAOD::BTagVertex_v1::setChi2
void setChi2(float value)
access the corresponding xAOD::BTagVertex
Trk::jet_yv
@ jet_yv
Definition: JetVtxParamDefs.h:27
Trk::VxClusteringTable
Definition: VxClusteringTable.h:71
WriteDecorHandle.h
Handle class for adding a decoration to an object.
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
xAOD::BTagVertex_v1
Definition: BTagVertex_v1.h:33
VxTrackAtVertex.h
Trk::LinkToXAODTrackParticle
Element link to XAOD TrackParticle.
Definition: LinkToXAODTrackParticle.h:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
Analysis::JetSecVertexingAlg::m_BTagSVCollectionName
SG::WriteHandleKey< xAOD::VertexContainer > m_BTagSVCollectionName
Definition: JetSecVertexingAlg.h:65
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
xAOD::BTagVertex
BTagVertex_v1 BTagVertex
Definition of the current "BTagging version".
Definition: BTagVertex.h:17
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Trk::VxJetFitterVertexInfo
Definition: VxJetFitterVertexInfo.h:58
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Analysis::JetSecVertexingAlg::m_BTagJFVtxCollectionName
SG::WriteHandleKey< xAOD::BTagVertexContainer > m_BTagJFVtxCollectionName
Definition: JetSecVertexingAlg.h:67
Analysis::JetSecVertexingAlg::initialize
virtual StatusCode initialize() override
Main routines specific to an ATHENA algorithm.
Definition: JetSecVertexingAlg.cxx:39
xAOD::BTagVertex_v1::setTrack_NDF
void setTrack_NDF(const std::vector< float > &values)
set track NDF values
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
MuonSimDataDict::pair1
std::pair< HepMcParticleLink,MuonMCData > pair1
Definition: MuonSimDataDict.h:14
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::VxClusteringTable::getCompatibilityPairOfVertices
const std::map< float, PairOfVxVertexOnJetAxis > & getCompatibilityPairOfVertices(void) const
Get back full compatibility info (only for reading)
Definition: VxClusteringTable.cxx:101
Analysis::JetSecVertexingAlg::createJFContainer
StatusCode createJFContainer(xAOD::BTagVertexContainer *, std::vector< ElementLink< xAOD::BTagVertexContainer > > *, const Trk::VxJetFitterVertexInfo *, const xAOD::TrackParticleContainer *) const
Definition: JetSecVertexingAlg.cxx:243
xAOD::BTagVertex_v1::setTrack_refPy
void setTrack_refPy(const std::vector< float > &values)
set track momentum y components
xAOD::BTagVertex_v1::setTrack_refPz
void setTrack_refPz(const std::vector< float > &values)
set track momentum z components
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Trk::VxSecVertexInfo
Definition: VxSecVertexInfo.h:63
Trk::jet_zv
@ jet_zv
position x,y,z of primary vertex
Definition: JetVtxParamDefs.h:27
Trk::VxJetCandidate
Definition: VxJetCandidate.h:72
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RecVertexPositions
Definition: RecVertexPositions.h:34
Trk::VxSecVKalVertexInfo
Definition: VxSecVKalVertexInfo.h:70
SG::ReadHandle::ptr
const_pointer_type ptr()
Dereference the pointer.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::RecVertexPositions::covariancePosition
Amg::MatrixX const & covariancePosition() const
return the covDeltaV matrix of the vertex fit
Definition: RecVertexPositions.cxx:171
Trk::VxJetCandidate::getClusteringTable
Trk::VxClusteringTable *& getClusteringTable(void)
Definition: VxJetCandidate.cxx:569
Analysis::JetSecVertexingAlg::JetSecVertexingAlg
JetSecVertexingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructors and destructors.
Definition: JetSecVertexingAlg.cxx:31
VxSecVKalVertexInfo.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::BTagVertex_v1::setPV_compatibility
void setPV_compatibility(float value)
set compatibility with PV
Analysis::JetSecVertexingAlg::m_TrackCollectionName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackCollectionName
Definition: JetSecVertexingAlg.h:62
Analysis::JetSecVertexingAlg::m_VertexCollectionName
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexCollectionName
Definition: JetSecVertexingAlg.h:63
Analysis::JetSecVertexingAlg::m_jetSVLinkName
Gaudi::Property< SG::WriteDecorHandleKey< xAOD::JetContainer > > m_jetSVLinkName
Definition: JetSecVertexingAlg.h:66
Analysis::JetSecVertexingAlg::createSecVkalContainer
StatusCode createSecVkalContainer(xAOD::VertexContainer *, std::vector< ElementLink< xAOD::VertexContainer > > *, const Trk::VxSecVKalVertexInfo *) const
Definition: JetSecVertexingAlg.cxx:223
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::jet_phi
@ jet_phi
Definition: JetVtxParamDefs.h:28
Analysis::JetSecVertexingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: JetSecVertexingAlg.cxx:65
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
Trk::VxJetFitterVertexInfo::verticesJF
const std::vector< Trk::VxJetCandidate * > & verticesJF() const
Definition: VxJetFitterVertexInfo.h:112
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
VxJetFitterVertexInfo.h
Analysis::JetSecVertexingAlg::m_MSVvarFactory
ToolHandle< IMSVVariablesFactory > m_MSVvarFactory
Definition: JetSecVertexingAlg.h:57
BTagVertexAuxContainer.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
RecVertexPositions.h
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
VertexAuxContainer.h
beamspotman.basename
basename
Definition: beamspotman.py:640