Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Rec::NewVrtSecInclusiveTool Class Reference

#include <NewVrtSecInclusiveTool.h>

Inheritance diagram for Rec::NewVrtSecInclusiveTool:
Collaboration diagram for Rec::NewVrtSecInclusiveTool:

Classes

struct  DevTuple
 
struct  Hists
 
struct  Vrt2Tr
 
struct  WrkVrt
 

Public Member Functions

 NewVrtSecInclusiveTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~NewVrtSecInclusiveTool ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 
std::unique_ptr< Trk::VxSecVertexInfofindAllVertices (const std::vector< const xAOD::TrackParticle * > &inputTracks, const xAOD::Vertex &primaryVertex) const final
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

using compatibilityGraph_t = boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void lockDecorations (const std::vector< const xAOD::TrackParticle * > &inpTrk) const
 
int getIdHF (const xAOD::TrackParticle *TP) const
 
std::vector< xAOD::Vertex * > getVrtSecMulti (workVectorArrxAOD *inpParticlesxAOD, const xAOD::Vertex &primVrt, compatibilityGraph_t &compatibilityGraph) const
 
void printWrkSet (const std::vector< WrkVrt > *WrkSet, const std::string &name) const
 
TLorentzVector momAtVrt (const std::vector< double > &inpTrk) const
 
double minVrtVrtDist (std::vector< WrkVrt > *WrkVrtSet, int &indexV1, int &indexV2, std::vector< double > &check) const
 
double distToMatLayerSignificance (Vrt2Tr &Vrt) const
 
double refitVertex (WrkVrt &Vrt, std::vector< const xAOD::TrackParticle * > &SelectedTracks, Trk::IVKalState &istate, bool ifCovV0) const
 
double refineVerticesWithCommonTracks (WrkVrt &v1, WrkVrt &v2, std::vector< const xAOD::TrackParticle * > &allTrackList, Trk::IVKalState &istate) const
 
double mergeAndRefitVertices (WrkVrt &v1, WrkVrt &v2, WrkVrt &newvrt, std::vector< const xAOD::TrackParticle * > &AllTrackList, Trk::IVKalState &istate, int robKey=0) const
 
double improveVertexChi2 (WrkVrt &vertex, std::vector< const xAOD::TrackParticle * > &allTracks, Trk::IVKalState &istate, bool ifCovV0) const
 
void selGoodTrkParticle (workVectorArrxAOD *xAODwrk, const xAOD::Vertex &primVrt) const
 
void select2TrVrt (std::vector< const xAOD::TrackParticle * > &SelectedTracks, const xAOD::Vertex &primVrt, std::map< long int, std::vector< double >> &vrt, compatibilityGraph_t &compatibilityGraph) const
 
HistsgetHists () 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...
 

Static Private Member Functions

static int notFromBC (int PDGID)
 
static const xAOD::TruthParticlegetPreviousParent (const xAOD::TruthParticle *child, int &ParentPDG)
 
static int getG4Inter (const xAOD::TrackParticle *TP)
 
static int getMCPileup (const xAOD::TrackParticle *TP)
 
static double massV0 (const std::vector< std::vector< double > > &TrkAtVrt, double massP, double massPi)
 
static double vrtRadiusError (const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr)
 
static int nTrkCommon (std::vector< WrkVrt > *WrkVrtSet, int indexV1, int indexV2)
 
static bool isPart (const std::deque< long int > &test, std::deque< long int > base)
 
static std::vector< double > estimVrtPos (int nTrk, std::deque< long int > &selTrk, std::map< long int, std::vector< double >> &vrt)
 
static double vrtVrtDist (const xAOD::Vertex &primVrt, const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr, double &signif)
 
static double vrtVrtDist2D (const xAOD::Vertex &primVrt, const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr, double &signif)
 
static double vrtVrtDist (const Amg::Vector3D &vrt1, const std::vector< double > &vrtErr1, const Amg::Vector3D &vrt2, const std::vector< double > &vrtErr2)
 
static double PntPntDist (const Amg::Vector3D &Vrt1, const Amg::Vector3D &Vrt2)
 
static double projSV_PV (const Amg::Vector3D &SV, const xAOD::Vertex &PV, const TLorentzVector &Direction)
 
static double MomProjDist (const Amg::Vector3D &SV, const xAOD::Vertex &PV, const TLorentzVector &Direction)
 
static int mostHeavyTrk (WrkVrt V, std::vector< const xAOD::TrackParticle * > AllTracks)
 
static void getPixelDiscs (const xAOD::TrackParticle *Part, int &d0Hit, int &d1Hit, int &d2Hit)
 
static int getIBLHit (const xAOD::TrackParticle *Part)
 
static int getBLHit (const xAOD::TrackParticle *Part)
 

Private Attributes

double m_w_1 {}
 
std::unique_ptr< Histsm_h
 
Gaudi::Property< long int > m_cutSctHits {this, "CutSctHits", 4 , "Remove track if it has less SCT hits" }
 
Gaudi::Property< long int > m_cutPixelHits {this, "CutPixelHits", 2, "Remove track if it has less Pixel hits"}
 
Gaudi::Property< long int > m_cutTRTHits {this, "CutTRTHits", 10, "Remove track if it has less TRT hits"}
 
Gaudi::Property< long int > m_cutSiHits {this, "CutSiHits", 8, "Remove track if it has less Pixel+SCT hits" }
 
Gaudi::Property< long int > m_cutBLayHits {this, "CutBLayHits", 0, "Remove track if it has less B-layer hits" }
 
Gaudi::Property< long int > m_cutSharedHits {this, "CutSharedHits", 1,"Reject final 2tr vertices if tracks have shared hits" }
 
Gaudi::Property< double > m_cutPt {this, "CutPt", 500., "Track Pt selection cut" }
 
Gaudi::Property< double > m_cutD0Min {this, "CutD0Min", 0., "Track minimal D0 selection cut" }
 
Gaudi::Property< double > m_cutD0Max {this, "CutD0Max", 10., "Track maximal D0 selection cut" }
 
Gaudi::Property< double > m_maxZVrt {this, "MaxZVrt", 15., "Track Z impact selection max"}
 
Gaudi::Property< double > m_minZVrt {this, "MinZVrt", 0., "Track Z impact selection min"}
 
Gaudi::Property< double > m_cutChi2 {this, "CutChi2", 5., "Track Chi2 selection cut" }
 
Gaudi::Property< double > m_trkSigCut {this, "TrkSigCut", 2.0, "Track 3D impact significance w/r primary vertex. Should be >=AntiPileupSigRCut" }
 
Gaudi::Property< float > m_vrtMassLimit {this, "VrtMassLimit", 5500., "Maximal allowed mass for found vertices" }
 
Gaudi::Property< float > m_vrt2TrMassLimit {this, "Vrt2TrMassLimit",4000.,"Maximal allowed mass for 2-track vertices" }
 
Gaudi::Property< float > m_vrt2TrPtLimit {this, "Vrt2TrPtLimit", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" }
 
Gaudi::Property< double > m_sel2VrtProbCut {this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" }
 
Gaudi::Property< double > m_globVrtProbCut {this, "GlobVrtProbCut", 0.005, "Cut on probability of any vertex for final selection" }
 
Gaudi::Property< double > m_maxSVRadiusCut {this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" }
 
Gaudi::Property< double > m_selVrtSigCut {this, "SelVrtSigCut", 3.0, "Cut on significance of 3D distance between vertex and PV" }
 
Gaudi::Property< float > m_antiPileupSigRCut {this, "AntiPileupSigRCut", 2.0, "Upper cut on significance of 2D distance between beam and perigee" }
 
Gaudi::Property< float > m_dRdZRatioCut {this, "dRdZRatioCut", 0.25, "Cut on dR/dZ ratio to remove pileup tracks" }
 
Gaudi::Property< float > m_v2tIniBDTCut {this, "v2tIniBDTCut", -0.6, "Initial BDT cut for 2track vertices selection " }
 
Gaudi::Property< float > m_v2tFinBDTCut {this, "v2tFinBDTCut", 0., "Final BDT cut for 2track vertices selection " }
 
Gaudi::Property< float > m_fastZSVCut {this, "FastZSVCut", 15., "Cut to remove SV candidates based on fast SV estimation. To save full fit CPU." }
 
Gaudi::Property< float > m_cosSVPVCut {this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" }
 
Gaudi::Property< bool > m_fillHist {this, "FillHist", false, "Fill technical histograms" }
 
Gaudi::Property< bool > m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." }
 
Gaudi::Property< bool > m_useVertexCleaning {this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" }
 
Gaudi::Property< float > m_twoTrkVtxFormingD0Cut {this, "TwoTrkVtxFormingD0Cut", 0.0, "Minimum two-track forming vertex d0 cut."}
 
Gaudi::Property< bool > m_multiWithOneTrkVrt {this, "MultiWithOneTrkVrt", true,"Allow one-track-vertex addition to already found secondary vertices"}
 
Gaudi::Property< float > m_vertexMergeCut {this, "VertexMergeCut", 4., "To allow vertex merging for MultiVertex Finder" }
 
Gaudi::Property< float > m_beampipeR {this, "BeampipeR", 24.3, "Radius of the beampipe material for aggressive material rejection" }
 
Gaudi::Property< float > m_firstPixelLayerR {this, "FirstPixelLayerR", 32.0, "Radius of the first Pixel layer" }
 
Gaudi::Property< float > m_removeTrkMatSignif {this, "removeTrkMatSignif", 0., "Significance of Vertex-TrackingMaterial distance for removal. No removal if <=0." }
 
Gaudi::Property< std::string > m_calibFileName {this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" }
 
std::unique_ptr< MVAUtils::BDTm_SV2T_BDT
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
 
ToolHandle< Trk::IExtrapolatorm_extrapolator {this,"ExtrapolatorName","Trk::Extrapolator/Extrapolator", "Name of the extrapolator tool"}
 
ToolHandle< Trk::TrkVKalVrtFitterm_fitSvc {this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool", "Name of the Vertex Fitter tool"}
 
ToolHandle< Reco::ITrackToVertexm_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex/TrackToVertex", "Name of the TrackToVertex tool"}
 
Gaudi::Property< std::string > m_augString {this, "AugmentingVersionString", "_NVSI", "Augmentation version string"}
 
double m_massPi {}
 
double m_massP {}
 
double m_massE {}
 
double m_massK0 {}
 
double m_massLam {}
 
std::string m_instanceName
 
SG::AuxElement::Decorator< char > m_is_selected
 
SG::AuxElement::Decorator< char > m_is_svtrk_final
 
SG::AuxElement::Decorator< float > m_pt_wrtSV
 
SG::AuxElement::Decorator< float > m_eta_wrtSV
 
SG::AuxElement::Decorator< float > m_phi_wrtSV
 
SG::AuxElement::Decorator< float > m_d0_wrtSV
 
SG::AuxElement::Decorator< float > m_z0_wrtSV
 
SG::AuxElement::Decorator< float > m_errP_wrtSV
 
SG::AuxElement::Decorator< float > m_errd0_wrtSV
 
SG::AuxElement::Decorator< float > m_errz0_wrtSV
 
SG::AuxElement::Decorator< float > m_chi2_toSV
 
float m_chiScale [11] {}
 
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

Definition at line 78 of file NewVrtSecInclusiveTool.h.

Member Typedef Documentation

◆ compatibilityGraph_t

using Rec::NewVrtSecInclusiveTool::compatibilityGraph_t = boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS>
private

Definition at line 308 of file NewVrtSecInclusiveTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ NewVrtSecInclusiveTool()

Rec::NewVrtSecInclusiveTool::NewVrtSecInclusiveTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 30 of file NewVrtSecInclusiveTool.cxx.

32  :
34  m_SV2T_BDT(nullptr),
36  m_is_selected("is_selected"),
37  m_is_svtrk_final("is_svtrk_final"),
38  m_pt_wrtSV("pt_wrtSV"),
39  m_eta_wrtSV("eta_wrtSV"),
40  m_phi_wrtSV("phi_wrtSV"),
41  m_d0_wrtSV("d0_wrtSV"),
42  m_z0_wrtSV("z0_wrtSV"),
43  m_errP_wrtSV("errP_wrtSV"),
44  m_errd0_wrtSV("errd0_wrtSV"),
45  m_errz0_wrtSV("errz0_wrtSV"),
46  m_chi2_toSV("chi2_toSV")
47  {
48 //
49 // Declare additional interface
50 //
51  declareInterface< IVrtInclusive >(this);
52 //
57  m_massLam = 1115.683 ;
58 
59  }

◆ ~NewVrtSecInclusiveTool()

Rec::NewVrtSecInclusiveTool::~NewVrtSecInclusiveTool ( )
virtual

Definition at line 62 of file NewVrtSecInclusiveTool.cxx.

62  {
63  ATH_MSG_DEBUG("NewVrtSecInclusiveTool destructor called");
64  }

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; }

◆ distToMatLayerSignificance()

double Rec::NewVrtSecInclusiveTool::distToMatLayerSignificance ( Vrt2Tr Vrt) const
private

Definition at line 315 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

316  {
317  const EventContext& ctx = Gaudi::Hive::currentContext();
318  if(Vrt.fitVertex.perp()<20.) return 1.e9;
319  double normP=1./Vrt.momentum.P();
320  Amg::Vector3D momentumP(Vrt.momentum.Px()*normP,Vrt.momentum.Py()*normP,Vrt.momentum.Pz()*normP);
321  Amg::Vector3D momentumN=-momentumP;
322 
323  const Trk::Layer * someLayer = nullptr;
324  const Trk::Layer * nextLayerP = nullptr;
325  const Trk::Layer * nextLayerN = nullptr;
326  const auto *volume = m_extrapolator->trackingGeometry()->lowestTrackingVolume(Vrt.fitVertex);
327  someLayer = volume->associatedLayer(Vrt.fitVertex);
328  const auto *material = someLayer->layerMaterialProperties();
329  if(material){
330  nextLayerP=someLayer;
331  } else {
332  nextLayerP = someLayer->nextLayer(Vrt.fitVertex,momentumP);
333  if(nextLayerP){ if(!nextLayerP->layerMaterialProperties())nextLayerP=nullptr; }
334  nextLayerN = someLayer->nextLayer(Vrt.fitVertex,momentumN);
335  if(nextLayerN){ if(!nextLayerN->layerMaterialProperties())nextLayerN=nullptr; }
336  }
337  momentumP *= 1.e5; //100GeV to have straight trajectory
338  double charge = 1.;
339  const Trk::Perigee pseudoVrtPart(Vrt.fitVertex, momentumP, charge, Vrt.fitVertex);
340 
341  const Trk::TrackParameters * extrapParP=nullptr; //along momentum
342  const Trk::TrackParameters * extrapParN=nullptr; //backward
343  if(nextLayerP){ extrapParP = m_extrapolator->extrapolate(ctx, pseudoVrtPart,
344  nextLayerP->surfaceRepresentation(), Trk::anyDirection, false, Trk::nonInteractingMuon).release();}
345  if(nextLayerN){ extrapParN = m_extrapolator->extrapolate(ctx, pseudoVrtPart,
346  nextLayerN->surfaceRepresentation(), Trk::anyDirection, false, Trk::nonInteractingMuon).release();}
347 
348  float distanceP=1.e9, distanceN=1.e9;
349  if(extrapParP)distanceP=PntPntDist(extrapParP->position(), Vrt.fitVertex);
350  if(extrapParN)distanceN=PntPntDist(extrapParN->position(), Vrt.fitVertex);
351  if(distanceP==1.e9 && distanceN==1.e9) return 1.e9;
352 
353  //std::pair<const Trk::TrackParameters*,const Trk::Layer*> next=
354  // m_extrapolator->extrapolateToNextActiveLayer(pseudoVrtPart,Trk::anyDirection,true,Trk::pion) ;
355 
356  double signif=1.e9;
357  std::vector<double> pntCovar={1.e-2,0.,1.e-2,0.,0.,4.e-2};
358  if(distanceP<distanceN)signif=vrtVrtDist(Vrt.fitVertex, Vrt.errorMatrix, extrapParP->position(), pntCovar);
359  else signif=vrtVrtDist(Vrt.fitVertex, Vrt.errorMatrix, extrapParN->position(), pntCovar);
360  delete extrapParP;
361  delete extrapParN;
362  return signif;
363  }

◆ estimVrtPos()

std::vector< double > Rec::NewVrtSecInclusiveTool::estimVrtPos ( int  nTrk,
std::deque< long int > &  selTrk,
std::map< long int, std::vector< double >> &  vrt 
)
staticprivate

Definition at line 365 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

366  {
367  std::vector<double> estimation(3,0.);
368  int ntsel=selTrk.size();
369  for( int i=0; i<ntsel-1; i++){
370  for( int j=i+1; j<ntsel; j++){
371  int k = selTrk[i]<selTrk[j] ? selTrk[i]*nTrk+selTrk[j] : selTrk[j]*nTrk+selTrk[i];
372  estimation[0]+=vrt.at(k)[0];
373  estimation[1]+=vrt[k][1];
374  estimation[2]+=vrt[k][2];
375  } }
376  estimation[0] /= ntsel*(ntsel-1)/2;
377  estimation[1] /= ntsel*(ntsel-1)/2;
378  estimation[2] /= ntsel*(ntsel-1)/2;
379  return estimation;
380  }

◆ 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

◆ finalize()

StatusCode Rec::NewVrtSecInclusiveTool::finalize ( )

Definition at line 251 of file NewVrtSecInclusiveTool.cxx.

252  {
253  ATH_MSG_DEBUG("NewVrtSecInclusiveTool finalize()");
254  return StatusCode::SUCCESS;
255  }

◆ findAllVertices()

std::unique_ptr< Trk::VxSecVertexInfo > Rec::NewVrtSecInclusiveTool::findAllVertices ( const std::vector< const xAOD::TrackParticle * > &  inputTracks,
const xAOD::Vertex primaryVertex 
) const
finalvirtual

Implements Rec::IVrtInclusive.

Definition at line 259 of file NewVrtSecInclusiveTool.cxx.

262  {
263  std::vector<xAOD::Vertex*> listVrtSec(0);
264 
265  if(m_fillHist) {
266  Hists& h = getHists();
267  h.m_curTup->nTrk=0;
268  h.m_curTup->n2Vrt=0;
269  h.m_curTup->nNVrt=0;
270  };
271 
272  workVectorArrxAOD * tmpVectxAOD=new workVectorArrxAOD();
273  tmpVectxAOD->inpTrk.resize(inpTrk.size());
274  std::copy(inpTrk.begin(),inpTrk.end(), tmpVectxAOD->inpTrk.begin());
276  tmpVectxAOD->beamX=beamSpotHandle->beamPos().x();
277  tmpVectxAOD->beamY=beamSpotHandle->beamPos().y();
278  tmpVectxAOD->beamZ=beamSpotHandle->beamPos().z();
279  tmpVectxAOD->tanBeamTiltX=tan(beamSpotHandle->beamTilt(0));
280  tmpVectxAOD->tanBeamTiltY=tan(beamSpotHandle->beamTilt(1));
281 
282  compatibilityGraph_t compatibilityGraph;
283  listVrtSec = getVrtSecMulti(tmpVectxAOD,primVrt,compatibilityGraph);
284 
285  for (const auto trk : tmpVectxAOD->listSelTracks) {
286  // Mark the track as selected
287  m_is_selected(*trk) = true;
289  }
290  delete tmpVectxAOD;
291 
292  for (const auto &vrt : listVrtSec) {
293  for (const auto &trk : vrt->trackParticleLinks()) {
294 
295  // Mark the track as a final track
296  m_is_svtrk_final(**trk) = true;
297 
298  // Get the perigee of the track at the vertex
299  ATH_MSG_VERBOSE(" > " << __FUNCTION__ << ": > Track index " << (*trk)->index() << ": Get the perigee of the track at the vertex." );
300  auto sv_perigee = m_trackToVertexTool->perigeeAtVertex(Gaudi::Hive::currentContext(), **trk, vrt->position() );
301  if( !sv_perigee ) {
302  ATH_MSG_WARNING(" > " << __FUNCTION__ << ": > Track index " << (*trk)->index() << ": Failed in obtaining the SV perigee!" );
303  }
304 
305  float qOverP_wrtSV = sv_perigee ? sv_perigee->parameters() [Trk::qOverP] : -FLT_MAX;
306  float theta_wrtSV = sv_perigee ? sv_perigee->parameters() [Trk::theta] : -FLT_MAX;
307  float p_wrtSV = sv_perigee ? 1.0 / std::abs( qOverP_wrtSV ) : -FLT_MAX;
308  float pt_wrtSV = sv_perigee ? p_wrtSV * sin( theta_wrtSV ) : -FLT_MAX;
309  float eta_wrtSV = sv_perigee ? -log( tan( theta_wrtSV/2. ) ) : -FLT_MAX;
310  float phi_wrtSV = sv_perigee ? sv_perigee->parameters() [Trk::phi] : -FLT_MAX;
311  float d0_wrtSV = sv_perigee ? sv_perigee->parameters() [Trk::d0] : -FLT_MAX;
312  float z0_wrtSV = sv_perigee ? sv_perigee->parameters() [Trk::z0] : -FLT_MAX;
313  float errd0_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())( Trk::d0, Trk::d0 )) : -FLT_MAX;
314  float errz0_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())( Trk::z0, Trk::z0 )) : -FLT_MAX;
315  float errP_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())( Trk::qOverP, Trk::qOverP )) : -FLT_MAX;
316 
317  m_pt_wrtSV(**trk) = pt_wrtSV;
318  m_eta_wrtSV(**trk) = eta_wrtSV;
319  m_phi_wrtSV(**trk) = phi_wrtSV;
320  m_d0_wrtSV(**trk) = d0_wrtSV;
321  m_z0_wrtSV(**trk) = z0_wrtSV;
322  m_errP_wrtSV(**trk) = errP_wrtSV;
323  m_errd0_wrtSV(**trk) = errd0_wrtSV;
324  m_errz0_wrtSV(**trk) = errz0_wrtSV;
325  }
326  }
327 
328  std::unique_ptr<Trk::VxSecVertexInfo> res = std::make_unique<Trk::VxSecVertexInfo>(Trk::VxSecVertexInfo(listVrtSec));
329 
330  if(m_fillHist){
331  Hists& h = getHists();
332  h.m_tuple->Fill();
333  };
334 
335  lockDecorations (inpTrk);
336 
337  return res;
338  }

