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) {
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());
169 acc(*
this) = newAuthor;
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;
228 return (
OQ & mask)==0;
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" );}
369 clusterAcc(
"caloClusterLinks" );
372 return clusterAcc(*this).size();
386 return *( cls[
index ] );
400 caloClusterLinks, setCaloClusterLinks)
405 if(!
acc.isAvailable(*
this) ) {
418 const SG::AuxElement::Accessor< char >
acc( menu );
424 if(!
acc.isAvailable(*
this) ) {
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
std::vector< size_t > vec
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
void makePrivateStore()
Create a new (empty) private store for this object.
bool hasStore() const
Return true if this object has an associated store.
SG::Accessor< T, ALLOC > Accessor
const SG::AuxVectorData * container() const
Return the container holding this element.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
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.
SG::Accessor< T, ALLOC > Accessor
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.
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.
static const SG::AuxElement::Accessor< ElementLink< xAOD::EgammaContainer > > ambiguityLinkAcc("ambiguityLink")
Accessor for the "ambiguityLink" dynamic variable.