ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
VP1CaloClusterCollection::Imp::ClusterHandle Class Reference
Collaboration diagram for VP1CaloClusterCollection::Imp::ClusterHandle:

Public Member Functions

 ClusterHandle (const CaloCluster *c)
 
 ~ClusterHandle ()
 
void attach (VP1CaloClusterCollection::Imp *d)
 
void detach (VP1ExtraSepLayerHelper *sh)
 
void updateShapePars (VP1CaloClusterCollection::Imp *d)
 
SoGenericBoxgenericBox ()
 
double phi () const
 
double eta () const
 
double transverseEnergy () const
 
double energy () const
 
double energyForLengthAndCuts (const VP1CaloClusterCollection::Imp *d)
 
const CaloClustercluster () const
 
bool attached () const
 

Private Attributes

bool m_attached
 
double m_transverseEnergy
 
const CaloClusterm_cluster
 
SoGenericBoxm_genericBox
 

Detailed Description

Definition at line 70 of file VP1CaloClusterCollection.cxx.

Constructor & Destructor Documentation

◆ ClusterHandle()

VP1CaloClusterCollection::Imp::ClusterHandle::ClusterHandle ( const CaloCluster c)
inline

Definition at line 72 of file VP1CaloClusterCollection.cxx.

72  : m_attached(false), m_cluster(c), m_genericBox(0)
73  {
74  m_transverseEnergy = sin(2*atan(exp(-fabs(eta()))))*energy();
75  }

◆ ~ClusterHandle()

VP1CaloClusterCollection::Imp::ClusterHandle::~ClusterHandle ( )
inline

Definition at line 76 of file VP1CaloClusterCollection.cxx.

76 { if (m_genericBox) m_genericBox->unref(); }

Member Function Documentation

◆ attach()

void VP1CaloClusterCollection::Imp::ClusterHandle::attach ( VP1CaloClusterCollection::Imp d)
inline

Definition at line 77 of file VP1CaloClusterCollection.cxx.

77  {
78  if (!m_genericBox) {
79  m_genericBox = new SoGenericBox();
80  m_genericBox->drawEdgeLines = d->showOutlines;
82  m_genericBox->ref();
83  }
84  m_attached = true;
86  d->sephelper->addNode(m_genericBox);
87  }

◆ attached()

bool VP1CaloClusterCollection::Imp::ClusterHandle::attached ( ) const
inline

Definition at line 118 of file VP1CaloClusterCollection.cxx.

118 { return m_attached; }

◆ cluster()

const CaloCluster* VP1CaloClusterCollection::Imp::ClusterHandle::cluster ( ) const
inline

Definition at line 117 of file VP1CaloClusterCollection.cxx.

117 { return m_cluster; }

◆ detach()

void VP1CaloClusterCollection::Imp::ClusterHandle::detach ( VP1ExtraSepLayerHelper sh)
inline

Definition at line 88 of file VP1CaloClusterCollection.cxx.

88  {
89  if (m_genericBox) {
90  sh->removeNode(m_genericBox);
91  }
92  m_attached = false;
93  }

◆ energy()

double VP1CaloClusterCollection::Imp::ClusterHandle::energy ( ) const
inline

Definition at line 115 of file VP1CaloClusterCollection.cxx.

115 { return m_cluster->e(); }

◆ energyForLengthAndCuts()

double VP1CaloClusterCollection::Imp::ClusterHandle::energyForLengthAndCuts ( const VP1CaloClusterCollection::Imp d)
inline

Definition at line 116 of file VP1CaloClusterCollection.cxx.

116 { return d->considerTransverseEnergies ? transverseEnergy() : energy(); }

◆ eta()

double VP1CaloClusterCollection::Imp::ClusterHandle::eta ( ) const
inline

Definition at line 113 of file VP1CaloClusterCollection.cxx.

113 { return m_cluster->eta(); }

◆ genericBox()

SoGenericBox* VP1CaloClusterCollection::Imp::ClusterHandle::genericBox ( )
inline

Definition at line 111 of file VP1CaloClusterCollection.cxx.

111 { return m_genericBox; }

◆ phi()

double VP1CaloClusterCollection::Imp::ClusterHandle::phi ( ) const
inline

Definition at line 112 of file VP1CaloClusterCollection.cxx.

112 { return m_cluster->phi(); }

◆ transverseEnergy()

double VP1CaloClusterCollection::Imp::ClusterHandle::transverseEnergy ( ) const
inline

Definition at line 114 of file VP1CaloClusterCollection.cxx.

114 { return m_transverseEnergy; }

◆ updateShapePars()

void VP1CaloClusterCollection::Imp::ClusterHandle::updateShapePars ( VP1CaloClusterCollection::Imp d)
inline

