diff --git a/Event/xAOD/xAODEgamma/Root/EgammaAccessors_v1.cxx b/Event/xAOD/xAODEgamma/Root/EgammaAccessors_v1.cxx
index 5a1f29a47a618fd2a75c57ba60f35a355c3136fe..ed92c38a1082969ac7a4b1b18b9aebdffd97677f 100644
--- a/Event/xAOD/xAODEgamma/Root/EgammaAccessors_v1.cxx
+++ b/Event/xAOD/xAODEgamma/Root/EgammaAccessors_v1.cxx
@@ -2,7 +2,7 @@
   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):
 #include <iostream>
@@ -70,11 +70,6 @@ namespace xAOD {
         DEFINE_ACCESSOR( float, Rhad );
         DEFINE_ACCESSOR( float, Rhad1 );
         DEFINE_ACCESSOR( float, DeltaE );
-	DEFINE_ACCESSOR( float, zvertex );
-	DEFINE_ACCESSOR( float, errz );
-	DEFINE_ACCESSOR( float, etap ); 
-	DEFINE_ACCESSOR( float, depth );
-
       default:                  
          std::cerr << "xAOD::Egamma  ERROR Unknown float ShowerShapeType ("
                    << type << ") requested" << std::endl;
diff --git a/Event/xAOD/xAODEgamma/Root/EgammaTruthxAODHelpers.cxx b/Event/xAOD/xAODEgamma/Root/EgammaTruthxAODHelpers.cxx
index 88b4df857308d55366c1c05210701056a5f82bdd..5a6f819240dedad4c8211267c17840ebadb8531d 100644
--- a/Event/xAOD/xAODEgamma/Root/EgammaTruthxAODHelpers.cxx
+++ b/Event/xAOD/xAODEgamma/Root/EgammaTruthxAODHelpers.cxx
@@ -8,29 +8,11 @@
 #include "xAODEgamma/Electron.h"
 #include "xAODTruth/TruthVertex.h"
 #include "xAODTruth/TruthParticle.h"
-
+#include "xAODTruth/xAODTruthHelpers.h"
 #include "xAODTruth/TruthParticleContainer.h"
 #include "xAODEgamma/ElectronContainer.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){
@@ -40,20 +22,18 @@ const xAOD::Electron* xAOD::EgammaHelpers::getRecoElectron(const xAOD::TruthPart
 const xAOD::Photon* xAOD::EgammaHelpers::getRecoPhoton(const xAOD::TruthParticle* particle){
   return getLink<xAOD::Photon>(particle, "recoPhotonLink");
 }
-
 // ==================================================================
 
 //Is the object matched to a true converted photon with R < maxRadius
 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;}
-
   // In older versions egammaTruthParticles did not have a decay vertex associated
   // so we look for the original truth particle
   if (truthPh->hasDecayVtx()){ 
     return isTrueConvertedPhoton(truthPh, maxRadius);
   }
-  const xAOD::TruthParticle *orgTruthPh = xAOD::EgammaHelpers::getTruthParticle(truthPh);
+  const xAOD::TruthParticle *orgTruthPh = xAOD::TruthHelpers::getTruthParticle(*truthPh);
   if (!orgTruthPh){ return false;}
   return xAOD::EgammaHelpers::isTrueConvertedPhoton(orgTruthPh, maxRadius);
 }
@@ -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 *truthel = xAOD::EgammaHelpers::getTruthParticle(el);
-  return getMotherElectron(truthel);
-
+const xAOD::TruthParticle* xAOD::EgammaHelpers::getBkgElectronMother(const xAOD::Electron* el){ 
+  const xAOD::TruthParticle *truthel = xAOD::TruthHelpers::getTruthParticle(*el);
+  return getBkgElectronMother(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;
   }
-
-  for  (size_t i =0;i < truthel->nParents();++i){ //Loop over the truth electron parents
-    const xAOD::TruthParticle *elparent = truthel->parent(i);
-    if(elparent->absPdgId() ==11){ //e->gamma+e case
-       return elparent;
+  ///
+  // The first parent has to exist
+  if (!truthel->nParents()){
+    return 0;
+  }
+  //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
-      //Loop over the truth  photon parents (electron grandparents)
-      for  (size_t j =0 ;j<elparent->nParents();++j){
-
-	const xAOD::TruthParticle *elgrandparent = elparent->parent(j);
-	if(elgrandparent->absPdgId() ==11){ //Photon comes from an electron
-	  return elgrandparent;
-	}
-      }//Loop over grandparents
-    } // Parent is Photon
-  }//Loop over parents
-
-  return 0;
+    else{ // if we do not see any more electron and photons we stop
+      break ; 
+    }
+  }
+  return parent;
 }
-// ==================================================================
+
diff --git a/Event/xAOD/xAODEgamma/Root/Egamma_v1.cxx b/Event/xAOD/xAODEgamma/Root/Egamma_v1.cxx
index 7283f364a7a14b64483b8ae79c7688c311e30508..de98fbf769095af0a5e9b7f8aa10986a658c5cb3 100644
--- a/Event/xAOD/xAODEgamma/Root/Egamma_v1.cxx
+++ b/Event/xAOD/xAODEgamma/Root/Egamma_v1.cxx
@@ -149,9 +149,7 @@ namespace xAOD {
     static Accessor< uint16_t > acc( "author" );
     acc( *this) = newAuthor;
   }
