34 return StatusCode::SUCCESS;
55 std::vector<const xAOD::Electron*> els;
56 els.reserve(electrons->size());
60 for (
auto el : *electrons ) {
62 ATH_MSG_INFO(
"elpt/eta/phi " << el->pt() <<
"," << el->eta() <<
"," << el->phi());
66 if (fabs(el->caloCluster()->eta()) >= 2.47)
continue;
67 if (el->pt() <= 7000.)
continue;
69 float d0 = el_tp->
d0();
70 if (primaryVtx) d0 = (el_tp->
z0() - primaryVtx->
z() + el_tp->
vz());
72 if (fabs(d0) > 10.)
continue;
89 float res = el0->
pt() * 0.1 / sqrt(el0->
e());
91 res = el1->
pt() * 0.1 / sqrt(el1->
e());
98 TLorentzVector fit4vec;
99 result.getCompositeFourVector(fit4vec);
109 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
std::pair< std::vector< unsigned int >, bool > res
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
std::string m_electronContName
virtual StatusCode execute()
Function executing the algorithm.
TestAthenaConstraintFit(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
std::string m_vertexContName
ToolHandle< ZMassConstraint::IConstraintFit > m_constraintFit
virtual StatusCode initialize()
Function initialising the algorithm.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double e() const override
The total energy of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
float charge() const
Obtain the charge of the object.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
float z0() const
Returns the parameter.
float vz() const
The z origin for the parameters.
float d0() const
Returns the parameter.
float z() const
Returns the z position.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
Electron_v1 Electron
Definition of the current "egamma version".