#include "xAODBPhys/BPhysHelper.h"
#include "xAODTracking/TrackParticle.h"
#include "xAODTracking/Vertex.h"
#include "xAODTracking/VertexContainer.h"
| |
#define | GET_PV(name) |
#define | SET_PV(name, pv, vertexContainer) |
#define | GET_FLOAT(name) |
#define | SET_FLOAT(name, val) |
#define | GET_INT(name) |
#define | SET_INT(name, val) |
typedef ElementLink < xAOD::VertexContainer > | VertexLink |
typedef std::vector< VertexLink > | VertexLinkVector |
typedef ElementLink < xAOD::MuonContainer > | MuonLink |
typedef std::vector< MuonLink > | MuonLinkVector |
#define GET_FLOAT | ( | name | ) |
{ \ static SG::AuxElement::Accessor<float> floatAcc(name); \ if(!floatAcc.isAvailable(*m_b)) return -9999999.; \ return floatAcc(*m_b); \ }
#define GET_INT | ( | name | ) |
{ \ static SG::AuxElement::Accessor<int> intAcc(name); \ if(!intAcc.isAvailable(*m_b)) return -9999999; \ return intAcc(*m_b); \ }
#define GET_PV | ( | name | ) |
{ \ static SG::AuxElement::Accessor<VertexLink> pvLinkAcc(name); \ if(!pvLinkAcc.isAvailable(*m_b)) { \ return 0; \ } \ const VertexLink& pvLink = pvLinkAcc(*m_b); \ if(!pvLink.isValid()) { \ return 0; \ } \ return *pvLink; \ }
Some useful macros
#define SET_FLOAT | ( | name, | |||
val | ) |
{ \ static SG::AuxElement::Decorator<float> floatDec(name); \ floatDec(*m_b) = val; \ return true; \ }
#define SET_INT | ( | name, | |||
val | ) |
{ \ static SG::AuxElement::Decorator<int> intDec(name); \ intDec(*m_b) = val; \ return true; \ }
#define SET_PV | ( | name, | |||
pv, | |||||
vertexContainer | ) |
{ \ static SG::AuxElement::Decorator<VertexLink> pvLinkDecor(name); \ VertexLink vertexLink; \ if(pv) { \ vertexLink.setElement(pv); \ vertexLink.setStorableObject(*vertexContainer); \ if( !vertexLink.isValid() ) \ return false;} \ pvLinkDecor(*m_b) = vertexLink; \ return true; \ }
typedef ElementLink<xAOD::VertexContainer> VertexLink |
Some useful typedefs