Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <ZeeVertexRefittingTool.h>
|
std::string | m_expression |
|
float | m_massCut |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_primaryVertexKey {this, "PVContainerName", "PrimaryVertices", "" } |
|
SG::ReadHandleKey< xAOD::ElectronContainer > | m_electronKey { this, "ElectronContainerName", "Electrons", "" } |
|
SG::WriteHandleKey< xAOD::VertexContainer > | m_refitpvKey {this, "RefittedPVContainerName", "HggPrimaryVertices", "" } |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey { this, "EventInfoKey", "EventInfo", "" } |
|
std::vector< unsigned int > | m_MCSamples |
|
ToolHandle< Analysis::PrimaryVertexRefitter > | m_pvrefitter {this, "PrimaryVertexRefitterTool", "Analysis::PrimaryVertexRefitter"} |
|
Definition at line 36 of file ZeeVertexRefittingTool.h.
◆ ZeeVertexRefittingTool()
DerivationFramework::ZeeVertexRefittingTool::ZeeVertexRefittingTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::ZeeVertexRefittingTool::addBranches |
( |
| ) |
const |
|
override |
Definition at line 71 of file ZeeVertexRefittingTool.cxx.
77 bool skipSample =
true;
84 if (skipSample)
return StatusCode::SUCCESS;
88 if (evtStore()->contains<xAOD::VertexContainer>(
m_refitpvKey.key())) {
89 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_refitpvKey.key() <<
" which already exists. Please use a different key");
90 return StatusCode::FAILURE;
98 refittedPVContainer->setStore( refittedPVAuxContainer );
101 ATH_CHECK(vertexContainer.recordNonConst(std::unique_ptr< xAOD::VertexContainer >(refittedPVContainer),
102 std::unique_ptr< xAOD::VertexAuxContainer >(refittedPVAuxContainer)));
105 for (
const auto *
v : *pv_cont ) {
112 return StatusCode::SUCCESS;
120 std::vector< std::vector<unsigned int> > eepairs;
125 for (
auto pair : eepairs) {
126 std::vector<const xAOD::TrackParticle*> tps = {
131 TLorentzVector
v0, v1, egamVec;
132 if(
electrons->at(pair[0])->caloCluster())
134 v0.SetPtEtaPhiM(
electrons->at(pair[0])->e()/cosh(
electrons->at(pair[0])->caloCluster()->etaBE(2)),
135 electrons->at(pair[0])->caloCluster()->etaBE(2),
136 electrons->at(pair[0])->caloCluster()->phiBE(2),
140 if(
electrons->at(pair[1])->caloCluster())
142 v1.SetPtEtaPhiM(
electrons->at(pair[1])->e()/cosh(
electrons->at(pair[1])->caloCluster()->etaBE(2)),
143 electrons->at(pair[1])->caloCluster()->etaBE(2),
144 electrons->at(pair[1])->caloCluster()->phiBE(2),
150 ATH_MSG_DEBUG(
"Refitting PV for e tracks: " << tps[0] <<
" " << tps[1]);
159 if(ipv !=0 ) refittedPVContainer->
push_back(nv);
169 float vert_dphi = (fabs(vtxmom.DeltaPhi(egamVec)));
171 vertices_sumPt(*
v) = vert_sumpt;
172 vertices_sumPt2(*
v) = vert_sumpt2;
173 vertices_dPhi(*
v) = vert_dphi;
183 std::vector<ElementLink<xAOD::TrackParticleContainer> > electronTrackLinks = {
184 electrons->at(pair[0])->trackParticleLink(),
185 electrons->at(pair[1])->trackParticleLink()
187 electronTrackLinksDecor(*pv_ref) = electronTrackLinks;
189 ATH_MSG_DEBUG(
"Electrons from pair not used in the refitting ");
197 ATH_MSG_DEBUG(
"Vertex container size: " << refittedPVContainer->size());
199 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::ZeeVertexRefittingTool::finalize |
( |
| ) |
|
|
override |
◆ initialize()
StatusCode DerivationFramework::ZeeVertexRefittingTool::initialize |
( |
| ) |
|
|
override |
◆ makeZeePairs()
StatusCode DerivationFramework::ZeeVertexRefittingTool::makeZeePairs |
( |
const xAOD::ElectronContainer * |
particles, |
|
|
std::vector< std::vector< unsigned int > > & |
ZeePairs |
|
) |
| const |
|
private |
Definition at line 202 of file ZeeVertexRefittingTool.cxx.
204 if (
particles->size()<2)
return StatusCode::SUCCESS;
207 std::vector<int> isSelected = m_parser->evaluateAsVector();
208 unsigned int nEntries = isSelected.size();
211 if (
nEntries==0)
return StatusCode::SUCCESS;
216 return StatusCode::FAILURE;
221 if (isSelected[
i]!=1)
continue;
224 for (
unsigned int j=
i+1; j<
nEntries; ++j) {
225 if (isSelected[j]!=1)
continue;
229 if (qi*qj>=0)
continue;
235 ZeePairs.push_back( {
i, j} );
238 return StatusCode::SUCCESS;
◆ m_electronKey
◆ m_eventInfoKey
◆ m_expression
std::string DerivationFramework::ZeeVertexRefittingTool::m_expression |
|
private |
◆ m_massCut
float DerivationFramework::ZeeVertexRefittingTool::m_massCut |
|
private |
◆ m_MCSamples
std::vector<unsigned int> DerivationFramework::ZeeVertexRefittingTool::m_MCSamples |
|
private |
◆ m_primaryVertexKey
◆ m_pvrefitter
◆ m_refitpvKey
The documentation for this class was generated from the following files:
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.
Temporary container used until we have I/O for AuxStoreInternal.
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ IS_SIMULATION
true: simulation, false: data
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
#define CHECK(...)
Evaluate an expression and check for errors.
float z() const
Returns the z position.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void makePrivateStore()
Create a new (empty) private store for this object.
Class describing a Vertex.
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.