ATLAS Offline Software
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
eflowRecCluster Class Reference

This class extends the information about a xAOD::CaloCluster. More...

#include <eflowRecCluster.h>

Collaboration diagram for eflowRecCluster:

Classes

class  SortDescendingPt
 

Public Member Functions

 eflowRecCluster (const ElementLink< xAOD::CaloClusterContainer > &clusElementLink, xAOD::CaloClusterContainer &newClusContainer)
 
 eflowRecCluster (const eflowRecCluster &originalEflowRecCluster)
 
eflowRecClusteroperator= (const eflowRecCluster &originalEflowRecCluster)=delete
 
virtual ~eflowRecCluster ()
 
xAOD::CaloClustergetCluster ()
 
const xAOD::CaloClustergetCluster () const
 
ElementLink< xAOD::CaloClusterContainergetClusElementLink () const
 
ElementLink< xAOD::CaloClusterContainergetOriginalClusElementLink () const
 
eflowMatchClustergetMatchCluster () const
 
double getSumExpectedEnergy ()
 
double getVarianceOfSumExpectedEnergy ()
 
bool isEOverPFail (bool consistencySigmaCut, bool useGoldenMode)
 
void addTrackMatch (eflowTrackClusterLink *trackMatch)
 
const std::vector< eflowTrackClusterLink * > & getTrackMatches () const
 
void clearTrackMatches ()
 
int getNTracks () const
 
int getClusterId () const
 
void setClusterId (int clusterId)
 
void setCellsWeight (std::map< IdentifierHash, double > &&cellsWeight)
 
const std::map< IdentifierHash, double > & getCellsWeight () const
 
int getClusterType () const
 Specifies if we have a cluster mainly in ECAL, HCAL or FCAL
More...
 
bool isTouchable () const
 

Private Types

enum  CalorimeterType {
  CALORIMETER_START = 0, UNASSIGNED = CALORIMETER_START, ECAL = 1, HCAL = 2,
  FCAL = 3, UNKNOWN = 4, CALORIMETER_END = 5
}
 ENUM that defines calorimeter regions as ECAL, HCAL or FCAL
More...
 

Private Member Functions

void setClusterType ()
 

Private Attributes

int m_clusterId
 
int m_calorimeterType
 
xAOD::CaloClusterm_cluster
 
ElementLink< xAOD::CaloClusterContainerm_originalClusElementLink
 
ElementLink< xAOD::CaloClusterContainerm_clusElementLink
 
bool m_isTouchable
 
std::map< IdentifierHash, double > m_cellsWeightMap
 
std::unique_ptr< eflowMatchClusterm_matchCluster
 
std::vector< eflowTrackClusterLink * > m_trackMatches
 

Detailed Description

This class extends the information about a xAOD::CaloCluster.

It includes an element link and raw pointer back to the CaloCluster, the index of the cluster in the CaloClusterContainer, a bool to determine if the CaloCluster is allowed to be modified or not (only if we have already copied the CaloCluster), the type (ECAL/HCAL), a map to store the LC weights for the calorimeter cluster cells, a pointer to an eflowMatchCluster and a vector of eflowTrackClusterLink

Definition at line 39 of file eflowRecCluster.h.

Member Enumeration Documentation

◆ CalorimeterType

ENUM that defines calorimeter regions as ECAL, HCAL or FCAL

Enumerator
CALORIMETER_START 
UNASSIGNED 
ECAL 
HCAL 
FCAL 
UNKNOWN 
CALORIMETER_END 

Definition at line 96 of file eflowRecCluster.h.

97  {
100  ECAL = 1,
101  HCAL = 2,
102  FCAL = 3,
103  UNKNOWN = 4,
104  CALORIMETER_END = 5
105  };

Constructor & Destructor Documentation

◆ eflowRecCluster() [1/2]

eflowRecCluster::eflowRecCluster ( const ElementLink< xAOD::CaloClusterContainer > &  clusElementLink,
xAOD::CaloClusterContainer newClusContainer 
)

Definition at line 17 of file eflowRecCluster.cxx.

