ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
CaloCell Class Referenceabstract

Data object for each calorimeter readout cell. More...

#include <CaloCell.h>

Inheritance diagram for CaloCell:
Collaboration diagram for CaloCell:

Public Types

enum  Kind {
  P4EETAPHIM, P4IPTCOTTHPHIM, P4PTETAPHIM, P4PXPYPZE,
  UNKNOWN
}
 

Public Member Functions

 CaloCell ()
 default constructor (should not be used, only there for persistency reason) More...
 
 CaloCell (const CaloDetDescrElement *caloDDE, float energy, float time, double quality, CaloGain::CaloGain gain)
 Legacy constructor. More...
 
 CaloCell (const CaloDetDescrElement *caloDDE, float energy, float time, uint16_t quality, uint16_t provenance, CaloGain::CaloGain gain)
 Main constructor. More...
 
 CaloCell (const CaloDetDescrElement *caloDDE, const Identifier &ID, float energy, float time, double quality, CaloGain::CaloGain gain)
 Legacy constructor for MBTS cells which doesn't use caloDDE to get ID. More...
 
 CaloCell (const CaloDetDescrElement *caloDDE, const Identifier &ID, float energy, float time, uint16_t quality, uint16_t provenance, CaloGain::CaloGain gain)
 Main constructor for MBTS cells which doesn't use caloDDE to get ID. More...
 
virtual ~CaloCell ()
 default destructor More...
 
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. More...
 
double energy () const
 get energy (data member) More...
 
float x () const
 get x (through CaloDetDescrElement) More...
 
float y () const
 get y (through CaloDetDescrElement) More...
 
float z () const
 get z (through CaloDetDescrElement) More...
 
Identifier ID () const
 get ID (from cached data member) non-virtual and inline for fast access More...
 
float time () const
 get time (data member) More...
 
uint16_t quality () const
 get quality (data member) More...
 
uint16_t provenance () const
 get provenance (data member) More...
 
CaloGain::CaloGain gain () const
 get gain (data member ) More...
 
const CaloDetDescrElementcaloDDE () const
 get pointer to CaloDetDescrElement (data member) More...
 
void setCaloDDE (const CaloDetDescrElement *caloDDE)
 set pointer to CaloDetDescrElement More...
 
void addEnergy (float energy)
 add energy More...
 
void addTime (float delta)
 add time More...
 
void setProvenance (uint16_t prov)
 set Provenance More...
 
void setGain (CaloGain::CaloGain gain=CaloGain::INVALIDGAIN)
 set gain More...
 
void setQuality (uint16_t quality)
 set quality More...
 
void setQuality (double quality)
 set Quality (obsolete) More...
 
virtual void set4Mom (const I4Momentum *const theI4Mom) override final
 set 4Momentum (will throw exception since cannot be implemented) More...
 
virtual void set4Mom (const I4Momentum &theI4Mom) override final
 set 4Momentum (will throw exception since cannot be implemented) More...
 
virtual void set4Mom (const CLHEP::HepLorentzVector &theHlv) override final
 set 4Momentum (will throw exception since cannot be implemented) More...
 
virtual std::unique_ptr< CaloCellclone () const
 clone a CaloCell More...
 
void set (const CaloDetDescrElement *caloDDE, const Identifier &ID)
 Fast method to change the identity of a cell. More...
 
void set (float energy, float time, uint16_t quality, uint16_t provenance, CaloGain::CaloGain gain)
 Fast method to change the data of a cell. More...
 
void set (float energy, float time, double quality, CaloGain::CaloGain gain)
 Fast method to change the data of a cell. More...
 
virtual double px () const
 x component of momentum More...
 
virtual double py () const
 y component of momentum More...
 
virtual double pz () const
 z component of momentum More...
 
virtual double p () const
 magnitude of 3-momentum. More...
 
virtual double p2 () const
 square of momentum magnitude More...
 
virtual double m2 () const
 mass squared More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double iPt () const
 inverse of transverse momentum More...
 
virtual double rapidity () const
 rapidity More...
 
virtual double tanTh () const
 tan theta More...
 