◆ getBLHit()

int Rec::NewVrtSecInclusiveTool::getBLHit ( const xAOD::TrackParticle Part)
staticprivate

Definition at line 224 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

225  {
226  uint8_t BLhit,BLexp;
227  if(!Part->summaryValue( BLexp, xAOD::expectNextToInnermostPixelLayerHit) ) BLexp = 0;
228  if( BLexp==0 ) return -1;
229  if(!Part->summaryValue( BLhit, xAOD::numberOfNextToInnermostPixelLayerHits) ) BLhit = 0;
230  if(BLhit) return 1;
231  else return 0;
232  }

◆ getG4Inter()

int Rec::NewVrtSecInclusiveTool::getG4Inter ( const xAOD::TrackParticle TP)
staticprivate

Definition at line 294 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

294  {
296  truthParticleLinkAcc ( "truthParticleLink");
297  if( truthParticleLinkAcc.isAvailable( *TP ) ) {
299  truthParticleLinkAcc( *TP );
300  if( tplink.isValid() && HepMC::is_simulation_particle((*tplink))) return 1;
301  }
302  return 0;
303  }

◆ getHists()

NewVrtSecInclusiveTool::Hists & Rec::NewVrtSecInclusiveTool::getHists ( ) const
private

Definition at line 373 of file NewVrtSecInclusiveTool.cxx.

374  {
375  // We earlier checked that no more than one thread is being used.
376  Hists* h ATLAS_THREAD_SAFE = m_h.get();
377  return *h;
378  }

◆ getIBLHit()

int Rec::NewVrtSecInclusiveTool::getIBLHit ( const xAOD::TrackParticle Part)
staticprivate

Definition at line 215 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

216  {
217  uint8_t IBLhit,IBLexp;
218  if(!Part->summaryValue( IBLexp, xAOD::expectInnermostPixelLayerHit) ) IBLexp = 0;
219  if( IBLexp==0 ) return -1;
220  if(!Part->summaryValue( IBLhit, xAOD::numberOfInnermostPixelLayerHits) ) IBLhit = 0;
221  if(IBLhit) return 1;
222  else return 0;
223  }

◆ getIdHF()

int Rec::NewVrtSecInclusiveTool::getIdHF ( const xAOD::TrackParticle TP) const
private

Definition at line 243 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

243  {
245  truthParticleLinkAcc ( "truthParticleLink");
246  if( truthParticleLinkAcc.isAvailable(*TP) ) {
248  truthParticleLinkAcc(*TP);
249  if( !tplink.isValid() ) return 0;
250  static const SG::ConstAccessor< float >
251  truthMatchProbabilityAcc ( "truthMatchProbability" );
252  if( truthMatchProbabilityAcc( *TP ) < 0.75 ) return 0;
253  if( HepMC::is_simulation_particle((*tplink))) return 0;
254  if( (*tplink)->hasProdVtx()){
255  if( (*tplink)->prodVtx()->nIncomingParticles()==1){
256  int PDGID1=0, PDGID2=0, PDGID3=0;
257  const xAOD::TruthParticle * parTP1=getPreviousParent(*tplink, PDGID1);
258  const xAOD::TruthParticle * parTP2=nullptr;
259  int noBC1=notFromBC(PDGID1);
260  if(noBC1) parTP2 = getPreviousParent(parTP1, PDGID2);
261  int noBC2=notFromBC(PDGID2);
262  if(noBC2 && parTP2) getPreviousParent(parTP2, PDGID3);
263  int noBC3=notFromBC(PDGID3);
264  if((*tplink)->prodVtx()->perp()>1.)return 1.; //For SUSY studies
265  if(noBC1 && noBC2 && noBC3)return 0;
266  return 1; //This is a reconstructed track from B/C decays
267  } } }
268  return 0;
269  }

◆ getMCPileup()

int Rec::NewVrtSecInclusiveTool::getMCPileup ( const xAOD::TrackParticle TP)
staticprivate

Definition at line 304 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

304  {
306  truthParticleLinkAcc ( "truthParticleLink");
307  if( truthParticleLinkAcc.isAvailable( *TP ) ) {
309  truthParticleLinkAcc( *TP );
310  if( !tplink.isValid() ) return 1;
311  } else { return 1; }
312  return 0;
313  }

◆ getPixelDiscs()

void Rec::NewVrtSecInclusiveTool::getPixelDiscs ( const xAOD::TrackParticle Part,
int &  d0Hit,
int &  d1Hit,
int &  d2Hit 
)
staticprivate

Definition at line 234 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

235  {
236  uint32_t HitPattern=Part->hitPattern();
237  d0Hit=0; if( HitPattern&((1<<Trk::pixelEndCap0)) ) d0Hit=1;
238  d1Hit=0; if( HitPattern&((1<<Trk::pixelEndCap1)) ) d1Hit=1;
239  d2Hit=0; if( HitPattern&((1<<Trk::pixelEndCap2)) ) d2Hit=1;
240  }

◆ getPreviousParent()

const xAOD::TruthParticle * Rec::NewVrtSecInclusiveTool::getPreviousParent ( const xAOD::TruthParticle child,
int &  ParentPDG 
)
staticprivate

Definition at line 282 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

282  {
283  ParentPDG=0;
284  if( child->hasProdVtx() ){
285  if( child->prodVtx()->nIncomingParticles()==1 ){
286  ParentPDG = std::abs((*(child->prodVtx()->incomingParticleLinks())[0])->pdgId());
287  return *(child->prodVtx()->incomingParticleLinks())[0];
288  }
289  }
290  return nullptr;
291  }

◆ getVrtSecMulti()

std::vector< xAOD::Vertex * > Rec::NewVrtSecInclusiveTool::getVrtSecMulti ( workVectorArrxAOD inpParticlesxAOD,
const xAOD::Vertex primVrt,
compatibilityGraph_t compatibilityGraph 
) const
private

Definition at line 29 of file VrtSecMulti.cxx.

