33 {
34
36
38 if (!vertexContainer.isValid()){
41 return StatusCode::FAILURE;
42 }
43 auto pvcont = vertexContainer.cptr();
44 if ( pvcont == 0 || pvcont->size()==0 ) {
46 return StatusCode::FAILURE;
47 }
48 for (const auto vx : *pvcont) {
51 break;
52 }
53 }
54
55
56
57 if (pv == nullptr) {
58 ATH_MSG_DEBUG(
"Could not find a primary vertex in this event" );
59 for (auto theVertex : *pvcont) {
62 break;
63 }
64 }
65 if (nullptr == pv) {
67 }
68 }
69
70 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_corrP4_pt(
m_corrP4_ptKey, ctx);
71 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_z0(
m_z0Key, ctx);
72 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_vz(
m_vzKey, ctx);
73 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_d0(
m_d0Key, ctx);
74 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_theta(
m_thetaKey, ctx);
75 SG::WriteDecorHandle<xAOD::FlowElementContainer,float> dec_envWeight(
m_envWeightKey, ctx);
76
78 if (!pfoContainer.isValid()){
81 return StatusCode::FAILURE;
82 }
83 auto cpfos = pfoContainer.cptr();
84
86 if ( cpfo == 0 ) {
88 continue;
89 }
91 if ( ptrk == 0 ) {
93 continue;
94 }
95
96
97 dec_z0(*cpfo) = ptrk->
z0();
98 dec_vz(*cpfo) = ptrk->
vz();
99 dec_d0(*cpfo) = ptrk->
d0();
100 dec_theta(*cpfo) = ptrk->
theta();
101
102
104 const static SG::AuxElement::ConstAccessor<int> accIsInDE("IsInDenseEnvironment");
105 if(accIsInDE.isAvailable(*cpfo)){
107 }
108
109
110 dec_corrP4_pt(*cpfo) =
weight*cpfo->pt();
111 dec_envWeight(*cpfo) =
weight;
112 }
113
114 return StatusCode::SUCCESS;
115 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
float z0() const
Returns the parameter.
float theta() const
Returns the parameter, which has range 0 to .
float vz() const
The z origin for the parameters.
float d0() const
Returns the parameter.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.