ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCluster Class Reference

Principal data class for CaloCell clusters. More...

#include <CaloCluster.h>

Inheritance diagram for CaloCluster:

Classes

class  MomentStoreIter
 Internal cell iterator. More...

Public Types

enum  ClusterSize {
  SW_55ele = 1 , SW_35ele = 2 , SW_37ele = 3 , SW_55gam = 4 ,
  SW_35gam = 5 , SW_37gam = 6 , SW_55Econv = 7 , SW_35Econv = 8 ,
  SW_37Econv = 9 , SW_softe = 10 , Topo_420 = 11 , Topo_633 = 12 ,
  SW_7_11 = 13 , Unknown = 99
}
 enums to identify different cluster size More...
typedef CaloCompositeCellBase< CaloClusterNavigable >::cell_iterator cell_iterator
 Iterator on CaloCell s.
typedef CaloSampling::CaloSample sampling_type
 Sampling indicator.
typedef CaloVariableType::VariableType variable_type
 Data type indicator.
typedef double value_type
 Variable value type.
typedef CaloClusterMomentStore moment_store
 Store type for cluster moments.
typedef moment_store::moment_type moment_type
 Cluster moment indicator type.
typedef moment_store::moment_value moment_value
 Cluster moment value type.
typedef moment_store::moment_iterator moment_iterator_i
 Cluster moment store iterator type.
typedef moment_type MomentType
typedef double(CaloCluster::* GET_VALUE) () const
typedef void(CaloCluster::* SET_VALUE) (double v)
typedef P4SignalState statename_t
typedef P4SignalState::State signalstate_t
typedef MomentStoreIter moment_iterator
 Moment iterator type for CaloCluster clients.
typedef std::vector< CaloClusterBadChannelDatabadChannelList
 Get Bad Channel information.
enum  Kind {
  P4EETAPHIM , P4IPTCOTTHPHIM , P4PTETAPHIM , P4PXPYPZE ,
  UNKNOWN
}
typedef CaloCellLink::cell_iterator object_iter
 external cell iterator type
typedef CaloClusterLinkTemplate< CaloCellLinkContainer >::link_type cell_link_type

Public Member Functions

 CaloCluster (double eta0=0, double phi0=0, unsigned int varTypePattern=0x00000000, unsigned int clusterSize=CaloCluster::SW_55ele)
 Constructor.
virtual ~CaloCluster ()
 Destructor.
 CaloCluster (const CaloCluster *pCluster)
 Copy constructor.
 CaloCluster (const CaloCluster &rCluster)
double getVariable (const variable_type &varType, const sampling_type &samType, bool useLink=true) const
 General sampling variable access.
bool getVariable (const variable_type &varType, std::vector< double > &varList, bool useLink=true) const
 General access to variables of a given type in all samplings.
bool setVariable (const variable_type &varType, const sampling_type &samType, const double &varData, bool useLink=false)
 General sampling variable setter.
bool setVariable (const variable_type &varType, const std::vector< double > &varList, bool useLink=false)
 Set variables of a given type in all samplings at once.
bool lockVariable (const variable_type &varType)
 Lock variable (protect against future updates)
bool unlockVariable (const variable_type &varType)
 Unlock variable (remove lock)
bool isLocked (const variable_type &varType) const
 Check lock status of variable.
bool isLocked (const unsigned int &bitPattern) const
bool allLocked () const
 Check if all variables are locked.
virtual CLHEP::HepLorentzVector hlv () const
 redefine hlv() here to avoid ambiguities
virtual CLHEP::HepLorentzVector hlv (signalstate_t s) const
 retrieve the 4-momentum at a given signal state
virtual double e () const
 Retrieve energy independent of signal state.
virtual double eta () const
 Retrieve eta independent of signal state.
virtual double phi () const
 Retrieve phi independent of signal state.
virtual double m () const
 Retrieve mass independent of signal state.
double e (signalstate_t s) const
 Retrieve energy for a specific signal state.
double eta (signalstate_t s) const
 Retrieve eta for a specific signal state.
double phi (signalstate_t s) const
 Retrieve phi for a specific signal state.
double m (signalstate_t s) const
 Retrieve mass for a specific signal state.
virtual void setE (double e)
 Set energy.
virtual void setEta (double eta)
 Set eta.
virtual void setPhi (double phi)
 Set phi.
virtual void setM (double m)
 Set mass.
virtual void set4Mom (const I4Momentum *const pMom)
 Set kinematics from four-vector.
virtual void set4Mom (const I4Momentum &rMom)
 Set kinematics directly from four-vector.
virtual void set4Mom (const CLHEP::HepLorentzVector &rVec)
 Set kinematics directly from HLV.
unsigned int nSamples () const
 Retrieve number of samplings in this cluster.
double eSample (sampling_type sampling) const
 Retrieve energy in a given sampling.
double etaSample (sampling_type sampling) const
 Retrieve barycenter \( \eta \) in a given sample.
double phiSample (sampling_type sampling) const
 Retrieve barycenter \( \varphi \) in a given sample.
void getEInSamples (std::vector< double > &theEnergies) const
 Retrieve energy for all samplings into a vector.
void getEtaInSamples (std::vector< double > &theEtas) const
 Retrieve \( \eta \) for all samplings into a vector.
void getPhiInSamples (std::vector< double > &thePhis) const
 Retrieve \( \varphi \) for all samplings into a vector.
void setEInSamples (const std::vector< double > &theEnergies)
 Set energy in all samplings from a vector.
void setEtaInSamples (const std::vector< double > &theEtas)
 Set \( \eta \) in all samplings from a vector.
void setPhiInSamples (const std::vector< double > &thePhis)
 Set \( \varphi \) in all samplings from a vector.
virtual double getBasicEnergy () const
 Access basic energy scale signal.
virtual void setBasicEnergy (double theEnergy)
 Set basic energy scale signal.
double getTime () const
 Access cluster time.
void setTime (double theTime)
 Set cluster time.
void setClusterSize (unsigned int theClusterSize)
 Set cluster size.
unsigned int getClusterSize () const
 Get cluster size.
unsigned int getClusterEtaSize () const
unsigned int getClusterPhiSize () const
void setenergy (sampling_type sampling, double e)
 Set energy for a given sampling.
void seteta (sampling_type sampling, double eta)
 Set \( \eta \) in a given sampling.
void setphi (sampling_type sampling, double phi)
 Set \( \varphi \) in a given sampling.
void insertMoment (const moment_type &momType, const moment_value &momValue, bool useLink=true)
 Set individual moment.
moment_iterator beginMoment (bool useLink=true) const
 First iterator on moment store.
moment_iterator endMoment (bool useLink=true) const
 Last iterator on moment store.
bool retrieveMoment (const moment_type &momType, moment_value &momValue, bool useLink=true) const
 Retrieve individual moment.
bool retrieveMoment (const moment_type &momType, double &momData, bool useLink=true) const
moment_value getMoment (const moment_type &momType, bool useLink=true) const
 Get individual moment.
moment_value getMoment (const moment_iterator &momIter) const
 Get individual moment.
double getMomentValue (const moment_type &momType, bool useLink=true) const
 Get moment value.
double getMomentValue (const moment_iterator &momIter) const
moment_type getMomentType (const moment_iterator &momIter) const
 Get moment type.
bool is_valid_sampling (const sampling_type &sampling) const
 Checks if cells from a given sampling in EMB or EMEC (!) are in cluster.
bool isEMSampling (const sampling_type &theSampling) const
 Checks if cells from a given sampling in EMB and EMEC are in the cluster.
bool hasSampling (const sampling_type &theSampling) const
 Checks if certain sampling contributes to cluster.
unsigned int samplingPattern () const
 Get sampling bitmask.
double eta0 () const
 Returns raw \( \eta \) of cluster seed.
double phi0 () const
 Returns raw \( \phi \) of cluster seed.
double etasize (sampling_type sampling) const
 Returns cluster size in \( \eta \) for a given sampling.
double phisize (sampling_type sampling) const
 Returns cluster size in \( \varphi \) for a given sampling.
void setetasize (sampling_type sampling, double size)
 Set the cluster size in \( \eta \) for a given sampling.
void setphisize (sampling_type sampling, double size)
 Set the cluster size in \( \varphi \) for a given sampling.
double energy_max (sampling_type sampling) const
 Retrieve maximum cell energy in given sampling.
double etamax (sampling_type sampling) const
 Retrieve \( \eta \) of cell with maximum energy in given sampling.
double phimax (sampling_type sampling) const
 Retrieve \( \varphi \) of cell with maximum energy in given sampling.
void setenergymax (sampling_type sampling, double m)
 Set the maximum energy in a given sampling.
void setetamax (sampling_type sampling, double m)
 Set the \( \eta \) of cell with maximum energy in a given sampling.
void setphimax (sampling_type sampling, double m)
 Set the \( \varphi \) of cell with maximum energy in a given sampling.
double etaBE (int sampling) const
 EMB/EMEC combined barycenter \( \eta \).
double phiBE (int sampling) const
 EMB/EMEC combined barycenter \( \varphi \).
double energyBE (int sampling) const
 EMB/EMEC combined signal.
bool inBarrel () const
 Returns true if at least one clustered cell in EMB.
bool inEndcap () const
 Returns true if at least one clustered cell in EMEC.
void setBarrel (bool barrel)
 Sets EMB indicator.
void setEndcap (bool endcap)
 Sets EMEC indicator.
void addBadChannel (const CaloClusterBadChannelData &badChannel)
 Add Bad channel information.
void resetBadChannel ()
 Reset Bad channel list.
const badChannelListgetBadChannel () const
bool containsBadCells () const
 Check if cluster has any bad channel in it.
void calculateKine (const bool useweight=true, const bool updateLayers=true)
 Calculate cluster kinematics from contained cells.
signalstate_t signalState () const
 Retrieve signal state.
signalstate_t defaultSignalState () const
 Retrieve default signal state.
virtual bool hasSignalState (signalstate_t s) const
 check if signal state exists for current implementation
virtual bool isAtSignalState (signalstate_t s) const
 check if we are at the passed state
data_link_type getMomentStoreLink () const
virtual double energy () const
 Return energy.
double energy_nonvirt () const
 Return energy (nonvirtual version)
void setRecoStatus (const CaloRecoStatus &recStatus)
 Set the reconstruction status.
void setRecoStatus (const CaloRecoStatus::StatusIndicator &recIndic)
 Set the reconstruction status indicator (recommended)
bool checkRecoStatus (const CaloRecoStatus::StatusIndicator &recIndic) const
 Check if a given indicator is set.
void removeRecoStatus (const CaloRecoStatus::StatusIndicator &recIndic)
 Remove a given indicator.
void removeRecoStatus ()
 Remove all indicators.
const CaloRecoStatusgetRecoStatus () const
 Retrieve the reconstruction status.
virtual const I4MomentumErrorerrors () const
 Access to errors, if available; returns 0 if no errors.
virtual double px () const
 x component of momentum
virtual double py () const
 y component of momentum
virtual double pz () const
 z component of momentum
virtual double et () const
 transverse energy defined to be e*sin(theta)
virtual double p () const
 magnitude of 3-momentum.
virtual double p2 () const
 square of momentum magnitude
virtual double m2 () const
 mass squared
virtual double pt () const
 transverse momentum
virtual double iPt () const
 inverse of transverse momentum
virtual double rapidity () const
 rapidity
virtual double cosPhi () const
 cosinus phi
virtual double sinPhi () const
 sinus phi
virtual double cotTh () const
 cottan theta
virtual double cosTh () const
 cosinus theta
virtual double sinTh () const
 sinus theta
virtual double tanTh () const
 tan theta
I4Momentum::Kind kind () const
 tells what kind of P4XYZT this is
virtual std::ostream & dump (std::ostream &out=std::cout) const
 Print I4Momentum content.
void addCell (const CaloCellContainer *pContainer, const CaloCell *pCell, double weight, size_t iCell=static_cast< size_t >(-1))
 Add a cell with global kinematic update (slow)
void addUniqueCell (const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0)
 Add a cell with global kinematic update (fast)
void addUniqueCellNoKine (const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0)
 Add a cell with no kinematic update (fast)
void reweightCell (const CaloCell *pCell, double weight)
 Reweight a cell with kinematic update.
void removeCell (const CaloCell *pCell)
 Remove a cell with kinematic update.
void removeCells ()
 Remove all cells without kinematic update.
double getCellWeight (const CaloCell *pCell) const
 Retrieve the kinematic weight of a given cell.
const CaloCellContainergetCellContainer (const CaloCell *pCell) const
 Retrieve the pointer to the original cell container for a given cell.
bool getCellIndex (const CaloCell *pCell, size_t &iCell) const
 Retrieve the index of a given cell in the cell container.
cell_iterator cell_begin () const
 Retrieve a STL-type begin() iterator for the cell store.
cell_iterator cell_end () const
 Retrieve a STL-type end() iterator for the cell store.
unsigned int getNumberOfCells () const
 Return the number of cells in the store.
void putElement (const CaloCellContainer *pContainer, const CaloCell *pCell, const double &weight=double(1.))
 add element to the Navigable: use pointer
void putElement (const CaloCellContainer *pContainer, size_t &iCell, const double &weight=double(1.))
 add element to the Navigable: use element index (direct access!)
void insertElement (const CaloCellContainer *pContainer, const CaloCell *pCell, const double &weight=double(1.))
 insert element without checking if already in store: use element pointer
void insertElement (const CaloCellContainer *pContainer, size_t &iCell, const double &weight=double(1.))
 insert element without checking if already in store: use index
void insertElement (const CaloCellContainer *pContainer, size_t iCell, const double weight, size_t size_hint)
 same, with a size hint.
void insertElement (const ElementLink< CaloCellContainer > &el, const double weight, size_t size_hint=0)
 Insert element via ElementLink.
void reweight (const CaloCell *pCell, const double &weight=double(1.))
 re-weight (overwrite old weight)
void reweight (const CaloCellContainer *pContainer, size_t &iCell, const double &weight=double(1.))
 re-weight (overwrite old weight)
void reweight (object_iter &cellIter, const double &weight=double(1.))
 re-weight (overwrite old weight)
bool remove (const CaloCell *pCell)
 remove object from the Navigable
bool remove (const CaloCellContainer *pContainer, size_t &iCell)
 remove object from the Navigable
bool removeAll ()
 remove all objects from the Navigable
bool contains (const CaloCell *pCell) const
 check if constituent is already there
bool contains (const CaloCellContainer *pContainer, size_t &iCell) const
 check if constituent is already there
virtual object_iter begin () const
 begin iterator for public object access
virtual object_iter end () const
 end iterator for public object access
virtual unsigned int nCells () const
 size of object access
double getParameter (const CaloCell *pCell) const
 public container access: relational parameter retrieval
double getParameter (const CaloCellContainer *pContainer, size_t &iCell) const
 public container access: relational parameter retrieval
double getParameter (object_iter &cellIter) const
 public container access: relational parameter retrieval
const CaloCellContainergetContainer (const CaloCell *pCell) const
 public container access: retrieve Container for given object pointer
const CaloCellContainergetContainer (object_iter cellIter) const
 public container access: retrieve Container for given object iterator
bool getIndex (const CaloCell *pCell, size_t &iCell) const
 get index of child in original container, given a pointer
bool getIndex (object_iter cellIter, size_t &iCell) const
 get index of child in original container, given an iterator
virtual void fillToken (INavigationToken &iToken) const
 fill token for navigation
virtual void fillToken (INavigationToken &iToken, const std::any &rPar) const
 fill token for navigation
virtual bool isCellLinkValid () const
const cell_link_typecellLink () const
 Access to underlying link.
void resetCellLink (const cell_link_type &cellLink)
virtual AthenaBarCode_t getAthenaBarCode () const
virtual void setAthenaBarCode (AthenaBarCode_t id)
virtual bool hasSameAthenaBarCode (const IAthenaBarCode &obj) const
virtual bool hasSameAthenaBarCodeExceptVersion (const IAthenaBarCode &obj) const
virtual AthenaBarCodeVersion_t getVersion () const
virtual void newVersion ()
virtual void setVersion (AthenaBarCodeVersion_t newversion)
std::ostream & dump (std::ostream &out) const
bool createdInCurrentJob () const
AthenaBarCode_t getReserveBits () const
void setReserveBits (AthenaBarCode_t id)

Static Public Member Functions

static void setDefaultHash (const char *jobid)

Static Public Attributes

static const unsigned short TotalBits = 64
static const unsigned short UUIDBits = 32
static const unsigned short CounterBits = 26
static const unsigned short VersionBits = 4
static const unsigned short ReserveBits = 2
static const unsigned short SUUIDBits = 0
static const unsigned short SCounterBits = UUIDBits
static const unsigned short SVersionBits = UUIDBits+CounterBits
static const unsigned short SReserveBits = UUIDBits+CounterBits+VersionBits
static const AthenaBarCode_t UNDEFINEDBARCODE = (AthenaBarCode_t)(-1)
static const AthenaBarCode_t UNDEFINEDVERSION = UNDEFINEDBARCODE

Protected Types

typedef CaloClusterLinkTemplate< CaloShowerContainer >::link_type data_link_type

Protected Member Functions

virtual void updateKine (const CaloCell *theCell, double weight)
 Updates cluster kinematics when cell is added.
double variableBE (const variable_type &theVariable, const int &samplingIndex) const
 Rewrite \( e_{0} \varphi_{0} + e_{1} \varphi_{1} \) as \( \left( e_{0} + e_{1} \right) \varphi_{0} + e_{1} \left( \varphi_{1} - \varphi_{0} \right) \) for \( \varphi \) calculation.
CaloSamplingDatagetDataStore (const variable_type &theVariable, bool useLink=true)
const CaloSamplingDatagetDataStore (const variable_type &theVariable, bool useLink=false) const
CaloClusterMomentStoregetMomentStore (bool useLink=true)
const CaloClusterMomentStoregetMomentStore (bool useLink=false) const
const CaloClusterMomentStoregetMomentStore (const moment_type &theMoment, bool useLink=false) const
CaloClusterMomentStoregetMomentStore (const moment_type &theMoment, bool useLink=true)
bool getMomentStorePtrs (const CaloClusterMomentStore *&pFirstStore, const CaloClusterMomentStore *&pSecndStore, bool useLink) const
bool setDataLink (CaloShowerContainer *pDataLink)
 Set element link for shower data.
bool setStores (CaloShower *pData, CaloCellLink *pLink, bool ownStores=true)
 Setup internal store.
bool setDataStore (CaloShower *pData, bool ownStores=true)
 Setup data store.
virtual bool setSignalState (signalstate_t s)
 Sets signal state.
virtual void resetSignalState ()
 reset the signal state
bool setDefaultSignalState (signalstate_t s)
 Sets default signal state.
CaloCellLinkgetCellLink ()
const CaloCellLinkgetCellLink () const
bool setCellLink (CaloCellLinkContainer *pLink)
bool setLinkStore (CaloCellLink *pLink, bool ownStores=true)
CaloCellLinkgetCellLinkPtr ()
const CaloCellLinkgetCellLinkPtr () const
void setBits (unsigned short startbit, unsigned short nbits, AthenaBarCode_t id, AthenaBarCode_t &bc) const
AthenaBarCode_t getBits (unsigned short startbit, unsigned short nbits) const
void initABC () const

Protected Attributes

CaloSamplingData m_dataStore
 {\ brief Cached Stores
CaloClusterMomentStore m_momentStore
 cluster moments
bool m_ownDataStore
 }
data_link_type m_dataLink
 {
CaloShowerm_shower
 }
double m_basicSignal
 Stores basic energy signal.
double m_time
 Cluster timing.
unsigned int m_samplingPattern
 Sampling pattern.
CaloRecoStatus m_status
 Calorimeter reconstruction status.
