ATLAS Offline Software
ReVertex.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 // ****************************************************************************
5 // ----------------------------------------------------------------------------
6 // ReVertex
7 //
8 // Konstantin Beloborodov <Konstantin.Beloborodov@cern.ch>
9 //
10 // ----------------------------------------------------------------------------
11 // ****************************************************************************
12 #include "ReVertex.h"
17 
19 #include "BPhysPVTools.h"
24 
25 using namespace DerivationFramework;
26 
27 ReVertex::ReVertex(const std::string& t,
28  const std::string& n,
29  const IInterface* p) :
30  base_class(t,n,p), m_vertexEstimator("InDet::VertexPointEstimator"), m_iVertexFitter("Trk::TrkVKalVrtFitter"),
31  m_massConst(0.),
32  m_totalMassConst(0.),
33  m_v0Tools("Trk::V0Tools"),
34  m_pvRefitter("Analysis::PrimaryVertexRefitter", this),
35  m_doMassConst(false),
36  m_vertexFittingWithPV(false),
37  m_chi2cut(-1.0),
38  m_trkDeltaZ(-1.0),
39  m_useAdditionalTrack(false)
40 {
41 
42  declareProperty("TrackIndices", m_TrackIndices);
43  declareProperty("TrkVertexFitterTool", m_iVertexFitter);
44  declareProperty("VertexPointEstimator",m_vertexEstimator);
45 
46  declareProperty("OutputVtxContainerName", m_OutputContainerName);
47  declareProperty("InputVtxContainerName", m_inputContainerName);
48  declareProperty("TrackContainerName", m_trackContainer = "InDetTrackParticles");
49  declareProperty("UseVertexFittingWithPV", m_vertexFittingWithPV);
50 
51  declareProperty("HypothesisNames",m_hypoNames);
52 
53  declareProperty("V0Tools" , m_v0Tools);
54  declareProperty("PVRefitter" , m_pvRefitter);
55  declareProperty("DefaultPVContainerName", m_defaultPVContainerName = "PrimaryVertices");
56  declareProperty("PVContainerName" , m_pvContainerName = "PrimaryVertices");
57  declareProperty("RefPVContainerName" , m_refPVContainerName = "RefittedPrimaryVertices");
58 
59  declareProperty("UseMassConstraint", m_doMassConst);
60  declareProperty("VertexMass", m_totalMassConst);
61  declareProperty("SubVertexMass", m_massConst);
62  declareProperty("MassInputParticles", m_trkMasses);
63  declareProperty("SubVertexTrackIndices", m_indices);
64 
65  declareProperty("UseAdditionalTrack", m_useAdditionalTrack);
66 
67  declareProperty("RefitPV" , m_refitPV = false);
68  //This parameter will allow us to optimize the number of PVs under consideration as the probability
69  //of a useful primary vertex drops significantly the higher you go
70  declareProperty("MaxPVrefit" , m_PV_max = 1000);
71  declareProperty("DoVertexType" , m_DoVertexType = 7);
72  // minimum number of tracks for PV to be considered for PV association
73  declareProperty("MinNTracksInPV" , m_PV_minNTracks = 0);
74  declareProperty("Do3d" , m_do3d = false);
75  declareProperty("AddPVData" , m_AddPVData = true);
76  declareProperty("StartingPoint0" , m_startingpoint0 = false);
77  declareProperty("BMassUpper",m_BMassUpper = std::numeric_limits<double>::max() );
78  declareProperty("BMassLower",m_BMassLower = std::numeric_limits<double>::min() );
79  declareProperty("Chi2Cut",m_chi2cut = std::numeric_limits<double>::max() );
80  declareProperty("TrkDeltaZ",m_trkDeltaZ);
81 
82 
83 }
84 
86  ATH_MSG_DEBUG("in initialize()");
87  if(m_TrackIndices.empty()) {
88  ATH_MSG_FATAL("No Indices provided");
89  return StatusCode::FAILURE;
90  }
91  ATH_CHECK(m_iVertexFitter.retrieve());
92  ATH_CHECK(m_v0Tools.retrieve());
93  ATH_CHECK(m_pvRefitter.retrieve());
94  ATH_CHECK(m_vertexEstimator.retrieve());
95  m_VKVFitter = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_iVertexFitter));
96  if(m_VKVFitter==nullptr) return StatusCode::FAILURE;
97  ATH_CHECK(m_OutputContainerName.initialize());
98  ATH_CHECK(m_inputContainerName.initialize());
100  ATH_CHECK(m_defaultPVContainerName.initialize());
101  ATH_CHECK(m_pvContainerName.initialize());
102  ATH_CHECK(m_refPVContainerName.initialize());
104  ATH_CHECK(m_RelinkContainers.initialize());
105  ATH_CHECK(m_CollectionsToCheck.initialize());
106  return StatusCode::SUCCESS;
107 }
108 
109 
111  const EventContext& ctx = Gaudi::Hive::currentContext();
113  ATH_CHECK(vtxContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
114 
115  const size_t Ntracks = m_TrackIndices.size();
116 
119  ATH_CHECK(InVtxContainer.isValid());
120  ATH_CHECK(importedTrackCollection.isValid());
121  //----------------------------------------------------
122  // retrieve primary vertices
123  //----------------------------------------------------
125  ATH_CHECK(defaultPVContainer.isValid());
126 
128  ATH_CHECK(pvContainer.isValid());
129 
130  std::vector<const xAOD::TrackParticle*> fitpair(Ntracks + m_useAdditionalTrack);
131  for(const xAOD::Vertex* v : *InVtxContainer)
132  {
133 
134  bool passed = false;
135  for(size_t i=0;i<m_hypoNames.size();i++) {
137  passed |= onia.pass();
138  }
139  if (!passed && m_hypoNames.size()) continue;
140 
141  for(size_t i =0; i<Ntracks; i++)
142  {
143  size_t trackN = m_TrackIndices[i];
144  if(trackN >= v->nTrackParticles())
145  {
146  ATH_MSG_FATAL("Indices exceeds limit in particle");
147  return StatusCode::FAILURE;
148  }
149  fitpair[i] = v->trackParticle(trackN);
150  }
151 
153  {
154  // Loop over ID tracks, call vertexing
155  for (auto trkItr=importedTrackCollection->cbegin(); trkItr!=importedTrackCollection->cend(); ++trkItr) {
156  const xAOD::TrackParticle* tp (*trkItr);
157  fitpair.back() = nullptr;
158  if (Analysis::JpsiUpsilonCommon::isContainedIn(tp,fitpair)) continue; // remove tracks which were used to build J/psi+2Tracks
159  fitpair.back() = tp;
160 
161  // Daniel Scheirich: remove track too far from the Jpsi+2Tracks vertex (DeltaZ cut)
162  if(m_trkDeltaZ>0 &&
163  std::abs((tp)->z0() + (tp)->vz() - v->z()) > m_trkDeltaZ )
164  continue;
165 
166  fitAndStore(vtxContainer.ptr(),v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
167  }
168  }
169  else
170  {
171  fitAndStore(vtxContainer.ptr(),v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
172  }
173  }
174 
175  if(m_AddPVData){
176  // Give the helper class the ptr to v0tools and beamSpotsSvc to use
178  if(not evt.isValid()) ATH_MSG_ERROR("Cannot Retrieve " << evt.key() );
179  BPhysPVTools helper(&(*m_v0Tools), evt.cptr());
180  helper.SetMinNTracksInPV(m_PV_minNTracks);
181  helper.SetSave3d(m_do3d);
182 
183  if(m_refitPV) {
184  //----------------------------------------------------
185  // Try to retrieve refitted primary vertices
186  //----------------------------------------------------
188  ATH_CHECK(refPvContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
189 
190  if(vtxContainer->size() >0){
191  ATH_CHECK(helper.FillCandwithRefittedVertices(vtxContainer.ptr(), pvContainer.cptr(), refPvContainer.ptr(), &(*m_pvRefitter) , m_PV_max, m_DoVertexType));
192  }
193  }else{
194  if(pvContainer->size()==0) {
195  if(vtxContainer->size() >0) ATH_CHECK(helper.FillCandExistingVertices(vtxContainer.ptr(), defaultPVContainer.cptr(), m_DoVertexType));
196  }
197  else {
198  if(vtxContainer->size() >0) ATH_CHECK(helper.FillCandExistingVertices(vtxContainer.ptr(), pvContainer.cptr(), m_DoVertexType));
199  }
200  }
201  }
202 
204 
205  std::vector<const xAOD::TrackParticleContainer*> trackCols;
206  for(const auto &str : m_RelinkContainers){
208  trackCols.push_back(handle.cptr());
209  }
210  if(not trackCols.empty()){
211  for(xAOD::Vertex* vtx : *vtxContainer){
212  try{
214  }catch(std::runtime_error const& e){
215  ATH_MSG_ERROR(e.what());
216  return StatusCode::FAILURE;
217  }
218  }
219  }
220  return StatusCode::SUCCESS;
221 }
222 
224  const xAOD::Vertex* v,
225  const xAOD::VertexContainer *InVtxContainer,
226  const std::vector<const xAOD::TrackParticle*> &inputTracks,
227  const xAOD::TrackParticleContainer* importedTrackCollection,
228  const xAOD::VertexContainer* pvContainer) const
229 {
230  std::unique_ptr<xAOD::Vertex> ptr(fit(inputTracks, importedTrackCollection, nullptr));
231  if(!ptr)return;
232 
233  double chi2DOF = ptr->chiSquared()/ptr->numberDoF();
234  ATH_MSG_DEBUG("Candidate chi2/DOF is " << chi2DOF);
235  bool chi2CutPassed = (m_chi2cut <= 0.0 || chi2DOF < m_chi2cut);
236  if(!chi2CutPassed) { ATH_MSG_DEBUG("Chi Cut failed!"); return; }
237  xAOD::BPhysHelper bHelper(ptr.get());//"get" does not "release" still automatically deleted
238  bHelper.setRefTrks();
239  if (m_trkMasses.size()==inputTracks.size()) {
240  TLorentzVector bMomentum = bHelper.totalP(m_trkMasses);
241  double bMass = bMomentum.M();
242  bool passesCuts = (m_BMassUpper > bMass && bMass > m_BMassLower);
243  if(!passesCuts)return;
244  }
245 
246  DerivationFramework::BPhysPVTools::PrepareVertexLinks( ptr.get(), importedTrackCollection );
247  std::vector<const xAOD::Vertex*> thePreceding;
248  thePreceding.push_back(v);
250  //
251  Analysis::CleanUpVertex closestRefPV = Analysis::JpsiUpsilonCommon::ClosestRefPV(bHelper, pvContainer, &(*m_pvRefitter));
252  if (!closestRefPV.get()) return;
253  std::unique_ptr<xAOD::Vertex> ptrPV(fit(inputTracks, importedTrackCollection, closestRefPV.get()));
254  if(!ptrPV) return;
255 
256  double chi2DOFPV = ptrPV->chiSquared()/ptrPV->numberDoF();
257  ATH_MSG_DEBUG("CandidatePV chi2/DOF is " << chi2DOFPV);
258  bool chi2CutPassed = (m_chi2cut <= 0.0 || chi2DOFPV < m_chi2cut);
259  if(!chi2CutPassed) { ATH_MSG_DEBUG("Chi Cut failed!"); return; }
260  xAOD::BPhysHelper bHelperPV(ptrPV.get());//"get" does not "release" still automatically deleted
261  bHelperPV.setRefTrks();
262  if (m_trkMasses.size()==inputTracks.size()) {
263  TLorentzVector bMomentumPV = bHelperPV.totalP(m_trkMasses);
264  double bMass = bMomentumPV.M();
265  bool passesCuts = (m_BMassUpper > bMass && bMass > m_BMassLower);
266  if(!passesCuts)return;
267  }
268 
269  bHelperPV.setPrecedingVertices(thePreceding, InVtxContainer);
270  vtxContainer->push_back(ptrPV.release());
271  return; //Don't store other vertex
272  }
273  bHelper.setPrecedingVertices(thePreceding, InVtxContainer);
274  vtxContainer->push_back(ptr.release());
275 }
276 
277  // *********************************************************************************
278 
279  // ---------------------------------------------------------------------------------
280  // fit - does the fit
281  // ---------------------------------------------------------------------------------
282 
283 xAOD::Vertex* ReVertex::fit(const std::vector<const xAOD::TrackParticle*> &inputTracks,
284  const xAOD::TrackParticleContainer* importedTrackCollection,
285  const xAOD::Vertex* pv) const
286 {
287  std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState();
288  if (m_doMassConst && (m_trkMasses.size()==inputTracks.size())) {
292  }
293  if (pv) {
294  m_VKVFitter->setCnstType(8, *state);
295  m_VKVFitter->setVertexForConstraint(pv->position().x(),
296  pv->position().y(),
297  pv->position().z(), *state);
298  m_VKVFitter->setCovVrtForConstraint(pv->covariancePosition()(Trk::x,Trk::x),
299  pv->covariancePosition()(Trk::y,Trk::x),
300  pv->covariancePosition()(Trk::y,Trk::y),
301  pv->covariancePosition()(Trk::z,Trk::x),
302  pv->covariancePosition()(Trk::z,Trk::y),
303  pv->covariancePosition()(Trk::z,Trk::z), *state );
304  }
305 
306  // Do the fit itself.......
307  // Starting point (use the J/psi position)
308  const Trk::Perigee& aPerigee1 = inputTracks[0]->perigeeParameters();
309  const Trk::Perigee& aPerigee2 = inputTracks[1]->perigeeParameters();
310  int sflag = 0;
311  int errorcode = 0;
312  Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&aPerigee1,&aPerigee2,sflag,errorcode);
313  if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
314  xAOD::Vertex* theResult = m_VKVFitter->fit(inputTracks, startingPoint, *state);
315 
316  // Added by ASC
317  if(theResult != 0){
318  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
319  for(unsigned int i=0; i< theResult->trackParticleLinks().size(); i++)
320  {
321  ElementLink<DataVector<xAOD::TrackParticle> > mylink=theResult->trackParticleLinks()[i]; //makes a copy (non-const)
322  mylink.setStorableObject( *importedTrackCollection, true);
323  newLinkVector.push_back( mylink );
324  }
325  theResult->clearTracks();
326  theResult->setTrackParticleLinks( newLinkVector );
327  }
328 
329  return theResult;
330 }
BPhysPVTools.h
DerivationFramework::ReVertex::m_refPVContainerName
SG::WriteHandleKey< xAOD::VertexContainer > m_refPVContainerName
Definition: ReVertex.h:68
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Trk::y
@ y
Definition: ParamDefs.h:56
Analysis::JpsiUpsilonCommon::ClosestRefPV
static Analysis::CleanUpVertex ClosestRefPV(xAOD::BPhysHelper &, const xAOD::VertexContainer *, const Analysis::PrimaryVertexRefitter *)
Definition: JpsiUpsilonCommon.cxx:94
V0Tools.h
DerivationFramework::ReVertex::m_TrackIndices
std::vector< int > m_TrackIndices
Definition: ReVertex.h:61
Analysis::CleanUpVertex
Definition: JpsiUpsilonCommon.h:22
xAOD::BPhysHelper::totalP
TVector3 totalP()
: Returns total 3-momentum calculated from the refitted tracks
Definition: BPhysHelper.cxx:374
Analysis::CleanUpVertex::get
const xAOD::Vertex * get() const
Definition: JpsiUpsilonCommon.h:26
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::ReVertex::m_OutputContainerName
SG::WriteHandleKey< xAOD::VertexContainer > m_OutputContainerName
Definition: ReVertex.h:65
DerivationFramework::ReVertex::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &inputTracks, const xAOD::TrackParticleContainer *importedTrackCollection, const xAOD::Vertex *pv) const
Definition: ReVertex.cxx:283
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
DerivationFramework::ReVertex::m_massConst
double m_massConst
Definition: ReVertex.h:74
Trk::TrkVKalVrtFitter::setVertexForConstraint
virtual void setVertexForConstraint(const xAOD::Vertex &, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:159
Trk::TrkVKalVrtFitter::setCovVrtForConstraint
virtual void setCovVrtForConstraint(double XX, double XY, double YY, double XZ, double YZ, double ZZ, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:185
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
DerivationFramework::ReVertex::addBranches
virtual StatusCode addBranches() const override
Definition: ReVertex.cxx:110
DerivationFramework::ReVertex::m_PV_minNTracks
size_t m_PV_minNTracks
Definition: ReVertex.h:83
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
VertexPointEstimator.h
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
DerivationFramework::ReVertex::m_vertexFittingWithPV
bool m_vertexFittingWithPV
Definition: ReVertex.h:90
DerivationFramework::ReVertex::m_useAdditionalTrack
bool m_useAdditionalTrack
Definition: ReVertex.h:97
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
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
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
DerivationFramework::ReVertex::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: ReVertex.h:80
DerivationFramework::ReVertex::m_chi2cut
double m_chi2cut
Definition: ReVertex.h:94
DerivationFramework::BPhysPVTools
Definition: BPhysPVTools.h:25
ParticleTest.tp
tp
Definition: ParticleTest.py:25
DerivationFramework::ReVertex::m_hypoNames
std::vector< std::string > m_hypoNames
Definition: ReVertex.h:76
DerivationFramework::ReVertex::m_inputContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerName
Definition: ReVertex.h:66
xAOD::BPhysHypoHelper::pass
bool pass() const
get the pass flag for this hypothesis
Definition: BPhysHypoHelper.cxx:361
DataVector::cend
const_iterator cend() const noexcept
Return a const_iterator pointing past the end of the collection.
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DerivationFramework::ReVertex::m_VKVFitter
Trk::TrkVKalVrtFitter * m_VKVFitter
Definition: ReVertex.h:64
Analysis::JpsiUpsilonCommon::isContainedIn
static bool isContainedIn(const xAOD::TrackParticle *, const std::vector< const xAOD::TrackParticle * > &)
Definition: JpsiUpsilonCommon.cxx:58
xAOD::BPhysHelper::setPrecedingVertices
bool setPrecedingVertices(const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer)
Sets links to preceding vertices.
Definition: BPhysHelper.cxx:641
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PrimaryVertexRefitter.h
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
TrkVKalVrtFitter.h
DerivationFramework::ReVertex::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: ReVertex.h:62
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:115
DerivationFramework::ReVertex::m_trackContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackContainer
Definition: ReVertex.h:67
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
DerivationFramework::ReVertex::m_refitPV
bool m_refitPV
Definition: ReVertex.h:86
xAOD::BPhysHypoHelper
Definition: BPhysHypoHelper.h:73
Trk::TrkVKalVrtFitter::setMassForConstraint
virtual void setMassForConstraint(double Mass, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:141
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
DerivationFramework::ReVertex::m_pvRefitter
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
Definition: ReVertex.h:79
DerivationFramework::ReVertex::m_BMassUpper
double m_BMassUpper
Definition: ReVertex.h:92
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
python.TrigInDetConfig.inputTracks
inputTracks
Definition: TrigInDetConfig.py:191
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::ReVertex::m_RelinkContainers
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_RelinkContainers
Definition: ReVertex.h:100
DerivationFramework::ReVertex::m_trkMasses
std::vector< double > m_trkMasses
Definition: ReVertex.h:72
beamspotman.n
n
Definition: beamspotman.py:729
DerivationFramework::ReVertex::m_indices
std::vector< int > m_indices
Definition: ReVertex.h:73
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
BPhysHypoHelper.h
: B-physics xAOD helpers.
DerivationFramework::ReVertex::initialize
virtual StatusCode initialize() override
Definition: ReVertex.cxx:85
Trk::TrkVKalVrtFitter::setCnstType
virtual void setCnstType(int, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:89
xAOD::Vertex_v1::setTrackParticleLinks
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
DerivationFramework::ReVertex::m_DoVertexType
int m_DoVertexType
Definition: ReVertex.h:82
DerivationFramework::ReVertex::m_do3d
bool m_do3d
Definition: ReVertex.h:84
DerivationFramework::ReVertex::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
Definition: ReVertex.h:78
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DerivationFramework::BPhysPVTools::PrepareVertexLinks
static void PrepareVertexLinks(xAOD::Vertex *theResult, const xAOD::TrackParticleContainer *importedTrackCollection)
Definition: BPhysPVTools.cxx:530
JpsiUpsilonCommon.h
DerivationFramework::ReVertex::ReVertex
ReVertex(const std::string &t, const std::string &n, const IInterface *p)
Definition: ReVertex.cxx:27
xAOD::Vertex_v1::clearTracks
void clearTracks()
Remove all tracks from the vertex.
Definition: Vertex_v1.cxx:331
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Analysis::JpsiUpsilonCommon::RelinkVertexTracks
static void RelinkVertexTracks(const std::vector< const xAOD::TrackParticleContainer * > &trkcols, xAOD::Vertex *vtx)
Definition: JpsiUpsilonCommon.cxx:126
DerivationFramework::ReVertex::m_PV_max
int m_PV_max
Definition: ReVertex.h:81
DerivationFramework::ReVertex::m_AddPVData
bool m_AddPVData
Definition: ReVertex.h:85
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IVertexFitter.h
DerivationFramework::ReVertex::m_BMassLower
double m_BMassLower
Definition: ReVertex.h:93
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
xAOD::BPhysHelper::setRefTrks
bool setRefTrks(std::vector< float > px, std::vector< float > py, std::vector< float > pz)
Sets refitted track momenta.
Definition: BPhysHelper.cxx:286
DerivationFramework::ReVertex::m_defaultPVContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_defaultPVContainerName
Definition: ReVertex.h:70
DerivationFramework::ReVertex::m_totalMassConst
double m_totalMassConst
Definition: ReVertex.h:75
VertexContainer.h
xAOD::Vertex_v1::chiSquared
float chiSquared() const
Returns the of the vertex fit as float.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
DerivationFramework::ReVertex::m_doMassConst
bool m_doMassConst
Definition: ReVertex.h:87
DerivationFramework::ReVertex::m_startingpoint0
bool m_startingpoint0
Definition: ReVertex.h:88
python.changerun.pv
pv
Definition: changerun.py:79
Analysis::JpsiUpsilonCommon
Definition: JpsiUpsilonCommon.h:39
DataVector::cbegin
const_iterator cbegin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
str
Definition: BTagTrackIpAccessor.cxx:11
DerivationFramework::ReVertex::m_pvContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_pvContainerName
Definition: ReVertex.h:69
DerivationFramework::ReVertex::fitAndStore
void fitAndStore(xAOD::VertexContainer *vtxContainer, const xAOD::Vertex *v, const xAOD::VertexContainer *InVtxContainer, const std::vector< const xAOD::TrackParticle * > &inputTracks, const xAOD::TrackParticleContainer *importedTrackCollection, const xAOD::VertexContainer *pvContainer) const
Definition: ReVertex.cxx:223
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Trk::TrkVKalVrtFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override final
Interface for MeasuredPerigee with starting point.
Definition: TrkVKalVrtFitter.cxx:203
DerivationFramework::ReVertex::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: ReVertex.h:63
Trk::x
@ x
Definition: ParamDefs.h:55
DerivationFramework::ReVertex::m_CollectionsToCheck
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_CollectionsToCheck
Definition: ReVertex.h:99
DerivationFramework::ReVertex::m_trkDeltaZ
double m_trkDeltaZ
Definition: ReVertex.h:95
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::TrkVKalVrtFitter::setMassInputParticles
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:194
Trk::TrkVKalVrtFitter::makeState
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final
Definition: TrkVKalVrtFitter.cxx:58
VertexAuxContainer.h
Trk::TrkVKalVrtFitter
Definition: TrkVKalVrtFitter.h:67
ReVertex.h