33  {
34 
35  const double probVrtMergeLimit=0.01;
36 
37  int i,j;
38  int inpNPart=xAODwrk->inpTrk.size();
39  std::vector<const xAOD::NeutralParticle*> neutralPartDummy(0);
40  ATH_MSG_DEBUG( "getVrtSecMulti() called with NPart=" << inpNPart);
41 
42  std::vector<xAOD::Vertex*> finalVertices(0);
43 
44  if( inpNPart < 2 ) { return finalVertices;} // 0,1 track => nothing to do!
45 
46  selGoodTrkParticle( xAODwrk, primVrt);
47  int nTracks = xAODwrk->listSelTracks.size();
48 
49  if( nTracks < 2 ) { return finalVertices;} // 0,1 selected track => nothing to do!
50 
51  ATH_MSG_DEBUG( "Number of selected tracks = " <<nTracks);
52 
53  if(m_fillHist){
54  Hists& h = getHists();
55  h.m_hb_ntrksel->Fill( (double) nTracks, m_w_1);
56  }
57 
58 //
59 // inpTrk[] - input track list
60 // listSelTracks[] - list of good tracks in jet for vertex search
61 //------------------------------------------------------------
62 // Initial track list ready
63 // Find 2track vertices
64 //
65 
66  std::map<long int,std::vector<double>> foundVrt2t;
67  select2TrVrt(xAODwrk->listSelTracks, primVrt, foundVrt2t, compatibilityGraph);
68 
69 //---
70  ATH_MSG_DEBUG(" Defined edges in the graph="<< num_edges(compatibilityGraph));
71  if(num_edges(compatibilityGraph)==0){ return finalVertices;} //No vertices!
72 
73 //
74 // m_Incomp[] - main vector of pointers for multivertex search
75 //-----------------------------------------------------------------------------------------------------
76 // Secondary track list is ready
77 // Creation of initial vertex set
78 //
79 
80 
81  std::unique_ptr<std::vector<WrkVrt>> wrkVrtSet = std::make_unique<std::vector<WrkVrt>>();
82  WrkVrt newvrt; newvrt.Good=true;
83  std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState();
84  StatusCode sc;
85  long int NPTR=0, nth=2; // VK nth=2 to speed up PGRAPH when it's used
86 
87 
88  std::vector< std::vector<int> > allCliques;
89  bron_kerbosch_all_cliques(compatibilityGraph, clique_visitor(allCliques));
90  for(int cq=0; cq<(int)allCliques.size();cq++){
91  newvrt.selTrk.clear();
92  NPTR=allCliques[cq].size();
93  for(i=0;i<NPTR;i++){ newvrt.selTrk.push_back(allCliques[cq][i]);}
94 //==================================================
95  xAODwrk->tmpListTracks.clear();
96  TLorentzVector vpsum;
97  for(i=0;i<NPTR;i++) {
98  xAODwrk->tmpListTracks.push_back( xAODwrk->listSelTracks.at(newvrt.selTrk[i]) );
99  vpsum += xAODwrk->listSelTracks.at(newvrt.selTrk[i])->p4();
100  }
101  std::vector<double> iniVrtPos=estimVrtPos(nTracks,newvrt.selTrk,foundVrt2t);
102  m_fitSvc->setApproximateVertex(iniVrtPos[0], iniVrtPos[1], iniVrtPos[2], *state); /*Use as starting point*/
103  sc=m_fitSvc->VKalVrtFit(xAODwrk->tmpListTracks, neutralPartDummy,
104  newvrt.vertex, newvrt.vertexMom, newvrt.vertexCharge, newvrt.vertexCov,
105  newvrt.chi2PerTrk, newvrt.trkAtVrt, newvrt.chi2,
106  *state, false);
107  if( sc.isFailure() ) continue; /* Bad fit - goto next solution */
108  ATH_MSG_VERBOSE("Found IniVertex="<<newvrt.vertex[0]<<", "<<newvrt.vertex[1]<<", "<<newvrt.vertex[2]);
109  ATH_MSG_VERBOSE("with Chi2="<<newvrt.chi2<<" Ntrk="<<NPTR<<" trk1,2="<<newvrt.selTrk[0]<<", "<<newvrt.selTrk[1]);
110  if(NPTR==2 && newvrt.chi2>10.) continue; /* Bad 2track vertex */
111  if(newvrt.chi2PerTrk.size()==2) newvrt.chi2PerTrk[0]=newvrt.chi2PerTrk[1]=newvrt.chi2/2.;
112  newvrt.Good = true;
113  newvrt.projectedVrt=MomProjDist(newvrt.vertex, primVrt, newvrt.vertexMom); //3D SV-PV distance
114  wrkVrtSet->push_back(newvrt);
115  }
116  std::sort(wrkVrtSet->begin(),wrkVrtSet->end(),[](WrkVrt a, WrkVrt b){return a.selTrk.size()>b.selTrk.size();});
117 //==================================================================================
118 // boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS>::vertex_iterator vertexIt, vertexEnd;
119 // boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS>::adjacency_iterator neighbourIt, neighbourEnd;
120 // tie(vertexIt, vertexEnd) = vertices(compatibilityGraph);
121 // for (; vertexIt != vertexEnd; ++vertexIt) { std::cout << *vertexIt << " is connected with ";
122 // tie(neighbourIt, neighbourEnd) = adjacent_vertices(*vertexIt, compatibilityGraph);
123 // for (; neighbourIt != neighbourEnd; ++neighbourIt) std::cout << *neighbourIt << " "; std::cout << "\n"; }
124 //==================================================================================
125  if((*wrkVrtSet).empty())return finalVertices;
126  if(msgLvl(MSG::DEBUG))printWrkSet(wrkVrtSet.get(),"Initial Vertices");
127  //
128  //--Count track participation in different vertices
129  std::vector<int> trkNPairs(nTracks,0);
130  for(auto &vrt : (*wrkVrtSet)){
131  int ntInV=vrt.selTrk.size()-1;
132  for(auto &trk : vrt.selTrk)trkNPairs.at(trk) += ntInV;
133  }
134 //
135 //- Resolve all overlapped vertices
136 //
137  state = m_fitSvc->makeState();
138  std::multimap<double,std::pair<int,int>> vrtWithCommonTrk;
139  while(true){
140  int nSoluI=(*wrkVrtSet).size();
141  vrtWithCommonTrk.clear();
142  unsigned int nTComMax=0;
143  for(int iv=0; iv<nSoluI-1; iv++ ){
144  if(!(*wrkVrtSet)[iv].Good) continue;
145  if( (*wrkVrtSet)[iv].selTrk.size()<nTComMax) continue; // Optimisation. Only biggest overlap matters
146  for(int jv=iv+1; jv<nSoluI; jv++){
147  if(!(*wrkVrtSet)[jv].Good) continue;
148  if( (*wrkVrtSet)[jv].selTrk.size()<nTComMax) continue; // Optimisation. Only biggest overlap matters
149  unsigned int nTCom=nTrkCommon( wrkVrtSet.get(), iv, jv);
150  if(!nTCom) continue;
151  if(nTCom<nTComMax) continue;
152  double sumChi2=(*wrkVrtSet)[iv].chi2+(*wrkVrtSet)[jv].chi2;
153  sumChi2=std::min(sumChi2,999.)*1.e-3;
154  vrtWithCommonTrk.emplace(nTCom+sumChi2,std::make_pair(iv,jv));
155  nTComMax=std::max(nTComMax,nTCom);
156  } }
157  if(vrtWithCommonTrk.empty())break;
158  //============================== DEBUG output
159  //for(auto ku : vrtWithCommonTrk)std::cout<<" nCom="<<ku.first<<" v1="<<ku.second.first<<" v2="<<ku.second.second<<'\n';
160  //if(msgLvl(MSG::DEBUG))printWrkSet(wrkVrtSet.get(),"Overlapped Vertex Cleaning");
161  //===========================================
162  for( const auto& ov : std::ranges::reverse_view(vrtWithCommonTrk)) {
163  WrkVrt & v1 = (*wrkVrtSet)[ov.second.first];
164  WrkVrt & v2 = (*wrkVrtSet)[ov.second.second];
165  if(!v1.Good)continue; //----One of the vertices is already preocessed
166  if(!v2.Good)continue;
167  //--Recheck amount of common tracks
168  unsigned int nTCom=nTrkCommon( wrkVrtSet.get(), ov.second.first, ov.second.second);
169  if(nTCom<nTComMax)continue; //----One of the vertices is already preocessed
170  //--First check if one vertex is fully contained in another
171  if( nTCom==v1.selTrk.size() || nTCom==v2.selTrk.size() ){
172  if(nTCom==v1.selTrk.size()){v1.Good = false; continue;}
173  if(nTCom==v2.selTrk.size()){v2.Good = false; continue;}
174  }
175  //--Then check if 2 vertices with common tracks can be simply merged
176  if( nTCom>1 && TMath::Prob( v1.chi2, 2*v1.selTrk.size()-3) > probVrtMergeLimit
177  && TMath::Prob( v2.chi2, 2*v2.selTrk.size()-3) > probVrtMergeLimit){
178  double prbV=mergeAndRefitVertices( v1, v2, newvrt, xAODwrk->listSelTracks, *state);
179  if(prbV>probVrtMergeLimit){
180  v1.Good = false; v2.Good = false;
181  newvrt.Good = true;
182  newvrt.projectedVrt=MomProjDist(newvrt.vertex, primVrt, newvrt.vertexMom); //3D SV-PV distance
183  std::swap(v1,newvrt); //Replace v1 by new vertex
184  continue;
185  } }
186  //--If not mergeable - refine them
187  refineVerticesWithCommonTracks( v1, v2, xAODwrk->listSelTracks, *state);
188  }
189  }
190  if(m_fillHist){
191  int cvgood=0; for(const auto& vrt:(*wrkVrtSet)) if(vrt.Good)cvgood++;
192  Hists& h = getHists();
193  h.m_hb_rawVrtN->Fill( (float)cvgood, m_w_1);
194  }
195 //
196 //-Clean duplicated 1track vertices if they exist
197 //
199  for(auto &v1t : (*wrkVrtSet)){
200  if(v1t.selTrk.size()!=1 || !v1t.Good)continue;
201  int ind_t=v1t.selTrk[0];
202  if(trkNPairs[ind_t]<2){ v1t.Good=false; continue; } //Remove 1tr-vertex if track crosses only one other track
203  if( xAODwrk->listSelTracks[ind_t]->pt()<m_cutPt*2){ v1t.Good=false; continue; }; //Tighten track_pt cut for 1-track vertex
204  for(auto &vrt :(*wrkVrtSet)){ // Check if the track is present in another vertex, including other 1-track ones
205  if(!vrt.Good || &v1t==&vrt)continue;
206  if(std::find(vrt.selTrk.begin(),vrt.selTrk.end(),ind_t) != vrt.selTrk.end()){ v1t.Good=false; break; }
207  } }
208  }
209 //
210 //-Remove all bad vertices from the working set
211 //
212  int tmpV=0; while( tmpV<(int)(*wrkVrtSet).size() )if( !(*wrkVrtSet)[tmpV].Good ) { (*wrkVrtSet).erase((*wrkVrtSet).begin()+tmpV);} else {tmpV++;}
213  if((*wrkVrtSet).empty())return finalVertices;
214  if(msgLvl(MSG::DEBUG))printWrkSet(wrkVrtSet.get(),"Intermediate Vertices");
215  for( auto &tmpV : (*wrkVrtSet) ) tmpV.projectedVrt=MomProjDist(tmpV.vertex, primVrt, tmpV.vertexMom ); //Setup ProjectedVrt
216 //----------------------------------------------------------------------------
217 
218 //----------------------------------------------------------------------------
219 //
220 // Final check/merge for close vertices
221 //
222  int foundV1=-1, foundV2=-1;
223  std::vector<double> checkedDst(0);
224  double minDistVV=minVrtVrtDist( wrkVrtSet.get(), foundV1, foundV2, checkedDst); //recalculate VV distances
225  if(m_fillHist){
226  Hists& h = getHists();
227  h.m_hb_distVV->Fill( minDistVV, m_w_1);
228  }
229  while ( minDistVV < m_vertexMergeCut) {
230  if(foundV1<foundV2) { int tmp=foundV1; foundV1=foundV2; foundV2=tmp;}
231  double probV=mergeAndRefitVertices( (*wrkVrtSet)[foundV1], (*wrkVrtSet)[foundV2], newvrt, xAODwrk->listSelTracks, *state, 0);
232  ATH_MSG_DEBUG( "Merged vertex prob=" << probV<<" Vrt1="<<foundV1<<" Vrt2="<<foundV2<<" dst="<<minDistVV);
233  if(probV<probVrtMergeLimit){ //--- If merged vertex is bad - try to remove the worst track
234  int pos=std::max_element(newvrt.chi2PerTrk.begin(),newvrt.chi2PerTrk.end())-newvrt.chi2PerTrk.begin();
235  newvrt.detachedTrack=newvrt.selTrk[pos];
236  newvrt.selTrk.erase(newvrt.selTrk.begin()+pos);
237  probV = refitVertex( newvrt, xAODwrk->listSelTracks, *state, false);
238  ATH_MSG_DEBUG( "Attempt to improve prob=" << probV);
239  }
240  if(probV>probVrtMergeLimit && newvrt.vertexMom.M()<m_vrtMassLimit){ // Good merged vertex found
241  newvrt.projectedVrt=MomProjDist(newvrt.vertex, primVrt, newvrt.vertexMom);
242  std::swap((*wrkVrtSet)[foundV1],newvrt);
243  (*wrkVrtSet)[foundV2].Good=false; //Drop vertex
244  (*wrkVrtSet)[foundV2].selTrk.clear(); //Clean dropped vertex
245  } else checkedDst.push_back(minDistVV);
246  minDistVV=minVrtVrtDist( wrkVrtSet.get(), foundV1, foundV2, checkedDst);
247  }
248 //
249 // Try to improve vertices with big Chi2 if something went wrong. Just precaution.
250  for(int iv=0; iv<(int)wrkVrtSet->size(); iv++) {
251  if(!(*wrkVrtSet)[iv].Good ) continue; //don't work on vertex which is already bad
252  if( (*wrkVrtSet)[iv].selTrk.size()<3 ) continue;
253  double tmpProb=TMath::Prob( (*wrkVrtSet)[iv].chi2, 2*(*wrkVrtSet)[iv].selTrk.size()-3 ); //Chi2 of the original vertex
254  if(tmpProb<m_globVrtProbCut){
255  ATH_MSG_DEBUG( "BAD vertex found prob=" << tmpProb);
256  tmpProb=improveVertexChi2( (*wrkVrtSet)[iv], xAODwrk->listSelTracks, *state, false);
257  (*wrkVrtSet)[iv].projectedVrt=MomProjDist((*wrkVrtSet)[iv].vertex, primVrt, (*wrkVrtSet)[iv].vertexMom);
258  }
259  }
260 //
261 //-Modify too heavy vertices
262  for(auto & iv : (*wrkVrtSet)){
263  if( iv.vertexMom.M()>m_vrtMassLimit ) {
264  ATH_MSG_DEBUG( "Heavy vertex found Mass=" << iv.vertexMom.M());
265  int it_bad=mostHeavyTrk(iv,xAODwrk->listSelTracks);
266  if(it_bad>-1){
267  iv.selTrk.erase( iv.selTrk.begin() + it_bad );
268  refitVertex(iv, xAODwrk->listSelTracks, *state, false);
269  iv.projectedVrt=MomProjDist(iv.vertex, primVrt, iv.vertexMom);
270  } } }
271 //--------------------------------------------------------------------------------------------------------
272 // Final vertex selection/cleaning
273 //
274  double signif3D=0., signif2D=0.;
275 
276 //----- Vertices with >1 tracks
277  for(int iv=0; iv<(int)wrkVrtSet->size(); iv++) {
278  WrkVrt & curVrt=(*wrkVrtSet)[iv];
279  nth=(*wrkVrtSet)[iv].selTrk.size();
280  if(nth == 1) continue; // 1track vertices for later...
281  if(!curVrt.Good ) continue; //don't work on vertex which is already bad
282  (*wrkVrtSet)[iv].Good = false; /* Make all vertices bad for futher selection */
283  if(nth < 1) continue; /* Definitely bad vertices */
284  if((*wrkVrtSet)[iv].projectedVrt<0.) continue; /* Remove vertices behind primary one */
285  if( TMath::Prob( curVrt.chi2, 2*nth-3)<m_globVrtProbCut) continue; /* Bad Chi2 of refitted vertex */
286 //-----------------------------------------------------------------------------------------
287  vrtVrtDist(primVrt,curVrt.vertex, curVrt.vertexCov, signif3D);
288  if(m_fillHist){
289  Hists& h = getHists();
290  if(nth==2 && curVrt.vertexCharge==0) h.m_hb_massPiPi1->Fill(curVrt.vertexMom.M(), m_w_1);
291  h.m_hb_sig3DTot->Fill( signif3D, m_w_1);
292  if(nth==2)h.m_hb_sig3D2tr->Fill( signif3D, m_w_1);
293  if(nth >2)h.m_hb_sig3DNtr->Fill( signif3D, m_w_1);
294  }
295 //
296 //--- Check V0s and conversions. Necessity must be checked in physics applications
297 #if 0
298  if(nth==2 && curVrt.vertexCharge==0 && curVrt.detachedTrack<0){
299  double mass_PiPi = curVrt.vertexMom.M();
300  double mass_PPi = massV0(curVrt.trkAtVrt,m_massP,m_massPi);
301  double mass_EE = massV0(curVrt.trkAtVrt,m_massE,m_massE);
302  if(m_fillHist){
303  Hists& h = getHists();
304  h.m_hb_massPiPi->Fill( mass_PiPi, m_w_1);
305  h.m_hb_massPPi ->Fill( mass_PPi, m_w_1);
306  if( curVrt.vertex.perp()>20.)h.m_hb_massEE ->Fill( mass_EE, m_w_1);
307  }
308  if( std::abs(mass_PiPi-m_massK0) < 22.) continue;
309  if( std::abs(mass_PPi-m_massLam) < 8.) continue;
310  if( mass_EE < 60. && curVrt.vertex.perp() > 20.) continue;
311  }
312 #endif
313 //---
314  if(signif3D<m_selVrtSigCut) continue; //Main PV-SV distance quality cut
315  if(curVrt.vertex.perp() > m_maxSVRadiusCut) continue; // Too far from interaction point
316  curVrt.Good = true; /* Vertex is absolutely good */
317  }
318  if(msgLvl(MSG::DEBUG))printWrkSet(wrkVrtSet.get(),"Final Vertices");
319 //-------------------------------------------
320 // Debug ntuple filling and BDT application
321 //
322  std::vector<double> impact,impactError;
323  for(int iv=0; iv<(int)wrkVrtSet->size(); iv++) {
324  WrkVrt & curVrt=(*wrkVrtSet)[iv];
325  nth=curVrt.selTrk.size();
326  if(!curVrt.Good || nth<2) continue;
327  double minPtT=1.e6, minSig3DT=1.e6, maxSig3DT=0.;
328  int ntrkBC=0,ntrkI=0,sumIBLHits=0,sumBLHits=0;
329  for(i=0;i<nth;i++) {
330  j=curVrt.selTrk[i]; //Track number
331  minPtT=std::min( minPtT, xAODwrk->listSelTracks[j]->pt());
332  m_fitSvc->VKalGetImpact(xAODwrk->listSelTracks[j], primVrt.position(), 1, impact, impactError);
333  double SigR2 = impact[0]*impact[0]/impactError[0];
334  double SigZ2 = impact[1]*impact[1]/impactError[2];
335  minSig3DT=std::min( minSig3DT, sqrt( SigR2 + SigZ2) );
336  maxSig3DT=std::max( maxSig3DT, sqrt( SigR2 + SigZ2) );
337  sumIBLHits += std::max(getIBLHit(xAODwrk->listSelTracks[j]),0);
338  sumBLHits += std::max(getBLHit(xAODwrk->listSelTracks[j]),0);
339  if(m_fillHist) {
340  ntrkBC += getIdHF(xAODwrk->listSelTracks[j]);
341  ntrkI += getG4Inter(xAODwrk->listSelTracks[j]);
342  }
343  }
344  float vProb=TMath::Prob(curVrt.chi2, 2*nth-3);
345  float cosSVPVM=projSV_PV(curVrt.vertex, primVrt, curVrt.vertexMom);
346  float vrtR=curVrt.vertex.perp();
347  TLorentzVector SVPV(curVrt.vertex.x()-primVrt.x(),curVrt.vertex.y()-primVrt.y(),curVrt.vertex.z()-primVrt.z(), 10.);
348  if(m_fillHist){
349  Hists& h = getHists();
350  if( nth>1 ){
351  vrtVrtDist(primVrt,curVrt.vertex, curVrt.vertexCov, signif3D);
352  float Dist2D=vrtVrtDist2D(primVrt,curVrt.vertex, curVrt.vertexCov, signif2D);
353  h.m_curTup->NVrtTrk [h.m_curTup->nNVrt] = nth;
354  h.m_curTup->NVrtTrkHF [h.m_curTup->nNVrt] = ntrkBC;
355  h.m_curTup->NVrtTrkI [h.m_curTup->nNVrt] = ntrkI;
356  h.m_curTup->NVrtProb [h.m_curTup->nNVrt] = vProb;
357  h.m_curTup->NVrtSig3D [h.m_curTup->nNVrt] = signif3D;
358  h.m_curTup->NVrtSig2D [h.m_curTup->nNVrt] = signif2D;
359  h.m_curTup->NVrtDist2D[h.m_curTup->nNVrt] = vrtR<20. ? Dist2D : vrtR;
360  h.m_curTup->NVrtM [h.m_curTup->nNVrt] = curVrt.vertexMom.M();
361  h.m_curTup->NVrtPt [h.m_curTup->nNVrt] = curVrt.vertexMom.Pt();
362  h.m_curTup->NVrtEta [h.m_curTup->nNVrt] = SVPV.Eta();
363  h.m_curTup->NVrtIBL [h.m_curTup->nNVrt] = sumIBLHits;
364  h.m_curTup->NVrtBL [h.m_curTup->nNVrt] = sumBLHits;
365  h.m_curTup->NVrtCosSPM[h.m_curTup->nNVrt] = cosSVPVM;
366  h.m_curTup->NVrtCh [h.m_curTup->nNVrt] = curVrt.vertexCharge;
367  h.m_curTup->NVMinPtT [h.m_curTup->nNVrt] = minPtT;
368  h.m_curTup->NVMinS3DT [h.m_curTup->nNVrt] = minSig3DT;
369  h.m_curTup->NVrtBDT [h.m_curTup->nNVrt] = 1.1;
370  h.m_curTup->NVrtHR1 [h.m_curTup->nNVrt] = xAODwrk->listSelTracks[curVrt.selTrk[0]]->radiusOfFirstHit();
371  h.m_curTup->NVrtHR2 [h.m_curTup->nNVrt] = xAODwrk->listSelTracks[curVrt.selTrk[1]]->radiusOfFirstHit();
372  if( h.m_curTup->nNVrt < DevTuple::maxNVrt-1 )h.m_curTup->nNVrt++;
373  }
374  }
375 //-------------------BDT based rejection
376  if(nth==2){
377  float curVrtPt=std::min(curVrt.vertexMom.Pt(), (double)m_vrt2TrPtLimit);
378  float rhit0=xAODwrk->listSelTracks[curVrt.selTrk[0]]->radiusOfFirstHit();
379  float rhit1=xAODwrk->listSelTracks[curVrt.selTrk[1]]->radiusOfFirstHit();
380  std::vector<float> VARS(10);
381  VARS[0]=vProb;
382  VARS[1]=log(curVrtPt);
383  VARS[2]=log(std::max(minPtT,m_cutPt.value()));
384  VARS[3]=log(vrtR<20. ? SVPV.Perp() : vrtR);
385  VARS[4]=log(std::max(minSig3DT,m_trkSigCut.value()));
386  VARS[5]=log(maxSig3DT);
387  VARS[6]=curVrt.vertexMom.M();
388  VARS[7]=sqrt(std::abs(1.-cosSVPVM*cosSVPVM));
389  VARS[8]=SVPV.Eta();
390  VARS[9]=std::max(rhit0,rhit1);
391  float wgtSelect=m_SV2T_BDT->GetGradBoostMVA(VARS);
392  curVrt.BDT=wgtSelect;
393  if(m_fillHist){
394  Hists& h = getHists();
395  h.m_hb_fakeSVBDT->Fill(wgtSelect,1.);
396  h.m_curTup->NVrtBDT[h.m_curTup->nNVrt-1] = wgtSelect;
397  }
398  if(wgtSelect<m_v2tFinBDTCut) {
399  curVrt.Good = false; // Disable 2-track vertex with bad BDT score
400  if(m_multiWithOneTrkVrt){ // Check if linked 1-track vertex exists and disable it
401  for(auto it : curVrt.selTrk){
402  for(auto &vtmp : (*wrkVrtSet)){
403  if(vtmp.selTrk.size()!=1 || (!vtmp.Good)) continue;
404  if(it==vtmp.detachedTrack)vtmp.Good=false;
405  } } }
406  }
407  }
408  } //End vertex set loop
409 //
410 //-- Debug ntuple for 1track vertex is filled here
411 //
413  Hists& h = getHists();
414  for(auto & vrt : (*wrkVrtSet)) {
415  if( !vrt.Good || vrt.selTrk.size() != 1 ) continue; // Good 1track vertices
416  const auto *xaodtp=xAODwrk->listSelTracks[vrt.selTrk[0]];
417  m_fitSvc->VKalGetImpact(xaodtp, primVrt.position(), 1, impact, impactError);
418  double SigR2 = std::abs(impact[0]*impact[0]/impactError[0]);
419  double SigZ2 = std::abs(impact[1]*impact[1]/impactError[2]);
420  float dist2D=vrtVrtDist2D(primVrt,vrt.vertex, vrt.vertexCov, signif2D);
421  h.m_curTup->NVrtTrk [h.m_curTup->nNVrt] = 1;
422  h.m_curTup->NVrtTrkHF [h.m_curTup->nNVrt] = getIdHF(xaodtp);
423  h.m_curTup->NVrtProb [h.m_curTup->nNVrt] = trkNPairs[vrt.selTrk[0]];
424  h.m_curTup->NVrtSig3D [h.m_curTup->nNVrt] = 0.;
425  h.m_curTup->NVrtSig2D [h.m_curTup->nNVrt] = signif2D;
426  h.m_curTup->NVrtDist2D[h.m_curTup->nNVrt] = dist2D;
427  h.m_curTup->NVrtM [h.m_curTup->nNVrt] = vrt.vertexMom.M();
428  h.m_curTup->NVrtPt [h.m_curTup->nNVrt] = vrt.vertexMom.Pt();
429  h.m_curTup->NVrtCosSPM[h.m_curTup->nNVrt] = 0.;
430  h.m_curTup->NVrtCh [h.m_curTup->nNVrt] = vrt.vertexCharge;
431  h.m_curTup->NVMinPtT [h.m_curTup->nNVrt] = xaodtp->pt();
432  h.m_curTup->NVMinS3DT [h.m_curTup->nNVrt] = sqrt(SigR2 + SigZ2);
433  h.m_curTup->NVrtBDT [h.m_curTup->nNVrt] = 1.1;
434  h.m_curTup->NVrtIBL [h.m_curTup->nNVrt] = std::max(getIBLHit(xaodtp),0);
435  h.m_curTup->NVrtBL [h.m_curTup->nNVrt] = std::max(getBLHit (xaodtp),0);
436  if( h.m_curTup->nNVrt < DevTuple::maxNVrt-1 )h.m_curTup->nNVrt++;
437  } }
438 //-------------------------------------------
439 //Sorting and check
440  std::multimap<double,WrkVrt,std::greater<double>> goodVertexMap;
441  int nNtrVrt=0;
442  for(auto & iv : (*wrkVrtSet) ) {
443  nth=iv.selTrk.size();
444  if(nth==1)iv.BDT=-2.; //To move 1-track vertices to the end of the vertex list later
445  double selector=iv.BDT;
446  if(nth==1) selector=iv.BDT+std::min(iv.vertexMom.Pt()*1.e-5,1.);
447  else if(nth>2) selector=iv.BDT+iv.vertexMom.M()*1.e-5;
448  if( iv.Good && nth>0 ) {
449  goodVertexMap.emplace(selector,iv); // add it and sort in the map
450  if(nth>1)nNtrVrt++;
451  }
452  }
453  if(nNtrVrt==0){ //--- No good vertices at all
454  if(m_fillHist) {
455  Hists& h = getHists();
456  h.m_curTup->nNVrt=0;
457  }
458  return finalVertices;
459  }
460 //
461 //-------------------------------------------
462 // Final vertex refit for full covariance matrix and xAOD::Vertex creation
463 //
464  static const SG::AuxElement::Decorator<float> wgtBDT("wgtBDT");
465  static const SG::AuxElement::Decorator<int> nTrksDec("nTracks");
466  static const SG::AuxElement::Decorator<int> vChrgTot("vCharge");
467  int n1trVrt=0; // Final number of good 1-track vertices
468  for(auto & iv : goodVertexMap){
469  WrkVrt & curVrt=iv.second;
470  nth=curVrt.selTrk.size();
471  xAODwrk->tmpListTracks.clear();
472  for(auto t : curVrt.selTrk)xAODwrk->tmpListTracks.push_back( xAODwrk->listSelTracks[t] );
473  if(m_fillHist){
474  Hists& h = getHists();
475  h.m_hb_totmass->Fill(curVrt.vertexMom.M(), m_w_1);
476  h.m_hb_r2d->Fill( curVrt.vertex.perp(), m_w_1);
477  }
478 //--- Re-fit with full error matrix and xAOD::Vertex creation
479  xAOD::Vertex * tmpVertex=nullptr;
480  if(nth>1){ //-- Common case with full refit
481  tmpVertex=m_fitSvc->fit(xAODwrk->tmpListTracks,curVrt.vertex,*state);
482  } else if(nth==1){ //-- Special case for 1-track vertex
483  tmpVertex=new (std::nothrow) xAOD::Vertex();
484  if(!tmpVertex)continue;
485  tmpVertex->makePrivateStore();
486  tmpVertex->setPosition(curVrt.vertex);
487  std::vector<float> floatErrMtx(6);
488  for(int i=0; i<6; i++) floatErrMtx[i]=curVrt.vertexCov[i];
489  tmpVertex->setCovariance(floatErrMtx);
490  tmpVertex->setFitQuality(curVrt.chi2, (float)(nth*2-3));
491  std::vector<Trk::VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex(); tmpVTAV.clear();
492  AmgSymMatrix(5) CovMtxP;
493  CovMtxP.setIdentity();
494  Trk::Perigee * tmpMeasPer = new (std::nothrow) Trk::Perigee( 0.,0.,
495  curVrt.trkAtVrt[0][0],
496  curVrt.trkAtVrt[0][1],
497  curVrt.trkAtVrt[0][2],
498  Trk::PerigeeSurface(curVrt.vertex),
499  std::move(CovMtxP) );
500  tmpVTAV.emplace_back( 1., tmpMeasPer );
501  ElementLink<xAOD::TrackParticleContainer> TEL; TEL.setElement( xAODwrk->tmpListTracks[0] );
502  const xAOD::TrackParticleContainer* cont = (const xAOD::TrackParticleContainer* ) (xAODwrk->tmpListTracks[0]->container() );
503  TEL.setStorableObject(*cont);
504  tmpVertex->addTrackAtVertex(TEL,1.);
505  n1trVrt++;
506  }
507  if(tmpVertex){
508  wgtBDT (*tmpVertex) =curVrt.BDT;
509  nTrksDec(*tmpVertex) =curVrt.selTrk.size();
510  vChrgTot(*tmpVertex) =curVrt.vertexCharge;
511  tmpVertex->setVertexType(xAOD::VxType::SecVtx);
512  finalVertices.push_back(tmpVertex);
513  for (int ind=0; ind<nth; ind++) {
514  m_chi2_toSV(*xAODwrk->listSelTracks[curVrt.selTrk[ind]]) = curVrt.chi2PerTrk[ind] > FLT_MAX ? FLT_MAX : curVrt.chi2PerTrk[ind];
515  }
516  }
517  }
518  if(m_fillHist){
519  Hists& h = getHists();
520  h.m_hb_goodvrtN->Fill( finalVertices.size()+0.1, m_w_1);
521  h.m_hb_goodvrt1N->Fill( n1trVrt+0.1, m_w_1);
522  }
523 //-----------------------------------------------------------------------------------
524 // Saving of results
525 //
526  return finalVertices;
527 
528  }

