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

This class, which inherits from the pure virtual ICluster, stores a pointer to an eflowRecCluster. More...

#include <eflowRecCluster.h>

Inheritance diagram for eflowMatchCluster:
Collaboration diagram for eflowMatchCluster:

Public Member Functions

 eflowMatchCluster (eflowRecCluster *efRecCluster)
virtual ~eflowMatchCluster ()
eflowRecClustergetEfRecCluster ()
const eflowRecClustergetEfRecCluster () const
virtual double e () const
virtual double eta () const
virtual double phi () const
virtual double etaMean () const
virtual double phiMean () const
virtual double etaVariance () const
virtual double phiVariance () const
virtual bool calVarianceStatus () const
virtual void etaMean (double clusterEtaMean)
virtual void phiMean (double clusterPhiMean)
virtual void etaVariance (double clusterEtaVariance)
virtual void phiVariance (double clusterPhiVariance)
virtual void setCalVarianceStatus ()
virtual unsigned int nCells () const
virtual const std::vector< double > & cellEta () const
virtual const std::vector< double > & cellPhi () const

Private Member Functions

void initCellPositions () const

Private Attributes

eflowRecClusterm_efRecCluster
CxxUtils::CachedValue< std::vector< double > > m_cellEta
CxxUtils::CachedValue< std::vector< double > > m_cellPhi
double m_clusterEne
double m_clusterEta
double m_clusterPhi
double m_clusterEtaMean
double m_clusterPhiMean
double m_clusterEtaVariance
double m_clusterPhiVariance
bool m_calVariance

Detailed Description

This class, which inherits from the pure virtual ICluster, stores a pointer to an eflowRecCluster.

It also stores assorted kinematic information such as cluster energy, mean energy weighted eta/phi values etc.

Definition at line 139 of file eflowRecCluster.h.

Constructor & Destructor Documentation

◆ eflowMatchCluster()

eflowMatchCluster::eflowMatchCluster ( eflowRecCluster * efRecCluster)
inline

Definition at line 142 of file eflowRecCluster.h.

143 : m_efRecCluster(efRecCluster)
144 , m_cellEta{}
145 , m_cellPhi{}
146 , m_clusterEne(m_efRecCluster->getCluster()->e())
147 , m_clusterEta(m_efRecCluster->getCluster()->eta())
148 , m_clusterPhi(m_efRecCluster->getCluster()->phi())
149 , m_clusterEtaMean(0.0)
150 , m_clusterPhiMean(0.0)
153 , m_calVariance(false)
154 {
155 assert(m_efRecCluster);
156 }
CxxUtils::CachedValue< std::vector< double > > m_cellEta
CxxUtils::CachedValue< std::vector< double > > m_cellPhi
eflowRecCluster * m_efRecCluster

◆ ~eflowMatchCluster()

virtual eflowMatchCluster::~eflowMatchCluster ( )
inlinevirtual

Definition at line 157 of file eflowRecCluster.h.

157{}

Member Function Documentation

◆ calVarianceStatus()

virtual bool eflowMatchCluster::calVarianceStatus ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 169 of file eflowRecCluster.h.

169{ return m_calVariance; }

◆ cellEta()

virtual const std::vector< double > & eflowMatchCluster::cellEta ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 212 of file eflowRecCluster.h.

213 {
214 if (!m_cellEta.isValid()) {
216 }
217 return *(m_cellEta.ptr());
218 }
void initCellPositions() const

◆ cellPhi()

virtual const std::vector< double > & eflowMatchCluster::cellPhi ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 219 of file eflowRecCluster.h.

220 {
221 if (!m_cellPhi.isValid()) {
223 }
224 return *(m_cellPhi.ptr());
225 }

◆ e()

virtual double eflowMatchCluster::e ( ) const
inlinevirtual

Definition at line 162 of file eflowRecCluster.h.

162{ return m_clusterEne; }

◆ eta()

virtual double eflowMatchCluster::eta ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 163 of file eflowRecCluster.h.

163{ return m_clusterEta; }

◆ etaMean() [1/2]

virtual double eflowMatchCluster::etaMean ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 165 of file eflowRecCluster.h.

165{ return m_clusterEtaMean; }

◆ etaMean() [2/2]

virtual void eflowMatchCluster::etaMean ( double clusterEtaMean)
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 171 of file eflowRecCluster.h.

172 {
173 m_clusterEtaMean = clusterEtaMean;
174 }

◆ etaVariance() [1/2]

virtual double eflowMatchCluster::etaVariance ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 167 of file eflowRecCluster.h.

167{ return m_clusterEtaVariance; }

◆ etaVariance() [2/2]

virtual void eflowMatchCluster::etaVariance ( double clusterEtaVariance)
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 179 of file eflowRecCluster.h.

180 {
181 m_clusterEtaVariance = clusterEtaVariance;
182 }

◆ getEfRecCluster() [1/2]

eflowRecCluster * eflowMatchCluster::getEfRecCluster ( )
inline

Definition at line 159 of file eflowRecCluster.h.

159{ return m_efRecCluster; }

◆ getEfRecCluster() [2/2]

const eflowRecCluster * eflowMatchCluster::getEfRecCluster ( ) const
inline

Definition at line 160 of file eflowRecCluster.h.

160{ return m_efRecCluster; }

◆ initCellPositions()

