5#ifndef CALOEVENT_CALOCELL_H
6#define CALOEVENT_CALOCELL_H
41#include "Identifier/Identifier.h"
50#include "CaloDetDescr/CaloDetDescrElement.h"
123 virtual double phi ()
const override final;
125 virtual
double eta ()
const override final;
137 virtual
double m ()
const override final;
139 virtual
double e ()
const override final;
141 virtual
double et ()
const override final;
241# define m_qualProv ((uint16_t*)&m_quality)
242# define m_tileQual ((uint8_t*)&m_quality)
308 return p->ID().get_identifier32().get_compact();
317 return p->ID().get_identifier32().get_compact();
425 return this->
e() * this->
sinTh();
std::size_t navigationHash(const CaloCell *p)
Data object for each calorimeter readout cell.
void addEnergy(float energy)
add energy
float time() const
get time (data member)
const CaloDetDescrElement * m_caloDDE
pointer to static CaloDetDescrElement to access information that does not change from event to event
virtual double e() const override final
get energy (data member) (synonym to method energy()
virtual double phi() const override final
get phi (through CaloDetDescrElement)
CaloCell()
default constructor (should not be used, only there for persistency reason)
float m_energy
energy (in MeV)
void addTime(float delta)
add time
virtual void setTime(float time)
set time
double energy() const
get energy (data member)
void setCaloDDE(const CaloDetDescrElement *caloDDE)
set pointer to CaloDetDescrElement
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
uint16_t provenance() const
get provenance (data member)
float y() const
get y (through CaloDetDescrElement)
virtual void set4Mom(const I4Momentum *const theI4Mom) override final
set 4Momentum (will throw exception since cannot be implemented)
virtual double cosPhi() const override final
get cos(phi)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
void setGain(CaloGain::CaloGain gain=CaloGain::INVALIDGAIN)
set gain
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
virtual ~CaloCell()
default destructor
void assign(const CaloDetDescrElement *caloDDE, const Identifier &ID, float energy, float time, uint16_t quality, uint16_t provenance, CaloGain::CaloGain gain)
For initializing a cell we get from a DataPool.
uint16_t quality() const
get quality (data member)
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
CaloCell(CaloCell &&)=default
virtual void setEnergy(float energy)
set energy
virtual double m() const override final
get mass (hardcoded to be null)
virtual double cosTh() const override final
get cos(theta) (derived from sinTh)
void setQuality(uint16_t quality)
set quality
CaloGain::CaloGain gain() const
get gain (data member )
virtual double cotTh() const override final
get cottan(theta)
CaloCell & operator=(const CaloCell &)=default
float z() const
get z (through CaloDetDescrElement)
float x() const
get x (through CaloDetDescrElement)
virtual void scaleEnergy(float scale)
scale energy
Identifier m_ID
offline identifier
virtual double et() const override final
get et
virtual double sinPhi() const override final
get sin(phi)
void setProvenance(uint16_t prov)
set Provenance
CaloCell(const CaloCell &)=default
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
CaloGain::CaloGain m_gain
gain
This class groups all DetDescr information related to a CaloCell.
I4Momentum is an abstract base class providing 4-momentum behavior.
P4EEtaPhiMBase is a base class for classes with 4-momentum behavior, for which E, eta,...
virtual void scaleEnergy(float scale) override final
scale energy and eneDiff (final override of CaloCell method)
void addEnergy(float e, int pmt, int gain)
set energy and gain for one PMT
virtual std::unique_ptr< CaloCell > clone() const override final
clone
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
virtual void setEnergy(float ene) override final
set total energy, reset eneDiff to zero (final override of CaloCell method)
void setQuality(unsigned char qual, unsigned char qbit, int pmt)
set quality value and quality bits for one PMT (TileCell specific overloads)
virtual void setTime(float t) override final
set cell time, reset timeDiff
A functional to get the ID from a CaloCell pointer.
std::size_t operator()(const CaloCell *p) const