Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <ReVertex.h>
Definition at line 42 of file ReVertex.h.
◆ ReVertex()
ReVertex::ReVertex |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 27 of file ReVertex.cxx.
48 declareProperty(
"TrackContainerName",
m_trackContainer =
"InDetTrackParticles");
62 declareProperty(
"SubVertexTrackIndices",
m_indices);
66 declareProperty(
"RefitPV" ,
m_refitPV =
false);
69 declareProperty(
"MaxPVrefit" ,
m_PV_max = 1000);
73 declareProperty(
"Do3d" ,
m_do3d =
false);
◆ addBranches()
StatusCode ReVertex::addBranches |
( |
| ) |
const |
|
overridevirtual |
Definition at line 108 of file ReVertex.cxx.
109 const EventContext& ctx = Gaudi::Hive::currentContext();
111 ATH_CHECK(vtxContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
118 ATH_CHECK(importedTrackCollection.isValid());
136 for(
size_t i =0;
i<Ntracks;
i++)
139 if(trackN >=
v->nTrackParticles())
142 return StatusCode::FAILURE;
144 fitpair[
i] =
v->trackParticle(trackN);
150 for (
auto trkItr=importedTrackCollection->cbegin(); trkItr!=importedTrackCollection->cend(); ++trkItr) {
152 fitpair.back() =
nullptr;
161 fitAndStore(vtxContainer.ptr(),
v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
166 fitAndStore(vtxContainer.ptr(),
v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
183 ATH_CHECK(refPvContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
185 if(vtxContainer->size() >0){
195 std::vector<const xAOD::TrackParticleContainer*> trackCols;
198 trackCols.push_back(handle.cptr());
200 if(not trackCols.empty()){
204 }
catch(std::runtime_error
const&
e){
206 return StatusCode::FAILURE;
210 return StatusCode::SUCCESS;
◆ fit()
Definition at line 273 of file ReVertex.cxx.
287 pv->position().z(), *state);
303 if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
308 std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
313 newLinkVector.push_back( mylink );
◆ fitAndStore()
Definition at line 213 of file ReVertex.cxx.
220 std::unique_ptr<xAOD::Vertex>
ptr(
fit(
inputTracks, importedTrackCollection,
nullptr));
223 double chi2DOF =
ptr->chiSquared()/
ptr->numberDoF();
226 if(!chi2CutPassed) {
ATH_MSG_DEBUG(
"Chi Cut failed!");
return; }
228 bHelper.setRefTrks();
230 TLorentzVector bMomentum = bHelper.totalP(
m_trkMasses);
231 double bMass = bMomentum.M();
233 if(!passesCuts)
return;
237 std::vector<const xAOD::Vertex*> thePreceding;
238 thePreceding.push_back(
v);
242 if (!closestRefPV.
get())
return;
243 std::unique_ptr<xAOD::Vertex> ptrPV(
fit(
inputTracks, importedTrackCollection, closestRefPV.
get()));
246 double chi2DOFPV = ptrPV->chiSquared()/ptrPV->numberDoF();
249 if(!chi2CutPassed) {
ATH_MSG_DEBUG(
"Chi Cut failed!");
return; }
251 bHelperPV.setRefTrks();
253 TLorentzVector bMomentumPV = bHelperPV.totalP(
m_trkMasses);
254 double bMass = bMomentumPV.M();
256 if(!passesCuts)
return;
259 bHelperPV.setPrecedingVertices(thePreceding, InVtxContainer);
260 vtxContainer->
push_back(ptrPV.release());
263 bHelper.setPrecedingVertices(thePreceding, InVtxContainer);
◆ initialize()
StatusCode ReVertex::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 84 of file ReVertex.cxx.
88 return StatusCode::FAILURE;
95 if(
m_VKVFitter==
nullptr)
return StatusCode::FAILURE;
104 return StatusCode::SUCCESS;
◆ m_AddPVData
bool DerivationFramework::ReVertex::m_AddPVData {} |
|
private |
◆ m_BMassLower
double DerivationFramework::ReVertex::m_BMassLower {} |
|
private |
◆ m_BMassUpper
double DerivationFramework::ReVertex::m_BMassUpper {} |
|
private |
◆ m_chi2cut
double DerivationFramework::ReVertex::m_chi2cut {} |
|
private |
◆ m_CollectionsToCheck
◆ m_do3d
bool DerivationFramework::ReVertex::m_do3d {} |
|
private |
◆ m_doMassConst
bool DerivationFramework::ReVertex::m_doMassConst {} |
|
private |
◆ m_DoVertexType
int DerivationFramework::ReVertex::m_DoVertexType {} |
|
private |
◆ m_eventInfo_key
◆ m_hypoNames
std::vector<std::string> DerivationFramework::ReVertex::m_hypoNames |
|
private |
◆ m_indices
std::vector<int> DerivationFramework::ReVertex::m_indices |
|
private |
◆ m_inputContainerName
◆ m_iVertexFitter
◆ m_massConst
double DerivationFramework::ReVertex::m_massConst {} |
|
private |
◆ m_OutputContainerName
◆ m_PV_max
int DerivationFramework::ReVertex::m_PV_max {} |
|
private |
◆ m_PV_minNTracks
size_t DerivationFramework::ReVertex::m_PV_minNTracks {} |
|
private |
◆ m_pvContainerName
◆ m_pvRefitter
◆ m_refitPV
bool DerivationFramework::ReVertex::m_refitPV {} |
|
private |
◆ m_refPVContainerName
◆ m_RelinkContainers
◆ m_startingpoint0
bool DerivationFramework::ReVertex::m_startingpoint0 {} |
|
private |
◆ m_totalMassConst
double DerivationFramework::ReVertex::m_totalMassConst {} |
|
private |
◆ m_trackContainer
◆ m_TrackIndices
std::vector<int> DerivationFramework::ReVertex::m_TrackIndices |
|
private |
◆ m_trkDeltaZ
double DerivationFramework::ReVertex::m_trkDeltaZ {} |
|
private |
◆ m_trkMasses
std::vector<double> DerivationFramework::ReVertex::m_trkMasses |
|
private |
◆ m_useAdditionalTrack
bool DerivationFramework::ReVertex::m_useAdditionalTrack {} |
|
private |
◆ m_v0Tools
ToolHandle<Trk::V0Tools> DerivationFramework::ReVertex::m_v0Tools |
|
private |
◆ m_vertexEstimator
◆ m_vertexFittingWithPV
bool DerivationFramework::ReVertex::m_vertexFittingWithPV {} |
|
private |
◆ m_VKVFitter
The documentation for this class was generated from the following files:
SG::WriteHandleKey< xAOD::VertexContainer > m_refPVContainerName
static Analysis::CleanUpVertex ClosestRefPV(xAOD::BPhysHelper &, const xAOD::VertexContainer *, const Analysis::PrimaryVertexRefitter *)
std::vector< int > m_TrackIndices
const xAOD::Vertex * get() const
SG::WriteHandleKey< xAOD::VertexContainer > m_OutputContainerName
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &inputTracks, const xAOD::TrackParticleContainer *importedTrackCollection, const xAOD::Vertex *pv) const
virtual void setVertexForConstraint(const xAOD::Vertex &, IVKalState &istate) const override final
virtual void setCovVrtForConstraint(double XX, double XY, double YY, double XZ, double YZ, double ZZ, IVKalState &istate) const override final
@ z
global position (cartesian)
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
bool m_vertexFittingWithPV
bool m_useAdditionalTrack
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
std::vector< std::string > m_hypoNames
SG::ReadHandleKey< xAOD::VertexContainer > m_inputContainerName
Trk::TrkVKalVrtFitter * m_VKVFitter
static bool isContainedIn(const xAOD::TrackParticle *, const std::vector< const xAOD::TrackParticle * > &)
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackContainer
virtual void setMassForConstraint(double Mass, IVKalState &istate) const override final
ToolHandle< Analysis::PrimaryVertexRefitter > m_pvRefitter
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_RelinkContainers
std::vector< double > m_trkMasses
std::vector< int > m_indices
virtual void setCnstType(int, IVKalState &istate) const override final
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
ToolHandle< Trk::V0Tools > m_v0Tools
void clearTracks()
Remove all tracks from the vertex.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink implementation for ROOT usage.
static void RelinkVertexTracks(const std::vector< const xAOD::TrackParticleContainer * > &trkcols, xAOD::Vertex *vtx)
bool setStorableObject(BaseConstReference data, bool replace=false, IProxyDict *sg=0)
Set link to point to a new container (storable).
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing a Vertex.
SG::ReadHandleKey< xAOD::VertexContainer > m_pvContainerName
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
Class describing a TrackParticle.
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override final
Interface for MeasuredPerigee with starting point.
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_CollectionsToCheck
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final