|
ATLAS Offline Software
|
#include <ReVertex.h>
|
| ReVertex (const std::string &t, const std::string &n, const IInterface *p) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | addBranches () const override |
| Pass the thinning service
More...
|
|
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 |
|
xAOD::Vertex * | fit (const std::vector< const xAOD::TrackParticle * > &inputTracks, const xAOD::TrackParticleContainer *importedTrackCollection, const xAOD::Vertex *pv) const |
|
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 |
|
Definition at line 42 of file ReVertex.h.
◆ StoreGateSvc_t
◆ ReVertex()
ReVertex::ReVertex |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 27 of file ReVertex.cxx.
42 declareInterface<DerivationFramework::IAugmentationTool>(
this);
◆ addBranches()
StatusCode ReVertex::addBranches |
( |
| ) |
const |
|
overridevirtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 109 of file ReVertex.cxx.
110 const EventContext& ctx = Gaudi::Hive::currentContext();
112 ATH_CHECK(vtxContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
119 ATH_CHECK(importedTrackCollection.isValid());
137 for(
size_t i =0;
i<Ntracks;
i++)
140 if(trackN >=
v->nTrackParticles())
143 return StatusCode::FAILURE;
145 fitpair[
i] =
v->trackParticle(trackN);
151 for (
auto trkItr=importedTrackCollection->cbegin(); trkItr!=importedTrackCollection->cend(); ++trkItr) {
153 fitpair.back() =
nullptr;
162 fitAndStore(vtxContainer.ptr(),
v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
167 fitAndStore(vtxContainer.ptr(),
v,InVtxContainer.cptr(),fitpair,importedTrackCollection.cptr(),pvContainer.cptr());
184 ATH_CHECK(refPvContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
186 if(vtxContainer->size() >0){
196 std::vector<const xAOD::TrackParticleContainer*> trackCols;
199 trackCols.push_back(handle.cptr());
201 if(not trackCols.empty()){
205 }
catch(std::runtime_error
const&
e){
207 return StatusCode::FAILURE;
211 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ fit()
Definition at line 274 of file ReVertex.cxx.
288 pv->position().z(), *state);
304 if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
309 std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
314 newLinkVector.push_back( mylink );
◆ fitAndStore()
Definition at line 214 of file ReVertex.cxx.
221 std::unique_ptr<xAOD::Vertex>
ptr(
fit(
inputTracks, importedTrackCollection,
nullptr));
224 double chi2DOF =
ptr->chiSquared()/
ptr->numberDoF();
227 if(!chi2CutPassed) {
ATH_MSG_DEBUG(
"Chi Cut failed!");
return; }
229 bHelper.setRefTrks();
231 TLorentzVector bMomentum = bHelper.totalP(
m_trkMasses);
232 double bMass = bMomentum.M();
234 if(!passesCuts)
return;
238 std::vector<const xAOD::Vertex*> thePreceding;
239 thePreceding.push_back(
v);
243 if (!closestRefPV.
get())
return;
244 std::unique_ptr<xAOD::Vertex> ptrPV(
fit(
inputTracks, importedTrackCollection, closestRefPV.
get()));
247 double chi2DOFPV = ptrPV->chiSquared()/ptrPV->numberDoF();
250 if(!chi2CutPassed) {
ATH_MSG_DEBUG(
"Chi Cut failed!");
return; }
252 bHelperPV.setRefTrks();
254 TLorentzVector bMomentumPV = bHelperPV.totalP(
m_trkMasses);
255 double bMass = bMomentumPV.M();
257 if(!passesCuts)
return;
260 bHelperPV.setPrecedingVertices(thePreceding, InVtxContainer);
261 vtxContainer->
push_back(ptrPV.release());
264 bHelper.setPrecedingVertices(thePreceding, InVtxContainer);
◆ initialize()
StatusCode ReVertex::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 85 of file ReVertex.cxx.
89 return StatusCode::FAILURE;
96 if(
m_VKVFitter==
nullptr)
return StatusCode::FAILURE;
105 return StatusCode::SUCCESS;
◆ inputHandles()
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& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ 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_detStore
◆ 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_evtStore
◆ 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_varHandleArraysDeclared
◆ m_vertexEstimator
◆ m_vertexFittingWithPV
bool DerivationFramework::ReVertex::m_vertexFittingWithPV {} |
|
private |
◆ m_vhka
◆ 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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
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 * > &)
virtual void setOwner(IDataHandleHolder *o)=0
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
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final