17  :
19  const xAOD::CaloCluster* originalCluster = *clusElementLink;
21  newClusContainer.push_back(m_cluster);
22  m_clusElementLink = ElementLink<xAOD::CaloClusterContainer>(newClusContainer,newClusContainer.size()-1);
23 
24  const CaloClusterCellLink* theOldCellLinks = originalCluster->getCellLinks();
25 
26  CaloClusterCellLink *newLinks = new CaloClusterCellLink(*theOldCellLinks);
27  m_cluster->addCellLink(newLinks);
30 
35 
36  m_matchCluster = std::make_unique<eflowMatchCluster>(this);
38 }

◆ eflowRecCluster() [2/2]

eflowRecCluster::eflowRecCluster ( const eflowRecCluster originalEflowRecCluster)

Definition at line 40 of file eflowRecCluster.cxx.

41  : m_clusterId (originalEflowRecCluster.m_clusterId),
42  m_calorimeterType (originalEflowRecCluster.m_calorimeterType),
43  m_cluster (originalEflowRecCluster.m_cluster),
44  m_originalClusElementLink (originalEflowRecCluster.m_originalClusElementLink),
45  m_clusElementLink (originalEflowRecCluster.m_clusElementLink),
46  m_isTouchable (originalEflowRecCluster.m_isTouchable),
47  m_matchCluster (std::make_unique<eflowMatchCluster>(this))
48 {
49 }

◆ ~eflowRecCluster()

eflowRecCluster::~eflowRecCluster ( )
virtualdefault

Member Function Documentation

◆ addTrackMatch()

void eflowRecCluster::addTrackMatch ( eflowTrackClusterLink trackMatch)
inline

Definition at line 69 of file eflowRecCluster.h.

70  {
71  m_trackMatches.push_back(trackMatch);
72  }

◆ clearTrackMatches()

void eflowRecCluster::clearTrackMatches ( )
inline

Definition at line 77 of file eflowRecCluster.h.

77 { m_trackMatches.clear(); }

◆ getCellsWeight()

const std::map<IdentifierHash, double>& eflowRecCluster::getCellsWeight ( ) const
inline

Definition at line 85 of file eflowRecCluster.h.

86  {
87  return m_cellsWeightMap;
88  }

◆ getClusElementLink()

ElementLink<xAOD::CaloClusterContainer> eflowRecCluster::getClusElementLink ( ) const
inline

Definition at line 54 of file eflowRecCluster.h.

55  {
56  return m_clusElementLink;
57  }

◆ getCluster() [1/2]

xAOD::CaloCluster* eflowRecCluster::getCluster ( )
inline

Definition at line 49 of file eflowRecCluster.h.

49 { return m_cluster; }

◆ getCluster() [2/2]

const xAOD::CaloCluster* eflowRecCluster::getCluster ( ) const
inline

Definition at line 50 of file eflowRecCluster.h.

50 { return m_cluster; }

◆ getClusterId()

int eflowRecCluster::getClusterId ( ) const
inline

Definition at line 79 of file eflowRecCluster.h.

79 { return m_clusterId; }

◆ getClusterType()

int eflowRecCluster::getClusterType ( ) const
inline

Specifies if we have a cluster mainly in ECAL, HCAL or FCAL

Definition at line 90 of file eflowRecCluster.h.

90 { return m_calorimeterType; }

◆ getMatchCluster()

eflowMatchCluster* eflowRecCluster::getMatchCluster ( ) const
inline

Definition at line 63 of file eflowRecCluster.h.

63 { return m_matchCluster.get(); }

◆ getNTracks()

int eflowRecCluster::getNTracks ( ) const
inline

Definition at line 78 of file eflowRecCluster.h.

78 { return m_trackMatches.size(); }

◆ getOriginalClusElementLink()

ElementLink<xAOD::CaloClusterContainer> eflowRecCluster::getOriginalClusElementLink ( ) const
inline

Definition at line 58 of file eflowRecCluster.h.

59  {
61  }

◆ getSumExpectedEnergy()

double eflowRecCluster::getSumExpectedEnergy ( )

Definition at line 69 of file eflowRecCluster.cxx.

69  {
70  double expectedEnergy(0);
71  int nTrk = getNTracks();
72  for (int iTrk = 0; iTrk < nTrk; ++iTrk){
73  expectedEnergy += m_trackMatches[iTrk]->getTrack()->getEExpect();
74  }
75  return expectedEnergy;
76 }

◆ getTrackMatches()

const std::vector<eflowTrackClusterLink*>& eflowRecCluster::getTrackMatches ( ) const
inline

