Commit ae472bc3 authored by Christos Anastopoulos's avatar Christos Anastopoulos Committed by Graeme Stewart
Browse files

Add getTrackParticlesVec helper. (xAODEgamma-00-01-40)

	* Add getTrackParticlesVec helper.
	* Apparently the getTrackParticles which is there to
	* help with the isolation  and thus returns a set,
	* has led to a "confusion" as the set does not retain the original
	* ordering. The current helper has to stay as it used by the isolation.
	* Added another one that returns a vector and hopefully people will
	* either use the methods from the interface or read the comments on the methods.
	* Tagged as xAODEgamma-00-01-40

2015-06-06 Christos Anastopoulos <Christos.Anastopoulos@cern.ch>

	* Small fixes , a bit more comments, documentation
	* Tagged as xAODEgamma-00-01-39

2015-06-02 Will Buttinger <will@cern.ch>
	* Root/xAODEgammaCLIDs.cxx: Add this file to ensure the storegate+class_def stuff is encountered at compile time ... necessary
	to avoid problems with address remappings etc (need to know the SG::BASE structure early!)
	* Tagged as xAODEgamma-00-01-38

...
(Long ChangeLog diff - truncated)
parent 5afd9d74
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/ */
// $Id: EgammaAccessors_v1.cxx 630766 2014-11-25 00:34:26Z christos $ // $Id: EgammaAccessors_v1.cxx 667007 2015-05-13 18:57:07Z christos $
// System include(s): // System include(s):
#include <iostream> #include <iostream>
...@@ -70,11 +70,6 @@ namespace xAOD { ...@@ -70,11 +70,6 @@ namespace xAOD {
DEFINE_ACCESSOR( float, Rhad ); DEFINE_ACCESSOR( float, Rhad );
DEFINE_ACCESSOR( float, Rhad1 ); DEFINE_ACCESSOR( float, Rhad1 );
DEFINE_ACCESSOR( float, DeltaE ); DEFINE_ACCESSOR( float, DeltaE );
DEFINE_ACCESSOR( float, zvertex );
DEFINE_ACCESSOR( float, errz );
DEFINE_ACCESSOR( float, etap );
DEFINE_ACCESSOR( float, depth );
default: default:
std::cerr << "xAOD::Egamma ERROR Unknown float ShowerShapeType (" std::cerr << "xAOD::Egamma ERROR Unknown float ShowerShapeType ("
<< type << ") requested" << std::endl; << type << ") requested" << std::endl;
......
...@@ -8,29 +8,11 @@ ...@@ -8,29 +8,11 @@
#include "xAODEgamma/Electron.h" #include "xAODEgamma/Electron.h"
#include "xAODTruth/TruthVertex.h" #include "xAODTruth/TruthVertex.h"
#include "xAODTruth/TruthParticle.h" #include "xAODTruth/TruthParticle.h"
#include "xAODTruth/xAODTruthHelpers.h"
#include "xAODTruth/TruthParticleContainer.h" #include "xAODTruth/TruthParticleContainer.h"
#include "xAODEgamma/ElectronContainer.h" #include "xAODEgamma/ElectronContainer.h"
#include "xAODEgamma/PhotonContainer.h" #include "xAODEgamma/PhotonContainer.h"
// ==================================================================
const xAOD::TruthParticle* xAOD::EgammaHelpers::getTruthParticle(const xAOD::IParticle* particle){
return getLink<xAOD::TruthParticle>(particle, "truthParticleLink");
}
int xAOD::EgammaHelpers::getParticleTruthType(const xAOD::IParticle* particle){
static SG::AuxElement::Accessor<int> tT("truthType") ;
if (!tT.isAvailable(*particle)) return 0;
return tT(*particle);
}
int xAOD::EgammaHelpers::getParticleTruthOrigin(const xAOD::IParticle* particle){
static SG::AuxElement::Accessor<int> tO("truthOrigin") ;
if (!tO.isAvailable(*particle)) return 0;
return tO(*particle);
}
// ================================================================== // ==================================================================
const xAOD::Electron* xAOD::EgammaHelpers::getRecoElectron(const xAOD::TruthParticle* particle){ const xAOD::Electron* xAOD::EgammaHelpers::getRecoElectron(const xAOD::TruthParticle* particle){
...@@ -40,20 +22,18 @@ const xAOD::Electron* xAOD::EgammaHelpers::getRecoElectron(const xAOD::TruthPart ...@@ -40,20 +22,18 @@ const xAOD::Electron* xAOD::EgammaHelpers::getRecoElectron(const xAOD::TruthPart
const xAOD::Photon* xAOD::EgammaHelpers::getRecoPhoton(const xAOD::TruthParticle* particle){ const xAOD::Photon* xAOD::EgammaHelpers::getRecoPhoton(const xAOD::TruthParticle* particle){
return getLink<xAOD::Photon>(particle, "recoPhotonLink"); return getLink<xAOD::Photon>(particle, "recoPhotonLink");
} }
// ================================================================== // ==================================================================
//Is the object matched to a true converted photon with R < maxRadius //Is the object matched to a true converted photon with R < maxRadius
bool xAOD::EgammaHelpers::isTrueConvertedPhoton(const xAOD::Photon* ph, float maxRadius /* = 800. */){ bool xAOD::EgammaHelpers::isTrueConvertedPhoton(const xAOD::Photon* ph, float maxRadius /* = 800. */){
const xAOD::TruthParticle *truthPh = xAOD::EgammaHelpers::getTruthParticle(ph); const xAOD::TruthParticle *truthPh = xAOD::TruthHelpers::getTruthParticle(*ph);
if (!truthPh) {return false;} if (!truthPh) {return false;}
// In older versions egammaTruthParticles did not have a decay vertex associated // In older versions egammaTruthParticles did not have a decay vertex associated
// so we look for the original truth particle // so we look for the original truth particle
if (truthPh->hasDecayVtx()){ if (truthPh->hasDecayVtx()){
return isTrueConvertedPhoton(truthPh, maxRadius); return isTrueConvertedPhoton(truthPh, maxRadius);
} }
const xAOD::TruthParticle *orgTruthPh = xAOD::EgammaHelpers::getTruthParticle(truthPh); const xAOD::TruthParticle *orgTruthPh = xAOD::TruthHelpers::getTruthParticle(*truthPh);
if (!orgTruthPh){ return false;} if (!orgTruthPh){ return false;}
return xAOD::EgammaHelpers::isTrueConvertedPhoton(orgTruthPh, maxRadius); return xAOD::EgammaHelpers::isTrueConvertedPhoton(orgTruthPh, maxRadius);
} }
...@@ -65,34 +45,37 @@ bool xAOD::EgammaHelpers::isTrueConvertedPhoton(const xAOD::TruthParticle* truth ...@@ -65,34 +45,37 @@ bool xAOD::EgammaHelpers::isTrueConvertedPhoton(const xAOD::TruthParticle* truth
} }
// ================================================================== // ==================================================================
const xAOD::TruthParticle* xAOD::EgammaHelpers::getMotherElectron(const xAOD::Electron* el){ const xAOD::TruthParticle* xAOD::EgammaHelpers::getBkgElectronMother(const xAOD::Electron* el){
const xAOD::TruthParticle *truthel = xAOD::TruthHelpers::getTruthParticle(*el);
const xAOD::TruthParticle *truthel = xAOD::EgammaHelpers::getTruthParticle(el); return getBkgElectronMother(truthel);
return getMotherElectron(truthel);
} }
const xAOD::TruthParticle* xAOD::EgammaHelpers::getMotherElectron(const xAOD::TruthParticle* truthel){
if (!truthel || truthel->absPdgId()!=11){ //Truth must exist and be an electron const xAOD::TruthParticle* xAOD::EgammaHelpers::getBkgElectronMother(const xAOD::TruthParticle* truthel){
//Truth must exist and be an electron
if (!truthel || truthel->absPdgId()!=11){
return 0; return 0;
} }
///
for (size_t i =0;i < truthel->nParents();++i){ //Loop over the truth electron parents // The first parent has to exist
const xAOD::TruthParticle *elparent = truthel->parent(i); if (!truthel->nParents()){
if(elparent->absPdgId() ==11){ //e->gamma+e case return 0;
return elparent; }
//And has to be a photon or electron
const xAOD::TruthParticle* parent = truthel->parent();
if(parent->absPdgId() !=22 && parent->absPdgId() !=11){
return 0;
}
while (parent->nParents()){ //Loop over the generations
const xAOD::TruthParticle* tmp = parent->parent();
//You want to see an electron or a photon
if(tmp->absPdgId() ==22 || tmp->absPdgId() ==11){
parent=tmp;
} }
else if(elparent->pdgId() ==22) { //Photon parent, lets check if it comes from an electron else{ // if we do not see any more electron and photons we stop
//Loop over the truth photon parents (electron grandparents) break ;
for (size_t j =0 ;j<elparent->nParents();++j){ }
}
const xAOD::TruthParticle *elgrandparent = elparent->parent(j); return parent;
if(elgrandparent->absPdgId() ==11){ //Photon comes from an electron
return elgrandparent;
}
}//Loop over grandparents
} // Parent is Photon
}//Loop over parents
return 0;
} }
// ==================================================================
...@@ -149,9 +149,7 @@ namespace xAOD { ...@@ -149,9 +149,7 @@ namespace xAOD {
static Accessor< uint16_t > acc( "author" ); static Accessor< uint16_t > acc( "author" );
acc( *this) = newAuthor; acc( *this) = newAuthor;
} }
/////////////// shower shapes /////////////// shower shapes
bool Egamma_v1::showerShapeValue(float& value, const EgammaParameters::ShowerShapeType information) const { bool Egamma_v1::showerShapeValue(float& value, const EgammaParameters::ShowerShapeType information) const {
xAOD::Egamma_v1::Accessor< float >* acc = showerShapeAccessorV1( information ); xAOD::Egamma_v1::Accessor< float >* acc = showerShapeAccessorV1( information );
...@@ -182,7 +180,7 @@ namespace xAOD { ...@@ -182,7 +180,7 @@ namespace xAOD {
} }
/////////////// Isolation value /////////////// Isolation value
bool Egamma_v1::isolationValue(float& value, const Iso::IsolationType information) const { bool Egamma_v1::isolation(float& value, const Iso::IsolationType information) const {
SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information ); SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information );
if( !acc ) { if( !acc ) {
return false; return false;
...@@ -195,13 +193,13 @@ namespace xAOD { ...@@ -195,13 +193,13 @@ namespace xAOD {
return true; return true;
} }
float Egamma_v1::isolationValue( const Iso::IsolationType information) const { float Egamma_v1::isolation( const Iso::IsolationType information) const {
SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information ); SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information );
if( !acc ) throw std::runtime_error( "Unknown/Unavailable Isolation type requested" ); if( !acc ) throw std::runtime_error( "Unknown/Unavailable Isolation type requested" );
return ( *acc )( *this ); return ( *acc )( *this );
} }
bool Egamma_v1::setIsolationValue(float value, const Iso::IsolationType information) { bool Egamma_v1::setIsolation(float value, const Iso::IsolationType information) {
SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information ); SG::AuxElement::Accessor< float >* acc = getIsolationAccessor( information );
if( !acc ) return false; if( !acc ) return false;
// Set the value: // Set the value:
...@@ -262,7 +260,6 @@ namespace xAOD { ...@@ -262,7 +260,6 @@ namespace xAOD {
return ( *acc )( *this ); return ( *acc )( *this );
} }
bool Egamma_v1::setIsolationCaloCorrection(float value, Iso::IsolationType type, Iso::IsolationCaloCorrection corr){ bool Egamma_v1::setIsolationCaloCorrection(float value, Iso::IsolationType type, Iso::IsolationCaloCorrection corr){
SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(type,corr); SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(type,corr);
if( !acc ) return false; if( !acc ) return false;
...@@ -271,7 +268,6 @@ namespace xAOD { ...@@ -271,7 +268,6 @@ namespace xAOD {
return true; return true;
} }
bool Egamma_v1::isolationTrackCorrection(float& value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection corr) const{ bool Egamma_v1::isolationTrackCorrection(float& value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection corr) const{
SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(flavour,corr); SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(flavour,corr);
if( !acc ) { if( !acc ) {
...@@ -300,7 +296,7 @@ namespace xAOD { ...@@ -300,7 +296,7 @@ namespace xAOD {
return true; return true;
} }
bool Egamma_v1::isolationCorrectionBitset(uint32_t& value, const Iso::IsolationFlavour flavour ) const{ bool Egamma_v1::isolationCorrectionBitset( std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const{
SG::AuxElement::Accessor< uint32_t >* acc = getIsolationCorrectionBitsetAccessor( flavour ); SG::AuxElement::Accessor< uint32_t >* acc = getIsolationCorrectionBitsetAccessor( flavour );
if( !acc ) { if( !acc ) {
return false; return false;
...@@ -309,14 +305,14 @@ namespace xAOD { ...@@ -309,14 +305,14 @@ namespace xAOD {
return false; return false;
} }
// Retrieve the value: // Retrieve the value:
value = ( *acc )( *this ); value = std::bitset<32>(( *acc )( *this ));
return true; return true;
} }
uint32_t Egamma_v1::isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const{ std::bitset<32> Egamma_v1::isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const{
SG::AuxElement::Accessor< uint32_t >* acc = getIsolationCorrectionBitsetAccessor( flavour ); SG::AuxElement::Accessor< uint32_t >* acc = getIsolationCorrectionBitsetAccessor( flavour );
if( !acc ) throw std::runtime_error( "Unknown/Unavailable Isolation BitSet requested" ); if( !acc ) throw std::runtime_error( "Unknown/Unavailable Isolation BitSet requested" );
return ( *acc )( *this ); return std::bitset<32>(( *acc )( *this ));
} }
bool Egamma_v1::setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour ) { bool Egamma_v1::setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour ) {
...@@ -327,8 +323,6 @@ namespace xAOD { ...@@ -327,8 +323,6 @@ namespace xAOD {
return true; return true;
} }
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
/// Implementation of the CaloCluster accessor functions /// Implementation of the CaloCluster accessor functions
size_t Egamma_v1::nCaloClusters() const { size_t Egamma_v1::nCaloClusters() const {
...@@ -414,7 +408,6 @@ namespace xAOD { ...@@ -414,7 +408,6 @@ namespace xAOD {
return; return;
} }
bool Egamma_v1::selectionisEM(unsigned int& value, const xAOD::EgammaParameters::SelectionisEM isEM) const { bool Egamma_v1::selectionisEM(unsigned int& value, const xAOD::EgammaParameters::SelectionisEM isEM) const {
SG::AuxElement::Accessor< unsigned int >* acc = selectionisEMAccessorV1( isEM ); SG::AuxElement::Accessor< unsigned int >* acc = selectionisEMAccessorV1( isEM );
if(!acc ) { if(!acc ) {
...@@ -438,8 +431,8 @@ namespace xAOD { ...@@ -438,8 +431,8 @@ namespace xAOD {
( *acc )( *this )=value; ( *acc )( *this )=value;
return; return;
} }
/////////////////////////////////////////////////////////////////////////
///Then with strings (full flexibility) ///Then with strings (full flexibility when adding new menus dynamically)
bool Egamma_v1::passSelection(bool& value, const std::string& menu ) const { bool Egamma_v1::passSelection(bool& value, const std::string& menu ) const {
SG::AuxElement::Accessor< char > acc( menu ); SG::AuxElement::Accessor< char > acc( menu );
if(!acc.isAvailable( *this) ) { if(!acc.isAvailable( *this) ) {
......
...@@ -9,65 +9,84 @@ ...@@ -9,65 +9,84 @@
#include "xAODCaloEvent/CaloCluster.h" #include "xAODCaloEvent/CaloCluster.h"
#include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticle.h"
bool xAOD::EgammaHelpers::isElectron(const xAOD::Egamma *eg){ bool xAOD::EgammaHelpers::isElectron(const xAOD::Egamma *eg){
return ( (eg->type()==xAOD::Type::Electron) && return ( (eg->type()==xAOD::Type::Electron) &&
(!eg->author(xAOD::EgammaParameters::AuthorFwdElectron))); (!eg->author(xAOD::EgammaParameters::AuthorFwdElectron)));
} }
// ==================================================================
bool xAOD::EgammaHelpers::isFwdElectron(const xAOD::Egamma *eg){ bool xAOD::EgammaHelpers::isFwdElectron(const xAOD::Egamma *eg){
return eg->author(xAOD::EgammaParameters::AuthorFwdElectron); return eg->author(xAOD::EgammaParameters::AuthorFwdElectron);
} }
// ==================================================================
bool xAOD::EgammaHelpers::isPhoton(const xAOD::Egamma *eg){ bool xAOD::EgammaHelpers::isPhoton(const xAOD::Egamma *eg){
return (eg->type()==xAOD::Type::Photon); return (eg->type()==xAOD::Type::Photon);
} }
// ==================================================================
bool xAOD::EgammaHelpers::isConvertedPhoton(const xAOD::Egamma *eg){ bool xAOD::EgammaHelpers::isConvertedPhoton(const xAOD::Egamma *eg){
const xAOD::Photon *ph = dynamic_cast<const xAOD::Photon*>(eg); const xAOD::Photon *ph = dynamic_cast<const xAOD::Photon*>(eg);
return (ph && (ph->nVertices()>0) ); return (ph && (ph->nVertices()>0) );
} }
// ================================================================== // ==================================================================
bool xAOD::EgammaHelpers::isBarrel(const xAOD::Egamma *eg){ bool xAOD::EgammaHelpers::isBarrel(const xAOD::Egamma *eg){
return (eg ? isBarrel(eg->caloCluster()) : false); return (eg ? isBarrel(eg->caloCluster()) : false);
} }
// ==================================================================
bool xAOD::EgammaHelpers::isBarrel(const xAOD::CaloCluster *cluster){ bool xAOD::EgammaHelpers::isBarrel(const xAOD::CaloCluster *cluster){
if (cluster->inBarrel() && cluster->inEndcap()){ if (cluster->inBarrel() && cluster->inEndcap()){
return cluster->eSample(CaloSampling::EMB2) >= cluster->eSample(CaloSampling::EME2); return cluster->eSample(CaloSampling::EMB2) >= cluster->eSample(CaloSampling::EME2);
} }
return cluster->inBarrel(); return cluster->inBarrel();
} }
// ================================================================== // ==================================================================
const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Egamma *eg, const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Egamma *eg,
bool useBremAssoc /* = true */, bool allParticles /* = true */){ bool useBremAssoc /* = true */,
bool allParticles /* = true */){
if (!eg) return std::set<const xAOD::TrackParticle*>(); if (!eg) {
return std::set<const xAOD::TrackParticle*>();
}
if (eg->type()==xAOD::Type::Electron) { if (eg->type()==xAOD::Type::Electron) {
const xAOD::Electron* el = static_cast<const xAOD::Electron*> (eg); const xAOD::Electron* el = static_cast<const xAOD::Electron*> (eg);
if (el) return getTrackParticles(el, useBremAssoc, allParticles); if (el) return getTrackParticles(el, useBremAssoc, allParticles);
} }
if (eg->type()==xAOD::Type::Photon) { if (eg->type()==xAOD::Type::Photon) {
const xAOD::Photon* ph = static_cast<const xAOD::Photon*> (eg); const xAOD::Photon* ph = static_cast<const xAOD::Photon*> (eg);
if (ph) return getTrackParticles(ph, useBremAssoc); if (ph) return getTrackParticles(ph, useBremAssoc);
} }
return std::set<const xAOD::TrackParticle*>(); return std::set<const xAOD::TrackParticle*>();
} }
// ==================================================================
const std::vector<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticlesVec(const xAOD::Egamma *eg,
bool useBremAssoc /* = true */,
bool allParticles /* = true */){
if (!eg) {
return std::vector<const xAOD::TrackParticle*>();
}
if (eg->type()==xAOD::Type::Electron) {
const xAOD::Electron* el = static_cast<const xAOD::Electron*> (eg);
if (el) return getTrackParticlesVec(el, useBremAssoc, allParticles);
}
if (eg->type()==xAOD::Type::Photon) {
const xAOD::Photon* ph = static_cast<const xAOD::Photon*> (eg);
if (ph) return getTrackParticlesVec(ph, useBremAssoc);
}
return std::vector<const xAOD::TrackParticle*>();
}
int xAOD::EgammaHelpers::summaryValueInt(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, int deflt /* = -999 */){ // ==================================================================
int xAOD::EgammaHelpers::summaryValueInt(const xAOD::TrackParticle& tp,
const xAOD::SummaryType& info,
int deflt /* = -999 */){
uint8_t dummy(0); uint8_t dummy(0);
return (tp.summaryValue(dummy, info) ? dummy : deflt); return (tp.summaryValue(dummy, info) ? dummy : deflt);
} }
float xAOD::EgammaHelpers::summaryValueFloat(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, int deflt /* = -999. */){ // ==================================================================
float xAOD::EgammaHelpers::summaryValueFloat(const xAOD::TrackParticle& tp,
const xAOD::SummaryType& info,
int deflt /* = -999. */){
float dummy(0); float dummy(0);
return (tp.summaryValue(dummy, info) ? dummy : deflt); return (tp.summaryValue(dummy, info) ? dummy : deflt);
} }
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
namespace xAOD { namespace xAOD {
Electron_v1::Electron_v1() : Egamma_v1() { Electron_v1::Electron_v1() : Egamma_v1() {
} }
Electron_v1::Electron_v1(const Electron_v1& el) : Egamma_v1(el){ Electron_v1::Electron_v1(const Electron_v1& el) : Egamma_v1(el){
...@@ -34,7 +33,6 @@ namespace xAOD { ...@@ -34,7 +33,6 @@ namespace xAOD {
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( Electron_v1, float, charge, setCharge ) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( Electron_v1, float, charge, setCharge )
Type::ObjectType Electron_v1::type() const { Type::ObjectType Electron_v1::type() const {
return Type::Electron; return Type::Electron;
} }
...@@ -114,7 +112,6 @@ namespace xAOD { ...@@ -114,7 +112,6 @@ namespace xAOD {
return true; return true;
} }
bool Electron_v1::trackParticleSummaryValue( uint8_t& value, const SummaryType information, int index ) const { bool Electron_v1::trackParticleSummaryValue( uint8_t& value, const SummaryType information, int index ) const {
const xAOD::TrackParticle* tempTrackParticle = trackParticle(index); const xAOD::TrackParticle* tempTrackParticle = trackParticle(index);
...@@ -128,7 +125,6 @@ namespace xAOD { ...@@ -128,7 +125,6 @@ namespace xAOD {
if (!tempTrackParticle) return false; if (!tempTrackParticle) return false;
return tempTrackParticle->summaryValue(value,information); return tempTrackParticle->summaryValue(value,information);
} }
uint8_t Electron_v1::trackParticleSummaryIntValue( const SummaryType information, int index) const { uint8_t Electron_v1::trackParticleSummaryIntValue( const SummaryType information, int index) const {
const xAOD::TrackParticle* tempTrackParticle = trackParticle(index); const xAOD::TrackParticle* tempTrackParticle = trackParticle(index);
...@@ -153,8 +149,7 @@ namespace xAOD { ...@@ -153,8 +149,7 @@ namespace xAOD {
} }
return value; return value;
} }
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
} // namespace xAOD } // namespace xAOD
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "xAODTracking/TrackParticleContainer.h" #include "xAODTracking/TrackParticleContainer.h"
// ================================================================== // ==================================================================
const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const xAOD::Electron* el){ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const xAOD::Electron* el){
if(el){ if(el){
...@@ -19,7 +18,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const x ...@@ -19,7 +18,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const x
} }
return 0; return 0;
} }
// ==================================================================
const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(const xAOD::TrackParticle* trkPar){ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(const xAOD::TrackParticle* trkPar){
if(! trkPar) {return 0;} if(! trkPar) {return 0;}
...@@ -29,9 +28,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF( ...@@ -29,9 +28,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(
return (*orig(*trkPar)); return (*orig(*trkPar));
} }
// ================================================================== // ==================================================================
float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *tp){ float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *tp){
static SG::AuxElement::Accessor<float > QoverPLM ("QoverPLM"); static SG::AuxElement::Accessor<float > QoverPLM ("QoverPLM");
...@@ -40,12 +37,10 @@ float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *t ...@@ -40,12 +37,10 @@ float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *t
} }
return -999 ; return -999 ;