virtual CLHEP::HepLorentzVector hlv () const
 HepLorentzVector Special implementation from Frank Paige : if negative energy, points in opposite direction but eta and phi still the same
More...
 
virtual const I4MomentumErrorerrors () const
 Access to errors, if available; returns 0 if no errors. More...
 
I4Momentum::Kind kind () const
 tells what kind of P4XYZT this is More...
 
virtual std::ostream & dump (std::ostream &out=std::cout) const
 Print I4Momentum content. More...
 
virtual AthenaBarCode_t getAthenaBarCode () const
 
virtual void setAthenaBarCode (AthenaBarCode_t)
 
virtual bool hasSameAthenaBarCode (const IAthenaBarCode &) const
 
virtual bool hasSameAthenaBarCodeExceptVersion (const IAthenaBarCode &) const
 
virtual AthenaBarCodeVersion_t getVersion () const
 
virtual void newVersion ()
 
virtual void setVersion (AthenaBarCodeVersion_t)
 
virtual void fillToken (INavigationToken &thisToken) const =0
 
virtual void fillToken (INavigationToken &thisToken, const std::any &weight) const =0
 
virtual void fillToken (INavigationToken &) const
 
virtual void fillToken (INavigationToken &, const std::any &) const
 

Static Public Attributes

static const AthenaBarCode_t UNDEFINEDBARCODE = (AthenaBarCode_t)(-1)
 
static const AthenaBarCode_t UNDEFINEDVERSION = UNDEFINEDBARCODE
 

Protected Attributes

float m_energy
 energy (in MeV) More...
 
float m_time
 time More...
 
union {
   int   m_quality = 0
 
   uint16_t   m_qualProv [2]
 
   uint8_t   m_tileQual [4]
 
}; 
 quality More...
 
Identifier m_ID
 offline identifier More...
 
CaloGain::CaloGain m_gain
 gain More...
 
const CaloDetDescrElementm_caloDDE
 pointer to static CaloDetDescrElement to access information that does not change from event to event More...
 

virtual functions

That get overriden by TileCell/LarCell

virtual bool badcell () const
 check is cell is dead More...
 
virtual void setEnergy (float energy)
 set energy More...
 
virtual void scaleEnergy (float scale)
 scale energy More...
 
virtual void setTime (float time)
 set time More...
 

Detailed Description

Data object for each calorimeter readout cell.

CaloCell is a class with nearly all information on a calorimeter cell in a given event. It has 4-momentum behavior through P4EEtaPhiMBase inheritance, and Navigable behavior through INavigable4Momentum, and NavigableTerminalNode inheritance. Further static information can be obtained through the CaloDetDescrElement obtained with caloDDE() method. CaloCell is a base class to LArCell and TileCell.

Author
Hong Ma
David Rousseau
Peter Loch

Definition at line 54 of file CaloCell.h.

Member Enumeration Documentation

◆ Kind

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

Definition at line 33 of file I4Momentum.h.

Constructor & Destructor Documentation

◆ CaloCell() [1/5]

CaloCell::CaloCell ( )
inline

default constructor (should not be used, only there for persistency reason)

Definition at line 257 of file CaloCell.h.

258  :
259  m_energy(0),
260  m_time(0),
261  m_quality(0),
263  m_caloDDE(0)
264 {}

◆ CaloCell() [2/5]

CaloCell::CaloCell ( const CaloDetDescrElement caloDDE,
float  energy,
float  time,
double  quality,
CaloGain::CaloGain  gain 
)

Legacy constructor.

Definition at line 19 of file CaloCell.cxx.

24  :
26  m_time(time),
27  m_quality((int)(quality)),
29  m_gain(gain),
31 {}

◆ CaloCell() [3/5]

CaloCell::CaloCell ( const CaloDetDescrElement caloDDE,
float  energy,
float  time,
uint16_t  quality,
uint16_t  provenance,
CaloGain::CaloGain  gain 
)

Main constructor.

Definition at line 34 of file CaloCell.cxx.

40  :
42  m_time(time),
44  m_gain(gain),
46 {
48  // cppcheck-suppress objectIndex
50 }