◆ improveVertexChi2()

double Rec::NewVrtSecInclusiveTool::improveVertexChi2 ( WrkVrt vertex,
std::vector< const xAOD::TrackParticle * > &  allTracks,
Trk::IVKalState istate,
bool  ifCovV0 
) const
private

Definition at line 195 of file MultiUtilities.cxx.

199  {
200 
201  int nTrk=vertex.selTrk.size();
202  if( nTrk<2 )return 0.;
203  double prob=TMath::Prob( vertex.chi2, 2*nTrk-3);
204  //
205  //----Start track removal iterations
206  while(prob<0.01){
207  nTrk=vertex.selTrk.size();
208  if(nTrk==2)return prob;
209  int selT=0;
210  for(int i=0; i<nTrk; i++){ if( vertex.chi2PerTrk[i]>vertex.chi2PerTrk[selT]) selT=i; }
211  vertex.detachedTrack=vertex.selTrk[selT];
212  vertex.selTrk.erase( vertex.selTrk.begin() + selT ); //remove track
213  prob = refitVertex( vertex, allTrackList, istate, ifCovV0);
214  if(prob<0.)return 0.;
215  }
216  return prob;
217  }

◆ initialize()

StatusCode Rec::NewVrtSecInclusiveTool::initialize ( )

Definition at line 67 of file NewVrtSecInclusiveTool.cxx.

67  {
68  ATH_MSG_DEBUG( "Initialising NewVrtSecInclusiveTool" );
69  ATH_CHECK( m_extrapolator.retrieve() );
70  ATH_CHECK( m_trackToVertexTool.retrieve() );
72  ATH_CHECK( m_fitSvc.retrieve() );
73  ATH_MSG_DEBUG("NewVrtSecInclusiveTool TrkVKalVrtFitter found");
74 
86 
87 //------------------------------------------
88 //
89  if(m_fillHist){
91  ATH_MSG_FATAL("Filling histograms not supported in MT jobs.");
92  return StatusCode::FAILURE;
93  }
94 
95  SmartIF<ITHistSvc> hist_root{service("THistSvc")};
96  if( !hist_root ) ATH_MSG_DEBUG("Could not find THistSvc service");
97  else ATH_MSG_DEBUG("NewVrtSecInclusiveTool Histograms found");
98  std::string histDir;
99  histDir="/NVSI/stat/MultiSVrt"+m_instanceName+"/";
100 
101  m_h = std::make_unique<Hists>();
102  ATH_CHECK( m_h->book (*hist_root, histDir) );
103 
104  m_w_1 = 1.;
105  }
106 
107 //--------------------------------------------------------
108  //std::string fileName="NewVrtSecInclusiveTool/Fake2TrVertexReject.MVA.v01.root"; ///For local calibration file
109  //std::string rootFilePath = PathResolver::find_file(fileName, "DATAPATH"); ///
110  std::string rootFilePath = PathResolver::find_calib_file("NewVrtSecInclusiveTool/"+m_calibFileName);
111  TFile* rootFile = TFile::Open(rootFilePath.c_str(), "READ");
112  if (!rootFile) {
113  ATH_MSG_FATAL("Could not retrieve root file: " << m_calibFileName);
114  return StatusCode::FAILURE;
115  }
116  TTree * training = (TTree*)rootFile->Get("BDT");
117  m_SV2T_BDT = std::make_unique<MVAUtils::BDT>(training);
118 //--------------------------------------------------------
119  return StatusCode::SUCCESS;
120 
121  }

◆ 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.

◆ interfaceID()

static const InterfaceID& Rec::IVrtInclusive::interfaceID ( )
inlinestaticinherited

Definition at line 43 of file IVrtInclusive.h.

43 { return IID_IVrtInclusive;}

◆ isPart()

bool Rec::NewVrtSecInclusiveTool::isPart ( const std::deque< long int > &  test,
std::deque< long int >  base 
)
staticprivate

Definition at line 252 of file MultiUtilities.cxx.

254  {
255  for (long int trk : test)
256  if(std::find(base.begin(), base.end(), trk) == base.end()) return false; //element not found => test is not part of base
257  return true;
258  }

◆ lockDecorations()

void Rec::NewVrtSecInclusiveTool::lockDecorations ( const std::vector< const xAOD::TrackParticle * > &  inpTrk) const
private

Definition at line 341 of file NewVrtSecInclusiveTool.cxx.

342  {
343  // We may have track from several containers. Use this to keep track
344  // of which ones we've processed. We only expect a few distinct ones,
345  // so just use a vector.
346  std::vector<const SG::AuxVectorData*> containers;
347  containers.reserve (16);
348 
349  for (const xAOD::TrackParticle* t : inpTrk) {
350  const SG::AuxVectorData* c = t->container();
351  if (c && std::find (containers.begin(), containers.end(), c) == containers.end())
352  {
353  containers.push_back (c);
354  // Ok because we just made these decorations.
356  c_nc->lockDecoration (m_is_selected.auxid());
357  c_nc->lockDecoration (m_is_svtrk_final.auxid());
358  c_nc->lockDecoration (m_pt_wrtSV.auxid());
359  c_nc->lockDecoration (m_eta_wrtSV.auxid());
360  c_nc->lockDecoration (m_phi_wrtSV.auxid());
361  c_nc->lockDecoration (m_d0_wrtSV.auxid());
362  c_nc->lockDecoration (m_z0_wrtSV.auxid());
363  c_nc->lockDecoration (m_errP_wrtSV.auxid());
364  c_nc->lockDecoration (m_errd0_wrtSV.auxid());
365  c_nc->lockDecoration (m_errz0_wrtSV.auxid());
366  c_nc->lockDecoration (m_chi2_toSV.auxid());
367  }
368  }
369  }

◆ massV0()

double Rec::NewVrtSecInclusiveTool::massV0 ( const std::vector< std::vector< double > > &  TrkAtVrt,
double  massP,
double  massPi 
)
staticprivate

Definition at line 176 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

179  {
180  double ap1i=std::abs(TrkAtVrt[0][2]); double ap2i=std::abs(TrkAtVrt[1][2]);
181  CxxUtils::sincos phi1(TrkAtVrt[0][0]);
182  CxxUtils::sincos theta1(TrkAtVrt[0][1]);
183  CxxUtils::sincos phi2(TrkAtVrt[1][0]);
184  CxxUtils::sincos theta2(TrkAtVrt[1][1]);
185  double px = phi1.cs * theta1.sn * ap1i
186  + phi2.cs * theta2.sn * ap2i;
187  double py = phi1.sn * theta1.sn * ap1i
188  + phi2.sn * theta2.sn * ap2i;
189  double pz = theta1.cs * ap1i
190  + theta2.cs * ap2i;
191  double ee= (ap1i > ap2i) ?
192  (std::sqrt(ap1i*ap1i+massP*massP)+std::sqrt(ap2i*ap2i+massPi*massPi)):
193  (std::sqrt(ap2i*ap2i+massP*massP)+std::sqrt(ap1i*ap1i+massPi*massPi));
194  double test=(ee-pz)*(ee+pz)-px*px-py*py;
195  return test>0 ? std::sqrt(test) : 0.;
196  }

◆ mergeAndRefitVertices()

double Rec::NewVrtSecInclusiveTool::mergeAndRefitVertices ( WrkVrt v1,
WrkVrt v2,
WrkVrt newvrt,
std::vector< const xAOD::TrackParticle * > &  AllTrackList,
Trk::IVKalState istate,
int  robKey = 0 
) const
private

Definition at line 151 of file MultiUtilities.cxx.

155  {
156  if(!v1.Good)return -1.; //bad vertex
157  if(!v2.Good)return -1.; //bad vertex
158  std::vector<const xAOD::NeutralParticle*> neutralPartDummy(0);
159  newvrt.Good=true;
160  int nTrk_V1=v1.selTrk.size();
161  int nTrk_V2=v2.selTrk.size();
162  newvrt.selTrk.resize(nTrk_V1+nTrk_V2);
163  std::copy(v1.selTrk.begin(),v1.selTrk.end(), newvrt.selTrk.begin());
164  std::copy(v2.selTrk.begin(),v2.selTrk.end(), newvrt.selTrk.begin()+nTrk_V1);
165 
167  sort( newvrt.selTrk.begin(), newvrt.selTrk.end() );
168  TransfEnd = unique( newvrt.selTrk.begin(), newvrt.selTrk.end() );
169  newvrt.selTrk.erase( TransfEnd, newvrt.selTrk.end());
170  std::vector<const xAOD::TrackParticle*> fitTrackList(0);
171  for(int it=0; it<(int)newvrt.selTrk.size(); it++)fitTrackList.push_back( AllTrackList[newvrt.selTrk[it]] );
172  m_fitSvc->setApproximateVertex( 0.5*(v1.vertex[0]+v2.vertex[0]),
173  0.5*(v1.vertex[1]+v2.vertex[1]),
174  0.5*(v1.vertex[2]+v2.vertex[2]),
175  istate);
176  m_fitSvc->setRobustness(robKey,istate);
177 
178  StatusCode sc=m_fitSvc->VKalVrtFit(fitTrackList,neutralPartDummy,
179  newvrt.vertex, newvrt.vertexMom, newvrt.vertexCharge, newvrt.vertexCov,
180  newvrt.chi2PerTrk, newvrt.trkAtVrt, newvrt.chi2,
181  istate, false);
182  if( sc.isFailure() ) return -1.;
183  if( newvrt.chi2>500. ) return -1.; //VK protection
184  if( newvrt.chi2PerTrk.size()==2) newvrt.chi2PerTrk[0]=newvrt.chi2PerTrk[1]=newvrt.chi2/2.;
185 
186  m_fitSvc->setRobustness(0,istate); //restore default behaviour
187 
188  return TMath::Prob( newvrt.chi2, 2*newvrt.selTrk.size()-3);
189  }

◆ minVrtVrtDist()

double Rec::NewVrtSecInclusiveTool::minVrtVrtDist ( std::vector< WrkVrt > *  WrkVrtSet,
int &  indexV1,
int &  indexV2,
std::vector< double > &  check 
) const
private

Definition at line 70 of file MultiUtilities.cxx.

72  {
73  V1=V2=-1;
74  double foundMinVrtDst=1000000.;
75 
76  for(int iv=0; iv<(int)wrkVrtSet->size()-1; iv++) {
77  if( (*wrkVrtSet)[iv].selTrk.size()< 2) continue; /* Bad vertices */
78  if(!(*wrkVrtSet)[iv].Good ) continue; /* Bad vertices */
79  for(int jv=iv+1; jv<(int)wrkVrtSet->size(); jv++) {
80  if( (*wrkVrtSet)[jv].selTrk.size()< 2) continue; /* Bad vertices */
81  if(!(*wrkVrtSet)[jv].Good ) continue; /* Bad vertices */
82  double tmp= std::abs((*wrkVrtSet)[iv].vertex.x()-(*wrkVrtSet)[jv].vertex.x())
83  +std::abs((*wrkVrtSet)[iv].vertex.y()-(*wrkVrtSet)[jv].vertex.y())
84  +std::abs((*wrkVrtSet)[iv].vertex.z()-(*wrkVrtSet)[jv].vertex.z());
85  if(tmp>20.) continue;
86  double tmpDst = vrtVrtDist((*wrkVrtSet)[iv].vertex,(*wrkVrtSet)[iv].vertexCov,
87  (*wrkVrtSet)[jv].vertex,(*wrkVrtSet)[jv].vertexCov);
88  if(std::find(checked.begin(),checked.end(),tmpDst) != checked.end()) continue; //Alreasy tried
89  if( tmpDst < foundMinVrtDst){foundMinVrtDst = tmpDst; V1=iv; V2=jv;}
90  }
91  }
92  return foundMinVrtDst;
93  }

◆ momAtVrt()

TLorentzVector Rec::NewVrtSecInclusiveTool::momAtVrt ( const std::vector< double > &  inpTrk) const
private

Definition at line 200 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

202  {
203  double api=1./std::abs(inpTrk[2]);
204  CxxUtils::sincos phi(inpTrk[0]);
205  CxxUtils::sincos theta(inpTrk[1]);
206  double px = phi.cs * theta.sn * api;
207  double py = phi.sn * theta.sn * api;
208  double pz = theta.cs * api;
209  double ee = std::sqrt( px*px + py*py + pz*pz + m_massPi*m_massPi);
210  return {px,py,pz,ee};
211  }

◆ MomProjDist()

double Rec::NewVrtSecInclusiveTool::MomProjDist ( const Amg::Vector3D SV,
const xAOD::Vertex PV,
const TLorentzVector &  Direction 
)
staticprivate

Definition at line 260 of file MultiUtilities.cxx.

262  {
263  Amg::Vector3D vv=SecVrt-primVrt.position();
264  return ( vv.x()*Mom.X()+vv.y()*Mom.Y()+vv.z()*Mom.Z() )/ Mom.P();
265  }