Definition at line 94 of file VP1CaloClusterCollection.cxx.

94  {
95  if (!m_attached)
96  return;
97  const double dEta = 0.05;//FIXME
98  const double dPhi = 0.05;//FIXME
99  const double theEta = eta();
100  const double thePhi = phi();
101  const double cellDepth = d->energyToLength(energyForLengthAndCuts(d));
103  m_genericBox->setParametersForBarrelEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
105  } else {
106  m_genericBox->setParametersForEndCapEtaPhiCell( theEta-0.5*dEta, theEta+0.5*dEta,thePhi-0.5*dPhi, thePhi+0.5*dPhi,
108  }
109  }

Member Data Documentation

◆ m_attached

bool VP1CaloClusterCollection::Imp::ClusterHandle::m_attached
private

Definition at line 120 of file VP1CaloClusterCollection.cxx.

◆ m_cluster

const CaloCluster* VP1CaloClusterCollection::Imp::ClusterHandle::m_cluster
private

Definition at line 122 of file VP1CaloClusterCollection.cxx.

◆ m_genericBox

SoGenericBox* VP1CaloClusterCollection::Imp::ClusterHandle::m_genericBox
private

Definition at line 123 of file VP1CaloClusterCollection.cxx.

◆ m_transverseEnergy

double VP1CaloClusterCollection::Imp::ClusterHandle::m_transverseEnergy
private

Definition at line 121 of file VP1CaloClusterCollection.cxx.


The documentation for this class was generated from the following file:
VP1CaloClusterCollection::Imp::ClusterHandle::updateShapePars
void updateShapePars(VP1CaloClusterCollection::Imp *d)
Definition: VP1CaloClusterCollection.cxx:94
VP1CaloClusterCollection::Imp::ClusterHandle::transverseEnergy
double transverseEnergy() const
Definition: VP1CaloClusterCollection.cxx:114
hist_file_dump.d
d
Definition: hist_file_dump.py:137
SoGenericBox::setParametersForEndCapEtaPhiCell
void setParametersForEndCapEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
Definition: SoGenericBox.cxx:266
SoGenericBox::setParametersForBarrelEtaPhiCell
void setParametersForBarrelEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
Definition: SoGenericBox.cxx:256
VP1CaloClusterCollection::Imp::ClusterHandle::phi
double phi() const
Definition: VP1CaloClusterCollection.cxx:112
VP1CaloClusterCollection::Imp::ClusterHandle::energyForLengthAndCuts
double energyForLengthAndCuts(const VP1CaloClusterCollection::Imp *d)
Definition: VP1CaloClusterCollection.cxx:116
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
VP1CaloClusterCollection::Imp::calo_start_r
static const double calo_start_r
Definition: VP1CaloClusterCollection.cxx:66
VP1CaloClusterCollection::Imp::ClusterHandle::m_genericBox
SoGenericBox * m_genericBox
Definition: VP1CaloClusterCollection.cxx:123
VP1CaloClusterCollection::Imp::ClusterHandle::m_cluster
const CaloCluster * m_cluster
Definition: VP1CaloClusterCollection.cxx:122
VP1CaloClusterCollection::Imp::ClusterHandle::m_transverseEnergy
double m_transverseEnergy
Definition: VP1CaloClusterCollection.cxx:121
RCU::Shell
Definition: ShellExec.cxx:28
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
VP1CaloClusterCollection::Imp::ClusterHandle::energy
double energy() const
Definition: VP1CaloClusterCollection.cxx:115
VP1CaloClusterCollection::Imp::calo_start_z
static const double calo_start_z
Definition: VP1CaloClusterCollection.cxx:67
SoGenericBox::drawEdgeLines
SoSFBool drawEdgeLines
Definition: SoGenericBox.h:33
CaloCluster::eta
virtual double eta() const
Retrieve eta independent of signal state.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:755
SoGenericBox::forceEdgeLinesInBaseColour
SoSFBool forceEdgeLinesInBaseColour
Definition: SoGenericBox.h:34
SoGenericBox
Definition: SoGenericBox.h:26
CaloCluster::e
virtual double e() const
Retrieve energy independent of signal state.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:753
VP1CaloClusterCollection::Imp::ClusterHandle::eta
double eta() const
Definition: VP1CaloClusterCollection.cxx:113
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:527
python.compressB64.c
def c
Definition: compressB64.py:93
VP1CaloClusterCollection::Imp::ClusterHandle::m_attached
bool m_attached
Definition: VP1CaloClusterCollection.cxx:120
VP1CaloClusterCollection::Imp::calo_crack_eta
static const double calo_crack_eta
Definition: VP1CaloClusterCollection.cxx:68
CaloCluster::phi
virtual double phi() const
Retrieve phi independent of signal state.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:759