◆ CaloCell() [4/5]

CaloCell::CaloCell ( const CaloDetDescrElement caloDDE,
const Identifier ID,
float  energy,
float  time,
double  quality,
CaloGain::CaloGain  gain 
)

Legacy constructor for MBTS cells which doesn't use caloDDE to get ID.

Definition at line 53 of file CaloCell.cxx.

59  :
61  m_time(time),
62  m_quality((int)(quality)),
63  m_ID(ID),
64  m_gain(gain),
66 {}

◆ CaloCell() [5/5]

CaloCell::CaloCell ( const CaloDetDescrElement caloDDE,
const Identifier ID,
float  energy,
float  time,
uint16_t  quality,
uint16_t  provenance,
CaloGain::CaloGain  gain 
)

Main constructor for MBTS cells which doesn't use caloDDE to get ID.

Definition at line 69 of file CaloCell.cxx.

76  :
78  m_time(time),
79  m_ID(ID),
80  m_gain(gain),
82 {
84  // cppcheck-suppress objectIndex
86 }

◆ ~CaloCell()

CaloCell::~CaloCell ( )
virtual

default destructor

Definition at line 13 of file CaloCell.cxx.

14 {
15 // destructor
16 }

Member Function Documentation

◆ addEnergy()

void CaloCell::addEnergy ( float  energy)
inline

add energy

Definition at line 443 of file CaloCell.h.

443  {
444  m_energy += energy;
445 }

◆ addTime()

void CaloCell::addTime ( float  delta)
inline

add time

Definition at line 448 of file CaloCell.h.

449 {
450  m_time += delta;
451 }

◆ assign()

void CaloCell::assign ( const CaloDetDescrElement caloDDE,
const Identifier ID,
float  energy,
float  time,
uint16_t  quality,
uint16_t  provenance,
CaloGain::CaloGain  gain 
)
inline

For initializing a cell we get from a DataPool.

Definition at line 269 of file CaloCell.h.

276 {
277  m_energy = energy;
278  m_time = time;
279  m_ID = ID;
280  m_gain = gain;
281  m_caloDDE = caloDDE;
282  m_qualProv[0]=quality;
284 }

◆ badcell()

bool CaloCell::badcell ( ) const
virtual

check is cell is dead

Reimplemented in TileCell, and LArCell.

Definition at line 144 of file CaloCell.cxx.

145 {
146  // actual correct implementation is in LArCell and TileCell
147  return false;
148 }

◆ caloDDE()

const CaloDetDescrElement * CaloCell::caloDDE ( ) const
inline

get pointer to CaloDetDescrElement (data member)

Definition at line 315 of file CaloCell.h.

315  {
316  return m_caloDDE;
317 }

◆ clone()

std::unique_ptr< CaloCell > CaloCell::clone ( ) const
virtual

clone a CaloCell

Reimplemented in TileCell, and LArCell.

Definition at line 134 of file CaloCell.cxx.

135 {
136  return std::make_unique<CaloCell>(this->caloDDE(),
137  this->energy(),
138  this->time(),
139  this->quality(),
140  this->provenance(),
141  this->gain() );
142 }

◆ cosPhi()

double CaloCell::cosPhi ( ) const
inlinefinaloverridevirtual

get cos(phi)

Reimplemented from P4EEtaPhiMBase.

Definition at line 411 of file CaloCell.h.

412 {
413  return m_caloDDE->cosPhi();
414 }

◆ cosTh()

double CaloCell::cosTh ( ) const
inlinefinaloverridevirtual

get cos(theta) (derived from sinTh)

Reimplemented from P4EEtaPhiMBase.

Definition at line 390 of file CaloCell.h.

391 {
392  return m_caloDDE->cosTh();
393 }

◆ cotTh()

double CaloCell::cotTh ( ) const
inlinefinaloverridevirtual

get cottan(theta)

Reimplemented from P4EEtaPhiMBase.

Definition at line 397 of file CaloCell.h.

398 {
399  return m_caloDDE->cotTh();
400 }

