|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALOEVENT_CALOCLUSTER_H
8 #define CALOEVENT_CALOCLUSTER_H
59 #include "CaloEvent/CaloClusterBadChannelData.h"
71 struct CaloClusterSignalState;
213 unsigned int varTypePattern = 0x00000000,
229 bool useLink =
true)
const;
235 bool useLink =
true)
const;
241 const double& varData,
242 bool useLink =
false);
246 const std::vector<double>&
varList,
247 bool useLink =
false);
260 bool isLocked(
const unsigned int& bitPattern)
const;
276 virtual double e()
const;
278 virtual double eta()
const;
280 virtual double phi()
const;
282 virtual double m()
const;
294 virtual void setE(
double e);
300 virtual void setM(
double m);
307 virtual void set4Mom(
const CLHEP::HepLorentzVector& rVec);
372 bool useLink=
true)
const;
375 bool useLink=
true)
const;
378 bool useLink=
true)
const;
384 bool useLink=
true)
const;
437 double etaBE(
int sampling)
const;
439 double phiBE(
int sampling)
const;
441 double energyBE(
int sampling)
const;
465 void calculateKine(
const bool useweight=
true,
const bool updateLayers=
true );
507 const int& samplingIndex)
const;
513 bool useLink=
false)
const;
542 template <
class InputIterator>
754 {
return (this->*
m_getE)(); }
765 {
return (this->*
m_getM)(); }
843 this->
setE(pMom->
e());
846 this->
setM(pMom->
m());
854 this->
setE(rVec.e());
857 this->
setM(rVec.m());
1251 {
return (momIter.
getMoment()).getValue(); }
1312 return static_cast<std::size_t
> (
static_cast<long long>(
p->energy_nonvirt()));
1316 template <
class InputIterator>
1321 if (this->
isLocked (varType))
return;
1324 p->storeData (varType,
beg,
end);
1380 #endif // CALOCLUSTER_H
static bool isEMSampling(const CaloSample &rSample)
Get sampling characteristics.
A mixin base class implementing IAthenaBarCode. IAthenaBarCode should be a virtual base of the class ...
bool isLocked(const variable_type &varType) const
Check lock status of variable.
void setPhiInSamples(const std::vector< double > &thePhis)
Set in all samplings from a vector.
SET_VALUE m_setPhi
Pointer to setter functions.
std::size_t navigationHash(const CaloCluster *p)
signalstate_t signalState() const
Retrieve signal state.
MomentType
enums to identify different moments
double phi0() const
Returns raw of cluster seed.
CaloClusterMomentStore m_momentStore
cluster moments
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
void setEtaInSamples(const std::vector< double > &theEtas)
Set in all samplings from a vector.
static unsigned int getAllVariableBits()
void setTime(double theTime)
Set cluster time.
double m_altPhi
Stores calibrated (cell weight) signal.
void setenergy(sampling_type sampling, double e)
Set energy for a given sampling.
virtual void resetSignalState()
reset the signal state
double phiSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
GET_VALUE m_getM
Pointer to getter functions.
Container class for CaloShower.
bool hasSampling(const sampling_type &theSampling) const
Checks if certain sampling contributes to cluster.
double m_basicSignal
Stores basic energy signal.
Scalar phi() const
phi method
double value_type
Variable value type.
void setCalEta(double eta)
Set calibrated (LC) eta.
void setetamax(sampling_type sampling, double m)
Set the of cell with maximum energy in a given sampling.
GET_VALUE m_getPhi
Pointer to getter functions.
void setRawEta(double eta)
Set raw eta.
bool is_valid_sampling(const sampling_type &sampling) const
Checks if cells from a given sampling in EMB or EMEC (!) are in cluster.
int m_nEndcap
Counter for number of endcap cells with non-zero weight and energy.
unsigned int nSamples() const
Retrieve number of samplings in this cluster.
double phiBE(int sampling) const
EMB/EMEC combined barycenter .
CaloCluster(double eta0=0, double phi0=0, unsigned int varTypePattern=0x00000000, unsigned int clusterSize=CaloCluster::SW_55ele)
Constructor.
double phisize(sampling_type sampling) const
Returns cluster size in for a given sampling.
void setEInSamples(const std::vector< double > &theEnergies)
Set energy in all samplings from a vector.
Scalar eta() const
pseudorapidity method
data_link_type getMomentStoreLink() const
double m_eta0
Cluster seed
void setphi(sampling_type sampling, double phi)
Set in a given sampling.
double getRawPhi() const
Access to raw phi.
void setCalE(double e)
Set calibrated (LC) energy.
bool inBarrel() const
Returns true if at least one clustered cell in EMB.
bool setStateCal()
Helper to switch to calibrated (LC) state.
virtual double p() const =0
momentum magnitude
void setetasize(sampling_type sampling, double size)
Set the cluster size in for a given sampling.
double energy_max(sampling_type sampling) const
Retrieve maximum cell energy in given sampling.
CaloSamplingData * getDataStore(const variable_type &theVariable, bool useLink=true)
void getEInSamples(std::vector< double > &theEnergies) const
Retrieve energy for all samplings into a vector.
GET_VALUE m_getEta
Pointer to getter functions.
bool setVariable(const variable_type &varType, const sampling_type &samType, const double &varData, bool useLink=false)
General sampling variable setter.
unsigned int getClusterPhiSize() const
double m_altE
Stores calibrated (cell weight) signal.
double m_timeNorm
Stores the normalization for time calculation e.g.
virtual bool setSignalState(signalstate_t s)
Sets signal state.
Internally used iterator.
virtual double getBasicEnergy() const
Access basic energy scale signal.
SET_VALUE m_setEta
Pointer to setter functions.
virtual void set4Mom(const I4Momentum *const pMom)
Set kinematics from four-vector.
unsigned int samplingPattern() const
Get sampling bitmask.
bool setDefaultSignalState(signalstate_t s)
Sets default signal state.
std::vector< double > m_posSamNorm
Stores the normalization e.g.
void seteta(sampling_type sampling, double eta)
Set in a given sampling.
bool setDataLink(CaloShowerContainer *pDataLink)
Set element link for shower data.
Data class for cluster variables associated with a CaloCluster.
virtual double e() const
get energy data member
double getCalE() const
Access to calibrated (LC) energy.
CaloVariableType::VariableType variable_type
Data type indicator.
moment_type getMomentType(const moment_iterator &momIter) const
Get moment type.
void setenergymax(sampling_type sampling, double m)
Set the maximum energy in a given sampling.
Stores CaloClusterMoment in a keyed map.
bool getMomentStorePtrs(const CaloClusterMomentStore *&pFirstStore, const CaloClusterMomentStore *&pSecndStore, bool useLink) const
SET_VALUE m_setM
Pointer to setter functions.
bool inEndcap() const
Returns true if at least one clustered cell in EMEC.
virtual double eta() const
get eta data member
double etasize(sampling_type sampling) const
Returns cluster size in for a given sampling.
double phimax(sampling_type sampling) const
Retrieve of cell with maximum energy in given sampling.
bool unlockVariable(const variable_type &varType)
Unlock variable (remove lock)
data_link_type m_dataLink
{
static unsigned int getSamplingBit(const CaloSample &rSample)
Return a unique bit set for a given sampling.
CaloCompositeCellBase< CaloClusterNavigable >::cell_iterator cell_iterator
Iterator on CaloCell s.
double m_time
Cluster timing.
virtual object_iter end() const
end iterator for public object access
unsigned int m_clusterSize
Cluster size (e.g.
double m_phi0
Cluster seed
static bool setLink(CONT *pCont, DOBJ *pDat, ELEM &rElm)
bool operator!=(const MomentStoreIter &anOther) const
Inequality comparator.
moment_value getMoment(const moment_type &momType, bool useLink=true) const
Get individual moment.
virtual bool isAtSignalState(signalstate_t s) const
check if we are at the passed state
const badChannelList * getBadChannel() const
Simple store for CaloCell links. This object is fully navigable.
virtual CLHEP::HepLorentzVector hlv() const
HepLorentzVector Special implementation from Frank Paige : if negative energy, points in opposite dir...
GET_VALUE m_getE
Pointer to getter functions.
friend struct CaloClusterSignalState
bool operator==(const MomentStoreIter &anOther) const
Equality comparator.
const CaloClusterMoment & operator*() const
Operator access to CaloClusterMoment.
virtual double e() const =0
energy
virtual double m() const
get mass data member
double getRawE() const
Access to raw energy.
bool m_endcap
Flag is true if at least one cell in EMB.
void setAltM(double m)
Set calibrated (cell weight) m.
CaloSamplingData m_dataStore
{\ brief Cached Stores
double etaSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
double getAltPhi() const
Access to calibrated (cell weight) phi.
void insertMoment(const moment_type &momType, const moment_value &momValue, bool useLink=true)
Set individual moment.
void getEtaInSamples(std::vector< double > &theEtas) const
Retrieve for all samplings into a vector.
CaloClusterLinkTemplate< CaloShowerContainer >::link_type data_link_type
double m_altM
Stores calibrated (cell weight) signal.
moment_iterator beginMoment(bool useLink=true) const
First iterator on moment store.
MomentStoreIter operator++()
Post-advance operator.
virtual double eta() const =0
pseudo rapidity
Principal data class for CaloCell clusters.
double m_rawM
Stores raw signal.
virtual void setEta(double eta)
Set eta.
void setRawM(double m)
Set raw m.
unsigned int m_samplingPattern
Sampling pattern.
MomentStoreIter operator--()
Post-step back operator.
double etaBE(int sampling) const
EMB/EMEC combined barycenter .
std::vector< CaloClusterBadChannelData > badChannelList
Get Bad Channel information.
void setRawE(double e)
Set raw energy.
double getCalEta() const
Access to calibrated (LC) eta.
void setphimax(sampling_type sampling, double m)
Set the of cell with maximum energy in a given sampling.
void setCalPhi(double phi)
Set calibrated (LC) phi.
virtual double phi() const =0
phi in [-pi,pi[
static const double m_errorValue
Internal error return for real numbers.
double getMomentValue(const moment_type &momType, bool useLink=true) const
Get moment value.
bool setDataStore(CaloShower *pData, bool ownStores=true)
Setup data store.
moment_type getMomentType() const
Function access to moment type.
void calculateKine(const bool useweight=true, const bool updateLayers=true)
Calculate cluster kinematics from contained cells.
MomentStoreIter moment_iterator
Moment iterator type for CaloCluster clients.
void setCalM(double m)
Set calibrated (LC) m.
double m_rawPhi
Stores raw signal.
MomentStoreIter next()
Advance iterator.
double getTime() const
Access cluster time.
virtual double phi() const
get phi data member
bool setStateAlt()
Helper to switch to calibrated (cell weight) state.
CaloClusterMomentStore moment_store
Store type for cluster moments.
const moment_store * m_firstStore
Pointer to first CaloClusterMomentStore.
double energyBE(int sampling) const
EMB/EMEC combined signal.
static unsigned int getVariableBit(const VariableType &varType)
P4SignalState statename_t
CaloSampling::CaloSample sampling_type
Sampling indicator.
void setBarrel(bool barrel)
Sets EMB indicator.
~MomentStoreIter()
Destructor.
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
const moment_store * m_secndStore
Pointer to second CaloClusterMomentStore.
virtual ~CaloCluster()
Destructor.
void setRawPhi(double phi)
Set raw phi.
moment_iterator endMoment(bool useLink=true) const
Last iterator on moment store.
virtual CLHEP::HepLorentzVector hlv() const
redefine hlv() here to avoid ambiguities
double m_altEta
Stores calibrated (cell weight) signal.
void setAltE(double e)
Set calibrated (cell weight) energy.
void setAltPhi(double phi)
Set calibrated (cell weight) phi.
const CaloClusterMoment & getMoment() const
Function access to CaloClusterMoment.
moment_store::moment_type moment_type
Cluster moment indicator type.
virtual double m() const =0
mass
bool containsBadCells() const
Check if cluster has any bad channel in it.
moment_iterator_i m_iter
Actual iterator on CaloClusterMomentStore.
SET_VALUE m_setE
Pointer to setter functions.
void setEndcap(bool endcap)
Sets EMEC indicator.
double(CaloCluster::* GET_VALUE)() const
ClusterSize
enums to identify different cluster size
moment_store::moment_iterator moment_iterator_i
Cluster moment store iterator type.
virtual void setE(double e)
Set energy.
bool allLocked() const
Check if all variables are locked.
double getAltEta() const
Access to calibrated (cell weight) eta.
Data object for each calorimeter readout cell.
signalstate_t m_defSigState
Stores default signal state.
unsigned int getClusterSize() const
Get cluster size.
bool lockVariable(const variable_type &varType)
Lock variable (protect against future updates)
friend class CaloClusterContainerCnvTest_p6
virtual double eta() const
Retrieve eta independent of signal state.
defines enums and data types for different moments of CaloCluster
int m_nBarrel
Counter for number of barrel cells with non-zero weight and energy.
MomentStoreIter prev()
Step back iterator.
P4SignalState::State signalstate_t
bool setStores(CaloShower *pData, CaloCellLink *pLink, bool ownStores=true)
Setup internal store.
void maybeSetVariable(variable_type varType, InputIterator beg, InputIterator end)
Set variables of a given type in all samplings at once, taking locking into account.
virtual void setM(double m)
Set mass.
virtual void updateKine(const CaloCell *theCell, double weight)
Updates cluster kinematics when cell is added.
CaloCluster & operator=(const CaloCluster &)
Disallow (avoid coverity warning).
virtual double e() const
Retrieve energy independent of signal state.
void setClusterSize(unsigned int theClusterSize)
Set cluster size.
double m_rawE
Stores raw signal.
double eta0() const
Returns raw of cluster seed.
double m_posNorm
Stores the normalization e.g.
double getAltE() const
Access to calibrated (cell weight) energy.
double variableBE(const variable_type &theVariable, const int &samplingIndex) const
Rewrite as for calculation.
double etamax(sampling_type sampling) const
Retrieve of cell with maximum energy in given sampling.
bool setLinkStore(CaloCellLink *pLink, bool ownStores=true)
CaloClusterMomentStore * getMomentStore(bool useLink=true)
double getCalPhi() const
Access to calibrated (LC) phi.
moment_store::moment_value moment_value
Cluster moment value type.
double getAltM() const
Access to calibrated (cell weight) m.
virtual void setBasicEnergy(double theEnergy)
Set basic energy scale signal.
void setphisize(sampling_type sampling, double size)
Set the cluster size in for a given sampling.
bool retrieveMoment(const moment_type &momType, moment_value &momValue, bool useLink=true) const
Retrieve individual moment.
virtual double m() const
Retrieve mass independent of signal state.
signalstate_t m_signalState
Stores actual signal state.
virtual void setPhi(double phi)
Set phi.
Simple data object to store all variables in calorimeter samplings.
signalstate_t defaultSignalState() const
Retrieve default signal state.
badChannelList m_badChannelData
virtual bool hasSignalState(signalstate_t s) const
check if signal state exists for current implementation
Define macros for attributes used to control the static checker.
base class for methods and store of cell links
void addBadChannel(const CaloClusterBadChannelData &badChannel)
Add Bad channel information.
void setAltEta(double eta)
Set calibrated (cell weight) eta.
unsigned int getClusterEtaSize() const
bool m_barrel
Flag is true if at least one cell in EMB.
double getRawM() const
Access to raw mass.
void(CaloCluster::* SET_VALUE)(double v)
void resetBadChannel()
Reset Bad channel list.
double m_rawEta
Stores raw signal.
double getCalM() const
Access to calibrated (LC) m.
bool setStateRaw()
Helper to switch to raw state.
friend class CaloClusterContainerCnvTest_p7
template class for CaloClusterLink
MomentStoreIter()
Default constructor builds unusable iterator.
base class for kinematics of composite calo object
void getPhiInSamples(std::vector< double > &thePhis) const
Retrieve for all samplings into a vector.
double getVariable(const variable_type &varType, const sampling_type &samType, bool useLink=true) const
General sampling variable access.
unsigned int m_lockPattern
Variable lock pattern.
double getRawEta() const
Access to raw eta.
virtual double phi() const
Retrieve phi independent of signal state.
bool isEMSampling(const sampling_type &theSampling) const
Checks if cells from a given sampling in EMB and EMEC are in the cluster.