double m_e
double m_eta
double m_phi
double m_m
bool m_ownLinkStore

Static Protected Attributes

static const double m_errorValue = -999.
 Internal error return for real numbers.

Private Member Functions

template<class InputIterator>
void maybeSetVariable (variable_type varType, InputIterator beg, InputIterator end)
 Set variables of a given type in all samplings at once, taking locking into account.
double getRawE () const
 Access to raw energy.
double getRawEta () const
 Access to raw eta.
double getRawPhi () const
 Access to raw phi.
double getRawM () const
 Access to raw mass.
double getCalE () const
 Access to calibrated (LC) energy.
double getCalEta () const
 Access to calibrated (LC) eta.
double getCalPhi () const
 Access to calibrated (LC) phi.
double getCalM () const
 Access to calibrated (LC) m.
double getAltE () const
 Access to calibrated (cell weight) energy.
double getAltEta () const
 Access to calibrated (cell weight) eta.
double getAltPhi () const
 Access to calibrated (cell weight) phi.
double getAltM () const
 Access to calibrated (cell weight) m.
void setRawE (double e)
 Set raw energy.
void setRawEta (double eta)
 Set raw eta.
void setRawPhi (double phi)
 Set raw phi.
void setRawM (double m)
 Set raw m.
void setCalE (double e)
 Set calibrated (LC) energy.
void setCalEta (double eta)
 Set calibrated (LC) eta.
void setCalPhi (double phi)
 Set calibrated (LC) phi.
void setCalM (double m)
 Set calibrated (LC) m.
void setAltE (double e)
 Set calibrated (cell weight) energy.
void setAltEta (double eta)
 Set calibrated (cell weight) eta.
void setAltPhi (double phi)
 Set calibrated (cell weight) phi.
void setAltM (double m)
 Set calibrated (cell weight) m.
bool setStateRaw ()
 Helper to switch to raw state.
bool setStateCal ()
 Helper to switch to calibrated (LC) state.
bool setStateAlt ()
 Helper to switch to calibrated (cell weight) state.
CaloClusteroperator= (const CaloCluster &)
 Disallow (avoid coverity warning).
AthenaBarCode_t combineWithUUIDHash (const AthenaBarCode_t &) const
void setUUIDHash (AthenaBarCode_t uuidhash)
AthenaBarCode_t hasUUIDHash () const
AthenaBarCode_t getUUIDHash () const

Static Private Member Functions

static AthenaBarCode_t hashUUID (const char *)
static AthenaBarCode_t getDefaultHash (const char *jobid=nullptr)
static AthenaBarCode_t makeDefaultHash (const char *jobid)

Private Attributes

bool m_barrel
 Flag is true if at least one cell in EMB.
bool m_endcap
 Flag is true if at least one cell in EMB.