◆ dump()

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 }

◆ e()

double CaloCell::e ( ) const
inlinefinaloverridevirtual

get energy (data member) (synonym to method energy()

Implements I4Momentum.

Definition at line 327 of file CaloCell.h.

328 {
329  return m_energy;
330 }

◆ energy()

double CaloCell::energy ( ) const
inline

get energy (data member)

Definition at line 321 of file CaloCell.h.

322 {
323  return m_energy;
324 }

◆ errors()

const I4MomentumError * P4EEtaPhiMBase::errors ( ) const
virtualinherited

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

Implements I4Momentum.

Reimplemented in P4EEtaPhiM.

Definition at line 175 of file P4EEtaPhiMBase.cxx.

176 {
177  return 0;
178 }

◆ et()

double CaloCell::et ( ) const
inlinefinaloverridevirtual

get et

Reimplemented from P4EEtaPhiMBase.

Definition at line 417 of file CaloCell.h.

418 {
419  return this->e() * this->sinTh();
420 }

◆ eta()

double CaloCell::eta ( ) const
inlinefinaloverridevirtual

get eta (through CaloDetDescrElement)

Implements I4Momentum.

Definition at line 376 of file CaloCell.h.

377 {
378  return m_caloDDE->eta();
379 }

◆ fillToken() [1/4]

virtual void NavigableTerminalNode::fillToken ( INavigationToken ) const
inlinevirtualinherited

Implements INavigable.

Definition at line 31 of file NavigableTerminalNode.h.

31 { };

◆ fillToken() [2/4]

virtual void NavigableTerminalNode::fillToken ( INavigationToken ,
const std::any &   
) const
inlinevirtualinherited

Implements INavigable.

Definition at line 32 of file NavigableTerminalNode.h.

32 { };

◆ fillToken() [3/4]

virtual void INavigable::fillToken ( INavigationToken thisToken) const
pure virtualinherited

Implemented in egamma, eflowObject, Analysis::TauJet, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >, ParticleSigStateImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, Analysis::Muon, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4PtEtaPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, Nav4MomWrapper< Navigable_t, P4Momentum_t >, Nav4MomWrapper< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE >, Jet, Navigable< CONT, RPAR, COLL >, Navigable< INavigable4MomentumCollection, MissingETHandlers::Weight >, Navigable< MuonContainer, double >, Navigable< INavigable4MomentumCollection, double >, Navigable< DataVector< INavigable4Momentum > >, Navigable< EMShowerMinimalContainer, double >, Navigable< CaloClusterContainer, double >, Navigable< PhotonContainer, double >, Navigable< ExampleHitContainer, double >, Navigable< ExampleHitContainer >, Navigable< Analysis::MuonContainer, double >, Navigable< DataVector< INavigable4Momentum >, double >, Navigable< CaloCellLinkContainer, double >, Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, Navigable< Rec::TrackParticleContainer, double >, Navigable< CaloCellContainer, double >, Navigable< egammaContainer, double >, Navigable< ElectronContainer, double >, Navigable< TruthParticleContainer, double >, Navigable< JetCollection, double >, CaloClusterNavigable, Analysis::ParticleShallowClone, Analysis::ISvxConstituent, Analysis::ISvxAssociation, Analysis::MuonAssociation, and NavigableTerminalNode.

◆ fillToken() [4/4]

virtual void INavigable::fillToken ( INavigationToken thisToken,
const std::any &  weight 
) const
pure virtualinherited

Implemented in ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >, ParticleSigStateImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4PtEtaPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, Nav4MomWrapper< Navigable_t, P4Momentum_t >, Nav4MomWrapper< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE >, eflowObject, egamma, Analysis::TauJet, Analysis::Muon, Navigable< CONT, RPAR, COLL >, Navigable< INavigable4MomentumCollection, MissingETHandlers::Weight >, Navigable< MuonContainer, double >, Navigable< INavigable4MomentumCollection, double >, Navigable< DataVector< INavigable4Momentum > >, Navigable< EMShowerMinimalContainer, double >, Navigable< CaloClusterContainer, double >, Navigable< PhotonContainer, double >, Navigable< ExampleHitContainer, double >, Navigable< ExampleHitContainer >, Navigable< Analysis::MuonContainer, double >, Navigable< DataVector< INavigable4Momentum >, double >, Navigable< CaloCellLinkContainer, double >, Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, Navigable< Rec::TrackParticleContainer, double >, Navigable< CaloCellContainer, double >, Navigable< egammaContainer, double >, Navigable< ElectronContainer, double >, Navigable< TruthParticleContainer, double >, Navigable< JetCollection, double >, Jet, CaloClusterNavigable, Analysis::ParticleShallowClone, Analysis::ISvxConstituent, Analysis::ISvxAssociation, Analysis::MuonAssociation, and NavigableTerminalNode.

◆ gain()

CaloGain::CaloGain CaloCell::gain ( ) const
inline

get gain (data member )

Definition at line 355 of file CaloCell.h.

356 {
357  return m_gain;
358 }

◆ getAthenaBarCode()

virtual AthenaBarCode_t IAthenaBarCode::getAthenaBarCode ( ) const
inlinevirtualinherited

◆ getVersion()

virtual AthenaBarCodeVersion_t IAthenaBarCode::getVersion ( ) const
inlinevirtualinherited

◆ hasSameAthenaBarCode()

virtual bool IAthenaBarCode::hasSameAthenaBarCode ( const IAthenaBarCode ) const
inlinevirtualinherited

◆ hasSameAthenaBarCodeExceptVersion()

virtual bool IAthenaBarCode::hasSameAthenaBarCodeExceptVersion ( const IAthenaBarCode ) const
inlinevirtualinherited

◆ hlv()

CLHEP::HepLorentzVector P4EEtaPhiMBase::hlv ( ) const
virtualinherited

HepLorentzVector Special implementation from Frank Paige : if negative energy, points in opposite direction but eta and phi still the same

Implements I4Momentum.

Reimplemented in CaloCluster.

Definition at line 134 of file P4EEtaPhiMBase.cxx.

135 {
136  //minimize the number of calculation and dereference
137  const double theCosTh=this->cosTh();
138 
139  // DR from Frank Paige
140  // negative energy point in opposite direction
141  // BUT Eta and Phi still the same
142  // double theP=theE;
143 
144  const double theP=this->p();
145 
146  const double theSinTh=std::sqrt(1.-theCosTh*theCosTh);
147  const double thePt=theP*theSinTh;
148  const double thePx=thePt*this->cosPhi();
149  const double thePy=thePt*this->sinPhi();
150  const double thePz=theP*theCosTh;
151 
152 
153  return CLHEP::HepLorentzVector(thePx,thePy,thePz,this->e());
154 
155 }

◆ ID()

Identifier CaloCell::ID ( ) const
inline

get ID (from cached data member) non-virtual and inline for fast access

Definition at line 289 of file CaloCell.h.

289  {
290  return m_ID;
291 }

◆ 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  }