Definition at line 73 of file eflowRecCluster.h.

74  {
75  return m_trackMatches;
76  }

◆ getVarianceOfSumExpectedEnergy()

double eflowRecCluster::getVarianceOfSumExpectedEnergy ( )

Definition at line 77 of file eflowRecCluster.cxx.

77  {
78  double varianceExpectedEnergy(0);
79  int nTrk = getNTracks();
80  for (int iTrk = 0; iTrk < nTrk; ++iTrk){
81  varianceExpectedEnergy += m_trackMatches[iTrk]->getTrack()->getVarEExpect();
82  }
83  return varianceExpectedEnergy;
84 }

◆ isEOverPFail()

bool eflowRecCluster::isEOverPFail ( bool  consistencySigmaCut,
bool  useGoldenMode 
)

Definition at line 53 of file eflowRecCluster.cxx.

53  {
54 
55  double expectedEnergy = getSumExpectedEnergy();
56  double clusterEnergy = m_cluster->e();
57 
58  if ((expectedEnergy == 0) && (clusterEnergy > 0)) {
59  return false;
60  }
61 
62  double sigma = sqrt(getVarianceOfSumExpectedEnergy());
63 
64  bool result = useGoldenMode ? fabs(clusterEnergy - expectedEnergy) > consistencySigmaCut*sigma
65  : clusterEnergy < expectedEnergy - consistencySigmaCut*sigma;
66  return result;
67 }

◆ isTouchable()

bool eflowRecCluster::isTouchable ( ) const
inline

Definition at line 91 of file eflowRecCluster.h.

91 { return m_isTouchable; }

◆ operator=()

eflowRecCluster& eflowRecCluster::operator= ( const eflowRecCluster originalEflowRecCluster)
delete

◆ setCellsWeight()

void eflowRecCluster::setCellsWeight ( std::map< IdentifierHash, double > &&  cellsWeight)
inline

Definition at line 81 of file eflowRecCluster.h.

82  {
83  m_cellsWeightMap = std::move(cellsWeight);
84  }

◆ setClusterId()

void eflowRecCluster::setClusterId ( int  clusterId)
inline

Definition at line 80 of file eflowRecCluster.h.

80 { m_clusterId = clusterId; }

◆ setClusterType()

void eflowRecCluster::setClusterType ( )
private

Definition at line 86 of file eflowRecCluster.cxx.

86  {
87 
112  double MiniFCAL_E = m_cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL0)
113  + m_cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL1)
114  + m_cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL2)
115  + m_cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL3);
116 
117  double totalEnergy = EMB_E + EME_E + HEC_E + Tile_E + FCAL_E + MiniFCAL_E;
118  if(std::abs(totalEnergy) < 1.0e-4){
120  return;
121  }
122  double ratioEM = (EMB_E+EME_E)/totalEnergy;
123  double ratioHCAL = (HEC_E+Tile_E)/totalEnergy;
124  double ratioFCAL = (FCAL_E + MiniFCAL_E)/totalEnergy;
126  if(ratioEM > 0.5) {
128  } else if (ratioHCAL > 0.5) {
130  } else if (ratioFCAL > 0.5) {
132  } else {
134  }
135  assert(m_calorimeterType!=UNASSIGNED);
136 }

Member Data Documentation

◆ m_calorimeterType

int eflowRecCluster::m_calorimeterType
private

Definition at line 108 of file eflowRecCluster.h.

◆ m_cellsWeightMap

std::map<IdentifierHash, double> eflowRecCluster::m_cellsWeightMap
private

Definition at line 117 of file eflowRecCluster.h.

◆ m_clusElementLink

ElementLink<xAOD::CaloClusterContainer> eflowRecCluster::m_clusElementLink
private

Definition at line 111 of file eflowRecCluster.h.

◆ m_cluster

xAOD::CaloCluster* eflowRecCluster::m_cluster
private

Definition at line 109 of file eflowRecCluster.h.

◆ m_clusterId

int eflowRecCluster::m_clusterId
private

Definition at line 107 of file eflowRecCluster.h.

◆ m_isTouchable

bool eflowRecCluster::m_isTouchable
private

Definition at line 112 of file eflowRecCluster.h.

◆ m_matchCluster

std::unique_ptr<eflowMatchCluster> eflowRecCluster::m_matchCluster
private