◆ mostHeavyTrk()

int Rec::NewVrtSecInclusiveTool::mostHeavyTrk ( WrkVrt  V,
std::vector< const xAOD::TrackParticle * >  AllTracks 
)
staticprivate

Definition at line 26 of file MultiUtilities.cxx.

28  {
29  int NTrk=V.selTrk.size(), SelT=-1;
30  if(NTrk<3)return -1;
31 //--------------------------------------------------
32  TLorentzVector TSum;
33  for(int i=0; i<NTrk; i++){
34  TSum += AllTracks.at(V.selTrk[i])->p4();
35  }
36  double massMin=1.e9;
37  for(int i=0; i<NTrk; i++){
38  TLorentzVector TSum_m1 = TSum - AllTracks[V.selTrk[i]]->p4();
39  if(TSum_m1.M()<massMin){massMin=TSum_m1.M(); SelT=i;}
40  }
41  return SelT;
42  }

◆ 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  }

◆ notFromBC()

int Rec::NewVrtSecInclusiveTool::notFromBC ( int  PDGID)
staticprivate

Definition at line 271 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

271  {
272  int noBC=0;
273  if(PDGID<=0)return 1;
274  if(PDGID>600 && PDGID<4000)noBC=1;
275  if(PDGID<400 || PDGID>5600)noBC=1;
276  if(PDGID==513 || PDGID==523 || PDGID==533 || PDGID==543)noBC=1; //Remove tracks from B* (they are in PV)
277  if(PDGID==5114 || PDGID==5214 || PDGID==5224 || PDGID==5314 || PDGID==5324)noBC=1; //Remove tracks from B_Barions* (they are in PV)
278  //if(PDGID==413 || PDGID==423 || PDGID==433 )continue; //Keep tracks from D* (they are from B vertex)
279  //if(PDGID==4114 || PDGID==4214 || PDGID==4224 || PDGID==4314 || PDGID==4324)continue;
280  return noBC;
281  }

◆ nTrkCommon()

int Rec::NewVrtSecInclusiveTool::nTrkCommon ( std::vector< WrkVrt > *  WrkVrtSet,
int  indexV1,
int  indexV2 
)
staticprivate

Definition at line 48 of file MultiUtilities.cxx.

50  {
51  int nTrk_V1 = (*wrkVrtSet).at(V1).selTrk.size(); if( nTrk_V1< 2) return 0; /* Bad vertex */
52  int nTrk_V2 = (*wrkVrtSet).at(V2).selTrk.size(); if( nTrk_V2< 2) return 0; /* Bad vertex */
53  int nTrkCom=0;
54  if(nTrk_V1 < nTrk_V2){
55  for(int i=0; i<nTrk_V1; i++){
56  int trk=(*wrkVrtSet)[V1].selTrk[i];
57  for(int j=0; j<nTrk_V2; j++){ if( trk==(*wrkVrtSet)[V2].selTrk[j]){ nTrkCom++; break;} }
58  }
59  }else{
60  for(int i=0; i<nTrk_V2; i++){
61  int trk=(*wrkVrtSet)[V2].selTrk[i];
62  for(int j=0; j<nTrk_V1; j++){ if( trk==(*wrkVrtSet)[V1].selTrk[j]){ nTrkCom++; break;} }
63  }
64  }
65  return nTrkCom;
66  }

◆ 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.

◆ PntPntDist()

double Rec::NewVrtSecInclusiveTool::PntPntDist ( const Amg::Vector3D Vrt1,
const Amg::Vector3D Vrt2 
)
staticprivate

Definition at line 148 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

149  {
150  double dx = Vrt1.x()- Vrt2.x();
151  double dy = Vrt1.y()- Vrt2.y();
152  double dz = Vrt1.z()- Vrt2.z();
153  return std::sqrt(dx*dx+dy*dy*dz*dz);
154  }

◆ printWrkSet()

void Rec::NewVrtSecInclusiveTool::printWrkSet ( const std::vector< WrkVrt > *  WrkSet,
const std::string &  name 
) const
private

Definition at line 26 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

26  {
27  int nGoodV=0;
28  if(msgLvl(MSG::INFO)){
29  for(int iv=0; iv<(int)WrkVrtSet->size(); iv++) {
30  msg(MSG::INFO)<<name
31  <<"= "<<(*WrkVrtSet)[iv].vertex[0]
32  <<", "<<(*WrkVrtSet)[iv].vertex[1]
33  <<", "<<(*WrkVrtSet)[iv].vertex[2]
34  <<" NTrk="<<(*WrkVrtSet)[iv].selTrk.size()
35  <<" is good="<<std::boolalpha<<(*WrkVrtSet)[iv].Good<<std::noboolalpha
36  <<" Chi2="<<(*WrkVrtSet)[iv].chi2
37  <<" Mass="<<(*WrkVrtSet)[iv].vertexMom.M()
38  <<" detached="<<(*WrkVrtSet)[iv].detachedTrack
39  <<" proj.dist="<<(*WrkVrtSet)[iv].projectedVrt
40  <<" trk=";
41  for(int kk=0; kk<(int)(*WrkVrtSet)[iv].selTrk.size(); kk++) {
42  msg(MSG::INFO)<<", "<<(*WrkVrtSet)[iv].selTrk[kk];}
43  for(int kk=0; kk<(int)(*WrkVrtSet)[iv].selTrk.size(); kk++) {
44  msg(MSG::INFO)<<", "<<momAtVrt((*WrkVrtSet)[iv].trkAtVrt[kk]).Perp();}
45  msg(MSG::INFO)<<endmsg;
46  if((*WrkVrtSet)[iv].Good)nGoodV++;
47  }
48  msg(MSG::INFO)<<name<<" N="<<nGoodV<<endmsg;
49  }
50  }

◆ projSV_PV()

double Rec::NewVrtSecInclusiveTool::projSV_PV ( const Amg::Vector3D SV,
const xAOD::Vertex PV,
const TLorentzVector &  Direction 
)
staticprivate

Definition at line 53 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

54  {
55  TVector3 SV_PV( SV.x()-PV.x(), SV.y()-PV.y(), SV.z()-PV.z() );
56  return Direction.Vect().Unit()*SV_PV.Unit();
57  }

◆ refineVerticesWithCommonTracks()

double Rec::NewVrtSecInclusiveTool::refineVerticesWithCommonTracks ( WrkVrt v1,
WrkVrt v2,
std::vector< const xAOD::TrackParticle * > &  allTrackList,
Trk::IVKalState istate 
) const
private

Definition at line 100 of file MultiUtilities.cxx.

104  {
105  if(!v1.Good || !v2.Good)return -1.; //bad vertex check for safety
106 
107  int ntv1=v1.selTrk.size();
108  int ntv2=v2.selTrk.size();
109  if( ntv1<2 || ntv2<2 ) return -1.; //for safety
110  double prb_v1=TMath::Prob( v1.chi2, 2*ntv1-3);
111  double prb_v2=TMath::Prob( v2.chi2, 2*ntv2-3);
112  WrkVrt * badV =&v1;
113  WrkVrt * goodV=&v2;
114  bool swap=false;
115  //---- Good vertex selection
116  if(prb_v1>0.01&&prb_v2>0.01){ //Both vertices are good Prob>1%
117  if( ntv1==ntv2 ) {if(prb_v1>prb_v2) swap=true;} //If multiplicities are equal- select better Chi2
118  else {if(ntv1>ntv2) swap=true;}
119  }
120  if(prb_v1<0.01&&prb_v2<0.01){ //Both vertices are bad Prob<1%
121  if(prb_v1>prb_v2) swap=true; // select better Chi2
122  }
123  if(prb_v1>0.01&&prb_v2<0.01){ //Second vertex is bad Prob<1%
124  if(prb_v1>prb_v2) swap=true;
125  }
126  if(swap) {badV =&v2; goodV =&v1;}
127  int badVNtrk=(*badV).selTrk.size();
128  //-----------------
129  unsigned int it=0;
130  while( it<(*badV).selTrk.size() ){
131  int trk=(*badV).selTrk[it];
132  if(std::find((*goodV).selTrk.begin(),(*goodV).selTrk.end(),trk) != (*goodV).selTrk.end()){
133  (*badV).selTrk.erase((*badV).selTrk.begin()+it);
134  (*badV).detachedTrack=trk;
135  } else it++;
136  }
137  if((*badV).selTrk.size()<2){
138  (*badV).Good=false;
139  if((*badV).selTrk.size()==1 && m_multiWithOneTrkVrt){ //Special case if 1-track vertices are allowed
140  (*badV).vertexCharge=allTrackList[(*badV).selTrk.at(0)]->charge();
141  (*badV).vertexMom=allTrackList[(*badV).selTrk.at(0)]->p4();
142  if( badVNtrk>=2 && TMath::Prob((*badV).chi2,2*badVNtrk-3)>0.1 ) (*badV).Good=true; //Accept only if original vertex prob>10%!
143  }
144  return -1.;
145  }
146  return refitVertex((*badV),allTrackList, istate, false);
147  }

◆ refitVertex()

double Rec::NewVrtSecInclusiveTool::refitVertex ( WrkVrt Vrt,
std::vector< const xAOD::TrackParticle * > &  SelectedTracks,
Trk::IVKalState istate,
bool  ifCovV0 
) const
private

Definition at line 221 of file MultiUtilities.cxx.

225  {
226  int i,j;
227  int nth = vrt.selTrk.size();
228 
229  if(nth<2) return -1.;
230 
231  std::vector<const xAOD::NeutralParticle*> neutralPartDummy(0);
232  std::vector<const xAOD::TrackParticle*> listTracks(0);
233  for(i=0;i<nth;i++) {
234  j=vrt.selTrk[i]; /*Track number*/
235  listTracks.push_back( selectedTracks[j] );
236  }
237  vrt.Good = false;
238  vrt.chi2PerTrk.resize(nth);
239  for(i=0;i<nth;i++)vrt.chi2PerTrk[i]=100000.+i; //VK safety
240 
241  m_fitSvc->setApproximateVertex(vrt.vertex[0],vrt.vertex[1],vrt.vertex[2],istate);
242  StatusCode sc=m_fitSvc->VKalVrtFit(listTracks,neutralPartDummy,vrt.vertex,vrt.vertexMom,vrt.vertexCharge,
243  vrt.vertexCov,vrt.chi2PerTrk, vrt.trkAtVrt,vrt.chi2,
244  istate, ifCovV0);
245  if(sc.isSuccess())vrt.Good = true;
246  else {vrt.Good = false; return -1.;}
247  if(vrt.chi2PerTrk.size()==2) vrt.chi2PerTrk[0]=vrt.chi2PerTrk[1]=vrt.chi2/2.;
248  return TMath::Prob( vrt.chi2, 2*nth-1);
249  }

◆ 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  }

◆ select2TrVrt()

void Rec::NewVrtSecInclusiveTool::select2TrVrt ( std::vector< const xAOD::TrackParticle * > &  SelectedTracks,
const xAOD::Vertex primVrt,
std::map< long int, std::vector< double >> &  vrt,
compatibilityGraph_t compatibilityGraph 
) const
private

Definition at line 31 of file Sel2TrkVertices.cxx.