◆ 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; };

◆ m()

double CaloCell::m ( ) const
inlinefinaloverridevirtual

get mass (hardcoded to be null)

Implements I4Momentum.

Definition at line 334 of file CaloCell.h.

335 {
336  // zero mass by convention
337  return 0.;
338 }

◆ 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 }

◆ newVersion()

virtual void IAthenaBarCode::newVersion ( )
inlinevirtualinherited

Reimplemented in Rec::TrackParticle, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >, ParticleSigStateImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4PtEtaPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, and AthenaBarCodeBase.

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

89  {
90  // throw std::runtime_error("IAthenaBarCode::newVersion():: can't newVersion() in the dummy implementation");
91  }

◆ 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()

double CaloCell::phi ( ) const
inlinefinaloverridevirtual

get phi (through CaloDetDescrElement)

Implements I4Momentum.

Definition at line 369 of file CaloCell.h.

370 {
371  return m_caloDDE->phi();
372 }

◆ provenance()

uint16_t CaloCell::provenance ( ) const
inline

get provenance (data member)

Definition at line 348 of file CaloCell.h.

349 {
350  // cppcheck-suppress objectIndex
351  return m_qualProv[1];
352 }

◆ 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  }

◆ 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  }

◆ 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  }

◆ 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  }

◆ quality()

