17#include <Math/GenVector/PtEtaPhiM4D.h>
30 for (
unsigned int i = 0; i < N ; ++i){
31 for (
unsigned int j = 0; j <= i; ++j){
37void expand(std::vector<float>::const_iterator it,
38 std::vector<float>::const_iterator, Eigen::Matrix<float,N,N,0,N,N>&
covMatrix) {
39 for (
unsigned int i = 0; i < N; ++i) {
40 for (
unsigned int j = 0; j <= i; ++j) {
57 if (!this->container() && !this->hasStore() ) {
67 static const Accessor< float >
acc(
"pt" );
72 static const Accessor<float >
acc(
"eta" );
77 static const Accessor< float >
acc(
"phi" );
101 static const Accessor< float > acc1(
"pt" );
103 static const Accessor< float > acc2(
"eta" );
105 static const Accessor< float > acc3(
"phi" );
110 static const Accessor< float >
acc(
"pt" );
115 static const Accessor< float >
acc(
"eta" );
120 static const Accessor< float >
acc(
"phi" );
126 static const Accessor< std::vector<float> >
acc(
"EgammaCovarianceMatrix" );
130 if(!
acc.isAvailable(*
this) ) {
133 const std::vector<float>& v =
acc(*
this);
134 size_t size= v.size();
137 cov = Eigen::Map<const EgammaCovMatrix_t> (v.data());
149 static const Accessor< std::vector < float > >
acc(
"EgammaCovarianceMatrix" );
156 static const Accessor< uint16_t >
acc(
"author" );
162 static const Accessor< uint16_t >
acc(
"author" );
168 static const Accessor< uint16_t >
acc(
"author" );
169 acc(*
this) = newAuthor;
178static const SG::AuxElement::Accessor< ElementLink< xAOD::EgammaContainer > >
188 if( ! link.isValid() ) {
201 if(!
acc->isAvailable(*
this) ) {
205 value = ( *acc )(*this);
211 if(!
acc )
throw std::runtime_error(
"Unknown/Unavailable Shower Shape type requested" );
212 return ( *
acc )(*this);
217 if( !
acc )
return false;
219 ( *acc )(*this) = value;
226 static const Accessor< uint32_t >
acc(
"OQ" );
228 return (
OQ & mask)==0;
232 static const Accessor< uint32_t >
acc(
"OQ" );
237 static const Accessor< uint32_t >
acc(
"OQ" );
247 if(!
acc->isAvailable(*
this) ) {
251 value = ( *acc )(*this);
257 if( !
acc )
throw std::runtime_error(
"Unknown/Unavailable Isolation type requested" );
258 return ( *
acc )(*this);
263 if( !
acc )
return false;
265 ( *acc )(*this) = value;
273 if(!
acc.isAvailable(*
this) ) {
285 if( !
acc.isAvailable(*
this) ) {
throw std::runtime_error(
"Unknown/Unavailable Isolation correction requested" );}
299 if(!
acc.isAvailable(*
this) ) {
309 if( !
acc.isAvailable(*
this) ) {
throw std::runtime_error(
"Unknown/Unavailable Isolation correction requested" );}
321 if(!
acc.isAvailable(*
this) ) {
331 if( !
acc.isAvailable(*
this) ) {
throw std::runtime_error(
"Unknown/Unavailable Isolation correction requested" );}
344 if(!
acc.isAvailable(*
this) ) {
348 value = std::bitset<32>(
acc(*
this));
354 if( !
acc.isAvailable(*
this) ) {
throw std::runtime_error(
"Unknown/Unavailable Isolation BitSet requested" );}
368 static const SG::AuxElement::Accessor< Egamma_v1::CLELVec_t >
369 clusterAcc(
"caloClusterLinks" );
371 if( clusterAcc.isAvailable(*
this) ) {
372 return clusterAcc(*this).size();
386 return *( cls[
index ] );
400 caloClusterLinks, setCaloClusterLinks)
404 const SG::AuxElement::Accessor< char >
acc(
menu );
405 if(!
acc.isAvailable(*
this) ) {
413 const SG::AuxElement::Accessor< char >
acc(
menu );
418 const SG::AuxElement::Accessor< char >
acc( menu );
423 const SG::AuxElement::Accessor< unsigned int >
acc( isEM );
424 if(!
acc.isAvailable(*
this) ) {
432 const SG::AuxElement::Accessor< unsigned int >
acc( isEM );
437 const SG::AuxElement::Accessor< unsigned int >
acc( isEM );
bool isValid() const
Test to see if the link can be dereferenced.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
std::vector< size_t > vec
size_t size() const
Number of registered mappings.
ElementLink implementation for ROOT usage.
void setSelectionisEM(unsigned int value, const std::string &isEM)
Set the isEM word for a selection menu (using the name).
void setAuthor(uint16_t)
set author
bool setShowerShapeValue(float value, const EgammaParameters::ShowerShapeType information)
Set method for Shower Shape values.
const ElementLink< CaloClusterContainer > & caloClusterLink(size_t index=0) const
ElementLink to the xAOD::CaloCluster/s that match the electron candidate.
void setPassSelection(bool value, const std::string &menu)
Set the selection decision for a menu (using the name).
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal egamma type.
EgammaCovMatrix_t covMatrix() const
Returns the 4x4 symmetric covariance matrix .
bool isolation(float &value, const Iso::IsolationType information) const
Accessor for Isolation values.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
void setCovMatrix(const EgammaCovMatrix_t &cov)
set the 4x4 symmetric covariance matrix .
void setEta(float eta)
set the eta
bool isolationCaloCorrection(float &value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection corr, const Iso::IsolationCorrectionParameter param) const
Accessor for flavour and type depended Isolation Calo correction.
virtual double e() const override
The total energy of the particle.
void setPhi(float phi)
set the phi
size_t nCaloClusters() const
Return the number of xAOD::CaloClusters that define the electron candidate.
virtual Type::ObjectType type() const override=0
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
void setOQ(uint32_t newOQ)
Set the object quality.
bool showerShapeValue(float &value, const EgammaParameters::ShowerShapeType information) const
Accessor for ShowerShape values.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for egamma.
std::vector< ElementLink< CaloClusterContainer > > CLELVec_t
Helper type definition.
Egamma_v1()
Default constructor.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
bool selectionisEM(unsigned int &value, const std::string &isEM) const
Return the isEM word for a selection menu If the menu isEM is stored in this xAOD::Egamma,...
bool isGoodOQ(uint32_t mask) const
Check object quality. Return True is it is Good Object Quality.
void setPt(float pt)
set the Pt
uint32_t OQ() const
Return the object quality bit word.
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
bool setIsolation(float value, const Iso::IsolationType information)
set method for Isolation values.
bool isolationCorrectionBitset(std::bitset< 32 > &value, const Iso::IsolationFlavour flavour) const
Accessor for Isolation corection Bitset.
bool isolationTrackCorrection(float &value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection corr) const
Accessor for Isolation Track correction.
virtual double rapidity() const override
The true rapidity (y) of the particle.
void setPtEtaPhi(float pt, float eta, float phi)
set the 4-vec
Egamma_v1 & operator=(const Egamma_v1 &eg)
Assignment Operator. Using the assignment of SG::AuxElement.
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
void addAuthor(uint16_t)
add author
Eigen::Matrix< float, 4, 4 > EgammaCovMatrix_t
4x4 Covariance Matrix in EtEtaPhiM (needs decision)
const Egamma_v1 * ambiguousObject() const
Get ambiguous.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle as a TLoretzVector.
bool setIsolationTrackCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationTrackCorrection corr)
Set method for Isolation Track Corrections.
bool setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour)
Set method for Isolation corection Bitset.
const CLELVec_t & caloClusterLinks() const
Get all cluster links.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
bool setIsolationCaloCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection corr, const Iso::IsolationCorrectionParameter param)
set method for flavour and type depended Isolation Calo Corrections.
IParticle & operator=(const IParticle &)=default
virtual double m() const =0
The invariant mass of the particle.
constexpr int CalculateCompressedSize(int n)
IsolationType
Overall enumeration for isolation types in xAOD files.
IsolationFlavour
Enumeration for different ways of calculating isolation in xAOD files.
IsolationCorrectionParameter
IsolationCaloCorrection
Enumeration for different ways of correcting isolation in xAOD files.
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, Eigen::Matrix< float, N, N, 0, N, N > &covMatrix)
void compress(const Eigen::Matrix< float, N, N, 0, N, N > &covMatrix, std::vector< float > &vec)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
const SG::AuxElement::Accessor< uint32_t > getIsolationCorrectionBitsetAccessor(Iso::IsolationFlavour type)
Returns an accessor for the correction bitset corresponding to this IsolationType.
static const SG::AuxElement::Accessor< ElementLink< xAOD::EgammaContainer > > ambiguityLinkAcc("ambiguityLink")
Accessor for the "ambiguityLink" dynamic variable.
const SG::AuxElement::Accessor< float > * showerShapeAccessorV1(xAOD::EgammaParameters::ShowerShapeType type)
Explicit Instantiation of Template.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
const SG::AuxElement::Accessor< float > getIsolationCorrectionAccessor(Iso::IsolationFlavour type, Iso::IsolationCaloCorrection corr, Iso::IsolationCorrectionParameter param)
const SG::AuxElement::Accessor< float > * getIsolationAccessor(Iso::IsolationType type)
Get the Accessor object for a given isolation type.
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.