unsigned int m_clusterSize
 Cluster size (e.g.
double m_eta0
 Cluster seed \( \eta \).
double m_phi0
 Cluster seed \( \varphi \).
double m_timeNorm
 Stores the normalization for time calculation e.g.
double m_posNorm
 Stores the normalization e.g.
std::vector< double > m_posSamNorm
 Stores the normalization e.g.
int m_nBarrel
 Counter for number of barrel cells with non-zero weight and energy.
int m_nEndcap
 Counter for number of endcap cells with non-zero weight and energy.
unsigned int m_lockPattern
 Variable lock pattern.
badChannelList m_badChannelData
GET_VALUE m_getE {}
 Pointer to getter functions.
GET_VALUE m_getEta {}
 Pointer to getter functions.
GET_VALUE m_getPhi {}
 Pointer to getter functions.
GET_VALUE m_getM {}
 Pointer to getter functions.
SET_VALUE m_setE {}
 Pointer to setter functions.
SET_VALUE m_setEta {}
 Pointer to setter functions.
SET_VALUE m_setPhi {}
 Pointer to setter functions.
SET_VALUE m_setM {}
 Pointer to setter functions.
signalstate_t m_signalState
 Stores actual signal state.
signalstate_t m_defSigState
 Stores default signal state.
double m_rawE
 Stores raw signal.
double m_rawEta
 Stores raw signal.
double m_rawPhi
 Stores raw signal.
double m_rawM
 Stores raw signal.
double m_altE
 Stores calibrated (cell weight) signal.
double m_altEta
 Stores calibrated (cell weight) signal.
double m_altPhi
 Stores calibrated (cell weight) signal.
double m_altM
 Stores calibrated (cell weight) signal.
cell_link_type m_cellLink
 Local pointer to cell store.
std::atomic< AthenaBarCode_tm_barcode

Static Private Attributes

static std::atomic< AthenaBarCode_tm_barcodeCounter = 0

Friends

class CaloClusterStoreHelper
struct CaloClusterSignalState
class CaloClusterContainerCnv_p1
class CaloClusterContainerCnv_p2
class CaloClusterContainerCnv_p3
class CaloClusterContainerCnv_p4
class CaloClusterContainerCnv_p5
class CaloClusterContainerCnv_p6
class CaloClusterContainerCnv_p7
class CaloClusterContainerCnvTest_p6
class CaloClusterContainerCnvTest_p7

Detailed Description

Principal data class for CaloCell clusters.

Data class for CaloCell clusters

Author
H. Ma hma@b.nosp@m.nl.g.nosp@m.ov (original author)
P. Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
S. Menke Sven..nosp@m.Menk.nosp@m.e@cer.nosp@m.n.ch
M. Boonekamp Maart.nosp@m.en.B.nosp@m.oonek.nosp@m.amp@.nosp@m.cern..nosp@m.ch
Date
April 1, 2005
July 18, 2005 significant updates in cluster moment handling
September 23, 2005 complete change of underlying store structure
May 1, 2009 third signal state added (PL)
Version
6

CaloCluster stores a list of CaloCell s with some correlated signal. In all generality this object describes an energy blob inside the calorimeter, with its location completely defined by the cell content. In particular, there is no assumption on any detector view (regular binning in a given coordinate system or similar) needed or used for the cluster description (unlike for CaloTower , for example). In general CaloCluster behaves like a navigable object with the default 4-momentum representation.

Remarks
The links to CaloCell objects are now stored externally in a CaloCellLink object. Also, a configurable set of sampling vaiables can be selected and stored directly in the cluster. The rest will automatically be stored in a associated CaloSamplingData object, which is linked to the cluster via a CaloShower object. Cluster moments are also kept in a split store following the same philosophy. All these features are completely transparent to clients of CaloCluster.
Todo

Definition at line 74 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

Member Typedef Documentation

◆ badChannelList

Get Bad Channel information.

Definition at line 458 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ cell_iterator

◆ cell_link_type

◆ data_link_type

◆ GET_VALUE

typedef double(CaloCluster::* CaloCluster::GET_VALUE) () const

◆ moment_iterator

Moment iterator type for CaloCluster clients.

Definition at line 205 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ moment_iterator_i

Cluster moment store iterator type.

Note
This type is only used internally, and can easily change in future implementations. DO NOT USE!

Definition at line 138 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ moment_store

Store type for cluster moments.

Definition at line 128 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ moment_type

Cluster moment indicator type.

Definition at line 130 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ moment_value

Cluster moment value type.

Definition at line 132 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ MomentType

◆ object_iter

external cell iterator type

Definition at line 51 of file CaloClusterNavigable.h.

◆ sampling_type

◆ SET_VALUE

typedef void(CaloCluster::* CaloCluster::SET_VALUE) (double v)

◆ signalstate_t

◆ statename_t

◆ value_type

typedef double CaloCluster::value_type

Variable value type.

Definition at line 124 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ variable_type

Member Enumeration Documentation

◆ ClusterSize

enums to identify different cluster size

Enumerator
SW_55ele 
SW_35ele 
SW_37ele 
SW_55gam 
SW_35gam 
SW_37gam 
SW_55Econv 
SW_35Econv 
SW_37Econv 
SW_softe 
Topo_420 
Topo_633 
SW_7_11 
Unknown 

Definition at line 85 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

85 {
86 // electrons
87 SW_55ele = 1,
88 SW_35ele = 2,
89 SW_37ele = 3,
90 // photons
91 SW_55gam = 4,
92 SW_35gam = 5,
93 SW_37gam = 6,
94 // early converted photons
95 SW_55Econv = 7,
96 SW_35Econv = 8,
97 SW_37Econv = 9,
98 // soft electrons
99 SW_softe = 10,
100 // topological clusters
101 Topo_420 = 11,
102 Topo_633 = 12,
103 // transient cluster for AODCellContainer
104 SW_7_11 = 13,
105 Unknown = 99
106 };

◆ Kind

enum I4Momentum::Kind
inherited
Enumerator
P4EETAPHIM 
P4IPTCOTTHPHIM 
P4PTETAPHIM 
P4PXPYPZE 
UNKNOWN 

Definition at line 33 of file I4Momentum.h.

Constructor & Destructor Documentation

◆ CaloCluster() [1/3]

CaloCluster::CaloCluster ( double eta0 = 0,
double phi0 = 0,
unsigned int varTypePattern = 0x00000000,
unsigned int clusterSize = CaloCluster::SW_55ele )

Constructor.

Definition at line 73 of file CaloCluster.cxx.

78 m_dataStore(varTypePattern),
79 m_ownDataStore(false),
80 m_shower(nullptr),
81 m_basicSignal(0.),
82 m_time(0.),
84 m_barrel (false),
85 m_endcap (false),
86 m_clusterSize(clusterSize),
87 m_eta0 (eta0),
88 m_phi0 (phi0),
89 m_timeNorm(0.),
90 m_posNorm(0.),
91 m_posSamNorm(CaloSampling::Unknown,0.),
92 m_nBarrel(0),
93 m_nEndcap(0),
94 m_lockPattern(0x00000000),
95 m_rawE(0.),
96 m_rawEta(0.),
97 m_rawPhi(0.),
98 m_rawM(0.),
99 m_altE(0.),
100 m_altEta(0.),
101 m_altPhi(0.),
102 m_altM(0.)
103{
105 m_badChannelData.clear();
106}
double eta0() const
Returns raw of cluster seed.
unsigned int m_samplingPattern
Sampling pattern.
double m_altE
Stores calibrated (cell weight) signal.
double m_altPhi
Stores calibrated (cell weight) signal.
int m_nEndcap
Counter for number of endcap cells with non-zero weight and energy.
bool m_endcap
Flag is true if at least one cell in EMB.
std::vector< double > m_posSamNorm
Stores the normalization e.g.
double m_altM
Stores calibrated (cell weight) signal.
bool setDefaultSignalState(signalstate_t s)
Sets default signal state.
double m_timeNorm
Stores the normalization for time calculation e.g.
double m_posNorm
Stores the normalization e.g.
CaloSamplingData m_dataStore
{\ brief Cached Stores
unsigned int m_clusterSize
Cluster size (e.g.
double phi0() const
Returns raw of cluster seed.
int m_nBarrel
Counter for number of barrel cells with non-zero weight and energy.
bool m_barrel
Flag is true if at least one cell in EMB.
double m_altEta
Stores calibrated (cell weight) signal.
double m_basicSignal
Stores basic energy signal.
unsigned int m_lockPattern
Variable lock pattern.

◆ ~CaloCluster()

CaloCluster::~CaloCluster ( )
virtual

Destructor.

The cluster destructs the associated external data objects CaloCellLink and CaloShower as long as it owns them.

Ownership is lost once these objects have been pushed into their corresponding storable collection. This is checked by the cluster on destruction.

Definition at line 248 of file CaloCluster.cxx.

249{
250 // If we own the store, the link holds the pointer directly.
251 if ( m_ownDataStore ) delete m_dataLink.cachedElement();
252}

◆ CaloCluster() [2/3]

CaloCluster::CaloCluster ( const CaloCluster * pCluster)

Copy constructor.

Parameters
pClusterpointer to non-modifiable cluster (origin)

The copy constructor for CaloCluster creates explicit copies of all data members, with the exception of the links to the external data objects. These are only partly copied, meaning the data object itself is copied (new instance), but the container information is NOT copied. The new cluster therefore owns the new external data objects until those are explictely pushed into a container. Then the owenership is transferred to the container.

Definition at line 120 of file CaloCluster.cxx.

123 m_dataStore(pCluster->m_dataStore),
124 m_momentStore(pCluster->m_momentStore),
125 m_ownDataStore(true),
126 m_basicSignal(pCluster->m_basicSignal),
127 m_time(pCluster->m_time),
129 m_barrel(pCluster->m_barrel),
130 m_endcap(pCluster->m_endcap),
131 m_clusterSize(pCluster->m_clusterSize),
132 m_eta0(pCluster->m_eta0),
133 m_phi0(pCluster->m_phi0),
134 m_timeNorm(pCluster->m_timeNorm),
135 m_posNorm(pCluster->m_posNorm),
136 m_posSamNorm(pCluster->m_posSamNorm),
137 m_nBarrel(pCluster->m_nBarrel),
138 m_nEndcap(pCluster->m_nEndcap),
139 m_lockPattern(pCluster->m_lockPattern),
140 m_rawE(pCluster->m_rawE),
141 m_rawEta(pCluster->m_rawEta),
142 m_rawPhi(pCluster->m_rawPhi),
143 m_rawM(pCluster->m_rawM),
144 m_altE(pCluster->m_altE),
145 m_altEta(pCluster->m_altEta),
146 m_altPhi(pCluster->m_altPhi),
147 m_altM(pCluster->m_altM)
148{
149 signalstate_t s = pCluster->m_defSigState;
151 this->setDefaultSignalState(s);
152 this->setSignalState(s);
153 // deep copy external data
154 bool isExternalShowerThere = false;
155 if ( pCluster->m_dataLink.isValid()) {
156 if (*(pCluster->m_dataLink) != nullptr) isExternalShowerThere = true;
157 }
158 CaloShower* pData = isExternalShowerThere
159 ? new CaloShower(*(pCluster->m_dataLink)) : new CaloShower();
160 m_shower = pData;
161 CaloCellLink* pLink = pCluster->getCellLink() != nullptr ? new CaloCellLink(pCluster->getCellLink()) : new CaloCellLink();
162 this->setStores(pData,pLink,
164 P4EEtaPhiM::setE(pCluster->m_e);
165 P4EEtaPhiM::setEta(pCluster->m_eta);
166 P4EEtaPhiM::setPhi(pCluster->m_phi);
167 P4EEtaPhiM::setM(pCluster->m_m);
168 this->setRecoStatus(pCluster->getRecoStatus());
169 m_badChannelData.reserve(pCluster->m_badChannelData.size());
170 for (unsigned int i=0;i<pCluster->m_badChannelData.size();i++) {
172 }
173}
CaloClusterMomentStore m_momentStore
cluster moments
virtual bool hasSignalState(signalstate_t s) const
check if signal state exists for current implementation
virtual bool setSignalState(signalstate_t s)
Sets signal state.
signalstate_t m_defSigState
Stores default signal state.
bool setStores(CaloShower *pData, CaloCellLink *pLink, bool ownStores=true)
Setup internal store.
void setRecoStatus(const CaloRecoStatus &recStatus)
Set the reconstruction status.
const CaloRecoStatus & getRecoStatus() const
Retrieve the reconstruction status.
double m_m
Definition P4EEtaPhiM.h:78
virtual void setM(double theM)
set mass data member
Definition P4EEtaPhiM.h:123
double m_eta
Definition P4EEtaPhiM.h:76
double m_phi
Definition P4EEtaPhiM.h:77
virtual void setEta(double theEta)
set eta data member
Definition P4EEtaPhiM.h:117
virtual void setE(double theE)
set energy data member
Definition P4EEtaPhiM.h:114
virtual void setPhi(double thePhi)
set phi data member
Definition P4EEtaPhiM.h:120
double m_e
Definition P4EEtaPhiM.h:75

◆ CaloCluster() [3/3]

CaloCluster::CaloCluster ( const CaloCluster & rCluster)

Definition at line 175 of file CaloCluster.cxx.

176 : I4Momentum(rCluster),
177 P4EEtaPhiMBase(rCluster),
178 INavigable(rCluster),
179 IAthenaBarCode(rCluster),
180 INavigable4Momentum(rCluster),
181 CaloCompositeKineBase(rCluster),
183 ISignalState(),
184 m_dataStore(rCluster.m_dataStore),
186 m_ownDataStore(true),
188 m_time(rCluster.m_time),
190 m_barrel(rCluster.m_barrel),
191 m_endcap(rCluster.m_endcap),
193 m_eta0(rCluster.m_eta0),
194 m_phi0(rCluster.m_phi0),
195 m_timeNorm(rCluster.m_posNorm),
196 m_posNorm(rCluster.m_posNorm),
197 m_posSamNorm(rCluster.m_posSamNorm),
198 m_nBarrel(rCluster.m_nBarrel),
199 m_nEndcap(rCluster.m_nEndcap),
201 m_rawE(rCluster.m_rawE),
202 m_rawEta(rCluster.m_rawEta),
203 m_rawPhi(rCluster.m_rawPhi),
204 m_rawM(rCluster.m_rawM),
205 m_altE(rCluster.m_altE),
206 m_altEta(rCluster.m_altEta),
207 m_altPhi(rCluster.m_altPhi),
208 m_altM(rCluster.m_altM)
209{
210 signalstate_t s = rCluster.m_defSigState;
212 this->setDefaultSignalState(s);
213 this->setSignalState(s);
214 // deep copy external data
215 bool isExternalShowerThere = false;
216 if ( rCluster.m_dataLink.isValid()) {
217 if (*(rCluster.m_dataLink) != nullptr) isExternalShowerThere = true;
218 }
219 CaloShower* pData = isExternalShowerThere
220 ? new CaloShower(*(rCluster.m_dataLink)) : new CaloShower();
221 m_shower = pData;
222 CaloCellLink* pLink = rCluster.getCellLink() != nullptr ? new CaloCellLink(rCluster.getCellLink()) : new CaloCellLink();
223 this->setStores(pData,pLink,
225 // energy etc may be corrected, so overwrite!
226 P4EEtaPhiM::setE(rCluster.m_e);
227 P4EEtaPhiM::setEta(rCluster.m_eta);
228 P4EEtaPhiM::setPhi(rCluster.m_phi);
229 P4EEtaPhiM::setM(rCluster.m_m);
230 this->setRecoStatus(rCluster.getRecoStatus());
231 m_badChannelData.reserve(rCluster.m_badChannelData.size());
232 for (unsigned int i=0;i<rCluster.m_badChannelData.size();i++) {
234 }
235}

Member Function Documentation

◆ addBadChannel()

void CaloCluster::addBadChannel ( const CaloClusterBadChannelData & badChannel)

Add Bad channel information.

Definition at line 1424 of file CaloCluster.cxx.

1425{
1426 m_badChannelData.push_back(badChannel);
1427}

◆ addCell()

void CaloCompositeCellBase< CaloClusterNavigable >::addCell ( const CaloCellContainer * pContainer,
const CaloCell * pCell,
double weight,
size_t iCell = static_cast<size_t>(-1) )
inherited

Add a cell with global kinematic update (slow)

Parameters
pContainerinput pointer to a CaloCellContainer (unchanged)
pCellinput pointer to a CaloCell (unchanged)
weightsignal weight asociated with this cell
iCellinput index of the CaloCell in the CaloCellContainer. This may be omitted, but if supplied, a potentially slow search of the CaloCellContainer for the CaloCell may be avoided.

Adding a cell usually changes the global kinematics. The concrete implementation is left to the updateKine method, which needs to be implemented by derived classes.

Adding cells without updating the global kinematics is also possible by using the corresponding putElement method in the Navigable<CaloCellContainer,double> base class.

◆ addUniqueCell()

void CaloCompositeCellBase< CaloClusterNavigable >::addUniqueCell ( const CaloCellContainer * theContainer,
size_t theIndex,
double weight,
size_t size_hint = 0 )
inherited

Add a cell with global kinematic update (fast)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theContainerinput pointer to a CaloCellContainer (unchanged)
theIndexinput index of CaloCell in CaloCellConatiner (unchanged)
weightsignal weight asociated with this cell
size_hintif non-zero, a hint about many cells are likely to be in the cluster.

Faster as index is already available, but has to rely on client to provide the correct (and valid) index.

The caller also guarantees that the cell is not already in the cluster.

◆ addUniqueCellNoKine()

void CaloCompositeCellBase< CaloClusterNavigable >::addUniqueCellNoKine ( const CaloCellContainer * theContainer,
size_t theIndex,
double weight,
size_t size_hint = 0 )
inherited

Add a cell with no kinematic update (fast)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theContainerinput pointer to a CaloCellContainer (unchanged)
theIndexinput index of CaloCell in CaloCellConatiner (unchanged)
weightsignal weight asociated with this cell
size_hintif non-zero, a hint about many cells are likely to be in the cluster.

Faster as index is already available, but has to rely on client to provide the correct (and valid) index.

The caller also guarantees that the cell is not already in the cluster.

◆ allLocked()

bool CaloCluster::allLocked ( ) const
inline

Check if all variables are locked.

Definition at line 1289 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1290{
1291 return
1294}
static unsigned int getAllVariableBits()

◆ begin()

CaloClusterNavigable::object_iter CaloClusterNavigable::begin ( ) const
inlinevirtualinherited

begin iterator for public object access

Definition at line 303 of file CaloClusterNavigable.h.

304{
305 return (this->getCellLink())->begin();
306}

◆ beginMoment()

CaloCluster::moment_iterator CaloCluster::beginMoment ( bool useLink = true) const

First iterator on moment store.

Definition at line 1119 of file CaloCluster.cxx.

1120{
1121 moment_iterator iMom;
1122 // get store pointers
1123 const CaloClusterMomentStore* pFirstMomStore = nullptr;
1124 const CaloClusterMomentStore* pSecndMomStore = nullptr;
1125 // try to return valid iterator to first data object...
1126 if ( this->getMomentStorePtrs(pFirstMomStore,pSecndMomStore,
1127 useLink) ) //DEBUG,"begin") )
1128 {
1129 iMom = moment_iterator(pFirstMomStore->begin(),pFirstMomStore,
1130 pSecndMomStore);
1131 }
1132 else
1133 {
1134 iMom = moment_iterator();
1135 }
1136
1137 return iMom;
1138}
virtual moment_iterator begin() const
{
bool getMomentStorePtrs(const CaloClusterMomentStore *&pFirstStore, const CaloClusterMomentStore *&pSecndStore, bool useLink) const
MomentStoreIter moment_iterator
Moment iterator type for CaloCluster clients.

◆ calculateKine()

void CaloCluster::calculateKine ( const bool useweight = true,
const bool updateLayers = true )

Calculate cluster kinematics from contained cells.

Definition at line 736 of file CaloCluster.cxx.

737{
738 //static CaloPhiRange range;
739
740 // update global kinematics
741 //
742 // for the update of the position the normalization is not a trival
743 // thing. The previous implementation used the sum of weighted
744 // energies as normalization. This leads to unphysical eta and phi
745 // values in case negative energies are added in. The new algorithm
746 // takes therefore |E| instead of E which gives the same eta and phi
747 // as before for the 2 cases where all cells are negative or all
748 // cells are positive. In the mixed case it will give the direction
749 // of activity in the calorimeter.
750
751 m_posNorm = 0;
752 m_nBarrel = 0;
753 m_nEndcap = 0;
754 m_timeNorm = 0.;
755
756 std::fill (m_posSamNorm.begin(), m_posSamNorm.end(), 0);
757
759 accum.theNewPhi = this->phi();
760 if (useweight)
761 accumCells (*this, accum, AccumWeight(this));
762 else
763 accumCells (*this, accum, AccumNoWeight());
764
765 if ( m_posNorm != 0. )
766 {
767 double inorm = 1 / m_posNorm;
768 this->setEta(accum.theNewEta * inorm);
769 this->setPhi(CaloPhiRange::fix(accum.theNewPhi * inorm));
770 }
771 else
772 {
773 this->setEta(0);
774 this->setPhi(0);
775 }
776
777 this->setE(accum.theNewEnergy);
778
779 if ( m_timeNorm != 0. )
780 this->setTime(accum.theNewTime/m_timeNorm);
781 else
782 this->setTime(0);
783
784
786 // Check Sampling Variable Updates //
788
789 if ( !updateLayers ) return;
790 if ( this->allLocked() ) return;
791 // update sampling quantities
792
793 for(int i=0;i<(int)CaloSampling::Unknown;i++) {
794 if ( !accum.PresenceInSample[i] ) continue;
795 // check sampling bit
798 if ( m_posSamNorm[i] != 0 ) {
799 double inorm = 1 / m_posSamNorm[i];
800 accum.EtaInSample[i] *= inorm;
801 accum.PhiInSample[i] = CaloPhiRange::fix (accum.PhiInSample[i] * inorm);
802 }
803 }
804
805#define SETVAR(v, a) maybeSetVariable(v, a, (a)+sizeof(a)/sizeof((a)[0]))
806 SETVAR (CaloVariableType::ENERGY, accum.EnergyInSample);
807 SETVAR (CaloVariableType::ETA, accum.EtaInSample);
808 SETVAR (CaloVariableType::PHI, accum.PhiInSample);
809 SETVAR (CaloVariableType::MAX_ENERGY, accum.MaxEnergyInSample);
810 SETVAR (CaloVariableType::MAX_ETA, accum.EtaMaxEnergyInSample);
811 SETVAR (CaloVariableType::MAX_PHI, accum.PhiMaxEnergyInSample);
812#undef SETVAR
813
814 if ( m_nBarrel < 0 ) m_nBarrel = 0;
815 if ( m_nEndcap < 0 ) m_nEndcap = 0;
816
817 m_barrel = (m_nBarrel>0);
818 m_endcap = (m_nEndcap>0);
819}
#define SETVAR(v, a)
virtual void setEta(double eta)
Set eta.
void setTime(double theTime)
Set cluster time.
virtual double phi() const
Retrieve phi independent of signal state.
bool allLocked() const
Check if all variables are locked.
virtual void setPhi(double phi)
Set phi.
virtual void setE(double e)
Set energy.
static double fix(double phi)
static unsigned int getSamplingBit(const CaloSample &rSample)
Return a unique bit set for a given sampling.

◆ cell_begin()

cell_iterator CaloCompositeCellBase< CaloClusterNavigable >::cell_begin ( ) const
inherited

Retrieve a STL-type begin() iterator for the cell store.

◆ cell_end()

cell_iterator CaloCompositeCellBase< CaloClusterNavigable >::cell_end ( ) const
inherited

Retrieve a STL-type end() iterator for the cell store.

◆ cellLink()

const cell_link_type & CaloClusterNavigable::cellLink ( ) const
inlineinherited

Access to underlying link.

Definition at line 149 of file CaloClusterNavigable.h.

149{ return m_cellLink; }
cell_link_type m_cellLink
Local pointer to cell store.

◆ checkRecoStatus()

bool CaloCompositeKineBase::checkRecoStatus ( const CaloRecoStatus::StatusIndicator & recIndic) const
inlineinherited

Check if a given indicator is set.

Definition at line 91 of file CaloCompositeKineBase.h.

93{ return m_status.checkStatus(recIndic); }
CaloRecoStatus m_status
Calorimeter reconstruction status.

◆ combineWithUUIDHash()

AthenaBarCode_t AthenaBarCodeImpl::combineWithUUIDHash ( const AthenaBarCode_t & hash) const
inlineprivateinherited

Definition at line 119 of file AthenaBarCodeImpl.h.

120 {
121
123 AthenaBarCode_t lowerh = ~tmp >> (TotalBits
124 - UUIDBits);
125 AthenaBarCode_t higherh = ~tmp << (UUIDBits);
126
127 AthenaBarCode_t lower = m_barcode & lowerh;
128 AthenaBarCode_t higher = hash & higherh;
129
130 /*
131 std::cout << "AthenaBarCodeImpl::combineWithHash::hash=" << std::hex
132 << hash << " lower=" << lower << " higher=" << higher << " lowerh="
133 << lowerh << " higherh=" << higherh << " barcode=" << (lower
134 | higher) << std::endl;
135 */
136 return lower | higher;
137
138}
uint64_t AthenaBarCode_t
barcode for all INav4Mom classes
static const unsigned short UUIDBits
std::atomic< AthenaBarCode_t > m_barcode
static const unsigned short TotalBits

◆ contains() [1/2]

bool CaloClusterNavigable::contains ( const CaloCell * pCell) const
inlineinherited

check if constituent is already there

Definition at line 290 of file CaloClusterNavigable.h.

291{
292 return (this->getCellLink())->contains(pCell);
293}

◆ contains() [2/2]

bool CaloClusterNavigable::contains ( const CaloCellContainer * pContainer,
size_t & iCell ) const
inlineinherited

check if constituent is already there

Definition at line 296 of file CaloClusterNavigable.h.

298{
299 return (this->getCellLink())->contains(pContainer,iCell);
300}

◆ containsBadCells()

bool CaloCluster::containsBadCells ( ) const
inline

Check if cluster has any bad channel in it.

Definition at line 1300 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1300 {
1301 return !(this->getBadChannel()->empty());
1302}
const badChannelList * getBadChannel() const

◆ cosPhi()

double P4EEtaPhiMBase::cosPhi ( ) const
virtualinherited

cosinus phi

Implements I4Momentum.

Reimplemented in CaloCell, and CaloVertexedCell.

Definition at line 54 of file P4EEtaPhiMBase.cxx.

55{
56 return std::cos(this->phi());
57}
virtual double phi() const =0
phi in [-pi,pi[

◆ cosTh()

double P4EEtaPhiMBase::cosTh ( ) const
virtualinherited

cosinus theta

Implements I4Momentum.

Reimplemented in CaloCell, and CaloVertexedCell.

Definition at line 82 of file P4EEtaPhiMBase.cxx.

83{
84 return std::tanh(this->eta());
85}
virtual double eta() const =0
pseudo rapidity

◆ cotTh()

double P4EEtaPhiMBase::cotTh ( ) const
virtualinherited

cottan theta

Implements I4Momentum.

Reimplemented in CaloCell.

Definition at line 77 of file P4EEtaPhiMBase.cxx.

78{
79 return std::sinh(this->eta());
80}

◆ createdInCurrentJob()

bool AthenaBarCodeImpl::createdInCurrentJob ( ) const
inherited

Definition at line 181 of file AthenaBarCodeImpl.cxx.

181 {
183 initABC();
184
185 //FIXME: it is possible that m_defaultHash is not yet initialized.
186 return getUUIDHash() == getDefaultHash();
187}
AthenaBarCode_t getUUIDHash() const
static AthenaBarCode_t getDefaultHash(const char *jobid=nullptr)
static const AthenaBarCode_t UNDEFINEDBARCODE

◆ defaultSignalState()

CaloCluster::signalstate_t CaloCluster::defaultSignalState ( ) const
inline

Retrieve default signal state.

Definition at line 862 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

863{ return m_defSigState; }

◆ dump() [1/2]

std::ostream & AthenaBarCodeImpl::dump ( std::ostream & out) const
inherited

Definition at line 172 of file AthenaBarCodeImpl.cxx.

172 {
174 initABC();
175
176 out << "\n[AthenaBarCode]= " << std::hex << (m_barcode) << std::dec << std::endl;
177 return out;
178}

◆ dump() [2/2]

std::ostream & P4EEtaPhiMBase::dump ( std::ostream & out = std::cout) const
virtualinherited

Print I4Momentum content.

Implements I4Momentum.

Definition at line 159 of file P4EEtaPhiMBase.cxx.

160{
161
162 std::stringstream outx;
163 outx << "[e,eta,phi,m] ="
164 << std::right << std::scientific << std::setprecision(8)
165 << std::setw(16) << this->e()
166 << std::setw(16) << this->eta()
167 << std::setw(16) << this->phi()
168 << std::setw(16) << this->m();
169
170 out<<outx.str();
171
172 return out;
173}
virtual double m() const =0
mass
virtual double e() const =0
energy

◆ e() [1/2]

double CaloCluster::e ( ) const
inlinevirtual

Retrieve energy independent of signal state.

Reimplemented from P4EEtaPhiM.

Definition at line 753 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

754{ return (this->*m_getE)(); }
GET_VALUE m_getE
Pointer to getter functions.

◆ e() [2/2]

double CaloCluster::e ( signalstate_t s) const
inline

Retrieve energy for a specific signal state.

Definition at line 777 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

778{
779 if (!hasSignalState(s)) return m_errorValue;
780 switch (s) {
782 return P4EEtaPhiM::e();
784 return m_rawE;
786 return m_altE;
787 default:
788 return m_errorValue;
789 }
790}
static const double m_errorValue
Internal error return for real numbers.
virtual double e() const
get energy data member
Definition P4EEtaPhiM.h:102

◆ end()

CaloClusterNavigable::object_iter CaloClusterNavigable::end ( ) const
inlinevirtualinherited

end iterator for public object access

Definition at line 309 of file CaloClusterNavigable.h.

310{
311 return (this->getCellLink())->end();
312}

◆ endMoment()

CaloCluster::moment_iterator CaloCluster::endMoment ( bool useLink = true) const

Last iterator on moment store.

Definition at line 1141 of file CaloCluster.cxx.

1142{
1143 const CaloClusterMomentStore* pFirstMomStore = nullptr;
1144 const CaloClusterMomentStore* pSecndMomStore = nullptr;
1145 if ( this->getMomentStorePtrs(pFirstMomStore,pSecndMomStore,useLink) )
1146 //DEBUG,"end") )
1147 {
1149 pSecndMomStore != nullptr && pSecndMomStore->size() > 0
1150 ? pSecndMomStore->end()
1151 : pFirstMomStore->end();
1152 return moment_iterator(lMom,pFirstMomStore,pSecndMomStore);
1153 }
1154 else
1155 {
1156 return {};
1157 }
1158}
virtual moment_iterator end() const
iterator loop terminator
CaloClusterMomentIterator moment_iterator
External moment iterator type.
size_t size() const
Number of stored moments.

◆ energy()

double CaloCompositeKineBase::energy ( ) const
inlinevirtualinherited

Return energy.

Definition at line 70 of file CaloCompositeKineBase.h.

71{ return this->e(); }

◆ energy_max()

double CaloCluster::energy_max ( sampling_type sampling) const
inline

Retrieve maximum cell energy in given sampling.

Parameters
samplingsampling indicator

Returns energy of cell with maximum signal in sampling.

Warning
Depreciated. This method should not be used anymore. Use getVariable(CaloVariableType::MAX_ENERGY,...) instead.

Definition at line 1096 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1097{
1098 return this->isEMSampling(sampling)
1099 ? this->getVariable(CaloVariableType::MAX_ENERGY,sampling,true)
1100 : double(0);
1101}
double getVariable(const variable_type &varType, const sampling_type &samType, bool useLink=true) const
General sampling variable access.
bool isEMSampling(const sampling_type &theSampling) const
Checks if cells from a given sampling in EMB and EMEC are in the cluster.

◆ energy_nonvirt()

double CaloCompositeKineBase::energy_nonvirt ( ) const
inlineinherited

Return energy (nonvirtual version)

Definition at line 74 of file CaloCompositeKineBase.h.

75{ return this->m_e; }

◆ energyBE()

double CaloCluster::energyBE ( int sam) const
inline

EMB/EMEC combined signal.

Parameters
samsampling counter
Warning
The sampling input argument refers to the sampling number (first, second, third,...) in the EMB and EMEC. It is not identical to the corresponding CaloSampling::CaloSample indicators in these calorimeters.

Definition at line 1219 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1220{ return this->variableBE(CaloVariableType::ENERGY,sam); }
double variableBE(const variable_type &theVariable, const int &samplingIndex) const
Rewrite as for calculation.

◆ errors()

const I4MomentumError * P4EEtaPhiM::errors ( ) const
virtualinherited

Access to errors, if available; returns 0 if no errors.

Reimplemented from P4EEtaPhiMBase.

Definition at line 15 of file P4EEtaPhiM.cxx.

16{
17 return 0;
18}

◆ eSample()

double CaloCluster::eSample ( sampling_type theSampling) const
inline

Retrieve energy in a given sampling.

Parameters
theSamplingsampling indicator

Returns the energy in a given sampling.

Definition at line 975 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

976{ return this->getVariable(CaloVariableType::ENERGY,theSampling,true); }

◆ et()

double P4EEtaPhiMBase::et ( ) const
virtualinherited

transverse energy defined to be e*sin(theta)

Implements I4Momentum.

Reimplemented in CaloCell.

Definition at line 106 of file P4EEtaPhiMBase.cxx.

107 {
108 return this->e()*this->sinTh();
109 }
virtual double sinTh() const
sinus theta

◆ eta() [1/2]

double CaloCluster::eta ( void ) const
inlinevirtual

Retrieve eta independent of signal state.

Reimplemented from P4EEtaPhiM.

Definition at line 755 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

756{
757 return (this->*m_getEta)();
758}
GET_VALUE m_getEta
Pointer to getter functions.

◆ eta() [2/2]

double CaloCluster::eta ( signalstate_t s) const
inline

Retrieve eta for a specific signal state.

Definition at line 793 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

794{
795 if (!hasSignalState(s)) return m_errorValue;
796 switch (s) {
798 return P4EEtaPhiM::eta();
800 return m_rawEta;
802 return m_altEta;
803 default:
804 return m_errorValue;
805 }
806}
virtual double eta() const
get eta data member
Definition P4EEtaPhiM.h:105

◆ eta0()

double CaloCluster::eta0 ( ) const
inline

Returns raw \( \eta \) of cluster seed.

Returns seed \( \eta \) for cluster.

Definition at line 1180 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1180{ return m_eta0; }

◆ etaBE()

double CaloCluster::etaBE ( int sam) const
inline

EMB/EMEC combined barycenter \( \eta \).

Parameters
samsampling counter
Warning
The sam input argument refers to the sampling number (first, second, third,...) in the EMB and EMEC. It is not identical to the corresponding CaloSampling::CaloSample indicators in these calorimeters.

Definition at line 1199 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1200{ return this->variableBE(CaloVariableType::ETA,sam); }

◆ etamax()

double CaloCluster::etamax ( sampling_type sampling) const
inline

Retrieve \( \eta \) of cell with maximum energy in given sampling.

Parameters
samplingsampling indicator

Returns \( \eta \) of cell with maximum signal in sampling.

Warning
Depreciated. This method should not be used anymore. Use getVariable(CaloVariableType::MAX_ETA,...) instead.

Definition at line 1112 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1113{
1114 return this->isEMSampling(sampling)
1115 ? this->getVariable(CaloVariableType::MAX_ETA,sampling,true)
1116 : double(0);
1117}

◆ etaSample()

double CaloCluster::etaSample ( sampling_type theSampling) const
inline

Retrieve barycenter \( \eta \) in a given sample.

Parameters
theSamplingsampling indicator

Returns \( \eta \) in sampling.

Definition at line 991 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

992{ return this->getVariable(CaloVariableType::ETA,theSampling,true); }

◆ etasize()

double CaloCluster::etasize ( sampling_type sampling) const
inline

Returns cluster size in \( \eta \) for a given sampling.

Parameters
samplingsampling indicator

Returns eta size \( \Delta\eta \) of cluster in sampling.

Warning
Depreciated. This method should not be used anymore. Use getVariable(CaloVariableType::DELTA_ETA,...) instead.

Definition at line 1148 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1149{
1150 return this->isEMSampling(sampling)
1151 ? this->getVariable(CaloVariableType::DELTA_ETA,sampling,true)
1152 : double(0);
1153}

◆ fillToken() [1/2]

void CaloClusterNavigable::fillToken ( INavigationToken & iToken) const
inlinevirtualinherited

fill token for navigation

Implements INavigable.

Definition at line 390 of file CaloClusterNavigable.h.

391{
392 if ( this->getCellLink() )
393 (this->getCellLink())->fillToken(iToken);
394}
virtual void fillToken(INavigationToken &iToken) const
fill token for navigation

◆ fillToken() [2/2]

void CaloClusterNavigable::fillToken ( INavigationToken & iToken,
const std::any & rPar ) const
inlinevirtualinherited

fill token for navigation

Implements INavigable.

Definition at line 397 of file CaloClusterNavigable.h.

399{
400 if ( this->getCellLink() )
401 (this->getCellLink())->fillToken(iToken,rPar);
402}

◆ getAltE()

double CaloCluster::getAltE ( ) const
private

Access to calibrated (cell weight) energy.

Definition at line 1325 of file CaloCluster.cxx.

1325{ return m_altE; }

◆ getAltEta()

double CaloCluster::getAltEta ( ) const
private

Access to calibrated (cell weight) eta.

Definition at line 1326 of file CaloCluster.cxx.

1326{ return m_altEta; }

◆ getAltM()

double CaloCluster::getAltM ( ) const
private

Access to calibrated (cell weight) m.

Definition at line 1328 of file CaloCluster.cxx.

1328{ return m_altM; }

◆ getAltPhi()

double CaloCluster::getAltPhi ( ) const
private

Access to calibrated (cell weight) phi.

Definition at line 1327 of file CaloCluster.cxx.

1327{ return m_altPhi; }

◆ getAthenaBarCode()

AthenaBarCode_t AthenaBarCodeBase::getAthenaBarCode ( ) const
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 22 of file AthenaBarCodeBase.cxx.

23{
25}
AthenaBarCode_t getAthenaBarCode() const

◆ getBadChannel()

const CaloCluster::badChannelList * CaloCluster::getBadChannel ( ) const

Definition at line 1434 of file CaloCluster.cxx.

1435{
1436 return &m_badChannelData;
1437}

◆ getBasicEnergy()

double CaloCluster::getBasicEnergy ( ) const
inlinevirtual

Access basic energy scale signal.

Implements CaloCompositeKineBase.

Definition at line 876 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

876{ return m_basicSignal; }

◆ getBits()

AthenaBarCode_t AthenaBarCodeImpl::getBits ( unsigned short startbit,
unsigned short nbits ) const
protectedinherited

Definition at line 249 of file AthenaBarCodeImpl.cxx.

249 {
250
252 //now m_barcode=aaaaaxxaa;
253 tmp = m_barcode << (startbit); //tmp=xxaa00000;
254 tmp = tmp >> (TotalBits - nbits); //tmp=0000000xx
255
256 return tmp;
257}

◆ getCalE()

double CaloCluster::getCalE ( ) const
private

Access to calibrated (LC) energy.

Definition at line 1335 of file CaloCluster.cxx.

1335{ return P4EEtaPhiM::e(); }

◆ getCalEta()

double CaloCluster::getCalEta ( ) const
private

Access to calibrated (LC) eta.

Definition at line 1336 of file CaloCluster.cxx.

1336{ return P4EEtaPhiM::eta(); }

◆ getCalM()

double CaloCluster::getCalM ( ) const
private

Access to calibrated (LC) m.

Definition at line 1338 of file CaloCluster.cxx.

1338{ return P4EEtaPhiM::m(); }
virtual double m() const
get mass data member
Definition P4EEtaPhiM.h:111

◆ getCalPhi()

double CaloCluster::getCalPhi ( ) const
private

Access to calibrated (LC) phi.

Definition at line 1337 of file CaloCluster.cxx.

1337{ return P4EEtaPhiM::phi(); }
virtual double phi() const
get phi data member
Definition P4EEtaPhiM.h:108

◆ getCellContainer()

const CaloCellContainer * CaloCompositeCellBase< CaloClusterNavigable >::getCellContainer ( const CaloCell * pCell) const
inherited

Retrieve the pointer to the original cell container for a given cell.

Parameters
pCellpointer to the cell (unchanged)

Returns 0 if cell not in store.

◆ getCellIndex()

bool CaloCompositeCellBase< CaloClusterNavigable >::getCellIndex ( const CaloCell * pCell,
size_t & iCell ) const
inherited

Retrieve the index of a given cell in the cell container.

Parameters
pCellpointer to the cell (unchanged)
iCellreference to a modifiable index variable

Returns true and a valid index if cell is found in store. If cell is not found, the value of the index is unchanged (typically 0 if initialized properly by client).

Note that the index refers to the index of the cell in the cell container, not the index of the cell in the local store.

◆ getCellLink() [1/2]

CaloCellLink * CaloClusterNavigable::getCellLink ( )
protectedinherited

Definition at line 40 of file CaloClusterNavigable.cxx.

41{
42 if ( m_ownLinkStore )
43 {
44 if ( *m_cellLink == nullptr ) m_cellLink.setElement(new CaloCellLink());
45 // Ok, because this happens only if we own the pointer.
46 CaloCellLink* link ATLAS_THREAD_SAFE = const_cast<CaloCellLink*>(*m_cellLink);
47 return link;
48 }
49 else
50 {
51 return (CaloCellLink*)nullptr;
52 }
53
54 // check if local pointer to store
55 // if ( m_cellLinkPointer != 0 ) { return m_cellLinkPointer;}
56 // check if linked pointer to store
57 // if ( m_cellLink.isValid() && *m_cellLink != 0 )
58 // {
59 // FIXME
60 // CaloCellLink* pLink = const_cast<CaloCellLink*>(*m_cellLink);
61 // return pLink;
62 // }
63 // create a new local store/
64 // m_cellLinkPointer = new CaloCellLink();
65 // return m_cellLinkPointer;
66}
#define ATLAS_THREAD_SAFE

◆ getCellLink() [2/2]

const CaloCellLink * CaloClusterNavigable::getCellLink ( ) const
protectedinherited

Definition at line 69 of file CaloClusterNavigable.cxx.

70{
71 // return *m_cellLink;
72
73 // if ( m_cellLinkPointer != 0 )
74 // {
75 // std::cout << "[CaloClusterNavigable@" << this << "] return "
76 // << "cell link @" << m_cellLinkPointer << std::endl;
77 // return m_cellLinkPointer;
78 // }
79 // if ( *m_cellLink == 0 )
80 // {
81 // std::cout << "[CaloClusterNavigable@" << this << "] problem with "
82 // << "cell link store, unexpected pointer = "
83 // << *m_cellLink << std::endl;
84 // }
85 return m_cellLink.isValid() ? *m_cellLink : nullptr;
86}

◆ getCellLinkPtr() [1/2]

CaloCellLink * CaloClusterNavigable::getCellLinkPtr ( )
inlineprotectedinherited

Definition at line 426 of file CaloClusterNavigable.h.

427{
428 CaloCellLink* ret;
429 if (m_cellLink.isValid())
430 ret = const_cast<CaloCellLink*>(*m_cellLink);
431 else
432 ret = 0;
433 return ret;
434
435}

◆ getCellLinkPtr() [2/2]

const CaloCellLink * CaloClusterNavigable::getCellLinkPtr ( ) const
inlineprotectedinherited

Definition at line 438 of file CaloClusterNavigable.h.

438 {
439 const CaloCellLink* ret;
440 if (m_cellLink.isValid())
441 ret = *m_cellLink;
442 else
443 ret = 0;
444 return ret;
445}

◆ getCellWeight()

double CaloCompositeCellBase< CaloClusterNavigable >::getCellWeight ( const CaloCell * pCell) const
inherited

Retrieve the kinematic weight of a given cell.

Parameters
pCellpointer to the cell (unchanged)

Returns 0. if cell not in store.

◆ getClusterEtaSize()

unsigned int CaloCluster::getClusterEtaSize ( ) const

Definition at line 1439 of file CaloCluster.cxx.

1439 {
1440
1441 unsigned int size = 0;
1442 if(m_clusterSize==SW_55ele ||
1445 size = 5;
1446 }else if(m_clusterSize==SW_35ele ||
1452 size = 3;
1453 }else if(m_clusterSize==SW_7_11){
1454 size = 7;
1455 }
1456
1457 return size;
1458
1459}

◆ getClusterPhiSize()

unsigned int CaloCluster::getClusterPhiSize ( ) const

Definition at line 1461 of file CaloCluster.cxx.

1461 {
1462
1463 unsigned int size = 0;
1464 if(m_clusterSize==SW_55ele ||
1470 size = 5;
1471 }else if(
1475 size = 7;
1476 }else if(m_clusterSize==SW_7_11){
1477 size = 11;
1478 }
1479
1480 return size;
1481
1482}

◆ getClusterSize()

unsigned int CaloCluster::getClusterSize ( ) const
inline

Get cluster size.

Definition at line 895 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

895{ return m_clusterSize; }

◆ getContainer() [1/2]

const CaloCellContainer * CaloClusterNavigable::getContainer ( const CaloCell * pCell) const
inlineinherited

public container access: retrieve Container for given object pointer

Definition at line 347 of file CaloClusterNavigable.h.

348{
349 return (this->getCellLink())->getContainer(pCell);
350}

◆ getContainer() [2/2]

const CaloCellContainer * CaloClusterNavigable::getContainer ( object_iter cellIter) const
inlineinherited

public container access: retrieve Container for given object iterator

Definition at line 354 of file CaloClusterNavigable.h.

355{
356 return (this->getCellLink())->getContainer(cellIter);
357}

◆ getDataStore() [1/2]

const CaloSamplingData * CaloCluster::getDataStore ( const variable_type & varType,
bool traceLink = false ) const
protected
Parameters
varTypereference to non-modifiable variable type indicator
traceLinkflag allows tracing external storelinks if set true

Dynamically allocates the correct store (local cache or external) depending on availability and indicator. The store is non-modifiable.

Definition at line 1056 of file CaloCluster.cxx.

1057{
1058 //
1059 //DEBUGstd::cout << "[CaloCluster@" << this
1060 //DEBUG << "]::getDataStore - const data store pointer requested, "
1061 //DEBUG << "try internal pointer = " << &m_dataStore;
1062
1063 // check if variable in local data store
1064 if ( m_dataStore.contains(varType) )
1065 {
1066 // std::cout << "...successful!" << std::endl;
1067 return &m_dataStore;
1068 }
1069
1070 // check linked data store if requested
1071 if ( traceLink && m_dataLink.isValid())
1072 {
1073 //DEBUG std::cout << "... unsuccessful, use linked pointer "
1074 //DEBUG << &((*m_dataLink)->getSamplingStore()) << std::endl;
1075 return &((*m_dataLink)->getSamplingStore());
1076 }
1077
1078 //DEBUGstd::cout << "... failed, no external or internal pointer available!"
1079 //DEBUG << std::endl;
1080 return (const CaloSamplingData*)nullptr;
1081}

◆ getDataStore() [2/2]

CaloSamplingData * CaloCluster::getDataStore ( const variable_type & varType,
bool traceLink = true )
protected
Parameters
varTypereference to non-modifiable variable type indicator
traceLinkif true return pointer to external store

Dynamically allocates the correct store (local cache or external) depending on availability and indicator. The store is modifiable, i.e. write access is granted.

Definition at line 1093 of file CaloCluster.cxx.

1094{
1095 if ( m_dataStore.contains(varType) )
1096 {
1097 return &m_dataStore;
1098 }
1099
1100 // check external store if requested
1101 if ( m_ownDataStore && !m_dataLink.isValid()) {
1102 m_shower = new CaloShower();
1103 m_dataLink.setElement(m_shower);
1104 }
1105
1106 // trace
1107 if ( ( traceLink || m_ownDataStore ) && m_shower )
1108 {
1109 return &(m_shower->getSamplingStore());
1110 }
1111
1112 return (CaloSamplingData*)nullptr;
1113}

◆ getDefaultHash()

AthenaBarCode_t AthenaBarCodeImpl::getDefaultHash ( const char * jobid = nullptr)
staticprivateinherited

Definition at line 304 of file AthenaBarCodeImpl.cxx.

305{
306 static const AthenaBarCode_t defaultHash = makeDefaultHash (jobid);
307 return defaultHash;
308}
static AthenaBarCode_t makeDefaultHash(const char *jobid)

◆ getEInSamples()

void CaloCluster::getEInSamples ( std::vector< double > & theEnergies) const
inline

Retrieve energy for all samplings into a vector.

Parameters
theEnergiesreference to a modifiable vector
Warning
The vector referenced on input will be completely overwritten and resized.

Definition at line 983 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

984{ this->getVariable(CaloVariableType::ENERGY,theEnergies,true); }

◆ getEtaInSamples()

void CaloCluster::getEtaInSamples ( std::vector< double > & theEtas) const
inline

Retrieve \( \eta \) for all samplings into a vector.

Parameters
theEtasreference to a modifiable vector
Warning
The vector referenced on input will be completely overwritten and resized.

Definition at line 999 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1000{ this->getVariable(CaloVariableType::ETA,theEtas,true); }

◆ getIndex() [1/2]

bool CaloClusterNavigable::getIndex ( const CaloCell * pCell,
size_t & iCell ) const
inlineinherited

get index of child in original container, given a pointer

Definition at line 360 of file CaloClusterNavigable.h.

361{
362 return (this->getCellLink())->getIndex(pCell,iCell);
363}

◆ getIndex() [2/2]

bool CaloClusterNavigable::getIndex ( object_iter cellIter,
size_t & iCell ) const
inlineinherited

get index of child in original container, given an iterator

Definition at line 366 of file CaloClusterNavigable.h.

367{
368 return (this->getCellLink())->getIndex(cellIter,iCell);
369}

◆ getMoment() [1/2]

CaloClusterMoment CaloCluster::getMoment ( const moment_iterator & momIter) const
inline

Get individual moment.

Definition at line 1236 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1237{ return rMomIter.getMoment(); }

◆ getMoment() [2/2]

CaloClusterMoment CaloCluster::getMoment ( const moment_type & momType,
bool useLink = true ) const
inline

Get individual moment.

Definition at line 1227 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1227 {
1228 CaloClusterMoment value(0.0);
1229 if (!this->retrieveMoment(momType,value,useLink))
1230 value = 0; // Make coverity happy.
1231 return value;
1232}
bool retrieveMoment(const moment_type &momType, moment_value &momValue, bool useLink=true) const
Retrieve individual moment.

◆ getMomentStore() [1/4]

const CaloClusterMomentStore * CaloCluster::getMomentStore ( bool useLink = false) const
protected

Definition at line 1160 of file CaloCluster.cxx.

1161{
1162 // follow link policy
1163 if ( !useLink ) return &m_momentStore;
1164
1165 // check on external link usage
1166 if ( ( m_dataLink.isValid() || m_ownDataStore ) && m_dataLink.isValid() )
1167 return &((*m_dataLink)->getMomentStore());
1168
1169 return (const CaloClusterMomentStore*)nullptr;
1170}

◆ getMomentStore() [2/4]

CaloClusterMomentStore * CaloCluster::getMomentStore ( bool useLink = true)
protected

Definition at line 1172 of file CaloCluster.cxx.

1173{
1174 // follow link policy: do not use link!
1175 if ( !useLink ) return &m_momentStore;
1176
1177 // follow link policy: use link!
1178 if ( m_ownDataStore && m_dataLink.isValid() == 0 )
1179 {
1180 m_shower = new CaloShower();
1181 m_dataLink.setElement(m_shower);
1182 return this->getMomentStore(useLink);
1183 }
1184
1185 if ( m_shower || m_ownDataStore )
1186 {
1187 return &(m_shower->getMomentStore());
1188 }
1189 return (CaloClusterMomentStore*)nullptr;
1190}
CaloClusterMomentStore * getMomentStore(bool useLink=true)

◆ getMomentStore() [3/4]

const CaloClusterMomentStore * CaloCluster::getMomentStore ( const moment_type & theMoment,
bool useLink = false ) const
protected

Definition at line 1202 of file CaloCluster.cxx.

1203{
1204 // local store
1205 if ( m_momentStore.contains(momType) ) return &m_momentStore;
1206
1207 // external store
1208 const CaloClusterMomentStore* pMomStore = this->getMomentStore(useLink);
1209
1210 //
1211 return pMomStore != nullptr && pMomStore->contains(momType)
1212 ? pMomStore : (const CaloClusterMomentStore*) nullptr;
1213}
virtual bool contains(const moment_type &rMomType) const
Containment check.

◆ getMomentStore() [4/4]

CaloClusterMomentStore * CaloCluster::getMomentStore ( const moment_type & theMoment,
bool useLink = true )
protected

Definition at line 1192 of file CaloCluster.cxx.

1194{
1195 // this is the "write" implementation!
1196 return m_momentStore.contains(momType)
1197 ? &m_momentStore // moment already in local store
1198 : this->getMomentStore(useLink); // retrieve local or external
1199}

◆ getMomentStoreLink()

data_link_type CaloCluster::getMomentStoreLink ( ) const
inline

Definition at line 725 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

726 { return m_dataLink; }

◆ getMomentStorePtrs()

bool CaloCluster::getMomentStorePtrs ( const CaloClusterMomentStore *& pFirstStore,
const CaloClusterMomentStore *& pSecndStore,
bool useLink ) const
protected

Definition at line 1216 of file CaloCluster.cxx.

1222{
1223 // first store is assumed local by default
1224 pFirstMomStore = this->getMomentStore();
1225 // second store is assumed NOT to exist by default
1226 pSecndMomStore = nullptr;
1227 // local first store does not exist or is empty...
1228 if ( pFirstMomStore == nullptr || pFirstMomStore->size() == 0 )
1229 {
1230 // ...try to make external store the first one!
1231 pFirstMomStore = this->getMomentStore(useLink);
1232 }
1233 // local first store exists...
1234 else
1235 {
1236 // ...check if second store available!
1237 pSecndMomStore = useLink ? this->getMomentStore(useLink) : nullptr;
1238 }
1239 return pFirstMomStore != nullptr;
1240}

◆ getMomentType()

CaloClusterMoment::MomentType CaloCluster::getMomentType ( const moment_iterator & momIter) const
inline

Get moment type.

Definition at line 1254 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1255{ return rMomIter.getMomentType(); }

◆ getMomentValue() [1/2]

double CaloCluster::getMomentValue ( const moment_iterator & momIter) const
inline

Definition at line 1250 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1251{ return (momIter.getMoment()).getValue(); }

◆ getMomentValue() [2/2]

double CaloCluster::getMomentValue ( const moment_type & momType,
bool useLink = true ) const
inline

Get moment value.

Definition at line 1240 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1240 {
1241 double value(0.0);
1242 if (!this->retrieveMoment(momType,value,useLink))
1243 value = 0; // Make coverity happy.
1244 return value;
1245}

◆ getNumberOfCells()

unsigned int CaloCompositeCellBase< CaloClusterNavigable >::getNumberOfCells ( ) const
inherited

Return the number of cells in the store.

◆ getParameter() [1/3]

double CaloClusterNavigable::getParameter ( const CaloCell * pCell) const
inlineinherited

public container access: relational parameter retrieval

Definition at line 327 of file CaloClusterNavigable.h.

328{
329 return (this->getCellLink())->getParameter(pCell);
330}

◆ getParameter() [2/3]

double CaloClusterNavigable::getParameter ( const CaloCellContainer * pContainer,
size_t & iCell ) const
inlineinherited

public container access: relational parameter retrieval

Definition at line 333 of file CaloClusterNavigable.h.

335{
336 return (this->getCellLink())->getParameter(pContainer,iCell);
337}

◆ getParameter() [3/3]

double CaloClusterNavigable::getParameter ( object_iter & cellIter) const
inlineinherited

public container access: relational parameter retrieval

Definition at line 340 of file CaloClusterNavigable.h.

341{
342 return (this->getCellLink())->getParameter(cellIter);
343}

◆ getPhiInSamples()

void CaloCluster::getPhiInSamples ( std::vector< double > & thePhis) const
inline

Retrieve \( \varphi \) for all samplings into a vector.

Parameters
thePhisreference to a modifiable vector
Warning
The vector referenced on input will be completely overwritten and resized.

Definition at line 1015 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1016{ this->getVariable(CaloVariableType::PHI,thePhis,true); }

◆ getRawE()

double CaloCluster::getRawE ( ) const
private

Access to raw energy.

Definition at line 1315 of file CaloCluster.cxx.

1315{ return m_rawE; }

◆ getRawEta()

double CaloCluster::getRawEta ( ) const
private

Access to raw eta.

Definition at line 1316 of file CaloCluster.cxx.

1316{ return m_rawEta; }

◆ getRawM()

double CaloCluster::getRawM ( ) const
private

Access to raw mass.

Definition at line 1318 of file CaloCluster.cxx.

1318{ return m_rawM; }

◆ getRawPhi()

double CaloCluster::getRawPhi ( ) const
private

Access to raw phi.

Definition at line 1317 of file CaloCluster.cxx.

1317{ return m_rawPhi; }

◆ getRecoStatus()

const CaloRecoStatus & CaloCompositeKineBase::getRecoStatus ( ) const
inlineinherited

Retrieve the reconstruction status.

Definition at line 78 of file CaloCompositeKineBase.h.

79{ return m_status; }

◆ getReserveBits()

AthenaBarCode_t AthenaBarCodeImpl::getReserveBits ( ) const
inherited

Definition at line 216 of file AthenaBarCodeImpl.cxx.

216 {
218 initABC();
220}
static const unsigned short ReserveBits
AthenaBarCode_t getBits(unsigned short startbit, unsigned short nbits) const
static const unsigned short SReserveBits

◆ getTime()

double CaloCluster::getTime ( ) const
inline

Access cluster time.

Definition at line 886 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

886{ return m_time; }

◆ getUUIDHash()

AthenaBarCode_t AthenaBarCodeImpl::getUUIDHash ( ) const
privateinherited

Definition at line 244 of file AthenaBarCodeImpl.cxx.

244 {
245 return getBits(SUUIDBits, UUIDBits);
246}
static const unsigned short SUUIDBits

◆ getVariable() [1/2]

double CaloCluster::getVariable ( const variable_type & varType,
const sampling_type & samType,
bool useLink = true ) const

General sampling variable access.

Parameters
varTypevariable type indicator
samTypesampling type indicator
useLinkextends checks to external data store only if true

This method first checks if the requested data is in the CaloCluster cache. If not, it tries to retrieve the data from the linked data store if the traceLink flag is set to true. This allows full control of the data source by the client.

Definition at line 837 of file CaloCluster.cxx.

840{
841 const CaloSamplingData* pDataStore = this->getDataStore(varType,useLink);
842 return pDataStore != nullptr
843 ? pDataStore->retrieveData(varType,samType)
844 : double(0);
845}
CaloSamplingData * getDataStore(const variable_type &theVariable, bool useLink=true)
value_type retrieveData(variable_key_type theVariable, sampling_key_type theSampling) const
Retrieve const reference to individual variable.

◆ getVariable() [2/2]

bool CaloCluster::getVariable ( const variable_type & varType,
std::vector< double > & varList,
bool useLink = true ) const

General access to variables of a given type in all samplings.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
varTypevariable type
varListreference to modifiable list of variable values
useLinkextends checks to external data store if true

Definition at line 857 of file CaloCluster.cxx.

860{
861 const CaloSamplingData* pDataStore = this->getDataStore(varType,useLink);
862 return pDataStore != nullptr ? pDataStore->retrieveData(varType,varList) : false;
863}

◆ getVersion()

AthenaBarCodeVersion_t AthenaBarCodeBase::getVersion ( ) const
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 47 of file AthenaBarCodeBase.cxx.

48{
50}
AthenaBarCodeVersion_t getVersion() const

◆ hashUUID()

AthenaBarCode_t AthenaBarCodeImpl::hashUUID ( const char * guid)
staticprivateinherited

Definition at line 190 of file AthenaBarCodeImpl.cxx.

190 {
191 const int maxdigs = 16;
192 AthenaBarCode_t tmp1 = static_cast<AthenaBarCode_t> (2166136261UL);
193
194 for (int i = 0; i < maxdigs; i++) {
195 tmp1 ^= (AthenaBarCode_t)(guid[i]);
196 tmp1 *= 16777619UL;
197 }
198
199 return (tmp1 << (TotalBits - UUIDBits)) >> (TotalBits - UUIDBits);
200}

◆ hasSameAthenaBarCode()

bool AthenaBarCodeBase::hasSameAthenaBarCode ( const IAthenaBarCode & obj) const
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 34 of file AthenaBarCodeBase.cxx.

35{
37}
bool hasSameAthenaBarCode(const IAthenaBarCode &obj) const

◆ hasSameAthenaBarCodeExceptVersion()

bool AthenaBarCodeBase::hasSameAthenaBarCodeExceptVersion ( const IAthenaBarCode & obj) const
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 41 of file AthenaBarCodeBase.cxx.

42{
44}
bool hasSameAthenaBarCodeExceptVersion(const IAthenaBarCode &obj) const

◆ hasSampling()

bool CaloCluster::hasSampling ( const sampling_type & theSampling) const
inline

Checks if certain sampling contributes to cluster.

Definition at line 954 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

955{
956 unsigned int bitPattern = CaloSamplingHelper::getSamplingBit(theSampling);
957 return (m_samplingPattern & bitPattern) == bitPattern;
958}

◆ hasSignalState()

bool CaloCluster::hasSignalState ( signalstate_t s) const
virtual

check if signal state exists for current implementation

Implements ISignalState.

Definition at line 1358 of file CaloCluster.cxx.

1359{
1360 return s == statename_t::CALIBRATED ||
1363}

◆ hasUUIDHash()

AthenaBarCode_t AthenaBarCodeImpl::hasUUIDHash ( ) const
privateinherited

Definition at line 239 of file AthenaBarCodeImpl.cxx.

239 {
240 return getUUIDHash();
241}

◆ hlv() [1/2]

virtual CLHEP::HepLorentzVector CaloCluster::hlv ( ) const
inlinevirtual

redefine hlv() here to avoid ambiguities

Reimplemented from P4EEtaPhiMBase.

Definition at line 270 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

virtual CLHEP::HepLorentzVector hlv() const =0
CLHEP HepLorentzVector.

◆ hlv() [2/2]

CLHEP::HepLorentzVector CaloCluster::hlv ( CaloCluster::signalstate_t s) const
virtual

retrieve the 4-momentum at a given signal state

Implements ISignalState.

Definition at line 1485 of file CaloCluster.cxx.

1485 {
1486 if(hasSignalState(s)){
1487 switch (s) {
1489 P4EEtaPhiM tmp = *this;
1490 return tmp.hlv();
1491 }
1494 return tmp.hlv();
1495 }
1498 return tmp.hlv();
1499 }
1500 default:
1501 break;
1502 }
1503 }
1504 return this->hlv();
1505}
virtual CLHEP::HepLorentzVector hlv() const
redefine hlv() here to avoid ambiguities
P4EEtaPhiM(const double e, const double eta, const double phi, const double m)
constructor with all data members
Definition P4EEtaPhiM.cxx:7

◆ inBarrel()

bool CaloCluster::inBarrel ( ) const
inline

Returns true if at least one clustered cell in EMB.

Returns true if cluster has more than one cell with positive signal in barrel calorimeter.

Definition at line 926 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

926{ return m_barrel; }

◆ inEndcap()

bool CaloCluster::inEndcap ( ) const
inline

Returns true if at least one clustered cell in EMEC.

Returns true if cluster has more than one cell with positive signal in endcap calorimeter.

Definition at line 931 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

931{ return m_endcap; }

◆ initABC()

void AthenaBarCodeImpl::initABC ( ) const
protectedinherited

Definition at line 24 of file AthenaBarCodeImpl.cxx.

24 {
25
26 //This function will be call the first time any "access" function is called
27 //using const type because those "access" functions might be const
28 //Will only change mutable variables
29
30 // std::cout<<"Calling AthenaBarCodeImpl::AthenaBarCodeImpl() "<<std::endl;
31
32 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
33 //Set counter part
34 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
35
37
39
40 try {
41 setBits(SCounterBits, CounterBits, counter & ((1u<<CounterBits)-1),
42 barcode);
43 }
44 catch (const GaudiException& Exception) {
45 throw std::runtime_error(
46 "AthenaBarCodeImpl::Can not Set Counter Bit, Counter Overflow");
47 }
48
49 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
50 //Set reserve part
51 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
52 try {
53 setBits(SReserveBits, ReserveBits, 0, barcode);
54 }
55 catch (const GaudiException& Exception) {
56 throw std::runtime_error(
57 "AthenaBarCodeImpl::Can not initialize Reserve Bit");
58 }
59
60 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
61 //Set Version part
62 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
63 try {
64 setBits(SVersionBits, VersionBits, 0, barcode);
65 }
66 catch (const GaudiException& Exception) {
67 throw std::runtime_error(
68 "AthenaBarCodeImpl::Can not initialize Version Bit");
69 }
70
71
72 try {
74 }
75 catch (const GaudiException& Exception) {
76 throw std::runtime_error("AthenaBarCodeImpl::Can not set UUID Hash Bits");
77 }
78
80
81 /* std::cout << "[AthenaBarCodeImpl::m_barcode,m_defaultHash,m_barcodeCounter]= "
82 << std::hex
83 << (m_barcode)<< "\t"
84 << m_defaultHash<< "\t"
85 << (m_barcodeCounter)<<"\t"
86 << std::dec
87 << std::endl;
88 */
89}
void setBits(unsigned short startbit, unsigned short nbits, AthenaBarCode_t id, AthenaBarCode_t &bc) const
static const unsigned short CounterBits
static const unsigned short SCounterBits
static const unsigned short SVersionBits
static const unsigned short VersionBits
static std::atomic< AthenaBarCode_t > m_barcodeCounter
int barcode(const T *p)
Definition Barcode.h:16

◆ insertElement() [1/4]

void CaloClusterNavigable::insertElement ( const CaloCellContainer * pContainer,
const CaloCell * pCell,
const double & weight = double(1.) )
inlineinherited

insert element without checking if already in store: use element pointer

Definition at line 217 of file CaloClusterNavigable.h.

220{
221 (this->getCellLink())->insertElement(pContainer,pCell,weight);
222}
void insertElement(const CaloCellContainer *pContainer, const CaloCell *pCell, const double &weight=double(1.))
insert element without checking if already in store: use element pointer

◆ insertElement() [2/4]

void CaloClusterNavigable::insertElement ( const CaloCellContainer * pContainer,
size_t & iCell,
const double & weight = double(1.) )
inlineinherited

insert element without checking if already in store: use index

Definition at line 225 of file CaloClusterNavigable.h.

228{
229 (this->getCellLink())->insertElement(pContainer,iCell,weight);
230}

◆ insertElement() [3/4]

void CaloClusterNavigable::insertElement ( const CaloCellContainer * pContainer,
size_t iCell,
const double weight,
size_t size_hint )
inlineinherited

same, with a size hint.

Definition at line 233 of file CaloClusterNavigable.h.

237{
238 (this->getCellLink())->insertElement(pContainer,iCell,weight,size_hint);
239}

◆ insertElement() [4/4]

void CaloClusterNavigable::insertElement ( const ElementLink< CaloCellContainer > & el,
const double weight,
size_t size_hint = 0 )
inlineinherited

Insert element via ElementLink.

Definition at line 243 of file CaloClusterNavigable.h.

246{
247 (this->getCellLink())->insertElement(el,weight,size_hint);
248}

◆ insertMoment()

void CaloCluster::insertMoment ( const moment_type & momType,
const moment_value & momData,
bool useLink = true )

Set individual moment.

Parameters
momTypereference to (non-modifiable) moment type indicator
momDatareference to (non-modifiable) moment value object
useLinknot used.

Definition at line 1247 of file CaloCluster.cxx.

1250{
1251 // use momType for getMomentStore to override useLink in case
1252 // the moment has already been stored and should just be updated ...
1253 CaloClusterMomentStore* pMomStore = this->getMomentStore(momType,useLink);
1254 if ( pMomStore != nullptr ) pMomStore->insert(momType,momData);
1255}
virtual void insert(const moment_type &rMomType, const moment_value &rMomData)
Insert key/data pair.

◆ iPt()

double P4EEtaPhiMBase::iPt ( ) const
virtualinherited

inverse of transverse momentum

Implements I4Momentum.

Definition at line 111 of file P4EEtaPhiMBase.cxx.

112 { return 1./this->pt();
113 }
virtual double pt() const
transverse momentum

◆ is_valid_sampling()

bool CaloCluster::is_valid_sampling ( const sampling_type & sampling) const
inline

Checks if cells from a given sampling in EMB or EMEC (!) are in cluster.

Parameters
samplingcalorimeter sampling indicator
Note
The original implementation only check on cells in the electromagnetic calorimeters. This method is depreciated, use isEMSampling(sampling) instead.

Definition at line 948 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

949{ return this->isEMSampling(sampling); }

◆ isAtSignalState()

bool CaloCluster::isAtSignalState ( signalstate_t s) const
virtual

check if we are at the passed state

Implements ISignalState.

Definition at line 1365 of file CaloCluster.cxx.

1366{
1367 return s == m_signalState;
1368}
signalstate_t m_signalState
Stores actual signal state.

◆ isCellLinkValid()

bool CaloClusterNavigable::isCellLinkValid ( ) const
inlinevirtualinherited

Definition at line 449 of file CaloClusterNavigable.h.

450{
451 return this->getCellLinkPtr() !=0;
452}
CaloCellLink * getCellLinkPtr()

◆ isEMSampling()

bool CaloCluster::isEMSampling ( const sampling_type & theSampling) const
inline

Checks if cells from a given sampling in EMB and EMEC are in the cluster.

Definition at line 951 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

952{ return CaloSamplingHelper::isEMSampling(theSampling); }
static bool isEMSampling(const CaloSample &rSample)
Get sampling characteristics.

◆ isLocked() [1/2]

bool CaloCluster::isLocked ( const unsigned int & bitPattern) const
inline

Definition at line 1283 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1284{
1285 return ( m_lockPattern & bitPattern ) == bitPattern;
1286}

◆ isLocked() [2/2]

bool CaloCluster::isLocked ( const variable_type & varType) const
inline

Check lock status of variable.

Definition at line 1278 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1279{
1280 unsigned int bitPattern(CaloVariableType::getVariableBit(varType));
1281 return this->isLocked(bitPattern);
1282}
bool isLocked(const variable_type &varType) const
Check lock status of variable.
static unsigned int getVariableBit(const VariableType &varType)

◆ kind()

I4Momentum::Kind P4EEtaPhiMBase::kind ( ) const
inlinevirtualinherited

tells what kind of P4XYZT this is

Implements I4Momentum.

Definition at line 65 of file P4EEtaPhiMBase.h.

65{ return I4Momentum::P4EETAPHIM; };

◆ lockVariable()

bool CaloCluster::lockVariable ( const variable_type & varType)

Lock variable (protect against future updates)

Definition at line 1293 of file CaloCluster.cxx.

1294{
1295 unsigned int bitPattern(CaloVariableType::getVariableBit(varType));
1296 m_lockPattern = ( m_lockPattern | bitPattern );
1297 return this->isLocked(bitPattern);
1298}

◆ m() [1/2]

double CaloCluster::m ( void ) const
inlinevirtual

Retrieve mass independent of signal state.

Reimplemented from P4EEtaPhiM.

Definition at line 764 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

765{ return (this->*m_getM)(); }
GET_VALUE m_getM
Pointer to getter functions.

◆ m() [2/2]

double CaloCluster::m ( signalstate_t s) const
inline

Retrieve mass for a specific signal state.

Definition at line 825 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

826{
827 if (!hasSignalState(s)) return m_errorValue;
828 switch (s) {
830 return P4EEtaPhiM::m();
832 return m_rawM;
834 return m_altM;
835 default:
836 return m_errorValue;
837 }
838}

◆ m2()

double P4EEtaPhiMBase::m2 ( ) const
virtualinherited

mass squared

Implements I4Momentum.

Definition at line 14 of file P4EEtaPhiMBase.cxx.

14 {
15 const double theM = this->m();
16 return theM*theM;
17}

◆ makeDefaultHash()

AthenaBarCode_t AthenaBarCodeImpl::makeDefaultHash ( const char * jobid)
staticprivateinherited

Definition at line 312 of file AthenaBarCodeImpl.cxx.

313{
314 if (jobid) {
315 return AthenaBarCodeImpl::hashUUID(jobid);
316 }
317
318 // First look for a uuid as an environment variable.
319 // This can be set in cases where we don't have the full
320 // Gaudi/Athena environment available (eg, ARA), and we
321 // don't want to try to create JobIDSvc. This has to be
322 // communicated in some way external to this library,
323 // as we may end up here while initializing the dictionary
324 // for this library.
325 const char* env_uuid = getenv ("_ATHENABARCODEIMPL_JOBUUID");
326 if (env_uuid) {
327 return AthenaBarCodeImpl::hashUUID(env_uuid);
328 }
329
330 // std::cout<<"no UUID stored, generating."<<std::endl;
331
332 ServiceHandle<IJobIDSvc> p_jobidsvc("JobIDSvc", "JobIDSvc");
333 StatusCode sc = p_jobidsvc.retrieve();
334 if (!sc.isSuccess() || 0 == p_jobidsvc) {
335 //FIXME
336 //use uuid instead if service not available
337 JobID_t JobID;
338 uuid_generate(JobID);
339 return AthenaBarCodeImpl::hashUUID((const char *) JobID);
340 /* std::cout << "Could not find JobIDSvc, using uuid directly"
341 <<"jobid "<<o.str()
342 << std::endl;*/
343 }
344
345 PJobID_t pjobid = p_jobidsvc->getJobID();
346 return AthenaBarCodeImpl::hashUUID((const char *) pjobid);
347}
uuid_t JobID_t
Definition IJobIDSvc.h:20
const unsigned char * PJobID_t
Definition IJobIDSvc.h:21
static Double_t sc
static AthenaBarCode_t hashUUID(const char *)
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string getenv(const std::string &variableName)
get an environment variable

◆ maybeSetVariable()

template<class InputIterator>
void CaloCluster::maybeSetVariable ( variable_type varType,
InputIterator beg,
InputIterator end )
private

Set variables of a given type in all samplings at once, taking locking into account.

Definition at line 1317 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1320{
1321 if (this->isLocked (varType)) return;
1322 CaloSamplingData* p = this->getDataStore (varType, true);
1323 if (p)
1324 p->storeData (varType, beg, end);
1325}
virtual object_iter end() const
end iterator for public object access
virtual double p() const =0
momentum magnitude

◆ nCells()

unsigned int CaloClusterNavigable::nCells ( ) const
inlinevirtualinherited

size of object access

Definition at line 315 of file CaloClusterNavigable.h.

316{
317
318 const CaloCellLink* link = this->getCellLinkPtr();
319 if (link)
320 return link->size();
321 else
322 return 0;
323
324}
virtual unsigned int size() const

◆ newVersion()

void AthenaBarCodeBase::newVersion ( )
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 53 of file AthenaBarCodeBase.cxx.

◆ nSamples()

unsigned int CaloCluster::nSamples ( ) const
inline

Retrieve number of samplings in this cluster.

Returns the maximum possible number of samplings, not the actual number contributing to the cluster!

Definition at line 968 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.

◆ operator=()

CaloCluster & CaloCluster::operator= ( const CaloCluster & )
private

Disallow (avoid coverity warning).

◆ p()

double P4EEtaPhiMBase::p ( ) const
virtualinherited

magnitude of 3-momentum.

Special implementation from Frank Paige : if negative energy p is negative but eta and phi still the same.

Implements I4Momentum.

Definition at line 21 of file P4EEtaPhiMBase.cxx.

22{
23 const double theM=this->m();
24 const double theE=this->e();
25 // if (theM==0.) return theE ;
26 // else return sqrt(theE*theE-theM*theM);
27 //DR from Frank Paige
28 // if negative energy point in the opposite direction
29 // BUT eta and phi still the same !!!
30 if (theM==0.) {
31 return theE;
32 } else {
33 double eSign = (theE >= 0) ? +1 : -1;
34 return eSign*std::sqrt(theE*theE-theM*theM);
35 }
36
37}

◆ p2()

double P4EEtaPhiMBase::p2 ( ) const
virtualinherited

square of momentum magnitude

This p2() implementaion is derived from the (somewhat unusual) Frank Paige implementation used to calculate p() above. What we do is look at what would happen if we were to square the answer returned by Frank's algorithm:

(1) The "eSign" would square to +1 and disappear, (2) The sqrt would disappear leaving theE*theE-theM*theM (3) In the event that theM==0, this theE*theE would indeed still equal theE*theE-theM*theM, so we simply return this quantity.

Implements I4Momentum.

Definition at line 39 of file P4EEtaPhiMBase.cxx.

40{
48 const double theM=this->m();
49 const double theE=this->e();
50
51 return theE*theE-theM*theM;
52}

◆ phi() [1/2]

double CaloCluster::phi ( void ) const
inlinevirtual

Retrieve phi independent of signal state.

Reimplemented from P4EEtaPhiM.

Definition at line 759 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

760{
761 return (this->*m_getPhi)();
762}
GET_VALUE m_getPhi
Pointer to getter functions.

◆ phi() [2/2]

double CaloCluster::phi ( signalstate_t s) const
inline

Retrieve phi for a specific signal state.

Definition at line 809 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

810{
811 if (!hasSignalState(s)) return m_errorValue;
812 switch (s) {
814 return P4EEtaPhiM::phi();
816 return m_rawPhi;
818 return m_altPhi;
819 default:
820 return m_errorValue;
821 }
822}

◆ phi0()

double CaloCluster::phi0 ( ) const
inline

Returns raw \( \phi \) of cluster seed.

Returns seed \( \varphi \) for cluster.

Definition at line 1186 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1186{ return m_phi0; }

◆ phiBE()

double CaloCluster::phiBE ( int sam) const
inline

EMB/EMEC combined barycenter \( \varphi \).

Parameters
samsampling counter
Warning
The sampling input argument refers to the sampling number (first, second, third,...) in the EMB and EMEC. It is not identical to the corresponding CaloSampling::CaloSample indicators in these calorimeters.

Definition at line 1209 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1210{ return this->variableBE(CaloVariableType::PHI,sam); }

◆ phimax()

double CaloCluster::phimax ( sampling_type sampling) const
inline

Retrieve \( \varphi \) of cell with maximum energy in given sampling.

Parameters
samplingsampling indicator

Returns \( \varphi \) of cell with maximum signal in sampling.

Warning
Depreciated. This method should not be used anymore. Use getVariable(CaloVariableType::MAX_PHI,...) instead.

Definition at line 1128 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1129{
1130 return this->isEMSampling(sampling)
1131 ? this->getVariable(CaloVariableType::MAX_PHI,sampling,true)
1132 : double(0);
1133}

◆ phiSample()

double CaloCluster::phiSample ( sampling_type theSampling) const
inline

Retrieve barycenter \( \varphi \) in a given sample.

Parameters
theSamplingsampling indicator

Returns \( \varphi \) in sampling.

Definition at line 1006 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1007{ return this->getVariable(CaloVariableType::PHI,theSampling,true); }

◆ phisize()

double CaloCluster::phisize ( sampling_type sampling) const
inline

Returns cluster size in \( \varphi \) for a given sampling.

Parameters
samplingsampling indicator

Returns phi size \( \Delta\varphi \) of cluster in sampling.

Warning
Depreciated. This method should not be used anymore. Use getVariable(CaloVariableType::DELTA_PHI,...) instead.

Definition at line 1165 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1166{
1167 return this->isEMSampling(sampling)
1168 ? this->getVariable(CaloVariableType::DELTA_PHI,sampling,true)
1169 : double(0);
1170}

◆ pt()

double P4EEtaPhiMBase::pt ( ) const
virtualinherited

transverse momentum

Implements I4Momentum.

Definition at line 101 of file P4EEtaPhiMBase.cxx.

102 {
103 return this->p()*this->sinTh();
104 }
virtual double p() const
magnitude of 3-momentum.

◆ putElement() [1/2]

void CaloClusterNavigable::putElement ( const CaloCellContainer * pContainer,
const CaloCell * pCell,
const double & weight = double(1.) )
inlineinherited

add element to the Navigable: use pointer

Definition at line 201 of file CaloClusterNavigable.h.

204{
205 (this->getCellLink())->putElement(pContainer,pCell,weight);
206}
void putElement(const CaloCellContainer *pContainer, const CaloCell *pCell, const double &weight=double(1.))
add element to the Navigable: use pointer

◆ putElement() [2/2]

void CaloClusterNavigable::putElement ( const CaloCellContainer * pContainer,
size_t & iCell,
const double & weight = double(1.) )
inlineinherited

add element to the Navigable: use element index (direct access!)

Definition at line 209 of file CaloClusterNavigable.h.

212{
213 (this->getCellLink())->putElement(pContainer,iCell,weight);
214}

◆ px()

double P4EEtaPhiMBase::px ( ) const
virtualinherited

x component of momentum

Implements I4Momentum.

Definition at line 122 of file P4EEtaPhiMBase.cxx.

123 { return this->pt()*this->cosPhi();
124 }
virtual double cosPhi() const
cosinus phi

◆ py()

double P4EEtaPhiMBase::py ( ) const
virtualinherited

y component of momentum

Implements I4Momentum.

Definition at line 126 of file P4EEtaPhiMBase.cxx.

127 { return this->pt()*this->sinPhi();
128 }
virtual double sinPhi() const
sinus phi

◆ pz()

double P4EEtaPhiMBase::pz ( ) const
virtualinherited

z component of momentum

Implements I4Momentum.

Definition at line 130 of file P4EEtaPhiMBase.cxx.

131 { return this->p()*this->cosTh();
132 }
virtual double cosTh() const
cosinus theta

◆ rapidity()

double P4EEtaPhiMBase::rapidity ( ) const
virtualinherited

rapidity

Implements I4Momentum.

Definition at line 115 of file P4EEtaPhiMBase.cxx.

116 {
117 const double theE=this->e();
118 const double thePz=this->pz();
119 return 0.5*std::log((theE+thePz)/(theE-thePz));
120 }
virtual double pz() const
z component of momentum

◆ remove() [1/2]

bool CaloClusterNavigable::remove ( const CaloCell * pCell)
inlineinherited

remove object from the Navigable

Definition at line 271 of file CaloClusterNavigable.h.

272{
273 return (this->getCellLink())->remove(pCell);
274}

◆ remove() [2/2]

bool CaloClusterNavigable::remove ( const CaloCellContainer * pContainer,
size_t & iCell )
inlineinherited

remove object from the Navigable

Definition at line 277 of file CaloClusterNavigable.h.

279{
280 return (this->getCellLink())->remove(pContainer,iCell);
281}

◆ removeAll()

bool CaloClusterNavigable::removeAll ( )
inlineinherited

remove all objects from the Navigable

Definition at line 284 of file CaloClusterNavigable.h.

285{
286 return (this->getCellLink())->removeAll();
287}

◆ removeCell()

void CaloCompositeCellBase< CaloClusterNavigable >::removeCell ( const CaloCell * pCell)
inherited

Remove a cell with kinematic update.

Parameters
pCellpointer to a CaloCell object (unchanged)

Removes the cell pointed to by the input argument. The effect on the global kinematics is defined by the updateKine implementation in the derived classes.

The Navigable<CaloCellContainer,double> base class provides a remove method which can be used if no kinematic update is required.

◆ removeCells()

void CaloCompositeCellBase< CaloClusterNavigable >::removeCells ( )
inherited

Remove all cells without kinematic update.

◆ removeRecoStatus() [1/2]

void CaloCompositeKineBase::removeRecoStatus ( )
inlineinherited

Remove all indicators.

Definition at line 101 of file CaloCompositeKineBase.h.

102{ m_status.resetStatus(); }

◆ removeRecoStatus() [2/2]

void CaloCompositeKineBase::removeRecoStatus ( const CaloRecoStatus::StatusIndicator & recIndic)
inlineinherited

Remove a given indicator.

Definition at line 96 of file CaloCompositeKineBase.h.

98{ m_status.resetStatus(recIndic); }

◆ resetBadChannel()

void CaloCluster::resetBadChannel ( )

Reset Bad channel list.

Definition at line 1429 of file CaloCluster.cxx.

1430{
1431 m_badChannelData.clear();
1432}

◆ resetCellLink()

void CaloClusterNavigable::resetCellLink ( const cell_link_type & cellLink)
inlineinherited

Definition at line 151 of file CaloClusterNavigable.h.

152 {
154 }
const cell_link_type & cellLink() const
Access to underlying link.

◆ resetSignalState()

void CaloCluster::resetSignalState ( )
protectedvirtual

reset the signal state

Implements ISignalState.

Definition at line 1370 of file CaloCluster.cxx.

1371{
1373}

◆ retrieveMoment() [1/2]

bool CaloCluster::retrieveMoment ( const moment_type & momType,
double & momData,
bool useLink = true ) const

Definition at line 1278 of file CaloCluster.cxx.

1281{
1282 CaloClusterMoment momData(0);
1283 if ( this->retrieveMoment(momType,momData,useLink) )
1284 {
1285 momValue = momData.getValue();
1286 return true;
1287 }
1288 return false;
1289}

◆ retrieveMoment() [2/2]

bool CaloCluster::retrieveMoment ( const moment_type & momType,
moment_value & momData,
bool useLink = true ) const

Retrieve individual moment.

Parameters
momTypereference to (non-modifiable) moment type indicator
momDatareference to (modifiable) moment value object
useLinkextends checks to external data store if true

Returns true if requested moment type in cluster.

Definition at line 1266 of file CaloCluster.cxx.

1269{
1270 const CaloClusterMomentStore* pMomStore = this->getMomentStore(momType,
1271 useLink);
1272 return pMomStore != nullptr
1273 ? pMomStore->retrieve(momType,momData)
1274 : false;
1275}
virtual bool retrieve(const moment_type &rMomType, moment_value &rMomData) const
Retrieve cluster moment for a given key.

◆ reweight() [1/3]

void CaloClusterNavigable::reweight ( const CaloCell * pCell,
const double & weight = double(1.) )
inlineinherited

re-weight (overwrite old weight)

Definition at line 251 of file CaloClusterNavigable.h.

252{
253 (this->getCellLink())->reweight(pCell,weight);
254}
void reweight(const CaloCell *pCell, const double &weight=double(1.))
re-weight (overwrite old weight)

◆ reweight() [2/3]

void CaloClusterNavigable::reweight ( const CaloCellContainer * pContainer,
size_t & iCell,
const double & weight = double(1.) )
inlineinherited

re-weight (overwrite old weight)

Definition at line 257 of file CaloClusterNavigable.h.

260{
261 (this->getCellLink())->reweight(pContainer,iCell,weight);
262}

◆ reweight() [3/3]

void CaloClusterNavigable::reweight ( object_iter & cellIter,
const double & weight = double(1.) )
inlineinherited

re-weight (overwrite old weight)

Definition at line 265 of file CaloClusterNavigable.h.

266{
267 (this->getCellLink())->reweight(cellIter,weight);
268}

◆ reweightCell()

void CaloCompositeCellBase< CaloClusterNavigable >::reweightCell ( const CaloCell * pCell,
double weight )
inherited

Reweight a cell with kinematic update.

Parameters
pCellinput pointer to a CaloCell object (unchanged)
weightinput new signal weight associated with this cell

Changes the kinematic weight of a cell in the cluster. No action if cell not in cluster. In particular, the cell is not added.

◆ samplingPattern()

unsigned int CaloCluster::samplingPattern ( ) const

Get sampling bitmask.

Definition at line 1507 of file CaloCluster.cxx.

1508{
1509 return m_samplingPattern;
1510}

◆ set4Mom() [1/3]

void CaloCluster::set4Mom ( const CLHEP::HepLorentzVector & rVec)
inlinevirtual

Set kinematics directly from HLV.

Reimplemented from P4EEtaPhiM.

Definition at line 852 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

853{
854 this->setE(rVec.e());
855 this->setEta(rVec.eta());
856 this->setPhi(rVec.phi());
857 this->setM(rVec.m());
858}
virtual void setM(double m)
Set mass.

◆ set4Mom() [2/3]

void CaloCluster::set4Mom ( const I4Momentum & rMom)
inlinevirtual

Set kinematics directly from four-vector.

Reimplemented from P4EEtaPhiM.

Definition at line 849 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

850{ this->set4Mom(&rMom); }
virtual void set4Mom(const I4Momentum *const pMom)
Set kinematics from four-vector.

◆ set4Mom() [3/3]

void CaloCluster::set4Mom ( const I4Momentum *const pMom)
inlinevirtual

Set kinematics from four-vector.

Reimplemented from P4EEtaPhiM.

Definition at line 841 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

842{
843 this->setE(pMom->e());
844 this->setEta(pMom->eta());
845 this->setPhi(pMom->phi());
846 this->setM(pMom->m());
847}

◆ setAltE()

void CaloCluster::setAltE ( double e)
private

Set calibrated (cell weight) energy.

Definition at line 1330 of file CaloCluster.cxx.

1330{ m_altE = e; }
virtual double e() const
Retrieve energy independent of signal state.

◆ setAltEta()

void CaloCluster::setAltEta ( double eta)
private

Set calibrated (cell weight) eta.

Definition at line 1331 of file CaloCluster.cxx.

1331{ m_altEta = eta; }
virtual double eta() const
Retrieve eta independent of signal state.

◆ setAltM()

void CaloCluster::setAltM ( double m)
private

Set calibrated (cell weight) m.

Definition at line 1333 of file CaloCluster.cxx.

1333{ m_altM = m; }
virtual double m() const
Retrieve mass independent of signal state.

◆ setAltPhi()

void CaloCluster::setAltPhi ( double phi)
private

Set calibrated (cell weight) phi.

Definition at line 1332 of file CaloCluster.cxx.

1332{ m_altPhi = phi; }

◆ setAthenaBarCode()

void AthenaBarCodeBase::setAthenaBarCode ( AthenaBarCode_t id)
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 28 of file AthenaBarCodeBase.cxx.

29{
31}
void setAthenaBarCode(AthenaBarCode_t id)

◆ setBarrel()

void CaloCluster::setBarrel ( bool barrel)
inline

Sets EMB indicator.

Parameters
barrelinput flag is true if at least one cell in EMB

Definition at line 935 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ setBasicEnergy()

void CaloCluster::setBasicEnergy ( double theEnergy)
inlinevirtual

Set basic energy scale signal.

Parameters
theEnergybasic energy signal

Overwrites default behaviour in CaloEnergyCluster base class

Implements CaloCompositeKineBase.

Definition at line 883 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ setBits()

void AthenaBarCodeImpl::setBits ( unsigned short startbit,
unsigned short nbits,
AthenaBarCode_t id,
AthenaBarCode_t & bc ) const
protectedinherited

now id=0000000xx;

Definition at line 260 of file AthenaBarCodeImpl.cxx.

263{
266 tmp2 = 0;
267
268 if ((id) >= ((~tmp2) >> (TotalBits - nbits))) {
269
270 IMessageSvc *msgsvc = Athena::getMessageSvc();
271 if (msgsvc) {
272 MsgStream msg(msgsvc, "AthenaBarCodeImpl");
273 msg << MSG::WARNING << "setBits::bit to be set:" << id
274 << " is larger than limit:" << ((~tmp2) >> (TotalBits - nbits))
275 << endmsg;
276 }
277 else {
278 std::cout << "setBits::bit to be set:" << id << " is larger than limit:"
279 << ((~tmp2) >> (TotalBits - nbits)) << std::endl;
280 }
281 throw std::runtime_error("AthenaBarCodeImpl::setBit Failed");
282 }
283
285 tmp = (id << (TotalBits - nbits - startbit)); //tmp=00000xx00
286 tmp2 = ((~tmp2) >> (TotalBits - nbits)); //tmp2=000000011
287
288 tmp2 = (tmp2 << (TotalBits - nbits - startbit)); //tmp2=000001100
289 tmp2 = (~tmp2); //tmp2=111110011
290
291 //now m_barcode=aaaaayyaa
292 bc &= tmp2; //m_barcode=aaaaa00aa
293 bc |= tmp; //m_barcode=aaaaaxxaa
294
295}
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)
MsgStream & msg
Definition testRead.cxx:32

◆ setCalE()

void CaloCluster::setCalE ( double e)
private

Set calibrated (LC) energy.

Definition at line 1340 of file CaloCluster.cxx.

1340{ P4EEtaPhiM::setE(e); }

◆ setCalEta()

void CaloCluster::setCalEta ( double eta)
private

Set calibrated (LC) eta.

Definition at line 1341 of file CaloCluster.cxx.

◆ setCalM()

void CaloCluster::setCalM ( double m)
private

Set calibrated (LC) m.

Definition at line 1343 of file CaloCluster.cxx.

1343{ P4EEtaPhiM::setM(m); }

◆ setCalPhi()

void CaloCluster::setCalPhi ( double phi)
private

Set calibrated (LC) phi.

Definition at line 1342 of file CaloCluster.cxx.

◆ setCellLink()

bool CaloClusterNavigable::setCellLink ( CaloCellLinkContainer * pLink)
inlineprotectedinherited

Definition at line 405 of file CaloClusterNavigable.h.

406{
407 if (!pLinkStore)
408 return false;
409
410 CaloCellLink* pLink = *m_cellLink != 0
411 ? const_cast<CaloCellLink*>(*m_cellLink) : (CaloCellLink*)0;
412
413 m_ownLinkStore = !pLinkStore->ownElements();
415 pLink,
416 m_cellLink);
417}
static bool setLink(CONT *pCont, DOBJ *pDat, ELEM &rElm)

◆ setClusterSize()

void CaloCluster::setClusterSize ( unsigned int theClusterSize)
inline

Set cluster size.

Definition at line 892 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

892{ m_clusterSize = theClusterSize; }

◆ setDataLink()

bool CaloCluster::setDataLink ( CaloShowerContainer * pDataLink)
inlineprotected

Set element link for shower data.

Definition at line 1262 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1263{
1264 if (!pDataLink)
1265 return false;
1266 CaloShower* pData = m_shower;
1267 m_ownDataStore = !pDataLink->ownElements();
1269 pData,
1270 m_dataLink);
1271}

◆ setDataStore()

bool CaloCluster::setDataStore ( CaloShower * pData,
bool ownStores = true )
inlineprotected

Setup data store.

Definition at line 909 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

910{
911 // m_dataStorePointer = pData;
912 m_ownDataStore = ownStores;
913 m_dataLink.setElement(pData);
914 m_shower = pData;
915 return m_dataLink.isValid();
916}

◆ setDefaultHash()

void AthenaBarCodeImpl::setDefaultHash ( const char * jobid)
staticinherited

Definition at line 298 of file AthenaBarCodeImpl.cxx.

298 {
299 getDefaultHash (jobid);
300}

◆ setDefaultSignalState()

bool CaloCluster::setDefaultSignalState ( signalstate_t s)
inlineprotected

Sets default signal state.

Definition at line 865 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

866{
868 return this->setSignalState(s);
869}

◆ setE()

void CaloCluster::setE ( double e)
inlinevirtual

Set energy.

Reimplemented from P4EEtaPhiM.

Definition at line 767 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

768{ (this->*m_setE)(e); }
SET_VALUE m_setE
Pointer to setter functions.

◆ setEInSamples()

void CaloCluster::setEInSamples ( const std::vector< double > & theEnergies)
inline

Set energy in all samplings from a vector.

Parameters
theEnergiesreference to a vector holding the energies in samplings (input unchanged)
Note
The CaloSampling::CaloSample indicator is interpreted as an (unsigned) int internally. The input vector should be set up such that the index to an energy value is understood to be the CaloSampling::CaloSample of the corresponding calorimeter sampling.

Definition at line 1041 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1042{ this->setVariable(CaloVariableType::ENERGY,theEnergies,true); }
bool setVariable(const variable_type &varType, const sampling_type &samType, const double &varData, bool useLink=false)
General sampling variable setter.

◆ setEndcap()

void CaloCluster::setEndcap ( bool endcap)
inline

Sets EMEC indicator.

Parameters
endcapinput flag is true if at least one cell in EMEC

Definition at line 939 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

939{ m_endcap = endcap; }

◆ setenergy()

void CaloCluster::setenergy ( sampling_type theSampling,
double theEnergy )
inline

Set energy for a given sampling.

Parameters
theSamplingsampling indicator
theEnergyenergy data

Depreciated. Sets the sampling energy without updating the global kinematics.

Definition at line 1029 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1030{ this->setVariable(CaloVariableType::ENERGY,theSampling,theEnergy,true); }

◆ setenergymax()

void CaloCluster::setenergymax ( sampling_type sampling,
double m )

Set the maximum energy in a given sampling.

Definition at line 908 of file CaloCluster.cxx.

909{
910 if ( this->isEMSampling(sampling) )
911 this->setVariable(CaloVariableType::MAX_ENERGY,sampling,m,true);
912}

◆ setEta()

void CaloCluster::setEta ( double eta)
inlinevirtual

Set eta.

Reimplemented from P4EEtaPhiM.

Definition at line 769 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

770{ (this->*m_setEta)(eta); }
SET_VALUE m_setEta
Pointer to setter functions.

◆ seteta()

void CaloCluster::seteta ( sampling_type sampling,
double eta )
inline

Set \( \eta \) in a given sampling.

Parameters
samplingcalorimeter sampling indicator
eta\( \eta \) value to be set

Definition at line 1048 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1049{ this->setVariable(CaloVariableType::ETA,sampling,eta,true); }

◆ setEtaInSamples()

void CaloCluster::setEtaInSamples ( const std::vector< double > & theEtas)
inline

Set \( \eta \) in all samplings from a vector.

Parameters
theEtasreference to a vector holding the \( \eta \) in samplings (input unchanged)
Note
The CaloSampling::CaloSample indicator is interpreted as an (unsigned) int internally. The input vector should be set up such that the index to a \( \eta \) value is understood to be the CaloSampling::CaloSample of the corresponding calorimeter sampling.

Definition at line 1061 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1062{ this->setVariable(CaloVariableType::ETA,theEtas,true); }

◆ setetamax()

void CaloCluster::setetamax ( sampling_type sampling,
double m )

Set the \( \eta \) of cell with maximum energy in a given sampling.

Definition at line 914 of file CaloCluster.cxx.

915{
916 if ( this->isEMSampling(sampling) )
917 this->setVariable(CaloVariableType::MAX_ETA,sampling,m,true);
918}

◆ setetasize()

void CaloCluster::setetasize ( sampling_type sampling,
double size )

Set the cluster size in \( \eta \) for a given sampling.

Parameters
samplingcalorimeter sampling indicator
sizeinput \( \Delta\eta \) cluster size

Definition at line 930 of file CaloCluster.cxx.

931{
932 if ( this->isEMSampling(sampling) )
933 this->setVariable(CaloVariableType::DELTA_ETA,sampling,size,true);
934}

◆ setLinkStore()

bool CaloClusterNavigable::setLinkStore ( CaloCellLink * pLink,
bool ownStores = true )
inlineprotectedinherited

Definition at line 191 of file CaloClusterNavigable.h.

193{
194 m_cellLink.setElement(pLink);
195 m_ownLinkStore = ownStores;
196 // m_cellLinkPointer = pLink;
197 return *m_cellLink != 0;
198}

◆ setM()

void CaloCluster::setM ( double m)
inlinevirtual

Set mass.

Reimplemented from P4EEtaPhiM.

Definition at line 773 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

774{ (this->*m_setM)(m); }
SET_VALUE m_setM
Pointer to setter functions.

◆ setPhi()

void CaloCluster::setPhi ( double phi)
inlinevirtual

Set phi.

Reimplemented from P4EEtaPhiM.

Definition at line 771 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

772{ (this->*m_setPhi)(phi); }
SET_VALUE m_setPhi
Pointer to setter functions.

◆ setphi()

void CaloCluster::setphi ( sampling_type sampling,
double phi )
inline

Set \( \varphi \) in a given sampling.

Parameters
samplingcalorimeter sampling indicator
phi\( \varphi \) value to be set

Definition at line 1068 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1069{ this->setVariable(CaloVariableType::PHI,sampling,phi,true); }

◆ setPhiInSamples()

void CaloCluster::setPhiInSamples ( const std::vector< double > & thePhis)
inline

Set \( \varphi \) in all samplings from a vector.

Parameters
thePhisreference to a vector holding the \( \eta \) in samplings (input unchanged)
Note
The CaloSampling::CaloSample indicator is interpreted as an (unsigned) int internally. The input vector should be set up such that the index to a \( \varphi \) value is understood to be the CaloSampling::CaloSample of the corresponding calorimeter sampling.

Definition at line 1081 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

1082{ this->setVariable(CaloVariableType::PHI,thePhis,true); }

◆ setphimax()

void CaloCluster::setphimax ( sampling_type sampling,
double m )

Set the \( \varphi \) of cell with maximum energy in a given sampling.

Definition at line 920 of file CaloCluster.cxx.

921{
922 if ( this->isEMSampling(sampling) )
923 this->setVariable(CaloVariableType::MAX_PHI,sampling,m,true);
924}

◆ setphisize()

void CaloCluster::setphisize ( sampling_type sampling,
double size )

Set the cluster size in \( \varphi \) for a given sampling.

Parameters
samplingcalorimeter sampling indicator
sizeinput \( \Delta\varphi \) cluster size

Definition at line 940 of file CaloCluster.cxx.

941{
942 if ( this->isEMSampling(sampling) )
943 this->setVariable(CaloVariableType::DELTA_PHI,sampling,size,true);
944}

◆ setRawE()

void CaloCluster::setRawE ( double e)
private

Set raw energy.

Definition at line 1320 of file CaloCluster.cxx.

1320{ m_rawE = e; }

◆ setRawEta()

void CaloCluster::setRawEta ( double eta)
private

Set raw eta.

Definition at line 1321 of file CaloCluster.cxx.

1321{ m_rawEta = eta; }

◆ setRawM()

void CaloCluster::setRawM ( double m)
private

Set raw m.

Definition at line 1323 of file CaloCluster.cxx.

1323{ m_rawM = m; }

◆ setRawPhi()

void CaloCluster::setRawPhi ( double phi)
private

Set raw phi.

Definition at line 1322 of file CaloCluster.cxx.

1322{ m_rawPhi = phi; }

◆ setRecoStatus() [1/2]

void CaloCompositeKineBase::setRecoStatus ( const CaloRecoStatus & recStatus)
inlineinherited

Set the reconstruction status.

Definition at line 82 of file CaloCompositeKineBase.h.

83{ m_status = theStatus; }

◆ setRecoStatus() [2/2]

void CaloCompositeKineBase::setRecoStatus ( const CaloRecoStatus::StatusIndicator & recIndic)
inlineinherited

Set the reconstruction status indicator (recommended)

Definition at line 86 of file CaloCompositeKineBase.h.

88{ m_status.setStatus(recIndic); }

◆ setReserveBits()

void AthenaBarCodeImpl::setReserveBits ( AthenaBarCode_t id)
inherited

Definition at line 223 of file AthenaBarCodeImpl.cxx.

223 {
225 initABC();
226
227 try {
230 m_barcode = bc;
231 }
232 catch (const GaudiException& Exception) {
233 throw std::runtime_error(
234 "AthenaBarCodeImpl::newVersion()::Version Overflow");
235 }
236}

◆ setSignalState()

bool CaloCluster::setSignalState ( signalstate_t s)
protectedvirtual

Sets signal state.

Implements ISignalState.

Definition at line 1345 of file CaloCluster.cxx.

1346{
1347 if ( !this->hasSignalState(s) ) return false;
1348
1349 m_signalState = s;
1350
1351 return
1353 s == statename_t::ALTCALIBRATED ? this->setStateAlt() :
1354 s == statename_t::UNCALIBRATED ? this->setStateRaw() :
1355 false;
1356}
bool setStateRaw()
Helper to switch to raw state.
bool setStateCal()
Helper to switch to calibrated (LC) state.
bool setStateAlt()
Helper to switch to calibrated (cell weight) state.

◆ setStateAlt()

bool CaloCluster::setStateAlt ( )
private

Helper to switch to calibrated (cell weight) state.

Definition at line 1392 of file CaloCluster.cxx.

1393{
1394 // std::cout << "CaloCluster [" << this
1395 // << "] setStateAlt()" << std::endl;
1400 //
1405 return true;
1406}
double getAltM() const
Access to calibrated (cell weight) m.
double getAltE() const
Access to calibrated (cell weight) energy.
void setAltE(double e)
Set calibrated (cell weight) energy.
double getAltPhi() const
Access to calibrated (cell weight) phi.
double getAltEta() const
Access to calibrated (cell weight) eta.
void setAltPhi(double phi)
Set calibrated (cell weight) phi.
void setAltM(double m)
Set calibrated (cell weight) m.
void setAltEta(double eta)
Set calibrated (cell weight) eta.

◆ setStateCal()

bool CaloCluster::setStateCal ( )
private

Helper to switch to calibrated (LC) state.

Definition at line 1408 of file CaloCluster.cxx.

1409{
1410 // std::cout << "CaloCluster [" << this
1411 // << "] setStateCal()" << std::endl;
1416 //
1421 return true;
1422}
void setCalPhi(double phi)
Set calibrated (LC) phi.
double getCalEta() const
Access to calibrated (LC) eta.
void setCalE(double e)
Set calibrated (LC) energy.
void setCalM(double m)
Set calibrated (LC) m.
double getCalPhi() const
Access to calibrated (LC) phi.
double getCalM() const
Access to calibrated (LC) m.
double getCalE() const
Access to calibrated (LC) energy.
void setCalEta(double eta)
Set calibrated (LC) eta.

◆ setStateRaw()

bool CaloCluster::setStateRaw ( )
private

Helper to switch to raw state.

Definition at line 1375 of file CaloCluster.cxx.

1376{
1377 // std::cout << "CaloCluster [" << this
1378 // << "] setStateRaw()" << std::endl;
1383 //
1388 //
1389 return true;
1390}
void setRawEta(double eta)
Set raw eta.
void setRawM(double m)
Set raw m.
double getRawPhi() const
Access to raw phi.
double getRawM() const
Access to raw mass.
double getRawEta() const
Access to raw eta.
void setRawPhi(double phi)
Set raw phi.
void setRawE(double e)
Set raw energy.
double getRawE() const
Access to raw energy.

◆ setStores()

bool CaloCluster::setStores ( CaloShower * pData,
CaloCellLink * pLink,
bool ownStores = true )
inlineprotected

Setup internal store.

Definition at line 902 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

903{
904 return ( this->setDataStore(pData,ownStores) &&
905 this->setLinkStore(pLink,ownStores) );
906}
bool setLinkStore(CaloCellLink *pLink, bool ownStores=true)
bool setDataStore(CaloShower *pData, bool ownStores=true)
Setup data store.

◆ setTime()

void CaloCluster::setTime ( double theTime)
inline

Set cluster time.

Definition at line 889 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

889{ m_time = theTime; }

◆ setUUIDHash()

void AthenaBarCodeImpl::setUUIDHash ( AthenaBarCode_t uuidhash)
inlineprivateinherited

Definition at line 114 of file AthenaBarCodeImpl.h.

114 {
115 m_barcode = combineWithUUIDHash(uuidhash);
116}
AthenaBarCode_t combineWithUUIDHash(const AthenaBarCode_t &) const

◆ setVariable() [1/2]

bool CaloCluster::setVariable ( const variable_type & varType,
const sampling_type & samType,
const double & varData,
bool useLink = false )

General sampling variable setter.

Parameters
varTypevariable type
samTypesampling indicator
varDatadata value
useLinkif true data is stored in external store

Definition at line 872 of file CaloCluster.cxx.

876{
877 // check samplingpattern
878 if(!this->hasSampling(samType)){
879 // std::cout << " Cluster does not have sampling " << samType << std::endl;
882 }
883
884 // allocate modifiable data store
885 CaloSamplingData* pDataStore = this->getDataStore(varType,useLink);
886 return pDataStore != nullptr
887 ? pDataStore->storeData(varType,samType,varData)
888 : false;
889}
bool hasSampling(const sampling_type &theSampling) const
Checks if certain sampling contributes to cluster.
bool storeData(variable_key_type theVariable, sampling_key_type theSampling, value_type theData)
}

◆ setVariable() [2/2]

bool CaloCluster::setVariable ( const variable_type & varType,
const std::vector< double > & varList,
bool useLink = false )

Set variables of a given type in all samplings at once.

Definition at line 892 of file CaloCluster.cxx.

895{
896 CaloSamplingData* pDataStore = this->getDataStore(varType,useLink);
897 return pDataStore != nullptr
898 ? pDataStore->storeData(varType,varList)
899 : false;
900}

◆ setVersion()

void AthenaBarCodeBase::setVersion ( AthenaBarCodeVersion_t newversion)
virtualinherited

Reimplemented from IAthenaBarCode.

Definition at line 59 of file AthenaBarCodeBase.cxx.

60{
62}
void setVersion(AthenaBarCodeVersion_t newversion)

◆ signalState()

CaloCluster::signalstate_t CaloCluster::signalState ( ) const
inlinevirtual

Retrieve signal state.

Implements ISignalState.

Definition at line 860 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

861{ return m_signalState; }

◆ sinPhi()

double P4EEtaPhiMBase::sinPhi ( ) const
virtualinherited

sinus phi

Implements I4Momentum.

Reimplemented in CaloCell, and CaloVertexedCell.

Definition at line 59 of file P4EEtaPhiMBase.cxx.

60{
61 return std::sin(this->phi());
62}

◆ sinTh()

double P4EEtaPhiMBase::sinTh ( ) const
virtualinherited

sinus theta

Implements I4Momentum.

Reimplemented in CaloCell, and CaloVertexedCell.

Definition at line 87 of file P4EEtaPhiMBase.cxx.

88{
89 // avoid numeric overflow if very large eta
90
91 double aEta=std::abs(this->eta());
92 if ( aEta>710) {
93 aEta=710;
94 }
95
96 return 1./std::cosh(aEta);
97
98}

◆ tanTh()

double P4EEtaPhiMBase::tanTh ( ) const
virtualinherited

tan theta

Implements I4Momentum.

Definition at line 64 of file P4EEtaPhiMBase.cxx.

65{
66 // avoid numeric overflow if very large eta
67
68 double theEta=this->eta();
69 if ( std::abs(theEta)>710) {
70 theEta=theEta>0 ? 710 : -710;
71 return 1./std::sinh(theEta);
72 }
73
74 return 1./this->cotTh();
75}
virtual double cotTh() const
cottan theta

◆ unlockVariable()

bool CaloCluster::unlockVariable ( const variable_type & varType)

Unlock variable (remove lock)

Definition at line 1301 of file CaloCluster.cxx.

1302{
1303 unsigned int bitPattern(CaloVariableType::getVariableBit(varType));
1304 if ( this->isLocked(bitPattern) )
1305 {
1306 m_lockPattern = m_lockPattern ^ bitPattern;
1307 return ! this->isLocked(bitPattern);
1308 }
1309 else
1310 {
1311 return false;
1312 }
1313}

◆ updateKine()

void CaloCluster::updateKine ( const CaloCell * theCell,
double weight )
protectedvirtual

Updates cluster kinematics when cell is added.

Parameters
theCellpointer to a CaloCell
weightsignal weight of cell in cluster

Present implementation performs full four-vector update for each cell added.

Implements CaloCompositeCellBase< CaloClusterNavigable >.

Definition at line 263 of file CaloCluster.cxx.

264{
265
266 // update global kinematics
267 //
268 // for the update of the position the normalization is not a trival
269 // thing. The previous implementation used the sum of weighted
270 // energies as normalization. This leads to unphysical eta and phi
271 // values in case negative energies are added in. The new algorithm
272 // takes therefore |E| instead of E which gives the same eta and phi
273 // as before for the 2 cases where all cells are negative or all
274 // cells are positive. In the mixed case it will give the direction
275 // of activity in the calorimeter.
276
277 if (!theCell->caloDDE()) return;
278
279 double theEnergyNoWeight = theCell->e();
280 double theEnergy = weight * theEnergyNoWeight;
281 double cellEta = theCell->eta();
282 double cellPhi = theCell->phi();
283 // weight might be negative for removing cells
284 // therefore the AbsEnergy can be negative ...
285 double theAbsEnergy = weight * fabs(theEnergyNoWeight);
286 double thePhi = proxim(cellPhi,this->phi());
287 double theNewEta =
288 m_posNorm * this->eta() + theAbsEnergy * cellEta;
289 double theNewPhi = m_posNorm * this->phi() + theAbsEnergy * thePhi;
290 double theNewEnergy = this->e() + theEnergy;
291 m_posNorm += theAbsEnergy;
292
293 if ( m_posNorm != 0. )
294 {
295 this->setEta(theNewEta/m_posNorm);
296 this->setPhi(CaloPhiRange::fix (theNewPhi/m_posNorm));
297 }
298 else
299 {
300 this->setEta(0);
301 this->setPhi(0);
302 }
303
304 this->setE(theNewEnergy);
305
306 // calculate the cluster time from cells which provide a time
307 // two modes are under discussion - either use an energy^2 weighted
308 // average (sigma_t ~ 1/E) or just the time of the leading cell
309 // for now the energy^2 weighted average is implemented ...
310
311 // need sampling number already for time
312 CaloSampling::CaloSample sam = theCell->caloDDE()->getSampling();
313 // unknown sampling
314 if ( sam == CaloSampling::Unknown ) return;
315
316 unsigned pmask = 0;
317 if (sam != CaloSampling::PreSamplerB &&
318 sam != CaloSampling::PreSamplerE)
319 {
320 if ( theCell->caloDDE()->is_tile() )
321 pmask = 0x8080;
322 else
323 pmask = 0x2000;
324 }
325
326 // Is time defined?
327 if ( theCell->provenance() & pmask ) {
328 // keep the sign of weight for the time norm in case a cell is removed
329 double theTimeNorm = fabs(weight) * theEnergy * theEnergyNoWeight;
330
331 double theNewTime = m_timeNorm * this->getTime()
332 + theTimeNorm * theCell->time();
333
334 m_timeNorm += theTimeNorm;
335
336 if ( m_timeNorm != 0. )
337 {
338 this->setTime(theNewTime/m_timeNorm);
339 }
340 else
341 {
342 this->setTime(0);
343 }
344 }
345
347 // Check Sampling Variable Updates //
349
350 // no update required
351 if ( this->allLocked() ) return;
352
353 // update sampling quantities
354
355 // This has gotten a bit more involved. To handle the stores for the
356 // data correctly, a pointer to each store (can be different for each
357 // variable type) has to be retrieved first (internal function). As all
358 // variables need the sampling energy, we start with this store. Note that
359 // the store for each variable can be defined by calling the corresponding
360 // set method before the first \a updateKine invocation.
361
363 // Energy in Sampling //
365
367 if ( ! this->isLocked(typeE) )
368 {
369 CaloSamplingData* pEStore = this->getDataStore(typeE,true);
370 if ( pEStore != nullptr )
371 {
372 // note that this is a reference to a modifiable data word!
373 pEStore->retrieveData(typeE,sam) += theEnergy;
374 }
375 }
376
377 double theOldNorm(m_posSamNorm[sam]);
378 m_posSamNorm[sam]+=theAbsEnergy;
379 double theNewNorm(m_posSamNorm[sam]);
380
382 // Azimuth //
384
385 // azimuth
387 if ( ! this->isLocked(typePhi) )
388 {
389 // central azimuth
390 CaloSamplingData* pPhiStore = this->getDataStore(typePhi,true);
391 if ( pPhiStore != nullptr )
392 {
393 double& refPhiSamp = pPhiStore->retrieveData(typePhi,sam);
394 thePhi = proxim(cellPhi,refPhiSamp);
395 theNewPhi = theNewNorm != 0.
396 ? CaloPhiRange::fix((theOldNorm*refPhiSamp+theAbsEnergy*thePhi)/theNewNorm)
397 : double(0);
398
399 // spread in azimuth
402 if ( ! this->isLocked(typeDPhi) )
403 {
404 CaloSamplingData* pDPhiStore = this->getDataStore(typeDPhi,true);
405 if ( pDPhiStore != nullptr )
406 {
407 // non-const reference -> modification in place!
408 double& refDPhiSamp = pDPhiStore->retrieveData(typeDPhi,sam);
409 double wP2
410 = theOldNorm *
411 ( refDPhiSamp*refDPhiSamp + refPhiSamp*refPhiSamp)
412 + theAbsEnergy * thePhi * thePhi;
413 refDPhiSamp = theNewNorm != 0.
414 ? wP2 / theNewNorm - theNewPhi*theNewPhi
415 : double(0);
416 if ( refDPhiSamp > 0. )
417 {
418 refDPhiSamp = sqrt(refDPhiSamp);
419 }
420 else
421 {
422 refDPhiSamp = double(0);
423 }
424 }
425 }
426 // save the new phi value
427 refPhiSamp = theNewPhi;
428 }
429 }
430
432 // Rapidity //
434
435
436 // rapidity
438 if ( ! this->isLocked(typeEta) )
439 {
440 CaloSamplingData* pEtaStore = this->getDataStore(typeEta,true);
441 if ( pEtaStore != nullptr )
442 {
443 double& refEtaSamp = pEtaStore->retrieveData(typeEta,sam);
444 double theNewEta = theNewNorm != 0.
445 ? (theOldNorm*refEtaSamp+theAbsEnergy* cellEta)/theNewNorm
446 : double(0);
447
448 // spread in eta
451 if ( ! this->isLocked(typeDEta) )
452 {
453 CaloSamplingData* pDEtaStore = this->getDataStore(typeDEta,true);
454 if ( pDEtaStore != nullptr )
455 {
456 double& refDEtaSamp = pDEtaStore->retrieveData(typeDEta,sam);
457 double wE2 = theOldNorm * (refDEtaSamp * refDEtaSamp +
458 refEtaSamp * refEtaSamp )
459 + theAbsEnergy * cellEta * cellEta;
460 refDEtaSamp = theNewNorm != 0
461 ? wE2 / theNewNorm - theNewEta * theNewEta
462 : double(0);
463 if ( refDEtaSamp > 0. )
464 {
465 refDEtaSamp = sqrt(refDEtaSamp);
466 }
467 else
468 {
469 refDEtaSamp = double(0.0);
470 }
471 }
472 }
473 // save the new eta value
474 refEtaSamp = theNewEta;
475 }
476 }
477
479 // Maximum Energy Cell //
481
483 if ( ! this->isLocked(typeEMax) )
484 {
485 CaloSamplingData* pEMaxStore = this->getDataStore(typeEMax,true);
486 if ( pEMaxStore != nullptr )
487 {
488 double& refEMaxSamp = pEMaxStore->retrieveData(typeEMax,sam);
489 if ( refEMaxSamp < theEnergy )
490 {
491 // set new maximum energy
492 refEMaxSamp = theEnergy;
493 // set new eta
496 if ( ! this->isLocked(typeEtaMax) )
497 {
498 CaloSamplingData* pEtaMaxStore =
499 this->getDataStore(typeEtaMax,true);
500 if ( pEtaMaxStore != nullptr )
501 {
502 pEtaMaxStore->retrieveData(typeEtaMax,sam) =
503 cellEta;
504 }
505 }
506 // set new phi
509 if ( ! this->isLocked(typePhiMax) )
510 {
511 CaloSamplingData* pPhiMaxStore =
512 this->getDataStore(typePhiMax,true);
513 if ( pPhiMaxStore != nullptr )
514 {
515 pPhiMaxStore->retrieveData(typePhiMax,sam) = thePhi;
516 }
517 } // lock on phi of maximum sampling signal
518 } // maximum condition
519 } // data store pointer
520 } // lock on max energy
521
522 if ( theEnergy != 0)
523 {
524 // check sampling bit
527 // count cells in endcap
528
529 switch(sam)
530 {
531 case CaloSampling::PreSamplerE:
532 case CaloSampling::EME1:
533 case CaloSampling::EME2:
534 case CaloSampling::EME3:
535 case CaloSampling::HEC0:
536 case CaloSampling::HEC1:
537 case CaloSampling::HEC2:
538 case CaloSampling::HEC3:
539 case CaloSampling::FCAL0:
540 case CaloSampling::FCAL1:
541 case CaloSampling::FCAL2:
542 m_nEndcap += (weight<0?-1:1);
543 break;
544 default:
545 m_nBarrel += (weight<0?-1:1);
546 break;
547 }
548 }
549
550 if ( m_nBarrel < 0 ) m_nBarrel = 0;
551 if ( m_nEndcap < 0 ) m_nEndcap = 0;
552
553 m_barrel = (m_nBarrel>0);
554 m_endcap = (m_nEndcap>0);
555}
float time() const
get time (data member)
Definition CaloCell.h:368
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition CaloCell.h:375
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
uint16_t provenance() const
get provenance (data member)
Definition CaloCell.h:354
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
double getTime() const
Access cluster time.
CaloCell_ID::CaloSample getSampling() const
cell sampling
double proxim(double b, double a)
Definition proxim.h:17

◆ variableBE()

double CaloCluster::variableBE ( const variable_type & theVariable,
const int & samplingIndex ) const
protected

Rewrite \( e_{0} \varphi_{0} + e_{1} \varphi_{1} \) as \( \left( e_{0} + e_{1} \right) \varphi_{0} + e_{1} \left( \varphi_{1} - \varphi_{0} \right) \) for \( \varphi \) calculation.

Definition at line 953 of file CaloCluster.cxx.

955{
956 // check input
957 unsigned int iSamp((unsigned int)sam);
958 if ( iSamp > 3 ) return m_errorValue;
959
960 // barrel and endcap
961 if ( this->inBarrel() && this->inEndcap() )
962 {
963 // offsets for sampling indicators
964 unsigned int bOff = (unsigned int)CaloSampling::PreSamplerB;
965 unsigned int eOff = (unsigned int)CaloSampling::PreSamplerE;
967 (CaloSampling::CaloSample)(bOff+iSamp);
969 (CaloSampling::CaloSample)(eOff+iSamp);
970 double eBarrel = this->getVariable(CaloVariableType::ENERGY,
971 bSample,true);
972 double eEndCap = this->getVariable(CaloVariableType::ENERGY,
973 eSample,true);
974
975 double vBarrel = this->getVariable(varType,bSample,true);
976 double vEndCap = this->getVariable(varType,eSample,true);
977
978 // Deal with invalid eta/phi values.
979 if (varType == CaloVariableType::PHI ||
980 varType == CaloVariableType::ETA)
981 {
982 if (vBarrel <= m_errorValue) {
983 vBarrel = 0;
984 eBarrel = 0;
985 }
986 if (vEndCap <= m_errorValue) {
987 vEndCap = 0;
988 eEndCap = 0;
989 }
990 }
991
992 // invalid signals
993 double eSum = eBarrel + eEndCap;
994 if ( eSum == 0. ) return m_errorValue;
995 // average
996 double vAverage(m_errorValue);
997 switch ( varType )
998 {
1000 {
1001 double phiSum =
1002 eSum * vBarrel + eEndCap * CaloPhiRange::diff(vEndCap,vBarrel);
1003 vAverage = CaloPhiRange::fix(phiSum/eSum);
1004 break;
1005 }
1007 {
1008 vAverage = ( eBarrel * vBarrel + eEndCap * vEndCap ) / eSum;
1009 break;
1010 }
1012 {
1013 vAverage = eSum;
1014 break;
1015 }
1016 default:
1017 {
1018 break;
1019 }
1020 }
1021 return vAverage;
1022 }
1023
1024 // barrel only
1025 if ( this->inBarrel() )
1026 {
1027 unsigned int bOff = (unsigned int)CaloSampling::PreSamplerB;
1028 CaloSampling::CaloSample bSample =
1029 (CaloSampling::CaloSample)(bOff+iSamp);
1030 return this->getVariable(varType,bSample);
1031 }
1032
1033 // endcap only
1034 if ( this->inEndcap() )
1035 {
1036 unsigned int eOff = (unsigned int)CaloSampling::PreSamplerE;
1038 (CaloSampling::CaloSample)(eOff+iSamp);
1039 return this->getVariable(varType,eSample);
1040 }
1041
1042 // just in case
1043 return m_errorValue;
1044}
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
bool inEndcap() const
Returns true if at least one clustered cell in EMEC.
bool inBarrel() const
Returns true if at least one clustered cell in EMB.
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.

◆ CaloClusterContainerCnv_p1

friend class CaloClusterContainerCnv_p1
friend

◆ CaloClusterContainerCnv_p2

friend class CaloClusterContainerCnv_p2
friend

◆ CaloClusterContainerCnv_p3

friend class CaloClusterContainerCnv_p3
friend

◆ CaloClusterContainerCnv_p4

friend class CaloClusterContainerCnv_p4
friend

◆ CaloClusterContainerCnv_p5

friend class CaloClusterContainerCnv_p5
friend

◆ CaloClusterContainerCnv_p6

friend class CaloClusterContainerCnv_p6
friend

◆ CaloClusterContainerCnv_p7

friend class CaloClusterContainerCnv_p7
friend

◆ CaloClusterContainerCnvTest_p6

friend class CaloClusterContainerCnvTest_p6
friend

◆ CaloClusterContainerCnvTest_p7

friend class CaloClusterContainerCnvTest_p7
friend

◆ CaloClusterSignalState

friend struct CaloClusterSignalState
friend

◆ CaloClusterStoreHelper

friend class CaloClusterStoreHelper
friend

Member Data Documentation

◆ CounterBits

const unsigned short AthenaBarCodeImpl::CounterBits = 26
staticinherited

Definition at line 44 of file AthenaBarCodeImpl.h.

◆ m_altE

double CaloCluster::m_altE
private

Stores calibrated (cell weight) signal.

Definition at line 705 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_altEta

double CaloCluster::m_altEta
private

Stores calibrated (cell weight) signal.

Definition at line 707 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_altM

double CaloCluster::m_altM
private

Stores calibrated (cell weight) signal.

Definition at line 711 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_altPhi

double CaloCluster::m_altPhi
private

Stores calibrated (cell weight) signal.

Definition at line 709 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_badChannelData

badChannelList CaloCluster::m_badChannelData
private

◆ m_barcode

std::atomic<AthenaBarCode_t> AthenaBarCodeImpl::m_barcode
mutableprivateinherited

Definition at line 110 of file AthenaBarCodeImpl.h.

◆ m_barcodeCounter

std::atomic< AthenaBarCode_t > AthenaBarCodeImpl::m_barcodeCounter = 0
staticprivateinherited

Definition at line 109 of file AthenaBarCodeImpl.h.

◆ m_barrel

bool CaloCluster::m_barrel
private

Flag is true if at least one cell in EMB.

Definition at line 549 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_basicSignal

double CaloCluster::m_basicSignal
protected

Stores basic energy signal.

Definition at line 495 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_cellLink

cell_link_type CaloClusterNavigable::m_cellLink
privateinherited

Local pointer to cell store.

Link to cell links object

Definition at line 186 of file CaloClusterNavigable.h.

◆ m_clusterSize

unsigned int CaloCluster::m_clusterSize
private

Cluster size (e.g.

5x5, 3.7, ...)

Definition at line 554 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_dataLink

data_link_type CaloCluster::m_dataLink
protected

{

Linked Stores link to data

Definition at line 488 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_dataStore

CaloSamplingData CaloCluster::m_dataStore
protected

{\ brief Cached Stores

sampling data

Definition at line 479 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_defSigState

signalstate_t CaloCluster::m_defSigState
private

Stores default signal state.

Definition at line 693 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_e

double P4EEtaPhiM::m_e
protectedinherited

Definition at line 75 of file P4EEtaPhiM.h.

◆ m_endcap

bool CaloCluster::m_endcap
private

Flag is true if at least one cell in EMB.

Definition at line 551 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_errorValue

const double CaloCluster::m_errorValue = -999.
staticprotected

Internal error return for real numbers.

Definition at line 476 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_eta

double P4EEtaPhiM::m_eta
protectedinherited

Definition at line 76 of file P4EEtaPhiM.h.

◆ m_eta0

double CaloCluster::m_eta0
private

Cluster seed \( \eta \).

Definition at line 558 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_getE

GET_VALUE CaloCluster::m_getE {}
private

Pointer to getter functions.

Definition at line 672 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

672{};

◆ m_getEta

GET_VALUE CaloCluster::m_getEta {}
private

Pointer to getter functions.

Definition at line 674 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

674{};

◆ m_getM

GET_VALUE CaloCluster::m_getM {}
private

Pointer to getter functions.

Definition at line 678 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

678{};

◆ m_getPhi

GET_VALUE CaloCluster::m_getPhi {}
private

Pointer to getter functions.

Definition at line 676 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

676{};

◆ m_lockPattern

unsigned int CaloCluster::m_lockPattern
private

Variable lock pattern.

Definition at line 581 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_m

double P4EEtaPhiM::m_m
protectedinherited

Definition at line 78 of file P4EEtaPhiM.h.

◆ m_momentStore

CaloClusterMomentStore CaloCluster::m_momentStore
protected

cluster moments

Definition at line 480 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_nBarrel

int CaloCluster::m_nBarrel
private

Counter for number of barrel cells with non-zero weight and energy.

Definition at line 576 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_nEndcap

int CaloCluster::m_nEndcap
private

Counter for number of endcap cells with non-zero weight and energy.

Definition at line 579 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_ownDataStore

bool CaloCluster::m_ownDataStore
protected

}

Temporary stores

Definition at line 485 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_ownLinkStore

bool CaloClusterNavigable::m_ownLinkStore
protectedinherited

Definition at line 178 of file CaloClusterNavigable.h.

◆ m_phi

double P4EEtaPhiM::m_phi
protectedinherited

Definition at line 77 of file P4EEtaPhiM.h.

◆ m_phi0

double CaloCluster::m_phi0
private

Cluster seed \( \varphi \).

Definition at line 560 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_posNorm

double CaloCluster::m_posNorm
private

Stores the normalization e.g.

sum(|E|) for the position calculations.

Definition at line 568 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_posSamNorm

std::vector<double> CaloCluster::m_posSamNorm
private

Stores the normalization e.g.

sum(|E|) for the position calculations in each sampling.

Definition at line 572 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_rawE

double CaloCluster::m_rawE
private

Stores raw signal.

Definition at line 696 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_rawEta

double CaloCluster::m_rawEta
private

Stores raw signal.

Definition at line 698 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_rawM

double CaloCluster::m_rawM
private

Stores raw signal.

Definition at line 702 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_rawPhi

double CaloCluster::m_rawPhi
private

Stores raw signal.

Definition at line 700 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_samplingPattern

unsigned int CaloCluster::m_samplingPattern
protected

Sampling pattern.

Definition at line 501 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_setE

SET_VALUE CaloCluster::m_setE {}
private

Pointer to setter functions.

Definition at line 681 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

681{};

◆ m_setEta

SET_VALUE CaloCluster::m_setEta {}
private

Pointer to setter functions.

Definition at line 683 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

683{};

◆ m_setM

SET_VALUE CaloCluster::m_setM {}
private

Pointer to setter functions.

Definition at line 687 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

687{};

◆ m_setPhi

SET_VALUE CaloCluster::m_setPhi {}
private

Pointer to setter functions.

Definition at line 685 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

685{};

◆ m_shower

CaloShower* CaloCluster::m_shower
protected

}

Non-const pointer to linked store.

Definition at line 492 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_signalState

signalstate_t CaloCluster::m_signalState
private

Stores actual signal state.

Definition at line 691 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_status

CaloRecoStatus CaloCompositeKineBase::m_status
protectedinherited

Calorimeter reconstruction status.

Definition at line 58 of file CaloCompositeKineBase.h.

◆ m_time

double CaloCluster::m_time
protected

Cluster timing.

Definition at line 498 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_timeNorm

double CaloCluster::m_timeNorm
private

Stores the normalization for time calculation e.g.

sum(w * |w| * E^2)

Definition at line 564 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ ReserveBits

const unsigned short AthenaBarCodeImpl::ReserveBits = 2
staticinherited

Definition at line 46 of file AthenaBarCodeImpl.h.

◆ SCounterBits

const unsigned short AthenaBarCodeImpl::SCounterBits = UUIDBits
staticinherited

Definition at line 49 of file AthenaBarCodeImpl.h.

◆ SReserveBits

const unsigned short AthenaBarCodeImpl::SReserveBits = UUIDBits+CounterBits+VersionBits
staticinherited

Definition at line 51 of file AthenaBarCodeImpl.h.

◆ SUUIDBits

const unsigned short AthenaBarCodeImpl::SUUIDBits = 0
staticinherited

Definition at line 48 of file AthenaBarCodeImpl.h.

◆ SVersionBits

const unsigned short AthenaBarCodeImpl::SVersionBits = UUIDBits+CounterBits
staticinherited

Definition at line 50 of file AthenaBarCodeImpl.h.

◆ TotalBits

const unsigned short AthenaBarCodeImpl::TotalBits = 64
staticinherited

Definition at line 41 of file AthenaBarCodeImpl.h.

◆ UNDEFINEDBARCODE

const AthenaBarCode_t IAthenaBarCode::UNDEFINEDBARCODE = (AthenaBarCode_t)(-1)
staticinherited

Definition at line 52 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.

◆ UNDEFINEDVERSION

const AthenaBarCode_t IAthenaBarCode::UNDEFINEDVERSION = UNDEFINEDBARCODE
staticinherited

Definition at line 53 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.

◆ UUIDBits

const unsigned short AthenaBarCodeImpl::UUIDBits = 32
staticinherited

Definition at line 43 of file AthenaBarCodeImpl.h.

◆ VersionBits

const unsigned short AthenaBarCodeImpl::VersionBits = 4
staticinherited

Definition at line 45 of file AthenaBarCodeImpl.h.


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