uint16_t CaloCell::quality ( ) const
inline

get quality (data member)

Definition at line 342 of file CaloCell.h.

343 {
344  return m_qualProv[0];
345 }

◆ 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  }

◆ scaleEnergy()

void CaloCell::scaleEnergy ( float  scale)
inlinevirtual

scale energy

Reimplemented in TileCell.

Definition at line 472 of file CaloCell.h.

473 {
474  m_energy *= scale ;
475 }

◆ set() [1/3]

void CaloCell::set ( const CaloDetDescrElement caloDDE,
const Identifier ID 
)
inline

Fast method to change the identity of a cell.

Definition at line 505 of file CaloCell.h.

506  {
507  m_ID = ID;
508  m_caloDDE = caloDDE;
509 }

◆ set() [2/3]

void CaloCell::set ( float  energy,
float  time,
double  quality,
CaloGain::CaloGain  gain 
)

Fast method to change the data of a cell.

OBSOLETE

Definition at line 104 of file CaloCell.cxx.

108 {
109  m_energy = energy;
110  m_time = time;
111  m_quality = (int)(quality);
112  m_gain = gain;
113 }

◆ set() [3/3]

void CaloCell::set ( float  energy,
float  time,
uint16_t  quality,
uint16_t  provenance,
CaloGain::CaloGain  gain 
)

Fast method to change the data of a cell.

Definition at line 89 of file CaloCell.cxx.

94 {
95  m_energy = energy;
96  m_time = time;
97  m_gain = gain;
99  // cppcheck-suppress objectIndex
101 }

◆ set4Mom() [1/3]

void CaloCell::set4Mom ( const CLHEP::HepLorentzVector &  theHlv)
finaloverridevirtual

set 4Momentum (will throw exception since cannot be implemented)

Reimplemented from P4EEtaPhiMBase.

Definition at line 127 of file CaloCell.cxx.

128 {
129  std::cout << " FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom " << std::endl ;
130  std::abort();
131 }

◆ set4Mom() [2/3]

void CaloCell::set4Mom ( const I4Momentum theI4Mom)
finaloverridevirtual

set 4Momentum (will throw exception since cannot be implemented)

Reimplemented from P4EEtaPhiMBase.

Definition at line 121 of file CaloCell.cxx.

122 {
123  std::cout << " FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom " << std::endl ;
124  std::abort();
125 }

◆ set4Mom() [3/3]

void CaloCell::set4Mom ( const I4Momentum *const  theI4Mom)
finaloverridevirtual

set 4Momentum (will throw exception since cannot be implemented)

Reimplemented from P4EEtaPhiMBase.

Definition at line 115 of file CaloCell.cxx.

116 {
117  std::cout << " FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom " << std::endl ;
118  std::abort();
119 }

◆ setAthenaBarCode()

virtual void IAthenaBarCode::setAthenaBarCode ( AthenaBarCode_t  )
inlinevirtualinherited

Reimplemented in Rec::TrackParticle, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >, ParticleSigStateImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4PtEtaPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, and AthenaBarCodeBase.

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

71  {
72  // throw std::runtime_error("IAthenaBarCode::setAthenaBarCode():: can't set AthenaBarCode in the dummy implementation");
73  }

◆ setCaloDDE()

void CaloCell::setCaloDDE ( const CaloDetDescrElement caloDDE)
inline

set pointer to CaloDetDescrElement

Definition at line 497 of file CaloCell.h.

497  {
498  m_caloDDE = caloDDE;
499  if (m_caloDDE) {
500  m_ID = m_caloDDE->identify();
501  }
502 }

◆ setEnergy()

void CaloCell::setEnergy ( float  energy)
inlinevirtual

set energy

Reimplemented in TileCell.

Definition at line 466 of file CaloCell.h.

467 {
468  m_energy = energy ;
469 }

◆ setGain()