36  {
37  std::vector<const xAOD::NeutralParticle*> neutralPartDummy(0);
38  std::vector<const xAOD::TrackParticle*> tracksForFit(2,nullptr);
39  std::vector<double> impact,impactError;
40  std::vector<double> inpMass(2,m_massPi);
41  long int Charge;
42  int i,j;
43  StatusCode sc;
44  Vrt2Tr tmpVrt;
45  std::vector<Vrt2Tr> all2TrVrt(0);
46  TLorentzVector PSum2T;
47  Amg::Vector3D iniVrt(0.,0.,0.);
48 //
49  int NTracks = (int) (selectedTracks.size());
50 //
51 // impact parameters with sign calculations
52 //
54  double signifR=0.,signifZ=0.;
55  std::vector<int> nPixHits(NTracks,0);
56  std::vector<double> trackSignif(NTracks),dRdZratio(NTracks);
57  for (i=0; i<NTracks; i++) {
58  m_fitSvc->VKalGetImpact(selectedTracks[i], primVrt.position(), 1, impact, impactError);
59  signifR = impact[0]/ sqrt(impactError[0]);
60  signifZ = impact[1]/ sqrt(impactError[2]);
61  trackSignif[i] = sqrt( signifR*signifR + signifZ*signifZ);
62  dRdZratio[i] = std::abs(signifR/signifZ);
63  if( !(selectedTracks[i]->summaryValue(nPixelHits,xAOD::numberOfPixelHits)) ) nPixelHits=0;
64  nPixHits[i]=nPixelHits;
65  if(m_fillHist){
66  Hists& h = getHists();
67  h.m_hb_impactR->Fill( signifR, m_w_1);
68  h.m_hb_impactZ->Fill( signifZ, m_w_1);
69  h.m_hb_impactRZ->Fill(signifR, signifZ, m_w_1);
70  h.m_hb_impact->Fill( trackSignif[i], m_w_1);
71  if( i<DevTuple::maxNTrk){
72  Hists& h = getHists();
73  h.m_curTup->pttrk[i]=selectedTracks[i]->pt();
74  h.m_curTup->d0trk[i]=selectedTracks[i]->d0();
75  h.m_curTup->Sig3D[i]=trackSignif[i];
76  h.m_curTup->idHF[i] =getIdHF(selectedTracks[i]);
77  h.m_curTup->dRdZrat[i] =dRdZratio[i];
78  uint8_t TRTHits;
79  if( !(selectedTracks[i]->summaryValue( TRTHits,xAOD::numberOfTRTHits))) TRTHits=0;
80  h.m_curTup->trkTRT[i] =TRTHits;
81  h.m_curTup->etatrk[i] =selectedTracks[i]->eta();
82  }
83  }
84  }
85 
86  if( m_fillHist ){
87  Hists& h = getHists();
88  h.m_curTup->nTrk=NTracks < DevTuple::maxNTrk ? NTracks : DevTuple::maxNTrk ;
89  h.m_curTup->n2Vrt=0;
90  }
91 
92  std::vector<std::vector<std::tuple<int,float>>> trkCount(NTracks);
93  std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState();
94  m_fitSvc->setMassInputParticles( inpMass, *state ); // Use pion masses for fit
95  for (i=0; i<NTracks-1; i++) {
96  if(trackSignif[i]<m_trkSigCut || dRdZratio[i]<m_dRdZRatioCut )continue;
97  for (j=i+1; j<NTracks; j++) {
98  if(trackSignif[j]<m_trkSigCut || dRdZratio[j]<m_dRdZRatioCut )continue;
99  PSum2T=selectedTracks[i]->p4()+selectedTracks[j]->p4();
100  if(PSum2T.M()>1.5*m_vrt2TrMassLimit)continue; //Approximate mass
101  if( std::abs(selectedTracks[i]->eta()-selectedTracks[j]->eta())==0 &&
102  std::abs(selectedTracks[i]->phi()-selectedTracks[j]->phi())==0 &&
103  std::abs(selectedTracks[i]->pt() -selectedTracks[j]->pt())==0 ) continue; //remove duplicated tracks
104  float ihitR = selectedTracks[i]->radiusOfFirstHit();
105  float jhitR = selectedTracks[j]->radiusOfFirstHit();
106  if(std::abs(ihitR-jhitR)>50.)continue; //- FMPs are in very different layers
107 
108  tracksForFit[0]=selectedTracks[i];
109  tracksForFit[1]=selectedTracks[j];
110  double minDZ=0.;
111  sc=m_fitSvc->VKalVrtFitFast(tracksForFit,tmpVrt.fitVertex,minDZ,*state); /* Fast crude estimation*/
112  if( sc.isFailure() ) { /* No initial estimation */
113  iniVrt=primVrt.position();
114  } else {
115  double cosMomVrtDir = projSV_PV(tmpVrt.fitVertex,primVrt,PSum2T);
116  if( cosMomVrtDir>0. ) iniVrt=tmpVrt.fitVertex; /* Good initial estimation */
117  else iniVrt=primVrt.position();
118  }
119  if(nPixHits[i]>0 && nPixHits[j]>0){ if(minDZ> m_fastZSVCut) continue; } // Drop SV candidates with big Z track-track distance.
120  else{ if(minDZ>2.*m_fastZSVCut) continue; } // Drop SV candidates with big Z track-track distance.
121  m_fitSvc->setApproximateVertex(iniVrt.x(), iniVrt.y(), iniVrt.z(),*state);
122  sc=m_fitSvc->VKalVrtFit(tracksForFit, neutralPartDummy, tmpVrt.fitVertex, tmpVrt.momentum, Charge,
123  tmpVrt.errorMatrix, tmpVrt.chi2PerTrk, tmpVrt.trkAtVrt, tmpVrt.chi2, *state, false );
124  if(sc.isFailure()) continue; /* No fit */
125  double Prob2v=TMath::Prob(tmpVrt.chi2,1);
126  if( Prob2v < m_sel2VrtProbCut ) continue;
127  if( tmpVrt.momentum.M()> m_vrt2TrMassLimit ) continue;
128  if( tmpVrt.fitVertex.perp() > m_maxSVRadiusCut) continue; // Too far from interaction point
129  double cosSVPV=projSV_PV(tmpVrt.fitVertex, primVrt, tmpVrt.momentum);
130  TLorentzVector SVPV(tmpVrt.fitVertex.x()-primVrt.x(),
131  tmpVrt.fitVertex.y()-primVrt.y(),
132  tmpVrt.fitVertex.z()-primVrt.z(), 10.);
133  if(m_fillHist){
134  Hists& h = getHists();
135  if(Charge==0){h.m_hb_massPiPi->Fill(tmpVrt.momentum.M(),1.);}
136  h.m_hb_cosSVMom->Fill(cosSVPV,1.);
137  h.m_hb_etaSV->Fill(SVPV.Eta(),1.);
138  }
139  if(cosSVPV<m_cosSVPVCut)continue;
140  if(tmpVrt.momentum.Pt()<1000.)continue;
141  double vrtR=tmpVrt.fitVertex.perp();
142  double vrtRErr=vrtRadiusError(tmpVrt.fitVertex,tmpVrt.errorMatrix );
143 //Check close material layer
144  double dstMatSignif=1.e4;
145  if(m_removeTrkMatSignif>0. && vrtR>20.){
146  if(vrtR<30.){ dstMatSignif=std::abs(vrtR-m_beampipeR)/vrtRErr;}
147  else { dstMatSignif=distToMatLayerSignificance(tmpVrt);} //Material in Pixel volume
148  if(dstMatSignif<m_removeTrkMatSignif)continue;
149  }
150 //
151 // Check pixel hits vs vertex positions.
152  int ihitIBL = getIBLHit(selectedTracks[i]);
153  int jhitIBL = getIBLHit(selectedTracks[j]);
154  if( m_do2TrkIBLChecks && ( (ihitIBL==0&&jhitIBL>0) || (ihitIBL>0&&jhitIBL==0) ) ) continue;
155  int ihitBL = getBLHit (selectedTracks[i]);
156  int jhitBL = getBLHit (selectedTracks[j]);
157 //--Very general cleaning cuts based on ID geometry and applicable to all processes
158  if( m_do2TrkIBLChecks && tmpVrt.fitVertex.perp()<m_firstPixelLayerR-2.*vrtRErr ){
159  if( ihitIBL<1 && ihitBL<1) continue;
160  if( jhitIBL<1 && jhitBL<1) continue;
161  }
162  if( vrtR-std::min(ihitR,jhitR) > 50.) continue; //- FMP is closer to (0,0) than SV itself
163  if(ihitR-vrtR > 180.+2.*vrtRErr)continue; //- Distance FMP-vertex should be less then SCT-Pixel gap
164  if(jhitR-vrtR > 180.+2.*vrtRErr)continue; //- Distance FMP-vertex should be less then SCT-Pixel gap
165 //-------------------------------------------------------
166  if(m_useVertexCleaning){ //More agressive cleaning
167  if(std::abs(ihitR-jhitR)>12.) continue;
168  if( ihitR-vrtR > 36.) continue; // Too big dR between vertex and hit in pixel
169  if( jhitR-vrtR > 36.) continue; // Should be another layer in between
170  if( ihitR-vrtR <-2.*vrtRErr) continue; // Vertex is behind hit in pixel
171  if( jhitR-vrtR <-2.*vrtRErr) continue; // Vertex is behind hit in pixel
172  }
173  if ((std::abs(selectedTracks[i]->d0())<m_twoTrkVtxFormingD0Cut) && (std::abs(selectedTracks[j]->d0())<m_twoTrkVtxFormingD0Cut)) continue;
174 //
175 // Debugging and BDT
176  double minPtT = std::min(tracksForFit[0]->pt(),tracksForFit[1]->pt());
177  if( m_fillHist ){
178  Hists& h = getHists();
179  double Sig3D=0.,Sig2D=0., Dist2D=0.;
180  int idisk1=0,idisk2=0,idisk3=0,jdisk1=0,jdisk2=0,jdisk3=0;
181  int sumIBLHits = std::max(ihitIBL,0)+std::max(jhitIBL,0);
182  int sumBLHits = std::max(ihitBL, 0)+std::max(jhitBL, 0);
183  getPixelDiscs(selectedTracks[i],idisk1,idisk2,idisk3);
184  getPixelDiscs(selectedTracks[j],jdisk1,jdisk2,jdisk3);
185  vrtVrtDist(primVrt, tmpVrt.fitVertex, tmpVrt.errorMatrix, Sig3D);
186  Dist2D=vrtVrtDist2D(primVrt, tmpVrt.fitVertex, tmpVrt.errorMatrix, Sig2D);
187  h.m_hb_signif3D->Fill(Sig3D,1.);
188  h.m_curTup->VrtTrkHF [h.m_curTup->n2Vrt] = getIdHF(tracksForFit[0])+ getIdHF(tracksForFit[1]);
189  h.m_curTup->VrtTrkI [h.m_curTup->n2Vrt] = getG4Inter(tracksForFit[0])+ getG4Inter(tracksForFit[1]);
190  h.m_curTup->VrtCh [h.m_curTup->n2Vrt] = Charge;
191  h.m_curTup->VrtProb [h.m_curTup->n2Vrt] = Prob2v;
192  h.m_curTup->VrtSig3D [h.m_curTup->n2Vrt] = Sig3D;
193  h.m_curTup->VrtSig2D [h.m_curTup->n2Vrt] = Sig2D;
194  h.m_curTup->VrtDist2D[h.m_curTup->n2Vrt] = vrtR<20. ? Dist2D : vrtR;
195  h.m_curTup->VrtM [h.m_curTup->n2Vrt] = tmpVrt.momentum.M();
196  h.m_curTup->VrtZ [h.m_curTup->n2Vrt] = tmpVrt.fitVertex.z();
197  h.m_curTup->VrtPt [h.m_curTup->n2Vrt] = tmpVrt.momentum.Pt();
198  h.m_curTup->VrtEta [h.m_curTup->n2Vrt] = SVPV.Eta();
199  h.m_curTup->VrtIBL [h.m_curTup->n2Vrt] = sumIBLHits;
200  h.m_curTup->VrtBL [h.m_curTup->n2Vrt] = sumBLHits;
201  h.m_curTup->VrtCosSPM[h.m_curTup->n2Vrt] = cosSVPV;
202  h.m_curTup->VMinPtT [h.m_curTup->n2Vrt] = minPtT;
203  h.m_curTup->VMinS3DT [h.m_curTup->n2Vrt] = std::min(trackSignif[i],trackSignif[j]);
204  h.m_curTup->VMaxS3DT [h.m_curTup->n2Vrt] = std::max(trackSignif[i],trackSignif[j]);
205  h.m_curTup->VrtBDT [h.m_curTup->n2Vrt] = 1.1;
206  h.m_curTup->VrtHR1 [h.m_curTup->n2Vrt] = ihitR;
207  h.m_curTup->VrtHR2 [h.m_curTup->n2Vrt] = jhitR;
208  h.m_curTup->VrtDZ [h.m_curTup->n2Vrt] = minDZ;
209  h.m_curTup->VrtDisk [h.m_curTup->n2Vrt] = idisk1+10*idisk2+20*idisk3+30*jdisk1+40*jdisk2+50*jdisk3;
210  h.m_curTup->VSigMat [h.m_curTup->n2Vrt] = dstMatSignif;
211  if(h.m_curTup->n2Vrt<DevTuple::maxNVrt-1)h.m_curTup->n2Vrt++;
212  }
213 //-------------------BDT based rejection
214  if(tmpVrt.momentum.Pt() > m_vrt2TrPtLimit) continue;
215  std::vector<float> VARS(10);
216  VARS[0]=Prob2v;
217  VARS[1]=log(tmpVrt.momentum.Pt());
218  VARS[2]=log(std::max(minPtT,m_cutPt.value()));
219  VARS[3]=log(vrtR<20. ? SVPV.Perp() : vrtR);
220  VARS[4]=log(std::max(std::min(trackSignif[i],trackSignif[j]),m_trkSigCut.value()));
221  VARS[5]=log(std::max(trackSignif[i],trackSignif[j]));
222  VARS[6]=tmpVrt.momentum.M();
223  VARS[7]=sqrt(std::abs(1.-cosSVPV*cosSVPV));
224  VARS[8]=SVPV.Eta();
225  VARS[9]=std::max(ihitR,jhitR);
226  float wgtSelect=m_SV2T_BDT->GetGradBoostMVA(VARS);
227  if( m_fillHist ) {
228  Hists& h = getHists();
229  h.m_curTup->VrtBDT[h.m_curTup->n2Vrt-1] = wgtSelect;
230  }
231  if(wgtSelect<m_v2tIniBDTCut) continue;
232 //
233 //--- Save good candidate for multi-vertex fit
234 //
235  add_edge(i,j,compatibilityGraph);
236  goodVrt[NTracks*i+j]=std::vector<double>{tmpVrt.fitVertex.x(),tmpVrt.fitVertex.y(),tmpVrt.fitVertex.z()};
237  trkCount[i].emplace_back(j,wgtSelect); trkCount[j].emplace_back(i,wgtSelect);
238  }
239  }
240  //=== Resolve -!----!- case to speed up cluster finding
241  for(int t=0; t<NTracks; t++){
242  if(trkCount[t].size()==2){
243  i=std::get<0>(trkCount[t][0]);
244  j=std::get<0>(trkCount[t][1]);
245  if(trkCount[i].size()==1 && trkCount[j].size()==1 ){
246  if( std::get<1>(trkCount[t][0]) < std::get<1>(trkCount[t][1]) ) {
247  remove_edge(t,i,compatibilityGraph);
248  if(t<i)goodVrt.erase(NTracks*t+i); else goodVrt.erase(NTracks*i+t);
249  trkCount[i].clear();
250  trkCount[t].erase(trkCount[t].begin()+0);
251  } else {
252  remove_edge(t,j,compatibilityGraph);
253  if(t<j)goodVrt.erase(NTracks*t+j); else goodVrt.erase(NTracks*j+t);
254  trkCount[j].clear();
255  trkCount[t].erase(trkCount[t].begin()+1);
256  }
257  }
258  }
259  }
260  //=== Remove isolated 2track vertices
261  for(int t=0; t<NTracks; t++){
262  if(trkCount[t].size()==1){
263  i=std::get<0>(trkCount[t][0]);
264  if(trkCount[i].size()==1){
265  if( std::get<1>(trkCount[t][0]) < m_v2tFinBDTCut ) {
266  remove_edge(t,i,compatibilityGraph);
267  if(t<i)goodVrt.erase(NTracks*t+i); else goodVrt.erase(NTracks*i+t);
268  trkCount[t].clear();
269  trkCount[i].clear();
270  }
271  }
272  }
273  }
274 
275  }

◆ selGoodTrkParticle()

void Rec::NewVrtSecInclusiveTool::selGoodTrkParticle ( workVectorArrxAOD xAODwrk,
const xAOD::Vertex primVrt 
) const
private

Definition at line 21 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/CutTrk.cxx.

24  {
25  std::vector<const xAOD::TrackParticle*>& inpTrk = xAODwrk->inpTrk;
26  std::vector<const xAOD::TrackParticle*>& selectedTracks = xAODwrk->listSelTracks;
27  std::vector<const xAOD::TrackParticle*>::const_iterator i_ntrk;
28  std::vector<double> impact,impactError;
29  std::multimap<double,const xAOD::TrackParticle*> orderedTrk;
30  if(m_fillHist){
31  Hists& h = getHists();
32  h.m_hb_ntrkInput->Fill( inpTrk.size()+0.1, m_w_1);
33  }
34  for (i_ntrk = inpTrk.begin(); i_ntrk < inpTrk.end(); ++i_ntrk) {
35 //
36 //-- Perigee in TrackParticle
37 //
38  if(m_fillHist){
39  Hists& h = getHists();
40  h.m_hb_trkSelect->Fill( 0., m_w_1);
41  }
42  if((*i_ntrk)->numberDoF() == 0) continue; //Protection
43  double trkChi2 = (*i_ntrk)->chiSquared() / (*i_ntrk)->numberDoF();
44  if(trkChi2 > m_cutChi2) continue;
45  if( (*i_ntrk)->pt() < m_cutPt) continue;
46  if(m_fillHist){
47  Hists& h = getHists();
48  h.m_hb_trkSelect->Fill( 1., m_w_1);
49  }
50 
51  const Trk::Perigee mPer=(*i_ntrk)->perigeeParameters() ;
52  const AmgSymMatrix(5) * locCov = mPer.covariance();
53  const double CovTrkMtx00 = (*locCov)(0,0);
54 
55  uint8_t PixelHits,SctHits,BLayHits,TRTHits;
56  if( !((*i_ntrk)->summaryValue(PixelHits,xAOD::numberOfPixelHits)) ) continue; // Track is
57  if( !((*i_ntrk)->summaryValue( SctHits,xAOD::numberOfSCTHits)) ) continue; // definitely
58  if( SctHits<3 ) continue; // bad
59  if( !((*i_ntrk)->summaryValue( TRTHits,xAOD::numberOfTRTHits)) ) continue;
60  if( !((*i_ntrk)->summaryValue(BLayHits,xAOD::numberOfInnermostPixelLayerHits))) BLayHits=0;
61  if(m_fillHist){
62  Hists& h = getHists();
63  h.m_hb_trkSelect->Fill( 2., m_w_1);
64  }
65 
66  Amg::Vector3D perigeePos=mPer.position();
67  double impactD0=sqrt( (perigeePos.x()-primVrt.x())*(perigeePos.x()-primVrt.x())
68  +(perigeePos.y()-primVrt.y())*(perigeePos.y()-primVrt.y()) );
69  double impactZ=perigeePos.z()-primVrt.z();
70  if(m_fillHist){
71  Hists& h = getHists();
72  h.m_hb_trkD0->Fill( impactD0, m_w_1);
73  h.m_hb_trkZ ->Fill( impactZ, m_w_1);
74  }
75  if(std::abs(impactZ)*std::sin((*i_ntrk)->theta())>m_maxZVrt && m_maxZVrt > 0.) continue;
76  if(std::abs(impactZ)*std::sin((*i_ntrk)->theta())<m_minZVrt && m_minZVrt > 0.) continue;
77  if(impactD0>m_cutD0Max) continue;
78  if(impactD0<m_cutD0Min) continue;
79  if(m_fillHist){
80  Hists& h = getHists();
81  h.m_hb_trkSelect->Fill( 3., m_w_1);
82  }
83 
84  double bX=xAODwrk->beamX + (perigeePos.z()-xAODwrk->beamZ)*xAODwrk->tanBeamTiltX;
85  double bY=xAODwrk->beamY + (perigeePos.z()-xAODwrk->beamZ)*xAODwrk->tanBeamTiltY;
86  double impactBeam=sqrt( (perigeePos.x()-bX)*(perigeePos.x()-bX) + (perigeePos.y()-bY)*(perigeePos.y()-bY));
87 //----Anti-pileup
88  double signifBeam = impactBeam / sqrt(CovTrkMtx00);
89  if(signifBeam < m_antiPileupSigRCut) continue; // cut against tracks from pileup vertices
90  if(m_fillHist){
91  Hists& h = getHists();
92  h.m_hb_trkSelect->Fill( 4., m_w_1);
93  }
94 //----
95  if(PixelHits < m_cutPixelHits) continue;
96  if(SctHits < m_cutSctHits) continue;
97  if((PixelHits+SctHits) < m_cutSiHits) continue;
98  if(BLayHits < m_cutBLayHits) continue;
99  if(std::abs((*i_ntrk)->eta())<1.9 && TRTHits < m_cutTRTHits) continue; //TRT hits must be present inside TRT
100  if(m_fillHist){
101  Hists& h = getHists();
102  h.m_hb_trkSelect->Fill( 5., m_w_1);
103  }
104 //----
105  orderedTrk.emplace(signifBeam,*i_ntrk);
106  selectedTracks.push_back(*i_ntrk);
107  }
108 //---- Order tracks according to ranks
109  std::map<double,const xAOD::TrackParticle*>::reverse_iterator rt=orderedTrk.rbegin();
110  selectedTracks.resize(orderedTrk.size());
111  for ( int cntt=0; rt!=orderedTrk.rend(); ++rt,++cntt) {selectedTracks[cntt]=(*rt).second;}
112  }

◆ 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.

◆ 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  }

◆ vrtRadiusError()

double Rec::NewVrtSecInclusiveTool::vrtRadiusError ( const Amg::Vector3D secVrt,
const std::vector< double > &  vrtErr 
)
staticprivate

Definition at line 159 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

160  {
161  double DirX=SecVrt.x(), DirY=SecVrt.y();
162  double Covar = DirX*VrtErr[0]*DirX
163  +2.*DirX*VrtErr[1]*DirY
164  +DirY*VrtErr[2]*DirY;
165  Covar /= DirX*DirX + DirY*DirY;
166  Covar=std::sqrt(std::abs(Covar));
167  if(Covar != Covar) Covar = 0.;
168  return Covar;
169  }

◆ vrtVrtDist() [1/2]

double Rec::NewVrtSecInclusiveTool::vrtVrtDist ( const Amg::Vector3D vrt1,
const std::vector< double > &  vrtErr1,
const Amg::Vector3D vrt2,
const std::vector< double > &  vrtErr2 
)
staticprivate

Definition at line 118 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

121  {
122  double distx = vrt1.x()- vrt2.x();
123  double disty = vrt1.y()- vrt2.y();
124  double distz = vrt1.z()- vrt2.z();
125 
126  AmgSymMatrix(3) primCovMtx; //Create
127  primCovMtx(0,0) = vrtErr1[0]+vrtErr2[0];
128  primCovMtx(0,1) = primCovMtx(1,0) = vrtErr1[1]+vrtErr2[1];
129  primCovMtx(1,1) = vrtErr1[2]+vrtErr2[2];
130  primCovMtx(0,2) = primCovMtx(2,0) = vrtErr1[3]+vrtErr2[3];
131  primCovMtx(1,2) = primCovMtx(2,1) = vrtErr1[4]+vrtErr2[4];
132  primCovMtx(2,2) = vrtErr1[5]+vrtErr2[5];
133 
134  AmgSymMatrix(3) wgtMtx = primCovMtx.inverse();
135 
136  double signif =
137  distx*wgtMtx(0,0)*distx
138  +disty*wgtMtx(1,1)*disty
139  +distz*wgtMtx(2,2)*distz
140  +2.*distx*wgtMtx(0,1)*disty
141  +2.*distx*wgtMtx(0,2)*distz
142  +2.*disty*wgtMtx(1,2)*distz;
143  signif=std::sqrt(std::abs(signif));
144  if(signif != signif) signif = 0.;
145  return signif;
146  }

◆ vrtVrtDist() [2/2]

double Rec::NewVrtSecInclusiveTool::vrtVrtDist ( const xAOD::Vertex primVrt,
const Amg::Vector3D secVrt,
const std::vector< double > &  vrtErr,
double &  signif 
)
staticprivate

Definition at line 59 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

62  {
63  double distx = primVrt.x()- secVrt.x();
64  double disty = primVrt.y()- secVrt.y();
65  double distz = primVrt.z()- secVrt.z();
66 
67 
68  AmgSymMatrix(3) primCovMtx=primVrt.covariancePosition(); //Create
69  primCovMtx(0,0) += secVrtErr[0];
70  primCovMtx(0,1) += secVrtErr[1];
71  primCovMtx(1,0) += secVrtErr[1];
72  primCovMtx(1,1) += secVrtErr[2];
73  primCovMtx(0,2) += secVrtErr[3];
74  primCovMtx(2,0) += secVrtErr[3];
75  primCovMtx(1,2) += secVrtErr[4];
76  primCovMtx(2,1) += secVrtErr[4];
77  primCovMtx(2,2) += secVrtErr[5];
78 
79  AmgSymMatrix(3) wgtMtx = primCovMtx.inverse();
80 
81  signif = distx*wgtMtx(0,0)*distx
82  +disty*wgtMtx(1,1)*disty
83  +distz*wgtMtx(2,2)*distz
84  +2.*distx*wgtMtx(0,1)*disty
85  +2.*distx*wgtMtx(0,2)*distz
86  +2.*disty*wgtMtx(1,2)*distz;
87  signif=std::sqrt(std::abs(signif));
88  if( signif!=signif ) signif = 0.;
89  return std::sqrt(distx*distx+disty*disty+distz*distz);
90  }

