Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
34 for (
const auto* vertex : *vertices) {
43 std::pair<float, float>
55 float zCommon = 0.0, zCommonError = 0.0;
58 double beamPosZ = eventInfo->beamPosZ();
59 double beamPosSigmaZ = eventInfo->beamPosSigmaZ();
61 if( beamPosSigmaZ == 0 )
64 zCommon = beamPosZ / beamPosSigmaZ / beamPosSigmaZ;
65 zCommonError = 1.0 / beamPosSigmaZ / beamPosSigmaZ;
81 if (HPV_errz(*
photon) == 0.0) {
85 zCommonError += 1.0 / HPV_errz(*
photon) / HPV_errz(*
photon);
104 zCommon /= zCommonError;
105 zCommonError = 1.0 / sqrt(zCommonError);
108 return std::make_pair(zCommon, zCommonError);
126 std::string
s = Form(
"pt%lu",
i + 1);
128 return (acc.withDefault(conversionVertex, 0) > convPtCut);
136 if (conversionVertex ==
nullptr)
140 for (
size_t i = 0;
i < NumberOfTracks; ++
i) {
159 v.SetPtEtaPhiM(
tp->pt(),
tp->eta(),
tp->phi(), 0.);
164 for (
unsigned int i = 0;
i < accParameterPX(*tp).size(); ++
i) {
166 v.SetPxPyPzE(accParameterPX(*
tp)[
i], accParameterPY(*
tp)[
i], 0, 0);
177 const std::string& derivationPrefix )
185 if (useAux and
pt.isAvailable(*vertex) and eta.isAvailable(*vertex) and
phi.isAvailable(*vertex)) {
187 if(!std::isnan(
pt(*vertex)) and !std::isnan(eta(*vertex)) and !std::isnan(
phi(*vertex))){
188 v.SetPtEtaPhiM(
pt(*vertex), eta(*vertex),
phi(*vertex), 0.0);
192 using namespace asg::msgUserCode;
194 <<
"NaN detected in Vertex decorations (pt, eta, phi) = "
195 <<
" (" <<
pt(*vertex) <<
", " << eta(*vertex) <<
", " <<
phi(*vertex) <<
")");
197 <<
"Recompute sum tracks 4-momenta from associated TrackParticles");
203 for (
size_t i = 0;
i < vertex->nTrackParticles(); ++
i) {
204 tp = vertex->trackParticle(
i);
218 std::string pw = (power == 1) ?
"sumPt" : Form(
"sumPt%d", power);
220 if (useAux and acc.isAvailable(*vertex))
226 for (
size_t i = 0;
i < vertex->nTrackParticles(); ++
i) {
227 tp = vertex->trackParticle(
i);
#define CXXUTILS_TRAPPING_FP
float getVertexSumPt(const xAOD::Vertex *vertex, int power=1, bool useAux=true)
Loop over track particles associated with vertex and return scalar sum of pT^power in GeV (from auxda...
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
TLorentzVector getTrackAtFirstMeasurement(const xAOD::TrackParticle *tp)
Return track at first measurment, useful as proxy to conversion vertex pT.
Helper class to provide type-safe access to aux data.
std::pair< float, float > getZCommonAndError(const xAOD::EventInfo *eventInfo, const xAOD::EgammaContainer *egammas, float convPtCut=2e3)
Return zCommon and zCommonError.
@ zvertex
pointing z at vertex reconstructed from the cluster
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setRcore setEtHad setFside pt
const xAOD::Vertex * getHardestVertex(const xAOD::VertexContainer *vertices)
Return vertex with highest sum pT^2.
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Amg::Vector3D momentumAtVertex(const xAOD::Photon *, bool debug=false)
return the momentum at the vertex (which can be 0)
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
TLorentzVector getVertexMomentum(const xAOD::Vertex *vertex, bool useAux=true, const std::string &derivationPrefix="")
Return vector sum of tracks associated with vertex (from auxdata if available and useAux = true)
Tell the compiler to optimize assuming that FP may trap.
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
Class describing the basic event information.
Photon_v1 Photon
Definition of the current "egamma version".
Class describing a Vertex.
@ errz
associated error on zvertex
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
bool passConvSelection(const xAOD::Photon *photon, float convPtCut=2e3)
Check if photon is converted, and tracks have Si hits and pass selection.
Class describing a TrackParticle.
Helper class to provide constant type-safe access to aux data.
constexpr int pow(int base, int exp) noexcept