void CaloCell::setGain ( CaloGain::CaloGain  gain = CaloGain::INVALIDGAIN)
inline

set gain

Definition at line 491 of file CaloCell.h.

492 {
493  m_gain = gain;
494 }

◆ setProvenance()

void CaloCell::setProvenance ( uint16_t  prov)
inline

set Provenance

Definition at line 484 of file CaloCell.h.

485 {
486  // cppcheck-suppress objectIndex
487  m_qualProv[1] = prov;
488 }

◆ setQuality() [1/2]

void CaloCell::setQuality ( double  quality)
inline

set Quality (obsolete)

Definition at line 460 of file CaloCell.h.

461 {
462  m_quality = (int)(quality);
463 }

◆ setQuality() [2/2]

void CaloCell::setQuality ( uint16_t  quality)
inline

set quality

Definition at line 454 of file CaloCell.h.

455 {
456  m_qualProv[0] = quality;
457 }

◆ setTime()

void CaloCell::setTime ( float  time)
inlinevirtual

set time

Reimplemented in TileCell.

Definition at line 478 of file CaloCell.h.

479 {
480  m_time = time;
481 }

◆ setVersion()

virtual void IAthenaBarCode::setVersion ( AthenaBarCodeVersion_t  )
inlinevirtualinherited

Reimplemented in Rec::TrackParticle, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >, ParticleSigStateImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4PtEtaPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, and AthenaBarCodeBase.

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

93  {
94  // throw std::runtime_error("IAthenaBarCode::setVersion():: can't setVersion() in the dummy implementation");
95  }

◆ sinPhi()

double CaloCell::sinPhi ( ) const
inlinefinaloverridevirtual

get sin(phi)

Reimplemented from P4EEtaPhiMBase.

Definition at line 404 of file CaloCell.h.

405 {
406  return m_caloDDE->sinPhi();
407 }

◆ sinTh()

double CaloCell::sinTh ( ) const
inlinefinaloverridevirtual

get sin(theta) (through CaloDetDescrElement)

Reimplemented from P4EEtaPhiMBase.

Definition at line 383 of file CaloCell.h.

384 {
385  return m_caloDDE->sinTh();
386 }

◆ 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 }

◆ time()

float CaloCell::time ( ) const
inline

get time (data member)

Definition at line 362 of file CaloCell.h.

363 {
364  return m_time;
365 }

◆ x()

float CaloCell::x ( ) const
inline

get x (through CaloDetDescrElement)

Definition at line 423 of file CaloCell.h.

424 {
425  return m_caloDDE->x();
426 }

◆ y()

float CaloCell::y ( ) const
inline

get y (through CaloDetDescrElement)

Definition at line 430 of file CaloCell.h.

431 {
432  return m_caloDDE->y();
433 }

◆ z()

float CaloCell::z ( ) const
inline

get z (through CaloDetDescrElement)

Definition at line 437 of file CaloCell.h.

438 {
439  return m_caloDDE->z();
440 }

Member Data Documentation

◆ @4

union { ... }

quality

◆ m_caloDDE

const CaloDetDescrElement* CaloCell::m_caloDDE
protected

pointer to static CaloDetDescrElement to access information that does not change from event to event

Definition at line 250 of file CaloCell.h.

◆ m_energy

float CaloCell::m_energy
protected

energy (in MeV)

Definition at line 224 of file CaloCell.h.

◆ m_gain

CaloGain::CaloGain CaloCell::m_gain
protected

gain

Definition at line 247 of file CaloCell.h.

◆ m_ID

Identifier CaloCell::m_ID
protected

offline identifier

Definition at line 245 of file CaloCell.h.

◆ m_quality

int CaloCell::m_quality = 0

Definition at line 239 of file CaloCell.h.

◆ m_qualProv

uint16_t CaloCell::m_qualProv[2]

Definition at line 240 of file CaloCell.h.

◆ m_tileQual

uint8_t CaloCell::m_tileQual[4]

Definition at line 241 of file CaloCell.h.

◆ m_time

float CaloCell::m_time
protected

time

Definition at line 226 of file CaloCell.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.