◆ vrtVrtDist2D()

double Rec::NewVrtSecInclusiveTool::vrtVrtDist2D ( const xAOD::Vertex primVrt,
const Amg::Vector3D secVrt,
const std::vector< double > &  vrtErr,
double &  signif 
)
staticprivate

Definition at line 92 of file Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx.

95  {
96  double distx = primVrt.x()- secVrt.x();
97  double disty = primVrt.y()- secVrt.y();
98 
99 
100  AmgSymMatrix(3) primCovMtx=primVrt.covariancePosition(); //Create
101  AmgSymMatrix(2) covMtx;
102  covMtx(0,0) = primCovMtx(0,0) + secVrtErr[0];
103  covMtx(0,1) = primCovMtx(0,1) + secVrtErr[1];
104  covMtx(1,0) = primCovMtx(1,0) + secVrtErr[1];
105  covMtx(1,1) = primCovMtx(1,1) + secVrtErr[2];
106 
107  AmgSymMatrix(2) wgtMtx = covMtx.inverse();
108 
109  signif = distx*wgtMtx(0,0)*distx
110  +disty*wgtMtx(1,1)*disty
111  +2.*distx*wgtMtx(0,1)*disty;
112  signif=std::sqrt(std::abs(signif));
113  if( signif!=signif ) signif = 0.;
114  return std::sqrt(distx*distx+disty*disty);
115  }

Member Data Documentation

◆ m_antiPileupSigRCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_antiPileupSigRCut {this, "AntiPileupSigRCut", 2.0, "Upper cut on significance of 2D distance between beam and perigee" }
private

Definition at line 166 of file NewVrtSecInclusiveTool.h.

◆ m_augString

Gaudi::Property<std::string> Rec::NewVrtSecInclusiveTool::m_augString {this, "AugmentingVersionString", "_NVSI", "Augmentation version string"}
private

Definition at line 199 of file NewVrtSecInclusiveTool.h.

◆ m_beampipeR

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_beampipeR {this, "BeampipeR", 24.3, "Radius of the beampipe material for aggressive material rejection" }
private

Definition at line 185 of file NewVrtSecInclusiveTool.h.

◆ m_beamSpotKey

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

Definition at line 193 of file NewVrtSecInclusiveTool.h.

◆ m_calibFileName