Definition at line 119 of file eflowRecCluster.h.

◆ m_originalClusElementLink

ElementLink<xAOD::CaloClusterContainer> eflowRecCluster::m_originalClusElementLink
private

Definition at line 110 of file eflowRecCluster.h.

◆ m_trackMatches

std::vector<eflowTrackClusterLink*> eflowRecCluster::m_trackMatches
private

Definition at line 120 of file eflowRecCluster.h.


The documentation for this class was generated from the following files:
eflowRecCluster::m_cellsWeightMap
std::map< IdentifierHash, double > m_cellsWeightMap
Definition: eflowRecCluster.h:117
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::CaloCluster_v1::setRawM
void setRawM(flt_t)
Set mass for singal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:299
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
eflowRecCluster::setClusterType
void setClusterType()
Definition: eflowRecCluster.cxx:86
eflowRecCluster::m_calorimeterType
int m_calorimeterType
Definition: eflowRecCluster.h:108
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
xAOD::CaloCluster_v1::calE
flt_t calE() const
Geet Energy in signal state CALIBRATED.
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
eflowRecCluster::getSumExpectedEnergy
double getSumExpectedEnergy()
Definition: eflowRecCluster.cxx:69
xAOD::CaloCluster_v1::calEta
flt_t calEta() const
Get in signal state CALIBRATED.
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
xAOD::CaloCluster_v1::calM
flt_t calM() const
Get mass in signal state CALIBRATED.
eflowRecCluster::m_clusterId
int m_clusterId
Definition: eflowRecCluster.h:107
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
eflowRecCluster::UNASSIGNED
@ UNASSIGNED
Definition: eflowRecCluster.h:99
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
eflowRecCluster::m_matchCluster
std::unique_ptr< eflowMatchCluster > m_matchCluster
Definition: eflowRecCluster.h:119
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
eflowRecCluster::CALORIMETER_START
@ CALORIMETER_START
Definition: eflowRecCluster.h:98
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
eflowRecCluster::m_clusElementLink
ElementLink< xAOD::CaloClusterContainer > m_clusElementLink
Definition: eflowRecCluster.h:111
eflowRecCluster::m_trackMatches
std::vector< eflowTrackClusterLink * > m_trackMatches
Definition: eflowRecCluster.h:120
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
xAOD::CaloCluster_v1::setRawEta
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:289
eflowRecCluster::getNTracks
int getNTracks() const
Definition: eflowRecCluster.h:78
xAOD::CaloCluster_v1::calPhi
flt_t calPhi() const
Get in signal state CALIBRATED.
xAOD::CaloCluster_v1::Topo_420
@ Topo_420
Definition: CaloCluster_v1.h:102
eflowRecCluster::m_cluster
xAOD::CaloCluster * m_cluster
Definition: eflowRecCluster.h:109
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
eflowRecCluster::UNKNOWN
@ UNKNOWN
Definition: eflowRecCluster.h:103
eflowRecCluster::CALORIMETER_END
@ CALORIMETER_END
Definition: eflowRecCluster.h:104
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
eflowRecCluster::m_originalClusElementLink
ElementLink< xAOD::CaloClusterContainer > m_originalClusElementLink
Definition: eflowRecCluster.h:110
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
xAOD::CaloCluster_v1::addCellLink
void addCellLink(CaloClusterCellLink *CCCL)
Definition: CaloCluster_v1.h:721
xAOD::CaloCluster_v1::setClusterSize
void setClusterSize(const ClusterSize)
Get cluster size.
Definition: CaloCluster_v1.cxx:369
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloClusterKineHelper::calculateKine
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
Definition: CaloClusterKineHelper.cxx:223
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
eflowRecCluster::HCAL
@ HCAL
Definition: eflowRecCluster.h:101
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
eflowRecCluster::ECAL
@ ECAL
Definition: eflowRecCluster.h:100
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
eflowRecCluster::getVarianceOfSumExpectedEnergy
double getVarianceOfSumExpectedEnergy()
Definition: eflowRecCluster.cxx:77
xAOD::CaloCluster_v1::setRawPhi
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:294
eflowRecCluster::m_isTouchable
bool m_isTouchable
Definition: eflowRecCluster.h:112
eflowRecCluster::FCAL
@ FCAL
Definition: eflowRecCluster.h:102