void eflowMatchCluster::initCellPositions ( ) const
inlineprivate

Definition at line 228 of file eflowRecCluster.h.

229 {
230 std::vector<double> tmp_cellEta;
231 std::vector<double> tmp_cellPhi;
232 if (m_efRecCluster) {
233 const xAOD::CaloCluster* thisCluster = std::as_const(*m_efRecCluster).getCluster();
234 if (thisCluster) {
235 const CaloClusterCellLink* theCellLink = thisCluster->getCellLinks();
236 CaloClusterCellLink::const_iterator itCell = theCellLink->begin();
237 CaloClusterCellLink::const_iterator endCell = theCellLink->end();
238
239 for (; itCell != endCell; ++itCell) {
240 const CaloCell* thisCell = *itCell;
241 tmp_cellEta.push_back(thisCell->eta());
242 tmp_cellPhi.push_back(thisCell->phi());
243 }
244 } else {
245 std::cerr
246 << "eflowMatchCluster ERROR: No valid link to xAOD::CaloCluster"
247 << std::endl;
248 }
249 } else {
250 std::cerr << "eflowMatchCluster ERROR: No valid link to eflowRecCluster"
251 << std::endl;
252 }
253 m_cellEta.set(std::move(tmp_cellEta));
254 m_cellPhi.set(std::move(tmp_cellPhi));
255 }
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition CaloCell.h:375
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ nCells()

virtual unsigned int eflowMatchCluster::nCells ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 189 of file eflowRecCluster.h.

190 {
191 if (m_efRecCluster) {
192 const xAOD::CaloCluster* thisCluster = std::as_const(*m_efRecCluster).getCluster();
193 if (thisCluster)
194 return thisCluster->size();
195 // Logically if we have no valid pointer to xAOD::CaloCluster, we have no
196 // link to any CaloCells
197 else {
198 std::cerr
199 << "eflowMatchCluster ERROR: No valid link to xAOD::CaloCluster"
200 << std::endl;
201 return 0;
202 }
203 }
204 // Logically if we have no valid pointer to eflowRecCluster, we have no link
205 // to any CaloCells
206 else {
207 std::cerr << "eflowMatchCluster ERROR: No valid link to eflowRecCluster"
208 << std::endl;
209 return 0;
210 }
211 }
size_t size() const
size method (forwarded from CaloClusterCellLink obj)

◆ phi()

virtual double eflowMatchCluster::phi ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 164 of file eflowRecCluster.h.

164{ return m_clusterPhi; }

◆ phiMean() [1/2]

virtual double eflowMatchCluster::phiMean ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 166 of file eflowRecCluster.h.

166{ return m_clusterPhiMean; }

◆ phiMean() [2/2]

virtual void eflowMatchCluster::phiMean ( double clusterPhiMean)
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 175 of file eflowRecCluster.h.

176 {
177 m_clusterPhiMean = clusterPhiMean;
178 }

◆ phiVariance() [1/2]

virtual double eflowMatchCluster::phiVariance ( ) const
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 168 of file eflowRecCluster.h.

168{ return m_clusterPhiVariance; }

◆ phiVariance() [2/2]

virtual void eflowMatchCluster::phiVariance ( double clusterPhiVariance)
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 183 of file eflowRecCluster.h.

184 {
185 m_clusterPhiVariance = clusterPhiVariance;
186 }

◆ setCalVarianceStatus()

virtual void eflowMatchCluster::setCalVarianceStatus ( )
inlinevirtual

Implements PFMatch::ICluster.

Definition at line 187 of file eflowRecCluster.h.

187{ m_calVariance = true; }

Member Data Documentation

◆ m_calVariance

bool eflowMatchCluster::m_calVariance
private

Definition at line 267 of file eflowRecCluster.h.

◆ m_cellEta

CxxUtils::CachedValue<std::vector<double> > eflowMatchCluster::m_cellEta
private

Definition at line 258 of file eflowRecCluster.h.

◆ m_cellPhi

CxxUtils::CachedValue<std::vector<double> > eflowMatchCluster::m_cellPhi
private

Definition at line 259 of file eflowRecCluster.h.

◆ m_clusterEne

double eflowMatchCluster::m_clusterEne
private

Definition at line 260 of file eflowRecCluster.h.

◆ m_clusterEta

double eflowMatchCluster::m_clusterEta
private

Definition at line 261 of file eflowRecCluster.h.

◆ m_clusterEtaMean

double eflowMatchCluster::m_clusterEtaMean
private

Definition at line 263 of file eflowRecCluster.h.

◆ m_clusterEtaVariance

double eflowMatchCluster::m_clusterEtaVariance
private

Definition at line 265 of file eflowRecCluster.h.

◆ m_clusterPhi

double eflowMatchCluster::m_clusterPhi
private

Definition at line 262 of file eflowRecCluster.h.

◆ m_clusterPhiMean

double eflowMatchCluster::m_clusterPhiMean
private

Definition at line 264 of file eflowRecCluster.h.

◆ m_clusterPhiVariance

double eflowMatchCluster::m_clusterPhiVariance
private

Definition at line 266 of file eflowRecCluster.h.

◆ m_efRecCluster

eflowRecCluster* eflowMatchCluster::m_efRecCluster
private

Definition at line 257 of file eflowRecCluster.h.


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