-  
-
-  
+    
   /////////////// shower shapes
   bool Egamma_v1::showerShapeValue(float& value, const EgammaParameters::ShowerShapeType information)  const {
     xAOD::Egamma_v1::Accessor< float >* acc = showerShapeAccessorV1( information );
@@ -182,7 +180,7 @@ namespace xAOD {
   }
 
   ///////////////   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 );
     if( !acc ) {
       return false;
@@ -195,13 +193,13 @@ namespace xAOD {
     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 );
     if( !acc ) throw std::runtime_error( "Unknown/Unavailable Isolation type requested" );
     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 );
     if( !acc ) return false;
     // Set the value:
@@ -262,7 +260,6 @@ namespace xAOD {
     return  ( *acc )( *this );
   }
 
-
   bool Egamma_v1::setIsolationCaloCorrection(float value, Iso::IsolationType type, Iso::IsolationCaloCorrection corr){
     SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(type,corr);
     if( !acc ) return false;
@@ -271,7 +268,6 @@ namespace xAOD {
     return true;
   }
 
-
   bool Egamma_v1::isolationTrackCorrection(float& value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection corr) const{
     SG::AuxElement::Accessor< float >* acc = getIsolationCorrectionAccessor(flavour,corr);
     if( !acc ) {
@@ -300,7 +296,7 @@ namespace xAOD {
     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 );
     if( !acc ) {
       return false;
@@ -309,14 +305,14 @@ namespace xAOD {
       return  false;
     }
     // Retrieve the value:
-    value = ( *acc )( *this );
+    value =  std::bitset<32>(( *acc )( *this ));
     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 );
     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 ) {
@@ -327,8 +323,6 @@ namespace xAOD {
     return true;
   }
 
-
-
   ////////////////////////////////////////////////////
   /// Implementation of the CaloCluster accessor functions
   size_t Egamma_v1::nCaloClusters() const {
@@ -414,7 +408,6 @@ namespace xAOD {
     return;
   }
 
-
   bool Egamma_v1::selectionisEM(unsigned int&  value, const xAOD::EgammaParameters::SelectionisEM isEM) const {
     SG::AuxElement::Accessor< unsigned int >* acc = selectionisEMAccessorV1( isEM );
     if(!acc ) {
@@ -438,8 +431,8 @@ namespace xAOD {
     ( *acc )( *this )=value;
     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 {
     SG::AuxElement::Accessor< char > acc( menu );
     if(!acc.isAvailable( *this) ) { 
diff --git a/Event/xAOD/xAODEgamma/Root/EgammaxAODHelpers.cxx b/Event/xAOD/xAODEgamma/Root/EgammaxAODHelpers.cxx
index 0d1eb39cfb157f8b9f1c493e5d359e81814945f2..3e47aedeb11f16066d2f1ee8c421e03ee6c845db 100644
--- a/Event/xAOD/xAODEgamma/Root/EgammaxAODHelpers.cxx
+++ b/Event/xAOD/xAODEgamma/Root/EgammaxAODHelpers.cxx
@@ -9,65 +9,84 @@
 #include "xAODCaloEvent/CaloCluster.h"
 #include "xAODTracking/TrackParticle.h"
 
+
 bool xAOD::EgammaHelpers::isElectron(const xAOD::Egamma *eg){
   return ( (eg->type()==xAOD::Type::Electron) && 
 	   (!eg->author(xAOD::EgammaParameters::AuthorFwdElectron)));
 }
-
-
+// ==================================================================
 bool xAOD::EgammaHelpers::isFwdElectron(const xAOD::Egamma *eg){
   return eg->author(xAOD::EgammaParameters::AuthorFwdElectron);
 }
-
+// ==================================================================
 bool xAOD::EgammaHelpers::isPhoton(const xAOD::Egamma *eg){
   return (eg->type()==xAOD::Type::Photon);
 }
-
+// ==================================================================
 bool xAOD::EgammaHelpers::isConvertedPhoton(const xAOD::Egamma *eg){
   const xAOD::Photon *ph = dynamic_cast<const xAOD::Photon*>(eg);
   return (ph && (ph->nVertices()>0) );
 }
-
 // ==================================================================
 bool xAOD::EgammaHelpers::isBarrel(const xAOD::Egamma *eg){
 
   return (eg ? isBarrel(eg->caloCluster()) : false);
-
 }
-
+// ==================================================================
 bool xAOD::EgammaHelpers::isBarrel(const xAOD::CaloCluster *cluster){
   if (cluster->inBarrel() &&  cluster->inEndcap()){
     return  cluster->eSample(CaloSampling::EMB2) >= cluster->eSample(CaloSampling::EME2);
   }
   return cluster->inBarrel();
 }
-
 // ==================================================================
 const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Egamma *eg, 
-  bool useBremAssoc /* = true */, bool allParticles /* = true */){  
-
-  if (!eg) return std::set<const xAOD::TrackParticle*>();
-
+										  bool useBremAssoc /* = true */, 
+										  bool allParticles /* = true */){  
+  if (!eg) {
+    return std::set<const xAOD::TrackParticle*>();
+  }
   if (eg->type()==xAOD::Type::Electron) {
     const xAOD::Electron* el = static_cast<const xAOD::Electron*> (eg);
     if (el) return getTrackParticles(el, useBremAssoc, allParticles);
   }
-  
   if (eg->type()==xAOD::Type::Photon) {
     const xAOD::Photon* ph = static_cast<const xAOD::Photon*> (eg);  
     if (ph) return getTrackParticles(ph, useBremAssoc);
   }
-
   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);
   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);
   return (tp.summaryValue(dummy, info) ? dummy : deflt);
 }
diff --git a/Event/xAOD/xAODEgamma/Root/Electron_v1.cxx b/Event/xAOD/xAODEgamma/Root/Electron_v1.cxx
index f87d794f51bf65662d22e8f006f617865d733bd7..17196f4ad94b755e3700b1622aeea84fb652c4db 100644
--- a/Event/xAOD/xAODEgamma/Root/Electron_v1.cxx
+++ b/Event/xAOD/xAODEgamma/Root/Electron_v1.cxx
@@ -15,7 +15,6 @@
 namespace xAOD {
 
   Electron_v1::Electron_v1() : Egamma_v1() {
-
   }
 
   Electron_v1::Electron_v1(const Electron_v1& el) : Egamma_v1(el){
@@ -34,7 +33,6 @@ namespace xAOD {
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( Electron_v1, float, charge, setCharge )
 
   Type::ObjectType Electron_v1::type() const {
-
     return Type::Electron;
   }
 
@@ -114,7 +112,6 @@ namespace xAOD {
     return true;
   }
 
-
   bool Electron_v1::trackParticleSummaryValue( uint8_t& value, const SummaryType information, int index ) const {
 
     const xAOD::TrackParticle* tempTrackParticle = trackParticle(index);
@@ -128,7 +125,6 @@ namespace xAOD {
     if (!tempTrackParticle) return false;
     return tempTrackParticle->summaryValue(value,information);
   }
-
   
   uint8_t Electron_v1::trackParticleSummaryIntValue( const SummaryType information, int index) const {
     const xAOD::TrackParticle* tempTrackParticle = trackParticle(index);
@@ -153,8 +149,7 @@ namespace xAOD {
     }
     return value;
   }
-
-  /////////////////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////////////////////////
 
 
 } // namespace xAOD
diff --git a/Event/xAOD/xAODEgamma/Root/ElectronxAODHelpers.cxx b/Event/xAOD/xAODEgamma/Root/ElectronxAODHelpers.cxx
index 4c3d8296206d170e7ba68bc6bd769aba83e9a297..62f1884cc204771bb676959931c8358b11324458 100644
--- a/Event/xAOD/xAODEgamma/Root/ElectronxAODHelpers.cxx
+++ b/Event/xAOD/xAODEgamma/Root/ElectronxAODHelpers.cxx
@@ -8,7 +8,6 @@
 #include "xAODTracking/TrackParticleContainer.h"
 
 // ==================================================================
-
 const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const xAOD::Electron* el){
 
  if(el){
@@ -19,7 +18,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticle(const x
   }
   return 0;
 }
-
+// ==================================================================
 const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(const xAOD::TrackParticle* trkPar){
 
   if(! trkPar) {return 0;}
@@ -29,9 +28,7 @@ const xAOD::TrackParticle* xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(
 
   return (*orig(*trkPar));
 }
-
 // ==================================================================
-
 float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *tp){
  
   static SG::AuxElement::Accessor<float > QoverPLM  ("QoverPLM");
@@ -40,12 +37,10 @@ float xAOD::EgammaHelpers::getLastMeasurementQoverP(const xAOD::TrackParticle *t
   }
   return -999 ; 
 }
-
-
 // ==================================================================
-
 const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Electron* el, 
-  bool useBremAssoc /* = true */, bool allParticles /* = true */){
+										  bool useBremAssoc /* = true */, 
+										  bool allParticles /* = true */){
 
   std::set<const xAOD::TrackParticle*> tps;
   for (unsigned int i = 0; i < el->nTrackParticles(); ++i){
@@ -56,12 +51,24 @@ const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticle
   }
   return tps;
 }
-
 // ==================================================================
+const std::vector<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticlesVec(const xAOD::Electron* el, 
+										     bool useBremAssoc /* = true */, 
+										     bool allParticles /* = true */){
 
+  std::vector<const xAOD::TrackParticle*> tps;
+  for (unsigned int i = 0; i < el->nTrackParticles(); ++i){
+    const xAOD::TrackParticle* tp = el->trackParticle(i);
+    if (useBremAssoc) {tp = xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(tp);}
+    if (tp) {tps.push_back( tp );}
+    if (!allParticles) {break;} // break after first particle
+  }
+  return tps;
+}
+// ==================================================================
 std::size_t xAOD::EgammaHelpers::numberOfSiHits(const xAOD::TrackParticle *tp){
+
   if (!tp) return 0;
-  
   uint8_t dummy(0), nSiHits(0);
   if (tp->summaryValue(dummy, xAOD::numberOfPixelHits)){
     nSiHits += dummy;
diff --git a/Event/xAOD/xAODEgamma/Root/Photon_v1.cxx b/Event/xAOD/xAODEgamma/Root/Photon_v1.cxx
index c052c4418e9872e05d37c10d4b9d5dc7d1840a5d..242184826456866f0b23a9d1e9c007bc6c648b46 100644
--- a/Event/xAOD/xAODEgamma/Root/Photon_v1.cxx
+++ b/Event/xAOD/xAODEgamma/Root/Photon_v1.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Photon_v1.cxx 619818 2014-10-03 12:34:09Z christos $
+// $Id: Photon_v1.cxx 667341 2015-05-15 14:39:34Z christos $
 
 // EDM include(s):
 #include "xAODCore/AuxStoreAccessorMacros.h"
@@ -33,7 +33,6 @@ namespace xAOD {
     return *this;
   }  
 
-
    Type::ObjectType Photon_v1::type() const {
 
       return Type::Photon;
diff --git a/Event/xAOD/xAODEgamma/Root/PhotonxAODHelpers.cxx b/Event/xAOD/xAODEgamma/Root/PhotonxAODHelpers.cxx
index 03b54b3221c36c8d80c833cc060ec86ba13c5985..64c3042e5716b50af745e365912f3f981245e5b8 100644
--- a/Event/xAOD/xAODEgamma/Root/PhotonxAODHelpers.cxx
+++ b/Event/xAOD/xAODEgamma/Root/PhotonxAODHelpers.cxx
@@ -35,11 +35,14 @@ xAOD::EgammaParameters::ConversionType xAOD::EgammaHelpers::conversionType(const
     {return nSiHits1 ? xAOD::EgammaParameters::singleSi : xAOD::EgammaParameters::singleTRT;}
   
   if (nSiHits1 && nSiHits2){
-    return xAOD::EgammaParameters::doubleSi;}
+    return xAOD::EgammaParameters::doubleSi;
+  }
   else if (nSiHits1 || nSiHits2){
-    return xAOD::EgammaParameters::doubleSiTRT;}  
+    return xAOD::EgammaParameters::doubleSiTRT;
+  }  
   else{
-    return xAOD::EgammaParameters::doubleTRT;}
+    return xAOD::EgammaParameters::doubleTRT;
+  }
 }
 
 // ==================================================================
@@ -102,17 +105,27 @@ Amg::Vector3D xAOD::EgammaHelpers::momentumAtVertex(const xAOD::Vertex& vertex,
 }
 
 // ==================================================================
-const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Photon* ph,
+const std::set<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticles(const xAOD::Photon* ph,  
 										  bool useBremAssoc /* = true */){
+
   std::set<const xAOD::TrackParticle*> tps;
   if (!ph) return tps;
   const xAOD::Vertex* vx = ph->vertex();
-  for (unsigned int i=0; vx && i < vx->nTrackParticles(); ++i)
-  {
+  for (unsigned int i=0; vx && i < vx->nTrackParticles(); ++i){
     const xAOD::TrackParticle *tp = vx->trackParticle(i);
     tps.insert( useBremAssoc ? xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(tp) : tp );
   }
   return tps;
 }
-
-
+// ==================================================================
+const std::vector<const xAOD::TrackParticle*> xAOD::EgammaHelpers::getTrackParticlesVec(const xAOD::Photon* ph,
+											bool useBremAssoc /* = true */){
+  std::vector<const xAOD::TrackParticle*> tps;
+  if (!ph) return tps;
+  const xAOD::Vertex* vx = ph->vertex();
+  for (unsigned int i=0; vx && i < vx->nTrackParticles(); ++i){
+    const xAOD::TrackParticle *tp = vx->trackParticle(i);
+    tps.push_back( useBremAssoc ? xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(tp) : tp );
+  }
+  return tps;
+}
diff --git a/Event/xAOD/xAODEgamma/Root/xAODEgammaCLIDs.cxx b/Event/xAOD/xAODEgamma/Root/xAODEgammaCLIDs.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..16edbb1a0fed8782d6a77a8af46d0153907019e4
--- /dev/null
+++ b/Event/xAOD/xAODEgamma/Root/xAODEgammaCLIDs.cxx
@@ -0,0 +1,14 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+//simple includes to force the CLASS_DEF etc to be encountered during compile
+
+#include "xAODEgamma/EgammaContainer.h"
+#include "xAODEgamma/ElectronContainer.h"
+#include "xAODEgamma/ElectronAuxContainer.h"
+#include "xAODEgamma/ElectronContainerFwd.h"
+#include "xAODEgamma/PhotonContainer.h"
+#include "xAODEgamma/PhotonAuxContainer.h"
+#include "xAODEgamma/PhotonContainerFwd.h"
diff --git a/Event/xAOD/xAODEgamma/cmt/requirements b/Event/xAOD/xAODEgamma/cmt/requirements
index 35b928cfdf0aaad68225830d6834e598ec136df4..28538e2ce129c6711a9ff6e05d840b1c2b2eee06 100644
--- a/Event/xAOD/xAODEgamma/cmt/requirements
+++ b/Event/xAOD/xAODEgamma/cmt/requirements
@@ -42,3 +42,6 @@ use AtlasReflex   AtlasReflex-*   External
 apply_pattern lcgdict dict=xAODEgamma selectionfile=selection.xml \
                       headerfiles="../xAODEgamma/xAODEgammaDict.h" \
                       extralibfiles=../Root/dict/*.cxx
+
+
+apply_pattern do_genCLIDDB library=xAODEgamma
\ No newline at end of file
diff --git a/Event/xAOD/xAODEgamma/doc/mainpage.h b/Event/xAOD/xAODEgamma/doc/mainpage.h
index d9a822b4cc0b72a6b4b36e9598de06c8c5031b63..7813dcecb8d37999303116a29527037b09078647 100644
--- a/Event/xAOD/xAODEgamma/doc/mainpage.h
+++ b/Event/xAOD/xAODEgamma/doc/mainpage.h
@@ -11,8 +11,8 @@
    @author Anthony Morley <Anthony.Morley@cern.ch>
    @author Bruno Lenzi <Bruno.Lenzi@cern.ch>
 
-   $Revision: 636327 $
-   $Date: 2014-12-16 17:34:24 +0100 (Tue, 16 Dec 2014) $
+   $Revision: 672987 $
+   $Date: 2015-06-06 18:15:13 +0200 (Sat, 06 Jun 2015) $
 
    @section xAODEgammaOverivew Overview
 
@@ -52,13 +52,22 @@
    and CP tools. Users should request additions in case of need.
    
    The functions are split in 3 files: 
-   EgammaxAODHelpers, ElectronxAODHelpers, PhotonxAODHelpers, EgammaTruthxAODHelpers
-   but the users only need:
-   <code> #include "xAODEgamma/EgammaxAODHelpers.h" </code>
-   
+   - EgammaxAODHelpers
+   - ElectronxAODHelpers
+   - PhotonxAODHelpers
+   - EgammaTruthxAODHelpers
 
+   They are all under this namespace
+   - xAOD::EgammaHelpers 
+   
+   Including this:
+   <code> #include "xAODEgamma/EgammaxAODHelpers.h" </code>
+   makes all of them available
 
+   @section EgammaParameters Parameters
 
+   The Egamma parameters are under this namespace:
+   xAOD::EgammaParameters
    @htmlinclude used_packages.html
 
    @include requirements
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainer.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainer.h
index 9869fac5c972d5e7e573858d887171d6aebe509b..edb0f01e69ce5b8964c2068e769e03213c19d52e 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainer.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainer.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: EgammaContainer.h 632191 2014-11-29 16:24:08Z christos $
+// $Id: EgammaContainer.h 672987 2015-06-06 16:15:13Z christos $
 #ifndef XAODEGAMMA_EGAMMACONTAINER_H
 #define XAODEGAMMA_EGAMMACONTAINER_H
 
@@ -18,9 +18,7 @@ namespace xAOD {
 }
 
 // Set up a CLID for the container:
-#ifndef XAOD_STANDALONE
-#include "SGTools/CLASS_DEF.h"
+#include "xAODCore/CLASS_DEF.h"
 CLASS_DEF( xAOD::EgammaContainer , 1087548811 , 1 )
-#endif // XAOD_STANDALONE
 
 #endif // XAODEGAMMA_EGAMMACONTAINER_H
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaDefs.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaDefs.h
index 8d0e668fe372e118bf1a5465f3f5f2ec8cc790bf..1b892a7ce2a6da5c9e5c1444f8942bce7e0c33cb 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaDefs.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaDefs.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: EgammaDefs.h 634202 2014-12-06 15:00:49Z christos $
+// $Id: EgammaDefs.h 671120 2015-05-30 18:53:01Z christos $
 #ifndef XAODEGAMMA_EGAMMADEFS_H
 #define XAODEGAMMA_EGAMMADEFS_H
 
@@ -111,7 +111,7 @@ namespace xAOD {
 
   /** @brief */
   
-  const uint32_t BADCLUSELECTRON = 
+    const uint32_t BADCLUSELECTRON = 
     0x1 << MaskedCellCore |
     0x1 << MissingFEBCellCore |
     0x1 << MissingFEBCellEdgeS1 |
@@ -119,7 +119,7 @@ namespace xAOD {
     0x1 << DeadHVS1S2S3Core | 
     0x1 << DeadHVS1S2S3Edge ; 
   
- const uint32_t BADCLUSPHOTON = 
+    const uint32_t BADCLUSPHOTON = 
     0x1 << MaskedCellCore |
     0x1 << MissingFEBCellCore |
     0x1 << MissingFEBCellEdgeS1 |
@@ -128,8 +128,10 @@ namespace xAOD {
     0x1 << DeadHVS1S2S3Edge |
     0x1 << BadS1Core; 
   
-  const uint32_t ALLOQ= 0xFFFFFFFF;
+    const uint32_t ALLOQ= 0xFFFFFFFF;
 
+
+    struct ROOT6_NamespaceAutoloadHook{};
   }
 }
 
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaEnums.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaEnums.h
index 0345a6d1b3e98903f864abcfc2be1d278ec9f6f6..4503828dca5a3d166b4e72308b1b9442bdc14105 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaEnums.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaEnums.h
@@ -122,16 +122,8 @@ namespace xAOD {
       Rhad1 = 42,
       /// @bried e2tsts1-emins1
       DeltaE =43,
-      /// @brief pointing z at vertex reconstructed from the cluster
-      zvertex = 44,
-      /// @brief error associated to zvertex 
-      errz = 45,
-      /// @brief pointing eta reconstructed from the cluster (first and second sampling)
-      etap = 46, 
-      /// @brief pointing depth of the shower as calculated in egammaqgcld
-      depth = 47,
       ///maximum number of enums 
-      NumberOfShowerShapes = 48 
+      NumberOfShowerShapes = 44
     };
     /// @}  
     
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaTruthxAODHelpers.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaTruthxAODHelpers.h
index 9d127ae7b167ebe25f6a7e65ad192219f39c913e..9626d004f69ac1f324860489a7e087e401307c5f 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaTruthxAODHelpers.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaTruthxAODHelpers.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: EgammaTruthxAODHelpers.h 643687 2015-02-03 04:35:51Z christos $
+// $Id: EgammaTruthxAODHelpers.h 668505 2015-05-19 19:23:05Z christos $
 #ifndef XAOD_EGAMMATRUTHXAODHELPERS_H
 #define XAOD_EGAMMATRUTHXAODHELPERS_H
 
@@ -38,15 +38,6 @@ namespace xAOD {
       return *link;
     }
     
-    ///@brief return the truthParticle associated to the given IParticle (if any)
-    const xAOD::TruthParticle* getTruthParticle(const xAOD::IParticle*);
-
-    ///@brief return the  particle's truth Type (as defined by the MC Truth Classifier) 
-    int getParticleTruthType(const xAOD::IParticle* particle);
-    
-    ///@brief return the  particle's Truth Origin (as defined by the MC Truth Classifier) 
-    int getParticleTruthOrigin(const xAOD::IParticle* particle);
-    
     ///@brief return the reco electron associated to the given TruthParticle (if any)
     const xAOD::Electron* getRecoElectron(const xAOD::TruthParticle*);
     
@@ -59,19 +50,22 @@ namespace xAOD {
     ///@brief is the true object a converted photon with R < maxRadius
     bool isTrueConvertedPhoton(const xAOD::TruthParticle* truePh, float maxRadius = 800.);
 
-    ///@brief Helper function for getting the Truth "Mother" electron for an existing electron
-    ///i.e for e->photon->e cases (brem) , or e->gamma+e (fsr),  
-    ///where we have matched the second electron as the best.
-    ///If the input is not a true electron or no Electron Mother is found
-    ///return null pointer.
-    const xAOD::TruthParticle* getMotherElectron(const xAOD::Electron* el);
+    ///@brief Helper wrapper function for calling the function below that accepts truth input
+    /// via a reco object
+    const xAOD::TruthParticle* getBkgElectronMother(const xAOD::Electron* el);
+
+
+    ///@brief Helper function for getting the True "Mother" electron for an existing electron.
+    ///There are cases when an electron has  a  photon (or electron) mother, that in turn comes
+    /// from another particle (possible leading to a Z or W etc).
+    /// This method will navigate back up to the last electron or photon it can find
+    /// in the lineage of the original true electron.
+    /// Then the user just needs to check the mother of that last electron/photon, returned from the method.
+    /// To see if we have a loose matched isolated electron (its mother would be Z,W etc)
+    /// or background.
+    ///If it fails returns null pointer.
+    const xAOD::TruthParticle* getBkgElectronMother(const xAOD::TruthParticle* truthel);
 
-    ///@brief Helper function for getting the Truth "Mother" electron for a truth electron
-    ///i.e for e->photon->e cases (brem) , or e->gamma+e (fsr),  
-    ///where we have matched the second electron as the best.
-    ///If the input is not a true electron or no Electron Mother is found
-    /// return null pointer.
-    const xAOD::TruthParticle* getMotherElectron(const xAOD::TruthParticle* truthel);
 
         
   }// EgammaHelpers
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaxAODHelpers.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaxAODHelpers.h
index bb09394cc85d480669ae8a73e25849e54a8b507a..30ccdd3c2e90cde2b663e05afec9c9dd013a8f39 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaxAODHelpers.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaxAODHelpers.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: EgammaxAODHelpers.h 636327 2014-12-16 16:34:24Z christos $
+// $Id: EgammaxAODHelpers.h 673480 2015-06-08 18:14:25Z christos $
 #ifndef XAOD_EGAMMAXAODHELPERS_H
 #define XAOD_EGAMMAXAODHELPERS_H
 #include "xAODEgamma/EgammaFwd.h"
@@ -20,6 +20,8 @@
 //other includes
 #include <cstddef>
 #include <set>
+#include <vector>
+
 
 namespace xAOD {
 
@@ -43,12 +45,20 @@ namespace xAOD {
     ///@brief return true if the cluster (or the majority of its energy) is in the barrel
     bool isBarrel(const xAOD::CaloCluster *cluster);
 
-    ///@bried Return a list of all or only the best TrackParticle associated to the object. 
-    /// (used for track isolation)
-    //// If useBremAssoc is set, get the original TrackParticle **/
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///If useBremAssoc is set, get the original TrackParticle 
+    ///This is useful when a std::set of the original track Particles is required, which is mainly the case for the 
+    //isolation interface,
+    ///as it will re-order the elements in pointer order and not best match.
     const std::set<const xAOD::TrackParticle*> getTrackParticles(const xAOD::Egamma *eg,
 								 bool useBremAssoc = true, bool allParticles = true);
 
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///If useBremAssoc is set, get the original TrackParticle 
+    ///This one returns a vector so as to be more "user friendly", as it retains the original
+    ///best match ordering
+    const std::vector<const xAOD::TrackParticle*> getTrackParticlesVec(const xAOD::Egamma *eg,
+								       bool useBremAssoc = true, bool allParticles = true);
 
     ///@brief return the summary value for a TrackParticle or default value (-999)
     /// (to be used mostly in python where uint8_t is converted to char and the Tracking does not provide unprotected methods)
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h
index 15a792a12367a3ada9240c8519fb87bded94c086..2684e9f22d0d394fac874563b23c17af08f0acc8 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: ElectronContainer.h 615077 2014-09-04 13:42:41Z schaffer $
+// $Id: ElectronContainer.h 652975 2015-03-10 14:14:13Z christos $
 #ifndef XAODEGAMMA_ELECTRONCONTAINER_H
 #define XAODEGAMMA_ELECTRONCONTAINER_H
 
@@ -18,9 +18,7 @@ namespace xAOD {
 }
 
 // Set up a CLID for the container:
-#ifndef XAOD_STANDALONE
-#include "SGTools/CLASS_DEF.h"
+#include "xAODCore/CLASS_DEF.h"
 CLASS_DEF( xAOD::ElectronContainer , 1087532415 , 1 )
-#endif // XAOD_STANDALONE
 
 #endif // XAODEGAMMA_ELECTRONCONTAINER_H
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronxAODHelpers.h b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronxAODHelpers.h
index abbf87644efdade9982087fae78b01c5ab237297..5dae31b52ea363b8e864b9935b5477916c6cfcc8 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronxAODHelpers.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronxAODHelpers.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: ElectronxAODHelpers.h 646800 2015-02-13 15:56:31Z christos $
+// $Id: ElectronxAODHelpers.h 673480 2015-06-08 18:14:25Z christos $
 #ifndef XAOD_ELECTRONXAODHELPERS_H
 #define XAOD_ELECTRONXAODHELPERS_H
 
@@ -12,6 +12,7 @@
 #include "xAODTracking/TrackParticleFwd.h"
 #include <cstddef>
 #include <set>
+#include <vector>
 
 namespace xAOD {
 
@@ -26,13 +27,22 @@ namespace xAOD {
     ///@Brief return parameters for the last measurement for a GSF track particle
     float getLastMeasurementQoverP(const xAOD::TrackParticle *tp);
 
-    ///@Brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
     ///If useBremAssoc is set, get the original TrackParticle 
-    /// This is most useful when a std::set of the original track Particles is required (i.e isolation)
-    /// Otherwise use the method provided via the electon interface
-    /// el->trackParticle( size_t index )
+    ///This is useful when a std::set of the original track Particles is required, which is mainly the case for the 
+    //isolation interface,
+    ///as it will re-order the elements in pointer order and not best match.
     const std::set<const xAOD::TrackParticle*> getTrackParticles(const xAOD::Electron* el,
 								 bool useBremAssoc = true, bool allParticles = true);
+
+
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///If useBremAssoc is set, get the original TrackParticle 
+    ///This one returns a vector so as to be more "user friendly",as it retains the original
+    ///best match ordering
+    const std::vector<const xAOD::TrackParticle*> getTrackParticlesVec(const xAOD::Electron* el,
+								       bool useBremAssoc = true, bool allParticles = true);
+
     
     ///@brief return the number of Si hits in the track particle
     std::size_t numberOfSiHits(const xAOD::TrackParticle *tp);
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainer.h b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainer.h
index 3b9335c8632bd8cd9032827bdac4188c1f98c40a..4c17cc6854ab6b95169537854259e471d3b0e710 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainer.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainer.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: PhotonContainer.h 615077 2014-09-04 13:42:41Z schaffer $
+// $Id: PhotonContainer.h 652975 2015-03-10 14:14:13Z christos $
 #ifndef XAODEGAMMA_PHOTONCONTAINER_H
 #define XAODEGAMMA_PHOTONCONTAINER_H
 
@@ -18,9 +18,7 @@ namespace xAOD {
 }
 
 // Set up a CLID for the container:
-#ifndef XAOD_STANDALONE
-#include "SGTools/CLASS_DEF.h"
+#include "xAODCore/CLASS_DEF.h"
 CLASS_DEF( xAOD::PhotonContainer , 1105575213 , 1 )
-#endif // XAOD_STANDALONE
 
 #endif // XAODEGAMMA_PHOTONCONTAINER_H
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonxAODHelpers.h b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonxAODHelpers.h
index 7dd7fa6b5dabdc9f0a8379e0647ad8e9a93b1325..7752e2ff310e13042a7c83c8df7f1950feb83e52 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonxAODHelpers.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonxAODHelpers.h
@@ -14,6 +14,7 @@
 
 #include <cstddef>
 #include <set>
+#include <vector>
 
 namespace xAOD {
 
@@ -49,11 +50,21 @@ namespace xAOD {
     ///@brief return the momentum at the vertex (which can be 0)
     Amg::Vector3D momentumAtVertex(const xAOD::Vertex&, bool debug = false);
 
-    /** Return a list of all or only the best TrackParticle associated to the object. 
-      * (used for track isolation)
-      * If useBremAssoc is set, get the original TrackParticle **/
+
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///If useBremAssoc is set, get the original TrackParticle 
+    ///This is useful when a std::set of the original track Particles is required, which is mainly the case for the 
+    //isolation interface,
+    ///as it will re-order the elements in pointer order and not best match.
     const std::set<const xAOD::TrackParticle*> getTrackParticles(const xAOD::Photon* ph,
 								 bool useBremAssoc = true);
+
+    ///@brief Return a list of all or only the best TrackParticle associated to the object. 
+    ///If useBremAssoc is set, get the original TrackParticle 
+    ///This one returns a vector so as to be more "user friendly",as it retains the original
+    ///best match ordering
+    const std::vector<const xAOD::TrackParticle*> getTrackParticlesVec(const xAOD::Photon* ph,
+								       bool useBremAssoc = true);
     
 
   } //namaspace EgammaHelpers
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml b/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml
index 544bd478d308ddbfd1e655d2ea7971962285f8df..80b23b9f22c7725d77adec360c601b83b7f37e3f 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml
@@ -1,4 +1,4 @@
-<!-- $Id: selection.xml 645853 2015-02-10 20:40:06Z blenzi $ -->
+<!-- $Id: selection.xml 671120 2015-05-30 18:53:01Z christos $ -->
 <lcgdict>
 
   <!-- Egamma_v1 dictionaries: -->
@@ -78,7 +78,8 @@
 
   <!-- Objects from the namespace -->
   <variable pattern="xAOD::EgammaParameters::*" />
-  
+  <class name="xAOD::EgammaParameters::ROOT6_NamespaceAutoloadHook" />   
+
   <!-- Enums -->
   <enum pattern="xAOD::EgammaParameters::*" />
   
@@ -103,7 +104,7 @@
     <class pattern="xAOD::CaloCluster*" />
     <class pattern="DataVector<xAOD::CaloCluster*" />
     <class pattern="ElementLink<DataVector<xAOD::CaloCluster*" />
-    <function pattern="xAOD::EgammaHelpers::getLink" />  
+    <function pattern="xAOD::EgammaHelpers::getLink*" />  
   </exclusion>
 
 </lcgdict>
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
index 18ab1333402d31e5e12d7e95c636559f221826ef..7b98cd1904e21e9b4422e7eb956cc33a58b83c41 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Egamma_v1.h 637182 2014-12-20 01:55:15Z christos $
+// $Id: Egamma_v1.h 656759 2015-03-25 15:37:07Z christos $
 #ifndef XAODEGAMMA_VERSIONS_EGAMMA_V1_H
 #define XAODEGAMMA_VERSIONS_EGAMMA_V1_H
 
@@ -47,8 +47,8 @@ namespace xAOD {
   /// @author Anthony Morley
   /// @author Jovan Mitrevski
   ///
-  /// $Revision: 637182 $
-  /// $Date: 2014-12-20 02:55:15 +0100 (Sat, 20 Dec 2014) $
+  /// $Revision: 656759 $
+  /// $Date: 2015-03-25 16:37:07 +0100 (Wed, 25 Mar 2015) $
   ///
   class Egamma_v1 :public IParticle {
 
@@ -212,14 +212,31 @@ namespace xAOD {
     /// @{    
 
     /// @brief Accessor for Isolation values.
-    bool isolationValue(float& value,   const Iso::IsolationType information) const;
+    bool isolation(float& value,   const Iso::IsolationType information) const;
 
     /// @brief Accessor to Isolation values , this just returns the value without internaly checking if it exists.
     /// Will lead to an exception if the information is not available
-    float isolationValue(const Iso::IsolationType information) const;
+    float isolation(const Iso::IsolationType information) const;
 
     /// @brief set method for Isolation values.
-    bool setIsolationValue(float value, const Iso::IsolationType information);
+    bool setIsolation(float value, const Iso::IsolationType information);
+
+
+    /// @brief old Accessor for Isolation values.
+    bool isolationValue(float& value,   const Iso::IsolationType information) const{
+
+      return isolation(value,information);
+    }
+    /// @brief old Accessor to Isolation values , this just returns the value without internaly checking if it exists.
+    /// Will lead to an exception if the information is not available
+    float isolationValue(const Iso::IsolationType information) const{
+
+      return isolation(information);
+    }
+    /// @brief old set method for Isolation values.
+    bool setIsolationValue(float value, const Iso::IsolationType information){
+      return setIsolation(value,information);
+    }
 
     /// @}
 
@@ -265,11 +282,11 @@ namespace xAOD {
 
 
     /// @brief Accessor for Isolation corection Bitset
-    bool isolationCorrectionBitset(uint32_t& value, const Iso::IsolationFlavour flavour ) const;
+    bool isolationCorrectionBitset(std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const;
 
     /// @brief Accessor to Isolation corection Bitset , this just returns the bitset without internaly checking if it exists.
     /// Will lead to an exception if the information is not available
-    uint32_t isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const;
+    std::bitset<32> isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const;
 
     /// @brief Set method for Isolation corection Bitset.
     bool setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour );
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
index caf269609e3a644e95219d943a6c4f534551c26c..b24ff2d5142c6b076a5ad3e8b1ee2933babb97d8 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Photon_v1.h 645853 2015-02-10 20:40:06Z blenzi $
+// $Id: Photon_v1.h 667341 2015-05-15 14:39:34Z christos $
 #ifndef XAODEGAMMA_VERSIONS_PHOTON_V1_H
 #define XAODEGAMMA_VERSIONS_PHOTON_V1_H
 
@@ -31,8 +31,8 @@ namespace xAOD {
   /// @author Christos Anastopoulos
   /// @author Anthony Morley
   ///
-  /// $Revision: 645853 $
-  /// $Date: 2015-02-10 21:40:06 +0100 (Tue, 10 Feb 2015) $
+  /// $Revision: 667341 $
+  /// $Date: 2015-05-15 16:39:34 +0200 (Fri, 15 May 2015) $
   ///
   class Photon_v1 :public xAOD::Egamma_v1 {
 
@@ -100,19 +100,16 @@ namespace xAOD {
     /// Will lead to an exception if the information is not available
     float vertexCaloMatchValue( const EgammaParameters::VertexCaloMatchType information ) const;
 
-
     ///@brief Set method for CaloMatch values.
     bool  setVertexCaloMatchValue( float& value, const EgammaParameters::VertexCaloMatchType information );
 
     ///@brief return the photon conversion type (see EgammaEnums)
-    xAOD::EgammaParameters::ConversionType conversionType()
-    {
+    xAOD::EgammaParameters::ConversionType conversionType() const{
       return xAOD::EgammaHelpers::conversionType(this);
     }
     
     ///@brief return the photon conversion radius
-    float conversionRadius()
-    {
+    float conversionRadius() const {
       return xAOD::EgammaHelpers::conversionRadius(this);
     }