The documentation for this class was generated from the following files:
CaloDetDescrElement::cosPhi
float cosPhi() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:391
P4EEtaPhiMBase::cotTh
virtual double cotTh() const
cottan theta
Definition: P4EEtaPhiMBase.cxx:77
P4EEtaPhiMBase::pz
virtual double pz() const
z component of momentum
Definition: P4EEtaPhiMBase.cxx:130
P4EEtaPhiMBase::pt
virtual double pt() const
transverse momentum
Definition: P4EEtaPhiMBase.cxx:101
IAthenaBarCode::UNDEFINEDBARCODE
static const AthenaBarCode_t UNDEFINEDBARCODE
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:52
CaloDetDescrElement::cotTh
float cotTh() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:387
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
CaloGain::UNKNOWNGAIN
@ UNKNOWNGAIN
Definition: CaloGain.h:20
P4EEtaPhiMBase::cosPhi
virtual double cosPhi() const
cosinus phi
Definition: P4EEtaPhiMBase.cxx:54
I4Momentum::P4IPTCOTTHPHIM
@ P4IPTCOTTHPHIM
Definition: I4Momentum.h:33
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:327
CaloCell::provenance
uint16_t provenance() const
get provenance (data member)
Definition: CaloCell.h:348
CaloCell::time
float time() const
get time (data member)
Definition: CaloCell.h:362
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:321
CaloCell::m_quality
int m_quality
Definition: CaloCell.h:239
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:63
I4Momentum::e
virtual double e() const =0
energy
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:315
P4EEtaPhiMBase::cosTh
virtual double cosTh() const
cosinus theta
Definition: P4EEtaPhiMBase.cxx:82
CaloCell::m_qualProv
uint16_t m_qualProv[2]
Definition: CaloCell.h:240
CaloCell::m_gain
CaloGain::CaloGain m_gain
gain
Definition: CaloCell.h:247
CaloCell::m_energy
float m_energy
energy (in MeV)
Definition: CaloCell.h:224
I4Momentum::eta
virtual double eta() const =0
pseudo rapidity
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
CaloCell::quality
uint16_t quality() const
get quality (data member)
Definition: CaloCell.h:342
I4Momentum::P4PTETAPHIM
@ P4PTETAPHIM
Definition: I4Momentum.h:33
I4Momentum::UNKNOWN
@ UNKNOWN
Definition: I4Momentum.h:33
CaloCell::gain
CaloGain::CaloGain gain() const
get gain (data member )
Definition: CaloCell.h:355
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:289
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
P4EEtaPhiMBase::p
virtual double p() const
magnitude of 3-momentum.
Definition: P4EEtaPhiMBase.cxx:21
I4Momentum::m
virtual double m() const =0
mass
P4EEtaPhiMBase::sinTh
virtual double sinTh() const
sinus theta
Definition: P4EEtaPhiMBase.cxx:87
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
P4EEtaPhiMBase::sinPhi
virtual double sinPhi() const
sinus phi
Definition: P4EEtaPhiMBase.cxx:59
CaloCell::m_time
float m_time
time
Definition: CaloCell.h:226
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
CaloDetDescrElement::cosTh
float cosTh() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:385
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
CaloCell::m_caloDDE
const CaloDetDescrElement * m_caloDDE
pointer to static CaloDetDescrElement to access information that does not change from event to event
Definition: CaloCell.h:250
CaloDetDescrElement::sinTh
float sinTh() const
for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:383
IAthenaBarCode::UNDEFINEDVERSION
static const AthenaBarCode_t UNDEFINEDVERSION
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:53
CaloDetDescrElement::sinPhi
float sinPhi() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:389
I4Momentum::P4EETAPHIM
@ P4EETAPHIM
Definition: I4Momentum.h:33
CaloCell::m_ID
Identifier m_ID
offline identifier
Definition: CaloCell.h:245
CaloCell::sinTh
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
Definition: CaloCell.h:383
I4Momentum::P4PXPYPZE
@ P4PXPYPZE
Definition: I4Momentum.h:33
Identifier
Definition: IdentifierFieldParser.cxx:14