ATLAS Offline Software
Loading...
Searching...
No Matches
PanTau::PanTauSeed Class Reference

#include <PanTauSeed.h>

Inheritance diagram for PanTau::PanTauSeed:
Collaboration diagram for PanTau::PanTauSeed:

Public Types

enum  TechnicalQuality {
  t_NoValidInputTau , t_NoConstituentsAtAll , t_NoSelectedConstituents , t_BadPtValue ,
  t_GoodSeed , t_nTechnicalQualities
}
enum  DecayModeExtended {
  t_ExtMode100 = 1 , t_ExtMode10X = 2 , t_ExtMode110 = 3 , t_ExtMode11X = 4 ,
  t_ExtMode1XX = 5 , t_ExtMode300 = 6 , t_ExtMode30X = 7 , t_ExtMode3XX = 8 ,
  t_ExtModeOther = 9 , t_ExtModeNotSet = 10 , t_ExtModeError = 11 , t_ExtMode11shots = 12
}
using TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
template<class T, class ALLOC = AuxAllocator_t<T>>
using ConstAccessor = SG::ConstAccessor<T, ALLOC>
template<class T, class ALLOC = AuxAllocator_t<T>>
using Decorator = SG::Decorator<T, ALLOC>

Public Member Functions

 PanTauSeed ()
 ~PanTauSeed ()
 PanTauSeed (const PanTauSeed &seed)
PanTauSeedoperator= (const PanTauSeed &seed)
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name)
 Fetch an aux data variable, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Check if an aux variable is available for writing.
void assign (const AuxElement &other, bool warnUnlocked=false)
 Assignment.
const SG::AuxVectorDatacontainer () const
 Return the container holding this element.
SG::AuxVectorDatacontainer ()
 Return the container holding this element.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for writing as a decoration.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name) const
 Fetch an aux decoration, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name, const std::string &clsname) const
 Fetch an aux decoration, as a non-const reference.
void makePrivateStore ()
 Create a new (empty) private store for this object.