Gaudi::Property<std::string> Rec::NewVrtSecInclusiveTool::m_calibFileName {this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" }
private

Definition at line 189 of file NewVrtSecInclusiveTool.h.

◆ m_chi2_toSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_chi2_toSV
private

Definition at line 218 of file NewVrtSecInclusiveTool.h.

◆ m_chiScale

float Rec::NewVrtSecInclusiveTool::m_chiScale[11] {}
private

Definition at line 309 of file NewVrtSecInclusiveTool.h.

◆ m_cosSVPVCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_cosSVPVCut {this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" }
private

Definition at line 171 of file NewVrtSecInclusiveTool.h.

◆ m_cutBLayHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutBLayHits {this, "CutBLayHits", 0, "Remove track if it has less B-layer hits" }
private

Definition at line 147 of file NewVrtSecInclusiveTool.h.

◆ m_cutChi2

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_cutChi2 {this, "CutChi2", 5., "Track Chi2 selection cut" }
private

Definition at line 155 of file NewVrtSecInclusiveTool.h.

◆ m_cutD0Max

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_cutD0Max {this, "CutD0Max", 10., "Track maximal D0 selection cut" }
private

Definition at line 152 of file NewVrtSecInclusiveTool.h.

◆ m_cutD0Min

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_cutD0Min {this, "CutD0Min", 0., "Track minimal D0 selection cut" }
private

Definition at line 151 of file NewVrtSecInclusiveTool.h.

◆ m_cutPixelHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutPixelHits {this, "CutPixelHits", 2, "Remove track if it has less Pixel hits"}
private

Definition at line 144 of file NewVrtSecInclusiveTool.h.

◆ m_cutPt

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_cutPt {this, "CutPt", 500., "Track Pt selection cut" }
private

Definition at line 150 of file NewVrtSecInclusiveTool.h.

◆ m_cutSctHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutSctHits {this, "CutSctHits", 4 , "Remove track if it has less SCT hits" }
private

Definition at line 143 of file NewVrtSecInclusiveTool.h.

◆ m_cutSharedHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutSharedHits {this, "CutSharedHits", 1,"Reject final 2tr vertices if tracks have shared hits" }
private

Definition at line 148 of file NewVrtSecInclusiveTool.h.

◆ m_cutSiHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutSiHits {this, "CutSiHits", 8, "Remove track if it has less Pixel+SCT hits" }
private

Definition at line 146 of file NewVrtSecInclusiveTool.h.

◆ m_cutTRTHits

Gaudi::Property<long int> Rec::NewVrtSecInclusiveTool::m_cutTRTHits {this, "CutTRTHits", 10, "Remove track if it has less TRT hits"}
private

Definition at line 145 of file NewVrtSecInclusiveTool.h.

◆ m_d0_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_d0_wrtSV
private

Definition at line 213 of file NewVrtSecInclusiveTool.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_do2TrkIBLChecks

Gaudi::Property<bool> Rec::NewVrtSecInclusiveTool::m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." }
private

Definition at line 175 of file NewVrtSecInclusiveTool.h.

◆ m_dRdZRatioCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_dRdZRatioCut {this, "dRdZRatioCut", 0.25, "Cut on dR/dZ ratio to remove pileup tracks" }
private

Definition at line 167 of file NewVrtSecInclusiveTool.h.

◆ m_errd0_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_errd0_wrtSV
private

Definition at line 216 of file NewVrtSecInclusiveTool.h.

◆ m_errP_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_errP_wrtSV
private

Definition at line 215 of file NewVrtSecInclusiveTool.h.

◆ m_errz0_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_errz0_wrtSV
private

Definition at line 217 of file NewVrtSecInclusiveTool.h.

◆ m_eta_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_eta_wrtSV
private

Definition at line 211 of file NewVrtSecInclusiveTool.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_extrapolator

ToolHandle<Trk::IExtrapolator> Rec::NewVrtSecInclusiveTool::m_extrapolator {this,"ExtrapolatorName","Trk::Extrapolator/Extrapolator", "Name of the extrapolator tool"}
private

Definition at line 195 of file NewVrtSecInclusiveTool.h.

◆ m_fastZSVCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_fastZSVCut {this, "FastZSVCut", 15., "Cut to remove SV candidates based on fast SV estimation. To save full fit CPU." }
private

Definition at line 170 of file NewVrtSecInclusiveTool.h.

◆ m_fillHist

Gaudi::Property<bool> Rec::NewVrtSecInclusiveTool::m_fillHist {this, "FillHist", false, "Fill technical histograms" }
private

Definition at line 173 of file NewVrtSecInclusiveTool.h.

◆ m_firstPixelLayerR

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_firstPixelLayerR {this, "FirstPixelLayerR", 32.0, "Radius of the first Pixel layer" }
private

Definition at line 186 of file NewVrtSecInclusiveTool.h.

◆ m_fitSvc

ToolHandle<Trk::TrkVKalVrtFitter> Rec::NewVrtSecInclusiveTool::m_fitSvc {this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool", "Name of the Vertex Fitter tool"}
private

Definition at line 196 of file NewVrtSecInclusiveTool.h.

◆ m_globVrtProbCut

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_globVrtProbCut {this, "GlobVrtProbCut", 0.005, "Cut on probability of any vertex for final selection" }
private

Definition at line 163 of file NewVrtSecInclusiveTool.h.

◆ m_h

std::unique_ptr<Hists> Rec::NewVrtSecInclusiveTool::m_h
private

Definition at line 141 of file NewVrtSecInclusiveTool.h.

◆ m_instanceName

std::string Rec::NewVrtSecInclusiveTool::m_instanceName
private

Definition at line 206 of file NewVrtSecInclusiveTool.h.

◆ m_is_selected

SG::AuxElement::Decorator<char> Rec::NewVrtSecInclusiveTool::m_is_selected
private

Definition at line 208 of file NewVrtSecInclusiveTool.h.

◆ m_is_svtrk_final

SG::AuxElement::Decorator<char> Rec::NewVrtSecInclusiveTool::m_is_svtrk_final
private

Definition at line 209 of file NewVrtSecInclusiveTool.h.

◆ m_massE

double Rec::NewVrtSecInclusiveTool::m_massE {}
private

Definition at line 203 of file NewVrtSecInclusiveTool.h.

◆ m_massK0

double Rec::NewVrtSecInclusiveTool::m_massK0 {}
private

Definition at line 204 of file NewVrtSecInclusiveTool.h.

◆ m_massLam

double Rec::NewVrtSecInclusiveTool::m_massLam {}
private

Definition at line 205 of file NewVrtSecInclusiveTool.h.

◆ m_massP

double Rec::NewVrtSecInclusiveTool::m_massP {}
private

Definition at line 202 of file NewVrtSecInclusiveTool.h.

◆ m_massPi

double Rec::NewVrtSecInclusiveTool::m_massPi {}
private

Definition at line 201 of file NewVrtSecInclusiveTool.h.

◆ m_maxSVRadiusCut

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_maxSVRadiusCut {this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" }
private

Definition at line 164 of file NewVrtSecInclusiveTool.h.

◆ m_maxZVrt

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_maxZVrt {this, "MaxZVrt", 15., "Track Z impact selection max"}
private

Definition at line 153 of file NewVrtSecInclusiveTool.h.

◆ m_minZVrt

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_minZVrt {this, "MinZVrt", 0., "Track Z impact selection min"}
private

Definition at line 154 of file NewVrtSecInclusiveTool.h.

◆ m_multiWithOneTrkVrt

Gaudi::Property<bool> Rec::NewVrtSecInclusiveTool::m_multiWithOneTrkVrt {this, "MultiWithOneTrkVrt", true,"Allow one-track-vertex addition to already found secondary vertices"}
private

Definition at line 181 of file NewVrtSecInclusiveTool.h.

◆ m_phi_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_phi_wrtSV
private

Definition at line 212 of file NewVrtSecInclusiveTool.h.

◆ m_pt_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_pt_wrtSV
private

Definition at line 210 of file NewVrtSecInclusiveTool.h.

◆ m_removeTrkMatSignif

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_removeTrkMatSignif {this, "removeTrkMatSignif", 0., "Significance of Vertex-TrackingMaterial distance for removal. No removal if <=0." }
private

Definition at line 187 of file NewVrtSecInclusiveTool.h.

◆ m_sel2VrtProbCut

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_sel2VrtProbCut {this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" }
private

Definition at line 162 of file NewVrtSecInclusiveTool.h.

◆ m_selVrtSigCut

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_selVrtSigCut {this, "SelVrtSigCut", 3.0, "Cut on significance of 3D distance between vertex and PV" }
private

Definition at line 165 of file NewVrtSecInclusiveTool.h.

◆ m_SV2T_BDT

std::unique_ptr<MVAUtils::BDT> Rec::NewVrtSecInclusiveTool::m_SV2T_BDT
private

Definition at line 191 of file NewVrtSecInclusiveTool.h.

◆ m_trackToVertexTool

ToolHandle< Reco::ITrackToVertex > Rec::NewVrtSecInclusiveTool::m_trackToVertexTool {this, "TrackToVertexTool", "Reco::TrackToVertex/TrackToVertex", "Name of the TrackToVertex tool"}
private

Definition at line 197 of file NewVrtSecInclusiveTool.h.

◆ m_trkSigCut

Gaudi::Property<double> Rec::NewVrtSecInclusiveTool::m_trkSigCut {this, "TrkSigCut", 2.0, "Track 3D impact significance w/r primary vertex. Should be >=AntiPileupSigRCut" }
private

Definition at line 156 of file NewVrtSecInclusiveTool.h.

◆ m_twoTrkVtxFormingD0Cut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_twoTrkVtxFormingD0Cut {this, "TwoTrkVtxFormingD0Cut", 0.0, "Minimum two-track forming vertex d0 cut."}
private

Definition at line 179 of file NewVrtSecInclusiveTool.h.

◆ m_useVertexCleaning

Gaudi::Property<bool> Rec::NewVrtSecInclusiveTool::m_useVertexCleaning {this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" }
private

Definition at line 177 of file NewVrtSecInclusiveTool.h.

◆ m_v2tFinBDTCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_v2tFinBDTCut {this, "v2tFinBDTCut", 0., "Final BDT cut for 2track vertices selection " }
private

Definition at line 169 of file NewVrtSecInclusiveTool.h.

◆ m_v2tIniBDTCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_v2tIniBDTCut {this, "v2tIniBDTCut", -0.6, "Initial BDT cut for 2track vertices selection " }
private

Definition at line 168 of file NewVrtSecInclusiveTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexMergeCut

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_vertexMergeCut {this, "VertexMergeCut", 4., "To allow vertex merging for MultiVertex Finder" }
private

Definition at line 183 of file NewVrtSecInclusiveTool.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vrt2TrMassLimit

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_vrt2TrMassLimit {this, "Vrt2TrMassLimit",4000.,"Maximal allowed mass for 2-track vertices" }
private

Definition at line 159 of file NewVrtSecInclusiveTool.h.

◆ m_vrt2TrPtLimit

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_vrt2TrPtLimit {this, "Vrt2TrPtLimit", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" }
private

Definition at line 160 of file NewVrtSecInclusiveTool.h.

◆ m_vrtMassLimit

Gaudi::Property<float> Rec::NewVrtSecInclusiveTool::m_vrtMassLimit {this, "VrtMassLimit", 5500., "Maximal allowed mass for found vertices" }
private

Definition at line 158 of file NewVrtSecInclusiveTool.h.

◆ m_w_1

double Rec::NewVrtSecInclusiveTool::m_w_1 {}
private

Definition at line 103 of file NewVrtSecInclusiveTool.h.

◆ m_z0_wrtSV

SG::AuxElement::Decorator<float> Rec::NewVrtSecInclusiveTool::m_z0_wrtSV
private

Definition at line 214 of file NewVrtSecInclusiveTool.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::pixelEndCap2
@ pixelEndCap2
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:239
Rec::NewVrtSecInclusiveTool::m_cutSctHits
Gaudi::Property< long int > m_cutSctHits
Definition: NewVrtSecInclusiveTool.h:143
ReadFromCoolCompare.ov
ov
Definition: ReadFromCoolCompare.py:230
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
base
std::string base
Definition: hcg.cxx:78
Rec::NewVrtSecInclusiveTool::getIdHF
int getIdHF(const xAOD::TrackParticle *TP) const
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:243
PathResolver::find_calib_file
static std::string find_calib_file(const std::string &logical_file_name)
Definition: PathResolver.cxx:384
Rec::NewVrtSecInclusiveTool::m_v2tIniBDTCut
Gaudi::Property< float > m_v2tIniBDTCut
Definition: NewVrtSecInclusiveTool.h:168
Rec::NewVrtSecInclusiveTool::vrtVrtDist2D
static double vrtVrtDist2D(const xAOD::Vertex &primVrt, const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr, double &signif)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:92
Rec::NewVrtSecInclusiveTool::refineVerticesWithCommonTracks
double refineVerticesWithCommonTracks(WrkVrt &v1, WrkVrt &v2, std::vector< const xAOD::TrackParticle * > &allTrackList, Trk::IVKalState &istate) const
Definition: MultiUtilities.cxx:100
Rec::NewVrtSecInclusiveTool::notFromBC
static int notFromBC(int PDGID)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:271
xAOD::Vertex_v1::x
float x() const
Returns the x position.
test_pyathena.eta
eta
Definition: test_pyathena.py:10
Rec::NewVrtSecInclusiveTool::m_cutChi2
Gaudi::Property< double > m_cutChi2
Definition: NewVrtSecInclusiveTool.h:155
Trk::proton
@ proton
Definition: ParticleHypothesis.h:31
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::k0
@ k0
Definition: ParticleHypothesis.h:35
Rec::NewVrtSecInclusiveTool::getIBLHit
static int getIBLHit(const xAOD::TrackParticle *Part)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:215
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
Rec::NewVrtSecInclusiveTool::m_sel2VrtProbCut
Gaudi::Property< double > m_sel2VrtProbCut
Definition: NewVrtSecInclusiveTool.h:162
Rec::NewVrtSecInclusiveTool::getBLHit
static int getBLHit(const xAOD::TrackParticle *Part)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:224
test_pyathena.px
px
Definition: test_pyathena.py:18
Rec::NewVrtSecInclusiveTool::selGoodTrkParticle
void selGoodTrkParticle(workVectorArrxAOD *xAODwrk, const xAOD::Vertex &primVrt) const
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/CutTrk.cxx:21
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Rec::NewVrtSecInclusiveTool::getVrtSecMulti
std::vector< xAOD::Vertex * > getVrtSecMulti(workVectorArrxAOD *inpParticlesxAOD, const xAOD::Vertex &primVrt, compatibilityGraph_t &compatibilityGraph) const
Definition: VrtSecMulti.cxx:29
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
AthCUDAExamples::TrackParticleContainer
vecmem::edm::container< TrackParticleInterface, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float > > TrackParticleContainer
SoA, GPU friendly TrackParticleContainer.
Definition: Control/AthenaExamples/AthExCUDA/src/TrackParticleContainer.h:46
Rec::NewVrtSecInclusiveTool::m_eta_wrtSV
SG::AuxElement::Decorator< float > m_eta_wrtSV
Definition: NewVrtSecInclusiveTool.h:211
Rec::NewVrtSecInclusiveTool::m_maxSVRadiusCut
Gaudi::Property< double > m_maxSVRadiusCut
Definition: NewVrtSecInclusiveTool.h:164
Rec::NewVrtSecInclusiveTool::m_h
std::unique_ptr< Hists > m_h
Definition: NewVrtSecInclusiveTool.h:141
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Rec::NewVrtSecInclusiveTool::m_instanceName
std::string m_instanceName
Definition: NewVrtSecInclusiveTool.h:206
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
Rec::NewVrtSecInclusiveTool::MomProjDist
static double MomProjDist(const Amg::Vector3D &SV, const xAOD::Vertex &PV, const TLorentzVector &Direction)
Definition: MultiUtilities.cxx:260
Rec::NewVrtSecInclusiveTool::m_twoTrkVtxFormingD0Cut
Gaudi::Property< float > m_twoTrkVtxFormingD0Cut
Definition: NewVrtSecInclusiveTool.h:179
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:407
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
Rec::NewVrtSecInclusiveTool::m_cosSVPVCut
Gaudi::Property< float > m_cosSVPVCut
Definition: NewVrtSecInclusiveTool.h:171
Trk::z0
@ z0
Definition: ParamDefs.h:64
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Rec::NewVrtSecInclusiveTool::mergeAndRefitVertices
double mergeAndRefitVertices(WrkVrt &v1, WrkVrt &v2, WrkVrt &newvrt, std::vector< const xAOD::TrackParticle * > &AllTrackList, Trk::IVKalState &istate, int robKey=0) const
Definition: MultiUtilities.cxx:151
Rec::NewVrtSecInclusiveTool::getPixelDiscs
static void getPixelDiscs(const xAOD::TrackParticle *Part, int &d0Hit, int &d1Hit, int &d2Hit)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:234
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:260
xAOD::expectInnermostPixelLayerHit
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Definition: TrackingPrimitives.h:237
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:276
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
SG::AuxVectorData::lockDecoration
void lockDecoration(SG::auxid_t auxid)
Explicitly lock a decoration.
Definition: AuxVectorData.cxx:687
Rec::NewVrtSecInclusiveTool::m_firstPixelLayerR
Gaudi::Property< float > m_firstPixelLayerR
Definition: NewVrtSecInclusiveTool.h:186
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
Rec::NewVrtSecInclusiveTool::m_cutD0Max
Gaudi::Property< double > m_cutD0Max
Definition: NewVrtSecInclusiveTool.h:152
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Rec::NewVrtSecInclusiveTool::m_trackToVertexTool
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Definition: NewVrtSecInclusiveTool.h:197
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Rec::NewVrtSecInclusiveTool::m_is_svtrk_final
SG::AuxElement::Decorator< char > m_is_svtrk_final
Definition: NewVrtSecInclusiveTool.h:209
covarianceTool.prob
prob
Definition: covarianceTool.py:678
xAOD::Vertex_v1::setCovariance
void setCovariance(const std::vector< float > &value)
Sets the covariance matrix as a simple vector of values.
IDTPM::nPixelHits
float nPixelHits(const U &p)
Definition: TrackParametersHelper.h:354
Rec::NewVrtSecInclusiveTool::m_antiPileupSigRCut
Gaudi::Property< float > m_antiPileupSigRCut
Definition: NewVrtSecInclusiveTool.h:166
Rec::NewVrtSecInclusiveTool::select2TrVrt
void select2TrVrt(std::vector< const xAOD::TrackParticle * > &SelectedTracks, const xAOD::Vertex &primVrt, std::map< long int, std::vector< double >> &vrt, compatibilityGraph_t &compatibilityGraph) const
Definition: Sel2TrkVertices.cxx:31
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
Rec::NewVrtSecInclusiveTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: NewVrtSecInclusiveTool.h:193
Rec::NewVrtSecInclusiveTool::m_vrt2TrPtLimit
Gaudi::Property< float > m_vrt2TrPtLimit
Definition: NewVrtSecInclusiveTool.h:160
Rec::NewVrtSecInclusiveTool::massV0
static double massV0(const std::vector< std::vector< double > > &TrkAtVrt, double massP, double massPi)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:176
Rec::NewVrtSecInclusiveTool::estimVrtPos
static std::vector< double > estimVrtPos(int nTrk, std::deque< long int > &selTrk, std::map< long int, std::vector< double >> &vrt)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:365
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
Rec::NewVrtSecInclusiveTool::m_fitSvc
ToolHandle< Trk::TrkVKalVrtFitter > m_fitSvc
Definition: NewVrtSecInclusiveTool.h:196
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Rec::NewVrtSecInclusiveTool::m_fastZSVCut
Gaudi::Property< float > m_fastZSVCut
Definition: NewVrtSecInclusiveTool.h:170
Trk::pixelEndCap0
@ pixelEndCap0
three pixel discs (on each side)
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:237
python.changerun.kk
list kk
Definition: changerun.py:41
Rec::NewVrtSecInclusiveTool::m_removeTrkMatSignif
Gaudi::Property< float > m_removeTrkMatSignif
Definition: NewVrtSecInclusiveTool.h:187
FlavorTagInference::SaltModelVersion::V1
@ V1
Rec::NewVrtSecInclusiveTool::mostHeavyTrk
static int mostHeavyTrk(WrkVrt V, std::vector< const xAOD::TrackParticle * > AllTracks)
Definition: MultiUtilities.cxx:26
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Rec::NewVrtSecInclusiveTool::m_vrt2TrMassLimit
Gaudi::Property< float > m_vrt2TrMassLimit
Definition: NewVrtSecInclusiveTool.h:159
Rec::NewVrtSecInclusiveTool::DevTuple::maxNTrk
static constexpr int maxNTrk
Definition: NewVrtSecInclusiveTool.h:232
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::expectNextToInnermostPixelLayerHit
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
Definition: TrackingPrimitives.h:248
Trk::Layer::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
Rec::NewVrtSecInclusiveTool::m_z0_wrtSV
SG::AuxElement::Decorator< float > m_z0_wrtSV
Definition: NewVrtSecInclusiveTool.h:214
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:355
IsoCloseByCorrectionTest.containers
containers
Associate the close-by pflow objects and the calorimeter clusters.
Definition: IsoCloseByCorrectionTest.py:82
Rec::NewVrtSecInclusiveTool::m_calibFileName
Gaudi::Property< std::string > m_calibFileName
Definition: NewVrtSecInclusiveTool.h:189
lumiFormat.i
int i
Definition: lumiFormat.py:85
Rec::NewVrtSecInclusiveTool::lockDecorations
void lockDecorations(const std::vector< const xAOD::TrackParticle * > &inpTrk) const
Definition: NewVrtSecInclusiveTool.cxx:341
Rec::NewVrtSecInclusiveTool::m_d0_wrtSV
SG::AuxElement::Decorator< float > m_d0_wrtSV
Definition: NewVrtSecInclusiveTool.h:213
Trk::theta
@ theta
Definition: ParamDefs.h:66
Trk::pixelEndCap1
@ pixelEndCap1
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:238
Rec::NewVrtSecInclusiveTool::m_cutTRTHits
Gaudi::Property< long int > m_cutTRTHits
Definition: NewVrtSecInclusiveTool.h:145
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::VxType::SecVtx
@ SecVtx
Secondary vertex.
Definition: TrackingPrimitives.h:573
Trk::electron
@ electron
Definition: ParticleHypothesis.h:27
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
Rec::NewVrtSecInclusiveTool::m_v2tFinBDTCut
Gaudi::Property< float > m_v2tFinBDTCut
Definition: NewVrtSecInclusiveTool.h:169
Rec::NewVrtSecInclusiveTool::m_phi_wrtSV
SG::AuxElement::Decorator< float > m_phi_wrtSV
Definition: NewVrtSecInclusiveTool.h:212
xAOD::GaussianSumFilter
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
Definition: TrackingPrimitives.h:50
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
Rec::NewVrtSecInclusiveTool::m_massPi
double m_massPi
Definition: NewVrtSecInclusiveTool.h:201
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
Rec::NewVrtSecInclusiveTool::m_massP
double m_massP
Definition: NewVrtSecInclusiveTool.h:202
FlavorTagInference::SaltModelVersion::V2
@ V2
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:11
xAOD::TruthParticle_v1::hasProdVtx
bool hasProdVtx() const
Check for a production vertex on this particle.
Definition: TruthParticle_v1.cxx:74
Rec::NewVrtSecInclusiveTool::m_fillHist
Gaudi::Property< bool > m_fillHist
Definition: NewVrtSecInclusiveTool.h:173
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:525
Rec::NewVrtSecInclusiveTool::m_cutBLayHits
Gaudi::Property< long int > m_cutBLayHits
Definition: NewVrtSecInclusiveTool.h:147
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::NewVrtSecInclusiveTool::m_minZVrt
Gaudi::Property< double > m_minZVrt
Definition: NewVrtSecInclusiveTool.h:154
Rec::NewVrtSecInclusiveTool::m_do2TrkIBLChecks
Gaudi::Property< bool > m_do2TrkIBLChecks
Definition: NewVrtSecInclusiveTool.h:175
Trk::Layer::nextLayer
const Layer * nextLayer(const Amg::Vector3D &gp, const Amg::Vector3D &udir) const
getting the next/previous Layer if registered - unit for direction vector required
Definition: Layer.cxx:175
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
makeComparison.rootFile
rootFile
Definition: makeComparison.py:27
Rec::NewVrtSecInclusiveTool::m_trkSigCut
Gaudi::Property< double > m_trkSigCut
Definition: NewVrtSecInclusiveTool.h:156
Rec::NewVrtSecInclusiveTool::m_cutSiHits
Gaudi::Property< long int > m_cutSiHits
Definition: NewVrtSecInclusiveTool.h:146
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
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
xAOD::Vertex_v1::z
float z() const
Returns the z position.
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
jobOption.theta
theta
Definition: jobOption.ParticleGun_fwd_sequence.py:13
Rec::NewVrtSecInclusiveTool::m_augString
Gaudi::Property< std::string > m_augString
Definition: NewVrtSecInclusiveTool.h:199
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
Rec::NewVrtSecInclusiveTool::m_massK0
double m_massK0
Definition: NewVrtSecInclusiveTool.h:204
Rec::NewVrtSecInclusiveTool::m_beampipeR
Gaudi::Property< float > m_beampipeR
Definition: NewVrtSecInclusiveTool.h:185
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:80
Trk::ParticleMasses::mass
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:53
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Rec::NewVrtSecInclusiveTool::momAtVrt
TLorentzVector momAtVrt(const std::vector< double > &inpTrk) const
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:200
Amg::py
@ py
Definition: GeoPrimitives.h:39
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:249
Rec::NewVrtSecInclusiveTool::m_errP_wrtSV
SG::AuxElement::Decorator< float > m_errP_wrtSV
Definition: NewVrtSecInclusiveTool.h:215
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::d0
@ d0
Definition: ParamDefs.h:63
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Rec::NewVrtSecInclusiveTool::m_cutPixelHits
Gaudi::Property< long int > m_cutPixelHits
Definition: NewVrtSecInclusiveTool.h:144
Rec::NewVrtSecInclusiveTool::m_maxZVrt
Gaudi::Property< double > m_maxZVrt
Definition: NewVrtSecInclusiveTool.h:153
charge
double charge(const T &p)
Definition: AtlasPID.h:931
Rec::NewVrtSecInclusiveTool::m_is_selected
SG::AuxElement::Decorator< char > m_is_selected
Definition: NewVrtSecInclusiveTool.h:208
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Trk::VxSecVertexInfo
Definition: VxSecVertexInfo.h:63
xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
Definition: ElectronxAODHelpers.cxx:22
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
Rec::NewVrtSecInclusiveTool::m_chi2_toSV
SG::AuxElement::Decorator< float > m_chi2_toSV
Definition: NewVrtSecInclusiveTool.h:218
Rec::NewVrtSecInclusiveTool::improveVertexChi2
double improveVertexChi2(WrkVrt &vertex, std::vector< const xAOD::TrackParticle * > &allTracks, Trk::IVKalState &istate, bool ifCovV0) const
Definition: MultiUtilities.cxx:195
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Rec::NewVrtSecInclusiveTool::m_multiWithOneTrkVrt
Gaudi::Property< bool > m_multiWithOneTrkVrt
Definition: NewVrtSecInclusiveTool.h:181
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Rec::NewVrtSecInclusiveTool::m_cutPt
Gaudi::Property< double > m_cutPt
Definition: NewVrtSecInclusiveTool.h:150
Rec::NewVrtSecInclusiveTool::m_errd0_wrtSV
SG::AuxElement::Decorator< float > m_errd0_wrtSV
Definition: NewVrtSecInclusiveTool.h:216
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
Rec::NewVrtSecInclusiveTool::compatibilityGraph_t
boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS > compatibilityGraph_t
Definition: NewVrtSecInclusiveTool.h:308
Rec::NewVrtSecInclusiveTool::m_w_1
double m_w_1
Definition: NewVrtSecInclusiveTool.h:103
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
std::unique
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
Definition: DVL_algorithms.h:135
Rec::NewVrtSecInclusiveTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: NewVrtSecInclusiveTool.h:195
a
TList * a
Definition: liststreamerinfos.cxx:10
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:611
Rec::NewVrtSecInclusiveTool::minVrtVrtDist
double minVrtVrtDist(std::vector< WrkVrt > *WrkVrtSet, int &indexV1, int &indexV2, std::vector< double > &check) const
Definition: MultiUtilities.cxx:70
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Rec::NewVrtSecInclusiveTool::vrtVrtDist
static double vrtVrtDist(const xAOD::Vertex &primVrt, const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr, double &signif)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:59
python.BackTrackingConfig.numThreads
int numThreads
Definition: BackTrackingConfig.py:61
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TruthVertex_v1::nIncomingParticles
size_t nIncomingParticles() const
Get the number of incoming particles.
Definition: TruthVertex_v1.cxx:47
Rec::NewVrtSecInclusiveTool::getHists
Hists & getHists() const
Definition: NewVrtSecInclusiveTool.cxx:373
DEBUG
#define DEBUG
Definition: page_access.h:11
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
xAOD::Vertex_v1::y
float y() const
Returns the y position.
Rec::NewVrtSecInclusiveTool::getPreviousParent
static const xAOD::TruthParticle * getPreviousParent(const xAOD::TruthParticle *child, int &ParentPDG)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:282
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DetType::Part
Part
Definition: DetType.h:14
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::Layer::layerMaterialProperties
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
Rec::NewVrtSecInclusiveTool::getG4Inter
static int getG4Inter(const xAOD::TrackParticle *TP)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:294
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:39
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
Rec::NewVrtSecInclusiveTool::distToMatLayerSignificance
double distToMatLayerSignificance(Vrt2Tr &Vrt) const
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:315
Rec::NewVrtSecInclusiveTool::m_pt_wrtSV
SG::AuxElement::Decorator< float > m_pt_wrtSV
Definition: NewVrtSecInclusiveTool.h:210
Rec::NewVrtSecInclusiveTool::m_dRdZRatioCut
Gaudi::Property< float > m_dRdZRatioCut
Definition: NewVrtSecInclusiveTool.h:167
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:269
Rec::NewVrtSecInclusiveTool::projSV_PV
static double projSV_PV(const Amg::Vector3D &SV, const xAOD::Vertex &PV, const TLorentzVector &Direction)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:53
Trk::phi
@ phi
Definition: ParamDefs.h:75
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Rec::NewVrtSecInclusiveTool::m_vrtMassLimit
Gaudi::Property< float > m_vrtMassLimit
Definition: NewVrtSecInclusiveTool.h:158
Rec::NewVrtSecInclusiveTool::m_errz0_wrtSV
SG::AuxElement::Decorator< float > m_errz0_wrtSV
Definition: NewVrtSecInclusiveTool.h:217
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
calibdata.copy
bool copy
Definition: calibdata.py:27
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Trk::nonInteractingMuon
@ nonInteractingMuon
Definition: ParticleHypothesis.h:36
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
Rec::NewVrtSecInclusiveTool::m_SV2T_BDT
std::unique_ptr< MVAUtils::BDT > m_SV2T_BDT
Definition: NewVrtSecInclusiveTool.h:191
Rec::NewVrtSecInclusiveTool::vrtRadiusError
static double vrtRadiusError(const Amg::Vector3D &secVrt, const std::vector< double > &vrtErr)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:159
Rec::NewVrtSecInclusiveTool::refitVertex
double refitVertex(WrkVrt &Vrt, std::vector< const xAOD::TrackParticle * > &SelectedTracks, Trk::IVKalState &istate, bool ifCovV0) const
Definition: MultiUtilities.cxx:221
Rec::NewVrtSecInclusiveTool::printWrkSet
void printWrkSet(const std::vector< WrkVrt > *WrkSet, const std::string &name) const
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:26
PlotCalibFromCool.vv
vv
Definition: PlotCalibFromCool.py:716
Rec::NewVrtSecInclusiveTool::m_globVrtProbCut
Gaudi::Property< double > m_globVrtProbCut
Definition: NewVrtSecInclusiveTool.h:163
Rec::NewVrtSecInclusiveTool::DevTuple::maxNVrt
static constexpr int maxNVrt
Definition: NewVrtSecInclusiveTool.h:233
python.compressB64.c
def c
Definition: compressB64.py:93
Rec::NewVrtSecInclusiveTool::m_massE
double m_massE
Definition: NewVrtSecInclusiveTool.h:203
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Rec::NewVrtSecInclusiveTool::m_selVrtSigCut
Gaudi::Property< double > m_selVrtSigCut
Definition: NewVrtSecInclusiveTool.h:165
Rec::NewVrtSecInclusiveTool::m_cutD0Min
Gaudi::Property< double > m_cutD0Min
Definition: NewVrtSecInclusiveTool.h:151
Rec::NewVrtSecInclusiveTool::m_useVertexCleaning
Gaudi::Property< bool > m_useVertexCleaning
Definition: NewVrtSecInclusiveTool.h:177
Rec::NewVrtSecInclusiveTool::m_vertexMergeCut
Gaudi::Property< float > m_vertexMergeCut
Definition: NewVrtSecInclusiveTool.h:183
fitman.k
k
Definition: fitman.py:528
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:238
Rec::NewVrtSecInclusiveTool::m_massLam
double m_massLam
Definition: NewVrtSecInclusiveTool.h:205
Trk::Layer
Definition: Layer.h:73
Rec::NewVrtSecInclusiveTool::nTrkCommon
static int nTrkCommon(std::vector< WrkVrt > *WrkVrtSet, int indexV1, int indexV2)
Definition: MultiUtilities.cxx:48
xAOD::TruthVertex_v1::incomingParticleLinks
const TPLinks_t & incomingParticleLinks() const
Get all the incoming particles.
Rec::NewVrtSecInclusiveTool::PntPntDist
static double PntPntDist(const Amg::Vector3D &Vrt1, const Amg::Vector3D &Vrt2)
Definition: Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx:148