template<class U1>
void makePrivateStore (const U1 &other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
template<class U1>
void makePrivateStore (const U1 *other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
void releasePrivateStore ()
 Release and free any private store associated with this object.
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object.
void setStore (SG::IAuxStore *store)
 Set the store associated with this object.
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object.
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore.
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore.
bool usingPrivateStore () const
 Test to see if this object is currently using a private store.
bool usingStandaloneStore () const
 Test to see if this object is currently using a standalone store.
void clearCache ()
 Clear the cached aux data pointers.
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items for this object.
const SG::auxid_set_tgetDecorIDs () const
 Return a set of identifiers for decorations for this object.
bool hasStore () const
 Return true if this object has an associated store.
bool hasNonConstStore () const
 Return true if this object has an associated non-const store.
bool clearDecorations () const
 Clear all decorations.
bool trackIndices () const
 Return true if index tracking is enabled for this object.
size_t index () const
 Return the index of this element within its container.
Functions for getting and setting user properties
template<class T>
XAOD_AUXDATA_DEPRECATED T & auxdata (const std::string &name, const std::string &clsname="")
 Fetch an aux data variable, as a non-const reference.
template<class T>
XAOD_AUXDATA_DEPRECATED const T & auxdata (const std::string &name, const std::string &clsname="") const
 Fetch an aux data variable, as a const reference.
template<class T>
XAOD_AUXDATA_DEPRECATED bool isAvailable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for reading or not.
template<class T>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for writing or not.

Static Public Member Functions

static int getDecayMode (int nCharged, int nNeutral)
static std::string getDecayModeName (int decayMode)

Static Public Attributes

static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations.

Protected Types

template<class T, class ALLOC = AuxAllocator_t<T>>
using Accessor

Protected Member Functions

const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface.
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface.
bool noPrivateData () const
 True if this element has no private data.
bool havePrivateData () const
 True if this element currently has private data.
bool hadPrivateData () const
 True if this element had private data before it was added to its current container.

Private Types

enum class  PrivateStoreState : uint8_t { NO_PRIVATE = 0 , HAVE_PRIVATE = 1 , HAD_PRIVATE = 2 }
 The current private data state. More...

Private Member Functions

void releasePrivateStoreForDtor ()
 Out-of-line portion of destructor.
void setIndex (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element.
bool setIndexPrivate (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element.
void makePrivateStore1 (const void *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data.
void makePrivateStore1 (const AuxElement *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data.
AuxElementStandaloneData * setStore1 (const SG::IConstAuxStore *store)
 Set the store associated with this object.
void clearAux ()
 Clear all aux data associated with this element.
void copyAux (const ConstAuxElement &other, bool warnUnlocked=false)
 Copy aux data from another object.
void setNoPrivateData ()
 Record that this element does not have private data.
void setHavePrivateData ()
 Record that this element currently has private data.
void setHadPrivateData ()
 Record that this element used to have private data.

Static Private Member Functions

static void clearAuxHelper (AuxVectorData &container, size_t index)
 Clear all aux data associated with an element.
static void copyAuxHelper (AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
 Copy aux data from another object.

Private Attributes

const SG::AuxVectorDatam_container
 The container of which this object is an element.
size_t m_index
 The index of this element within its container.
PrivateStoreState m_privateStoreState

xAOD::IParticle functions

These are already virtual due to IParticle

typedef IParticle::FourMom_t FourMom_t
 Definition of the 4-momentum type.
FourMom_t m_p4
 4-momentum object
bool m_IsValidSeed
std::vector< int > m_TechnicalQuality
xAOD::TauJetm_TauJet
std::vector< std::vector< PanTau::TauConstituent * > > m_Constituents
TLorentzVector m_ProtoMomentum_Core
TLorentzVector m_FinalMomentum
std::vector< TLorentzVector > m_TypeHLVs
std::vector< PanTau::TauConstituent * > m_ConstituentsList_Core
std::vector< PanTau::TauConstituent * > m_ConstituentsList_AllSelected
std::vector< PanTau::TauConstituent * > m_ConstituentsList_All
int m_DecayMode_BySubAlg
int m_DecayMode_ByPanTau
bool m_decayModeHack_CellBasedShots
PanTau::TauFeaturem_Features
 flag to indicate whether the decay mode by cellbased was
virtual double pt () const
 The transverse momentum ( \(p_T\)) of the particle.
virtual double eta () const
 The pseudorapidity ( \(\eta\)) of the particle.
virtual double phi () const
 The azimuthal angle ( \(\phi\)) of the particle.
virtual double m () const
 The invariant mass of the particle.
virtual double e () const
 The total energy of the particle.
virtual double rapidity () const
 The true rapidity (y) of the particle.
virtual FourMom_t p4 () const
 The full 4-momentum of the particle as a TLoretzVector.
virtual xAOD::Type::ObjectType type () const
 The type of the object as a simple enumeration, remains pure virtual in e/gamma.
void setP4 (float pt, float eta, float phi, float m)
 set the 4-vec
void setPt (float pt)
 set the Pt
void setEta (float eta)
 set the eta
void setPhi (float phi)
 set the phi
void setM (float m)
 set the Mass
 PanTauSeed (xAOD::TauJet *tauJet, const std::vector< PanTau::TauConstituent * > &tauConstituents, const std::vector< PanTau::TauConstituent * > &tauConstituentsWithUnselected, const std::vector< int > &pantauSeed_TechnicalQuality)
 Main constructor to be used.
 PanTauSeed (xAOD::TauJet *tauJet, const std::vector< int > &pantauSeed_TechnicalQuality)
 Constructor for invalid seeds.
const xAOD::TauJetgetTauJet () const
xAOD::TauJetgetTauJet ()
const PanTau::TauFeaturegetFeatures () const
PanTau::TauFeaturegetFeatures ()
TLorentzVector getProtoMomentumCore () const
bool getIsValidSeed () const
const std::vector< int > & getTechnicalQuality () const
bool isOfTechnicalQuality (int pantauSeed_TechnicalQuality) const
const std::vector< std::vector< PanTau::TauConstituent * > > & getConstituents () const
const std::vector< PanTau::TauConstituent * > & getConstituentsAsList_Core () const
const std::vector< PanTau::TauConstituent * > & getConstituentsAsList_All () const
std::vector< PanTau::TauConstituent * > getConstituentsOfType (int tauConstituent_Type, bool &foundit)
int getNumberOfConstituentsOfType (int tauConstituent_Type)
TLorentzVector getSubsystemHLV (int tauConstituent_Type, bool &foundit)
TLorentzVector getFinalMomentum () const
int getDecayModeBySubAlg () const
int getDecayModeByPanTau () const
void setFinalMomentum (TLorentzVector finalMom)
void setDecayModeByPanTau (int decayModePanTau)
void setModeHackedByCellBased (bool f)
bool getModeHackedByCellBased ()

Detailed Description

Definition at line 24 of file PanTauSeed.h.

Member Typedef Documentation

◆ Accessor

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Accessor
protectedinherited

Definition at line 572 of file AuxElement.h.

◆ ConstAccessor

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::ConstAccessor = SG::ConstAccessor<T, ALLOC>
inherited

Definition at line 569 of file AuxElement.h.

◆ Decorator

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Decorator = SG::Decorator<T, ALLOC>
inherited

Definition at line 575 of file AuxElement.h.

◆ FourMom_t

typedef IParticle::FourMom_t PanTau::PanTauSeed::FourMom_t

Definition of the 4-momentum type.

Definition at line 90 of file PanTauSeed.h.

◆ TypelessConstAccessor

using SG::AuxElement::TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
inherited

Definition at line 566 of file AuxElement.h.

Member Enumeration Documentation

◆ DecayModeExtended

Enumerator
t_ExtMode100 
t_ExtMode10X 
t_ExtMode110 
t_ExtMode11X 
t_ExtMode1XX 
t_ExtMode300 
t_ExtMode30X 
t_ExtMode3XX 
t_ExtModeOther 
t_ExtModeNotSet 
t_ExtModeError 
t_ExtMode11shots 

Definition at line 43 of file PanTauSeed.h.

43 {
44 t_ExtMode100 = 1,
45 t_ExtMode10X = 2,
46 t_ExtMode110 = 3,
47 t_ExtMode11X = 4,
48 t_ExtMode1XX = 5,
49 t_ExtMode300 = 6,
50 t_ExtMode30X = 7,
51 t_ExtMode3XX = 8,
53 t_ExtModeNotSet = 10,
54 t_ExtModeError = 11,
55 t_ExtMode11shots = 12 // for taus which have been classified as 1p1n but have >2 shots
56 };

◆ PrivateStoreState

enum class SG::IAuxElement::PrivateStoreState : uint8_t
strongprivateinherited

The current private data state.

Enumerator
NO_PRIVATE 
HAVE_PRIVATE 
HAD_PRIVATE 

Definition at line 131 of file IAuxElement.h.

132 {
133 NO_PRIVATE = 0,
134 HAVE_PRIVATE = 1,
135 HAD_PRIVATE = 2,
136 };

◆ TechnicalQuality

Enumerator
t_NoValidInputTau 
t_NoConstituentsAtAll 
t_NoSelectedConstituents 
t_BadPtValue 
t_GoodSeed 
t_nTechnicalQualities 

Definition at line 33 of file PanTauSeed.h.

33 {
34 t_NoValidInputTau, //use this when there's no substructure info available
35 t_NoConstituentsAtAll, //use when no constituent was found
36 t_NoSelectedConstituents, //use when no constituent passes the cuts (all below pT, none in cone...)
37 t_BadPtValue, //for cases when pT is not in the range of any BDT PT bin
40 };

Constructor & Destructor Documentation

◆ PanTauSeed() [1/4]

PanTau::PanTauSeed::PanTauSeed ( )

Definition at line 9 of file PanTauSeed.cxx.

10 :
11 IParticle(),
12 m_p4(),
13 m_IsValidSeed(false),
15 m_TauJet(nullptr),
17 m_TypeHLVs(),
24 m_Features(nullptr)
25{
26}
bool m_decayModeHack_CellBasedShots
Definition PanTauSeed.h:198
std::vector< PanTau::TauConstituent * > m_ConstituentsList_AllSelected
Definition PanTauSeed.h:188
std::vector< PanTau::TauConstituent * > m_ConstituentsList_Core
Definition PanTauSeed.h:187
std::vector< PanTau::TauConstituent * > m_ConstituentsList_All
Definition PanTauSeed.h:192
PanTau::TauFeature * m_Features
flag to indicate whether the decay mode by cellbased was
Definition PanTauSeed.h:203
FourMom_t m_p4
4-momentum object
Definition PanTauSeed.h:161
std::vector< TLorentzVector > m_TypeHLVs
Definition PanTauSeed.h:184
std::vector< std::vector< PanTau::TauConstituent * > > m_Constituents
Definition PanTauSeed.h:175
xAOD::TauJet * m_TauJet
Definition PanTauSeed.h:171
std::vector< int > m_TechnicalQuality
Definition PanTauSeed.h:168
IParticle()=default

◆ ~PanTauSeed()

PanTau::PanTauSeed::~PanTauSeed ( )

Definition at line 30 of file PanTauSeed.cxx.

31{
32 if(m_Features != nullptr) delete m_Features;
33
34 //delete the constituents
35 for(unsigned int iConst=0; iConst<m_ConstituentsList_All.size(); iConst++) {
36 PanTau::TauConstituent* curConst = m_ConstituentsList_All[iConst];
37 if(curConst != nullptr) delete curConst;
38 }
42
43 // also clear the constituent matrix
44 // dont delete the entries as they point to the (at this point already deleted) constituents in m_ConstituentsList
45 for(unsigned int iType=0; iType<m_Constituents.size(); iType++) {
46 std::vector<PanTau::TauConstituent*> curConsts = m_Constituents[iType];
47 curConsts.clear();
48 }
49 m_Constituents.clear();
50}

◆ PanTauSeed() [2/4]

PanTau::PanTauSeed::PanTauSeed ( const PanTauSeed & seed)

Definition at line 54 of file PanTauSeed.cxx.

55 :
56 IParticle(rhs),
57 m_p4(rhs.m_p4),
58 m_IsValidSeed(rhs.m_IsValidSeed),
59 m_TechnicalQuality(rhs.m_TechnicalQuality),
60 m_TauJet(rhs.m_TauJet),
61 m_Constituents(rhs.m_Constituents),
62 m_TypeHLVs(rhs.m_TypeHLVs),
63 m_ConstituentsList_Core(rhs.m_ConstituentsList_Core),
64 m_ConstituentsList_AllSelected(rhs.m_ConstituentsList_AllSelected),
65 m_ConstituentsList_All(rhs.m_ConstituentsList_All),
66 m_DecayMode_BySubAlg(rhs.m_DecayMode_BySubAlg),
67 m_DecayMode_ByPanTau(rhs.m_DecayMode_ByPanTau),
68 m_decayModeHack_CellBasedShots(rhs.m_decayModeHack_CellBasedShots),
69
70 m_Features( (rhs.m_Features ? new PanTau::TauFeature(*rhs.m_Features) : nullptr) )
71{
72}

◆ PanTauSeed() [3/4]

PanTau::PanTauSeed::PanTauSeed ( xAOD::TauJet * tauJet,
const std::vector< PanTau::TauConstituent * > & tauConstituents,
const std::vector< PanTau::TauConstituent * > & tauConstituentsWithUnselected,
const std::vector< int > & pantauSeed_TechnicalQuality )

Main constructor to be used.

Definition at line 186 of file PanTauSeed.cxx.

191 :
192 IParticle()
193{
194
195 // *This may be a bug!!! change to Set*Pt*EtaPhiM?? ***
196 // PanTau::SetP4EEtaPhiM( m_p4, tauJet->ptIntermediateAxis() * cosh( tauJet->etaIntermediateAxis() ), tauJet->etaIntermediateAxis(), tauJet->phiIntermediateAxis(), tauJet->mIntermediateAxis() );
197 m_p4.SetPtEtaPhiM(tauJet->ptIntermediateAxis(), tauJet->etaIntermediateAxis(), tauJet->phiIntermediateAxis(), tauJet->mIntermediateAxis() );
198 m_IsValidSeed = true;
199 m_TechnicalQuality = pantauSeed_TechnicalQuality;
200 m_TauJet = tauJet;
202 m_Features = new PanTau::TauFeature;
203
204 //save a copy of the flat constituents list and also split into core/wide constituents
205 m_ConstituentsList_All = tauConstituentsAll;
206 m_ConstituentsList_AllSelected = tauConstituents; //all types are in here, this is the complete list
207 for(unsigned int iConst=0; iConst<tauConstituents.size(); iConst++) {
208 bool isCoreChrg = tauConstituents[iConst]->isOfType(PanTau::TauConstituent::t_Charged);
209 bool isCoreNeut = tauConstituents[iConst]->isOfType(PanTau::TauConstituent::t_Neutral);
210 bool isCorePi0 = tauConstituents[iConst]->isOfType(PanTau::TauConstituent::t_Pi0Neut);
211
212 if(isCoreChrg || isCoreNeut || isCorePi0) m_ConstituentsList_Core.push_back(tauConstituents[iConst]); // Core only contains the currently used objects
213
214 }
215
216 //create the constituents lists
217 for(int iType=0; iType<PanTau::TauConstituent::t_nTypes; iType++) {
218 m_Constituents.emplace_back(0 );
219 m_TypeHLVs.emplace_back(0,0,0,0 );
220 }
221
222 //assign tauConstituents
223 TLorentzVector hlv_SumConstituents_Core = TLorentzVector(0,0,0,0);
224
225 int nCharged = 0;
226 int nPi0Neut = 0;
227
228 for(unsigned int iConst=0; iConst<tauConstituents.size(); iConst++) {
229 PanTau::TauConstituent* curConst = tauConstituents.at(iConst);
230 std::vector<int> curTypes = curConst->getTypeFlags();
231
232 for(unsigned int curType=0; curType<curTypes.size(); curType++) {
233 if(curTypes.at(curType) == 0) continue;
234
235 if(curType == static_cast<int>(PanTau::TauConstituent::t_Charged)) nCharged++;
236 if(curType == static_cast<int>(PanTau::TauConstituent::t_Pi0Neut)) nPi0Neut++;
237
238 if((unsigned int)curType >= m_Constituents.size()) {
239 continue;
240 }
241
242 //fill into sorted lists
243 m_Constituents.at(curType).push_back(curConst);
244 m_TypeHLVs.at(curType) += curConst->p4();
245
246 }//end loop over types
247
248 //add all charged and neutral constituents (i.e. from core region) to core proto momentum
249 if(curConst->isOfType(PanTau::TauConstituent::t_Charged)) {hlv_SumConstituents_Core += curConst->p4(); continue;}
250 if(curConst->isOfType(PanTau::TauConstituent::t_Pi0Neut)) {hlv_SumConstituents_Core += curConst->p4(); continue;}
251
252 }//end loop over constituents
253 m_ProtoMomentum_Core = hlv_SumConstituents_Core;
254
255 //set mode as obtained from subalg
258
261 }
262
263}
TLorentzVector m_ProtoMomentum_Core
Definition PanTauSeed.h:178
bool isOfTechnicalQuality(int pantauSeed_TechnicalQuality) const
static int getDecayMode(int nCharged, int nNeutral)
virtual FourMom_t p4() const
The full 4-momentum of the particle as a TLorentzVector.
bool isOfType(TauConstituent::Type aType) const
const std::vector< int > & getTypeFlags() const
double ptIntermediateAxis() const
double mIntermediateAxis() const
double etaIntermediateAxis() const
double phiIntermediateAxis() const

◆ PanTauSeed() [4/4]

PanTau::PanTauSeed::PanTauSeed ( xAOD::TauJet * tauJet,
const std::vector< int > & pantauSeed_TechnicalQuality )

Constructor for invalid seeds.

Definition at line 267 of file PanTauSeed.cxx.

269 :
270 IParticle(),
272 m_TypeHLVs(),
278{
279 // *This may be a bug!!! change to Set*Pt*EtaPhiM?? ***
280 // PanTau::SetP4EEtaPhiM( m_p4, tauJet->ptIntermediateAxis() * cosh( tauJet->etaIntermediateAxis() ), tauJet->etaIntermediateAxis(), tauJet->phiIntermediateAxis(), tauJet->mIntermediateAxis() );
281 m_p4.SetPtEtaPhiM(tauJet->ptIntermediateAxis(), tauJet->etaIntermediateAxis(), tauJet->phiIntermediateAxis(), tauJet->mIntermediateAxis() );
282 m_IsValidSeed = false;
283 m_TechnicalQuality = pantauSeed_TechnicalQuality;
284 m_TauJet = tauJet;
285 m_Features = new PanTau::TauFeature;
286}

Member Function Documentation

◆ assign()

void SG::AuxElement::assign ( const AuxElement & other,
bool warnUnlocked = false )
inherited

Assignment.

Parameters
otherThe object from which we're assigning.
warnUnlockedIf true, then warn when we skip unlocked decorations.

We don't copy container/index, as assignment doesn't change where this object is. However, if we have aux data, then we copy aux data if we're copying from an object that also has it; otherwise, if we're copying from an object with no aux data, then we clear ours.

◆ auxdata() [1/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type SG::AuxElement::auxdata ( const std::string & name)
inherited

Fetch an aux data variable, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ auxdata() [2/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::AuxElement::auxdata ( const std::string & name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor or ConstAccessor classes.

◆ auxdata() [3/4]

template<class T>
XAOD_AUXDATA_DEPRECATED T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" )
inlineinherited

Fetch an aux data variable, as a non-const reference.

This function provides an easy way for users to decorate objects with auxiliary data.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A modifiable reference to the decoration

Definition at line 98 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

99 {
100
101 return SG::Accessor< T >(name, clsname)(*this);
102 }

◆ auxdata() [4/4]

template<class T>
XAOD_AUXDATA_DEPRECATED const T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Fetch an aux data variable, as a const reference.

This function provides an easy way for users to retrieve auxiliary decorations from an object.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A constant reference to the decoration

Definition at line 118 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

119 {
120
121 return SG::ConstAccessor< T >( name, clsname )( *this );
122 }

◆ auxdataConst() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::AuxElement::auxdataConst ( const std::string & name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdataConst() [2/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::AuxElement::auxdataConst ( const std::string & name,
const std::string & clsname ) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdecor() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type SG::AuxElement::auxdecor ( const std::string & name) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ auxdecor() [2/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type SG::AuxElement::auxdecor ( const std::string & name,
const std::string & clsname ) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ clearAux()

void SG::AuxElement::clearAux ( )
privateinherited

Clear all aux data associated with this element.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 580 of file AuxElement.cxx.

581{
582 if (!m_container) return;
584}
static void clearAuxHelper(AuxVectorData &container, size_t index)
Clear all aux data associated with an element.
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
const SG::AuxVectorData * m_container
The container of which this object is an element.
Definition AuxElement.h:335

◆ clearAuxHelper()

void SG::AuxElement::clearAuxHelper ( AuxVectorData & container,
size_t index )
staticprivateinherited

Clear all aux data associated with an element.

Parameters
containerContainer of the element.
indexIndex of this element within the container.

If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 639 of file AuxElement.cxx.

640{
641 if (!container.hasStore()) return;
642 if (!container.hasNonConstStore()) {
643 throw SG::ExcConstAuxData ("clearAux", SG::null_auxid);
644 }
645
646 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
647 for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
648 r.clear (auxid, container, index, 1);
649 }
650}
static AuxTypeRegistry & instance()
Return the singleton registry instance.
int r
Definition globals.cxx:22
static const auxid_t null_auxid
To signal no aux data item.
Definition AuxTypes.h:30
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27

◆ clearCache()

void SG::AuxElement::clearCache ( )
inherited

Clear the cached aux data pointers.

You should call this any time something changes in the aux store that could invalidate the vector pointers.

Definition at line 339 of file AuxElement.cxx.

340{
341 if (container())
343}
void clearCache()
Clear the cached aux data pointers.

◆ clearDecorations()

bool SG::AuxElement::clearDecorations ( ) const
inherited

Clear all decorations.

Erase all decorations from an associated store, restoring the state to when lock was called.

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

Definition at line 428 of file AuxElement.cxx.

429{
430 if (havePrivateData())
431 return m_container->clearDecorations();
432 return false;
433}
bool havePrivateData() const
True if this element currently has private data.

◆ container() [1/2]

SG::AuxVectorData * SG::AuxElement::container ( )
inherited

Return the container holding this element.

◆ container() [2/2]

const SG::AuxVectorData * SG::AuxElement::container ( ) const
inherited

Return the container holding this element.

◆ copyAux()

void SG::AuxElement::copyAux ( const ConstAuxElement & other,
bool warnUnlocked = false )
privateinherited

Copy aux data from another object.

Parameters
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 600 of file AuxElement.cxx.

602{
603 if (!m_container) return;
604 copyAuxHelper (*container(), index(), other, warnUnlocked);
605}
static void copyAuxHelper(AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
Copy aux data from another object.

◆ copyAuxHelper()

void SG::AuxElement::copyAuxHelper ( AuxVectorData & container,
size_t index,
const ConstAuxElement & other,
bool warnUnlocked )
staticprivateinherited

Copy aux data from another object.

Parameters
containerContainer of the element.
indexIndex of this element within the container.
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 667 of file AuxElement.cxx.

671{
672 if (!container.hasStore()) return;
673 if (!container.hasNonConstStore())
674 throw SG::ExcConstAuxData ("copyAux");
675
676 const SG::AuxVectorData* ocont = other.container();
677
678 if (!ocont || !ocont->hasStore()) {
680 return;
681 }
682
683#ifndef XAOD_STANDALONE
684 const SG::auxid_set_t& other_decors = ocont->getDecorIDs();
685#endif
686 SG::auxid_set_t other_ids = ocont->getAuxIDs();
687
688 size_t oindex = other.index();
689 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
690
691 for (SG::auxid_t auxid : other_ids) {
692#ifndef XAOD_STANDALONE
693 if (other_decors.test (auxid)) {
694 // Don't copy decorations --- another thread may be modifying them.
695 other_ids.reset (auxid);
696 // Warn if we skip a decoration (except for mcEventWeights,
697 // for which this is expected).
698 if (warnUnlocked && r.getName(auxid) != "mcEventWeights") {
699 std::ostringstream ss;
700 ss << "skipped unlocked decoration " << r.getName(auxid)
701 << " (" << auxid << ")";
702 ATHCONTAINERS_WARNING("copyAux", ss.str());
703 }
704 }
705 else
706#endif
707 if (!r.isLinked (auxid)) {
708 r.copy (auxid, container, index, *ocont, oindex, 1);
709 }
710 }
711
712 for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
713 if (!other_ids.test (auxid)) {
714 r.clear (auxid, container, index, 1);
715 }
716 }
717}
static Double_t ss
bool test(bit_t bit) const
Test to see if a bit is set.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
bool hasStore() const
Return true if this object has an associated store.
#define ATHCONTAINERS_WARNING(ctx, msg)
Definition error.h:57

◆ e()

double PanTau::PanTauSeed::e ( ) const
virtual

The total energy of the particle.

Implements xAOD::IParticle.

Definition at line 125 of file PanTauSeed.cxx.

125 {
126 return p4().E();
127}
virtual FourMom_t p4() const
The full 4-momentum of the particle as a TLoretzVector.

◆ eta()

double PanTau::PanTauSeed::eta ( ) const
virtual

The pseudorapidity ( \(\eta\)) of the particle.

Implements xAOD::IParticle.

Definition at line 107 of file PanTauSeed.cxx.

107 {
108 // static Accessor<float > acc( "eta" );
109 // return acc( *this );
110 return p4().Eta();
111}

◆ getAuxIDs()

const SG::auxid_set_t & SG::AuxElement::getAuxIDs ( ) const
inherited

Return a set of identifiers for existing data items for this object.

If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.

Definition at line 355 of file AuxElement.cxx.

356{
357#ifdef ATHCONTAINERS_R21_COMPAT
358 if (havePrivateData())
359 return m_container->getConstStore()->getAuxIDs();
360 if (container())
361 return container()->getAuxIDs();
362 static const SG::auxid_set_t null_set;
363 return null_set;
364#else
366#endif
367}
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.

◆ getConstituents()

const std::vector< std::vector< PanTau::TauConstituent * > > & PanTau::PanTauSeed::getConstituents ( ) const
inline

Definition at line 220 of file PanTauSeed.h.

220{return m_Constituents;}

◆ getConstituentsAsList_All()

const std::vector< PanTau::TauConstituent * > & PanTau::PanTauSeed::getConstituentsAsList_All ( ) const
inline

Definition at line 222 of file PanTauSeed.h.

◆ getConstituentsAsList_Core()

const std::vector< PanTau::TauConstituent * > & PanTau::PanTauSeed::getConstituentsAsList_Core ( ) const
inline

Definition at line 221 of file PanTauSeed.h.

◆ getConstituentsOfType()

std::vector< PanTau::TauConstituent * > PanTau::PanTauSeed::getConstituentsOfType ( int tauConstituent_Type,
bool & foundit )

Definition at line 337 of file PanTauSeed.cxx.

337 {
338 if(tauConstituent_Type > PanTau::TauConstituent::t_nTypes) {
339 foundit = false;
340 return std::vector<TauConstituent*>(0);
341 }
342 foundit = true;
343 if(tauConstituent_Type == static_cast<int>(PanTau::TauConstituent::t_NoType)) return m_ConstituentsList_AllSelected;
344 return m_Constituents.at(tauConstituent_Type);
345}

◆ getConstStore()

const SG::IConstAuxStore * SG::AuxElement::getConstStore ( ) const
protectedinherited

Return the current store, as a const interface.

This will be non-zero if either a const or non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 869 of file AuxElement.cxx.

305{
306 if (havePrivateData()) {
307 return m_container->getConstStore();
308 }
309 return 0;
310}

◆ getDecayMode()

int PanTau::PanTauSeed::getDecayMode ( int nCharged,
int nNeutral )
static

Definition at line 289 of file PanTauSeed.cxx.

289 {
290
291 int decayMode;
292
293 // 1 Prong modes
294 if(nCharged == 1 && nNeutral == 0) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_1p0n);
295 else if(nCharged == 1 && nNeutral == 1) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_1p1n);
296 else if(nCharged == 1 && nNeutral > 1) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_1pXn);
297 // 3 prong modes
298 else if(nCharged == 3 && nNeutral == 0) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_3p0n);
299 else if(nCharged == 3 && nNeutral > 0) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_3pXn);
300 // other mode
301 else if(nCharged == 2) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_Other);
302 else if(nCharged == 4) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_Other);
303 else if(nCharged == 5) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_Other);
304 else if(nCharged == 0) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_NotSet);
305 else if(nCharged >= 6) decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_NotSet);
306 else decayMode = static_cast<int>(xAOD::TauJetParameters::Mode_Error);
307
308 return decayMode;
309}

◆ getDecayModeByPanTau()

int PanTau::PanTauSeed::getDecayModeByPanTau ( ) const
inline

Definition at line 225 of file PanTauSeed.h.

225{return m_DecayMode_ByPanTau;}

◆ getDecayModeBySubAlg()

int PanTau::PanTauSeed::getDecayModeBySubAlg ( ) const
inline

Definition at line 224 of file PanTauSeed.h.

224{return m_DecayMode_BySubAlg;}

◆ getDecayModeName()

std::string PanTau::PanTauSeed::getDecayModeName ( int decayMode)
static

Definition at line 312 of file PanTauSeed.cxx.

312 {
313
315
316 if(mode == xAOD::TauJetParameters::Mode_1p0n) return "1p0n";
317 if(mode == xAOD::TauJetParameters::Mode_1p1n) return "1p1n";
318 if(mode == xAOD::TauJetParameters::Mode_1pXn) return "1pXn";
319 if(mode == xAOD::TauJetParameters::Mode_3p0n) return "3p0n";
320 if(mode == xAOD::TauJetParameters::Mode_3pXn) return "3pXn";
321 if(mode == xAOD::TauJetParameters::Mode_Other) return "Other";
322 if(mode == xAOD::TauJetParameters::Mode_Error) return "Error";
323 if(mode == xAOD::TauJetParameters::Mode_NotSet) return "NotSet";
324 return "InvalidMode!!!";
325}

◆ getDecorIDs()

const SG::auxid_set_t & SG::AuxElement::getDecorIDs ( ) const
inherited

Return a set of identifiers for decorations for this object.

   If this object has a private or standalone store, then information
   from that will be returned.  Otherwise, if this element
   is part of a container, then information for the container
   will be returned.  Otherwise, return an empty set.

Definition at line 378 of file AuxElement.cxx.

379{
380#ifdef ATHCONTAINERS_R21_COMPAT
381 if (havePrivateData())
382 return m_container->getConstStore()->getDecorIDs();
383 if (container())
384 return container()->getDecorIDs();
385 static const SG::auxid_set_t null_set;
386 return null_set;
387#else
389#endif
390}
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.

◆ getFeatures() [1/2]

PanTau::TauFeature * PanTau::PanTauSeed::getFeatures ( )
inline

Definition at line 218 of file PanTauSeed.h.

218{return m_Features;}

◆ getFeatures() [2/2]

const PanTau::TauFeature * PanTau::PanTauSeed::getFeatures ( ) const
inline

Definition at line 217 of file PanTauSeed.h.

217{return m_Features;}

◆ getFinalMomentum()

TLorentzVector PanTau::PanTauSeed::getFinalMomentum ( ) const
inline

Definition at line 223 of file PanTauSeed.h.

223{return m_FinalMomentum;}
TLorentzVector m_FinalMomentum
Definition PanTauSeed.h:181

◆ getIsValidSeed()

bool PanTau::PanTauSeed::getIsValidSeed ( ) const
inline

Definition at line 226 of file PanTauSeed.h.

226{return m_IsValidSeed;}

◆ getModeHackedByCellBased()

bool PanTau::PanTauSeed::getModeHackedByCellBased ( )
inline

Definition at line 154 of file PanTauSeed.h.

◆ getNumberOfConstituentsOfType()

int PanTau::PanTauSeed::getNumberOfConstituentsOfType ( int tauConstituent_Type)

Definition at line 348 of file PanTauSeed.cxx.

348 {
349 bool isOK = false;
350 std::vector<PanTau::TauConstituent*> consts = this->getConstituentsOfType(tauConstituent_Type, isOK);
351 if(isOK) {
352 return static_cast<int>(consts.size());
353 }
354 return -1;
355}
std::vector< PanTau::TauConstituent * > getConstituentsOfType(int tauConstituent_Type, bool &foundit)

◆ getProtoMomentumCore()

TLorentzVector PanTau::PanTauSeed::getProtoMomentumCore ( ) const
inline

Definition at line 219 of file PanTauSeed.h.

219{return m_ProtoMomentum_Core;}

◆ getStore()

SG::IAuxStore * SG::AuxElement::getStore ( ) const
protectedinherited

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 878 of file AuxElement.cxx.

320{
321 if (havePrivateData()) {
322#ifdef ATHCONTAINERS_R21_COMPAT
323 SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = m_container;
324#else
325 SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = const_cast<SG::AuxVectorData*>(container());
326#endif
327 return container_nc->getStore();
328 }
329 return 0;
330}
#define ATLAS_THREAD_SAFE

◆ getSubsystemHLV()

TLorentzVector PanTau::PanTauSeed::getSubsystemHLV ( int tauConstituent_Type,
bool & foundit )

Definition at line 358 of file PanTauSeed.cxx.

358 {
359 if(tauConstituent_Type > PanTau::TauConstituent::t_nTypes) {
360 foundit = false;
361 return {0,0,0,0};
362 }
363 foundit = true;
364 return m_TypeHLVs.at(tauConstituent_Type);
365}

◆ getTauJet() [1/2]

xAOD::TauJet * PanTau::PanTauSeed::getTauJet ( )
inline

Definition at line 216 of file PanTauSeed.h.

216{return m_TauJet;}

◆ getTauJet() [2/2]

const xAOD::TauJet * PanTau::PanTauSeed::getTauJet ( ) const
inline

Definition at line 215 of file PanTauSeed.h.

215{return m_TauJet;}

◆ getTechnicalQuality()

const std::vector< int > & PanTau::PanTauSeed::getTechnicalQuality ( ) const
inline

Definition at line 227 of file PanTauSeed.h.

227{return m_TechnicalQuality;}

◆ hadPrivateData()

bool SG::IAuxElement::hadPrivateData ( ) const
protectedinherited

True if this element had private data before it was added to its current container.

◆ hasNonConstStore()

bool SG::AuxElement::hasNonConstStore ( ) const
inherited

Return true if this object has an associated non-const store.

This will be true for either a private or standalone store.

Definition at line 411 of file AuxElement.cxx.

412{
413 if (havePrivateData())
414 return m_container->hasNonConstStore();
415 return false;
416}

◆ hasStore()

bool SG::AuxElement::hasStore ( ) const
inherited

Return true if this object has an associated store.

This will be true for either a private or standalone store.

Definition at line 398 of file AuxElement.cxx.

399{
400 if (havePrivateData())
401 return m_container->hasStore();
402 return false;
403}

◆ havePrivateData()

bool SG::IAuxElement::havePrivateData ( ) const
protectedinherited

True if this element currently has private data.

◆ index()

size_t SG::IAuxElement::index ( ) const
inherited

Return the index of this element within its container.

Inherited from IAuxElement.

◆ isAvailable()

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailable ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Check if a user property is available for reading or not.

This function should be used to check if a user property which may or may not exist, is set on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration exists or not

Definition at line 135 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

136 {
137
138 return SG::ConstAccessor< T >(name, clsname).isAvailable(*this);
139 }

◆ isAvailableWritable() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::AuxElement::isAvailableWritable ( const std::string & name,
const std::string & clsname = "" )
inherited

Check if an aux variable is available for writing.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isAvailableWritable() [2/2]

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailableWritable ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Check if a user property is available for writing or not.

This function can be used to check whether it will be possible to set a user property on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration is possible to set

Definition at line 152 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

153 {
154
155 return SG::Accessor< T >(name, clsname).isAvailableWritable(*this);
156 }

◆ isAvailableWritableAsDecoration()

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::AuxElement::isAvailableWritableAsDecoration ( const std::string & name,
const std::string & clsname = "" ) const
inherited

Check if an aux variable is available for writing as a decoration.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isOfTechnicalQuality()

bool PanTau::PanTauSeed::isOfTechnicalQuality ( int pantauSeed_TechnicalQuality) const

Definition at line 328 of file PanTauSeed.cxx.

328 {
329 if(pantauSeed_TechnicalQuality > PanTau::PanTauSeed::t_nTechnicalQualities) {
330 return false;
331 }
332 if(m_TechnicalQuality[pantauSeed_TechnicalQuality] == 1) return true;
333 return false;
334}

◆ m()

double PanTau::PanTauSeed::m ( ) const
virtual

The invariant mass of the particle.

Implements xAOD::IParticle.

Definition at line 119 of file PanTauSeed.cxx.

119 {
120 // static Accessor< float> acc( "m" );
121 // return acc( *this );
122 return p4().M();
123}

◆ makePrivateStore() [1/3]

void SG::AuxElement::makePrivateStore ( )
inherited

Create a new (empty) private store for this object.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

Definition at line 192 of file AuxElement.cxx.

193{
194 if (m_container) {
195 throw SG::ExcBadPrivateStore ("store already exists");
196 }
197
198 m_container = new SG::AuxElementPrivateData;
201}
void setIndex(size_t index)
Set the index of this element within its container.
void setHavePrivateData()
Record that this element currently has private data.

◆ makePrivateStore() [2/3]

template<class U1>
void SG::AuxElement::makePrivateStore ( const U1 & other,
bool warnUnlocked = false )
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore() [3/3]

template<class U1>
void SG::AuxElement::makePrivateStore ( const U1 * other,
bool warnUnlocked = false )
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore1() [1/2]

void SG::AuxElement::makePrivateStore1 ( const AuxElement * other,
bool warnUnlocked )
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does have aux data.

Definition at line 565 of file AuxElement.cxx.

567{
569 if (other)
570 this->copyAux (*other, warnUnlocked);
571}
void makePrivateStore()
Create a new (empty) private store for this object.
void copyAux(const ConstAuxElement &other, bool warnUnlocked=false)
Copy aux data from another object.

◆ makePrivateStore1() [2/2]

void SG::AuxElement::makePrivateStore1 ( const void * other,
bool warnUnlocked )
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does not have aux data.

◆ noPrivateData()

bool SG::IAuxElement::noPrivateData ( ) const
protectedinherited

True if this element has no private data.

◆ operator=()

PanTau::PanTauSeed & PanTau::PanTauSeed::operator= ( const PanTauSeed & seed)

Definition at line 75 of file PanTauSeed.cxx.

76{
77 if (this != &seed){
78
79 if (!this->container() && !this->hasStore() ) {
81 }
82 this->IParticle::operator=( seed );
83 this->m_p4 = seed.m_p4;
84 m_IsValidSeed = seed.m_IsValidSeed;
85 m_TechnicalQuality = seed.m_TechnicalQuality;
86 m_TauJet = seed.m_TauJet;
87 m_Constituents = seed.m_Constituents;
88 m_TypeHLVs = seed.m_TypeHLVs;
89 m_ConstituentsList_Core = seed.m_ConstituentsList_Core;
90 m_ConstituentsList_AllSelected = seed.m_ConstituentsList_AllSelected;
91 m_ConstituentsList_All = seed.m_ConstituentsList_All;
92 m_decayModeHack_CellBasedShots = seed.m_decayModeHack_CellBasedShots;
93
94 if(m_Features) delete m_Features;
95 m_Features = (seed.m_Features ? new PanTau::TauFeature(*seed.m_Features) : nullptr);
96 }
97 return *this;
98}
bool hasStore() const
Return true if this object has an associated store.

◆ p4()

PanTau::PanTauSeed::FourMom_t PanTau::PanTauSeed::p4 ( ) const
virtual

The full 4-momentum of the particle as a TLoretzVector.

Implements xAOD::IParticle.

Definition at line 133 of file PanTauSeed.cxx.

133 {
134 return m_p4;
135}

◆ phi()

double PanTau::PanTauSeed::phi ( ) const
virtual

The azimuthal angle ( \(\phi\)) of the particle.

Implements xAOD::IParticle.

Definition at line 113 of file PanTauSeed.cxx.

113 {
114 // static Accessor< float > acc( "phi" );
115 // return acc( *this );
116 return p4().Phi();
117}

◆ pt()

double PanTau::PanTauSeed::pt ( ) const
virtual

The transverse momentum ( \(p_T\)) of the particle.

Implements xAOD::IParticle.

Definition at line 101 of file PanTauSeed.cxx.

101 {
102 // static Accessor< float > acc( "pt" );
103 // return acc( *this );
104 return p4().Pt();
105}

◆ rapidity()

double PanTau::PanTauSeed::rapidity ( ) const
virtual

The true rapidity (y) of the particle.

Implements xAOD::IParticle.

Definition at line 129 of file PanTauSeed.cxx.

129 {
130 return p4().Rapidity();
131}

◆ releasePrivateStore()

void SG::AuxElement::releasePrivateStore ( )
inherited

Release and free any private store associated with this object.

ExcBadPrivateStore will be thrown if this object does not have a private store.

Definition at line 210 of file AuxElement.cxx.

211{
212 if (hadPrivateData()) {
213 // We had a private store, but it was released because this object
214 // was added to a container. Just forget about it.
216 return;
217 }
218
219 if (!havePrivateData() ||
220 !m_container ||
221 typeid(*m_container) != typeid(AuxElementPrivateData))
222 {
223 throw SG::ExcBadPrivateStore ("no private store exists");
224 }
225
228 delete m_container;
229 m_container = 0;
230}
bool hadPrivateData() const
True if this element had private data before it was added to its current container.
void setNoPrivateData()
Record that this element does not have private data.

◆ releasePrivateStoreForDtor()

void SG::AuxElement::releasePrivateStoreForDtor ( )
privateinherited

Out-of-line portion of destructor.

Delete a private store if we have one.

Definition at line 441 of file AuxElement.cxx.

442{
443#ifdef ATHCONTAINERS_R21_COMPAT
444 if (havePrivateData()) {
445 delete m_container;
446 }
447#else
449#endif
450}
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.

◆ setConstStore()

void SG::AuxElement::setConstStore ( const SG::IConstAuxStore * store)
inherited

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

◆ setDecayModeByPanTau()

void PanTau::PanTauSeed::setDecayModeByPanTau ( int decayModePanTau)
inline

Definition at line 230 of file PanTauSeed.h.

230{m_DecayMode_ByPanTau = decayModePanTau;}

◆ setEta()

void PanTau::PanTauSeed::setEta ( float eta)

set the eta

Definition at line 157 of file PanTauSeed.cxx.

157 {
158 static const Accessor< float > acc( "eta" );
159 acc( *this ) = eta;
160 //Need to recalculate m_p4
161 m_p4.SetPtEtaPhiM( pt(), eta, phi(), m());
162}
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double m() const
The invariant mass of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572

◆ setFinalMomentum()

void PanTau::PanTauSeed::setFinalMomentum ( TLorentzVector finalMom)
inline

Definition at line 229 of file PanTauSeed.h.

229{m_FinalMomentum = finalMom;}

◆ setHadPrivateData()

void SG::IAuxElement::setHadPrivateData ( )
privateinherited

Record that this element used to have private data.

◆ setHavePrivateData()

void SG::IAuxElement::setHavePrivateData ( )
privateinherited

Record that this element currently has private data.

◆ setIndex()

void SG::AuxElement::setIndex ( size_t index,
SG::AuxVectorData * container )
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

Usually this simply sets the index and container members of this object. However, in the case where this object has an associated private store, then we need to deal with releasing the store if the object is being added to a container, or making a new store if the object is being removed from a container.

◆ setIndexPrivate()

bool SG::AuxElement::setIndexPrivate ( size_t index,
SG::AuxVectorData * container )
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

This is called from setIndex when we have a private store to deal with.

Definition at line 505 of file AuxElement.cxx.

506{
507#ifdef ATHCONTAINERS_R21_COMPAT
508 if (hadPrivateData()) {
509 // We had a private store, but it was released because we were added
510 // to a container.
511
512 if (container == 0) {
513 // We're being moved out of the container. Make a new private
514 // store, copy the data, and switch to it.
515 auto privateData = new SG::AuxElementPrivateData;
516 AuxElement to (privateData, 0);
517 to.copyAux (*this);
520 m_container = privateData;
521 return true;
522 }
523 }
524 else if (havePrivateData() &&
525 typeid(*m_container) == typeid(AuxElementPrivateData))
526 {
527 // We currently have a private store.
528
529 if (container != 0 && container != m_container) {
530 // We're being added to a container.
531 // Aux data has already been copied.
532 // Release private store.
535 delete m_container;
537 return false;
538 }
539 }
540 else {
541 // We have a standalone store.
542 throw SG::ExcBadPrivateStore ("Attempt to add/remove a standalone object "
543 "from a container.");
544 }
545
548 return false;
549#else
551#endif
552}
AuxElement()
Default constructor.
bool setIndexPrivate(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
void setHadPrivateData()
Record that this element used to have private data.
CONT to(RANGE &&r)
Definition ranges.h:39

◆ setM()

void PanTau::PanTauSeed::setM ( float m)

set the Mass

Definition at line 171 of file PanTauSeed.cxx.

171 {
172 static const Accessor< float > acc( "m" );
173 acc( *this ) = m;
174 //Need to recalculate m_p4
175 m_p4.SetPtEtaPhiM( pt(), eta(), phi(), m);
176}

◆ setModeHackedByCellBased()

void PanTau::PanTauSeed::setModeHackedByCellBased ( bool f)
inline

◆ setNonConstStore()

void SG::AuxElement::setNonConstStore ( SG::IAuxStore * store)
inherited

Synonym for setStore with IAuxStore.

Parameters
storeThe new store.

◆ setNoPrivateData()

void SG::IAuxElement::setNoPrivateData ( )
privateinherited

Record that this element does not have private data.

◆ setP4()

void PanTau::PanTauSeed::setP4 ( float pt,
float eta,
float phi,
float m )

set the 4-vec

Definition at line 137 of file PanTauSeed.cxx.

137 {
138 static const Accessor< float > acc1( "pt" );
139 acc1( *this ) = pt;
140 static const Accessor< float > acc2( "eta" );
141 acc2( *this ) = eta;
142 static const Accessor< float > acc3( "phi" );
143 acc3( *this ) = phi;
144 static const Accessor< float > acc4( "m" );
145 acc4( *this ) = m;
146 //Need to recalculate m_p4
147 m_p4.SetPtEtaPhiM( pt, eta, phi, m);
148}

◆ setPhi()

void PanTau::PanTauSeed::setPhi ( float phi)

set the phi

Definition at line 164 of file PanTauSeed.cxx.

164 {
165 static const Accessor< float > acc( "phi" );
166 acc( *this ) = phi;
167 //Need to recalculate m_p4
168 m_p4.SetPtEtaPhiM( pt(), eta(), phi, m());
169}

◆ setPt()

void PanTau::PanTauSeed::setPt ( float pt)

set the Pt

Definition at line 150 of file PanTauSeed.cxx.

150 {
151 static const Accessor< float > acc( "pt" );
152 acc( *this ) = pt;
153 //Need to recalculate m_p4
154 m_p4.SetPtEtaPhiM( pt, eta(), phi(), m());
155}

◆ setStore() [1/3]

void SG::AuxElement::setStore ( const DataLink< SG::IConstAuxStore > & store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Parameters
storeLink to the new store.

Definition at line 269 of file AuxElement.cxx.

270{
271 AuxElementStandaloneData* data = setStore1 (store);
272 if (store)
273 data->setStore (store);
274}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
AuxElementStandaloneData * setStore1(const SG::IConstAuxStore *store)
Set the store associated with this object.

◆ setStore() [2/3]

void SG::AuxElement::setStore ( const SG::IConstAuxStore * store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 241 of file AuxElement.cxx.

242{
243 AuxElementStandaloneData* data = setStore1 (store);
244 if (store)
245 data->setStore (store);
246}

◆ setStore() [3/3]

void SG::AuxElement::setStore ( SG::IAuxStore * store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 257 of file AuxElement.cxx.

258{
259 AuxElementStandaloneData* data = setStore1 (store);
260 if (store)
261 data->setStore (store);
262}

◆ setStore1()

AuxElementStandaloneData * SG::AuxElement::setStore1 ( const SG::IConstAuxStore * store)
privateinherited

Set the store associated with this object.

Parameters
storeThe new store.

Helper for setStore. Creates the AuxElementStandaloneData object if needed and returns it.

Parameters
storeThe new store.

Helper for setStore. Creates the @x AuxElementStandaloneData object if needed and returns it.

Definition at line 461 of file AuxElement.cxx.

462{
463 if (store) {
464 // Want this object be standalone.
465 if (!m_container) {
466 // Not in a container (and no private store). Make a new object.
467 AuxElementStandaloneData* data = new AuxElementStandaloneData;
470 return data;
471 }
472 if (usingStandaloneStore()) {
473 // Standalone --- return existing object.
474 return static_cast<AuxElementStandaloneData*> (container());
475 }
476 // Otherwise, it's an error.
477 throw ExcBadPrivateStore ("Attempt to attach a standalone store to an "
478 "object in a container or with a private store.");
479 }
480
481 else {
482 // Getting rid of a standalone store.
483 if (usingStandaloneStore()) {
485 delete m_container;
486 m_container = 0;
487 }
488 else if (m_container != 0)
489 throw ExcBadPrivateStore ("Attempt to remove a standalone store from an "
490 "object in a container or with a private store.");
491 return 0;
492 }
493}
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.

◆ trackIndices()

bool SG::AuxElement::trackIndices ( ) const
inherited

Return true if index tracking is enabled for this object.

Always returns true. Included here to be consistent with AuxVectorBase when standalone objects may be used as template parameters.

◆ type()

xAOD::Type::ObjectType PanTau::PanTauSeed::type ( ) const
virtual

The type of the object as a simple enumeration, remains pure virtual in e/gamma.

Implements xAOD::IParticle.

Definition at line 179 of file PanTauSeed.cxx.

179 {
180 return xAOD::Type::Tau;
181}
@ Tau
The object is a tau (jet)
Definition ObjectType.h:49

◆ usingPrivateStore()

bool SG::AuxElement::usingPrivateStore ( ) const
inherited

Test to see if this object is currently using a private store.

Definition at line 280 of file AuxElement.cxx.

281{
282 return havePrivateData() &&
283 typeid(*m_container) == typeid(AuxElementPrivateData);
284}

◆ usingStandaloneStore()

bool SG::AuxElement::usingStandaloneStore ( ) const
inherited

Test to see if this object is currently using a standalone store.

Test to see if this object is currently using a private store.

Definition at line 290 of file AuxElement.cxx.

291{
292 return havePrivateData() &&
293 typeid(*m_container) == typeid(AuxElementStandaloneData);
294}

Member Data Documentation

◆ m_Constituents

std::vector< std::vector<PanTau::TauConstituent*> > PanTau::PanTauSeed::m_Constituents
protected

Definition at line 175 of file PanTauSeed.h.

◆ m_ConstituentsList_All

std::vector<PanTau::TauConstituent*> PanTau::PanTauSeed::m_ConstituentsList_All
protected

Definition at line 192 of file PanTauSeed.h.

◆ m_ConstituentsList_AllSelected

std::vector<PanTau::TauConstituent*> PanTau::PanTauSeed::m_ConstituentsList_AllSelected
protected

Definition at line 188 of file PanTauSeed.h.

◆ m_ConstituentsList_Core

std::vector<PanTau::TauConstituent*> PanTau::PanTauSeed::m_ConstituentsList_Core
protected

Definition at line 187 of file PanTauSeed.h.

◆ m_container

const SG::AuxVectorData* SG::ConstAuxElement::m_container
privateinherited

The container of which this object is an element.

Should be null if this object is not within a container, except that it may also point at a private store.

Definition at line 335 of file AuxElement.h.

◆ m_DecayMode_ByPanTau

int PanTau::PanTauSeed::m_DecayMode_ByPanTau
protected

Definition at line 196 of file PanTauSeed.h.

◆ m_DecayMode_BySubAlg

int PanTau::PanTauSeed::m_DecayMode_BySubAlg
protected

Definition at line 195 of file PanTauSeed.h.

◆ m_decayModeHack_CellBasedShots

bool PanTau::PanTauSeed::m_decayModeHack_CellBasedShots
protected

Definition at line 198 of file PanTauSeed.h.

◆ m_Features

PanTau::TauFeature* PanTau::PanTauSeed::m_Features
protected

flag to indicate whether the decay mode by cellbased was

1p1n and hits in EM1 > 2 (because then 1p1n -> 1pX
is set)

Definition at line 203 of file PanTauSeed.h.

◆ m_FinalMomentum

TLorentzVector PanTau::PanTauSeed::m_FinalMomentum
protected

Definition at line 181 of file PanTauSeed.h.

◆ m_index

size_t SG::IAuxElement::m_index
privateinherited

The index of this element within its container.

Should be 0 if this object is not within a container.

Definition at line 128 of file IAuxElement.h.

◆ m_IsValidSeed

bool PanTau::PanTauSeed::m_IsValidSeed
protected

Definition at line 166 of file PanTauSeed.h.

◆ m_p4

FourMom_t PanTau::PanTauSeed::m_p4
private

4-momentum object

Definition at line 161 of file PanTauSeed.h.

◆ m_privateStoreState

PrivateStoreState SG::IAuxElement::m_privateStoreState
privateinherited

Definition at line 137 of file IAuxElement.h.

◆ m_ProtoMomentum_Core

TLorentzVector PanTau::PanTauSeed::m_ProtoMomentum_Core
protected

Definition at line 178 of file PanTauSeed.h.

◆ m_TauJet

xAOD::TauJet* PanTau::PanTauSeed::m_TauJet
protected

Definition at line 171 of file PanTauSeed.h.

◆ m_TechnicalQuality

std::vector<int> PanTau::PanTauSeed::m_TechnicalQuality
protected

Definition at line 168 of file PanTauSeed.h.

◆ m_TypeHLVs

std::vector< TLorentzVector > PanTau::PanTauSeed::m_TypeHLVs
protected

Definition at line 184 of file PanTauSeed.h.

◆ supportsThinning

bool SG::AuxElement::supportsThinning = true
staticconstexprinherited

Mark that this type supports thinning operations.

See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 959 of file AuxElement.h.


The documentation for this class was generated from the following files: