ATLAS Offline Software
eflowCaloObject.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EFLOWEVENT_EFLOWCALOOBJECT_H
6 #define EFLOWEVENT_EFLOWCALOOBJECT_H
7 /********************************************************************
8 
9 NAME: eflowCaloObject.h
10 PACKAGE: offline/Reconstruction/eflowRec
11 
12 AUTHORS: D. Tovey
13 CREATED: 18th November, 2001
14 
15 PURPOSE: Calorimeter Object data class
16 
17 ********************************************************************/
18 
19 #include <vector>
20 #include <memory>
21 #include "AthLinks/ElementLink.h"
22 
23 class eflowRecCluster;
24 class eflowRecTrack;
29 
34 public:
35 
36  eflowCaloObject()=default;
38 
40  void addCluster(eflowRecCluster* cluster) { m_eflowRecClusters.push_back(cluster); }
41  void addTrackClusterLinks(const std::vector<eflowTrackClusterLink*> &trackClusterLink);
42  void addTracks(const std::vector<eflowRecTrack*> &tracks);
43  void addClusters(const std::vector<eflowRecCluster*> &clusters);
44 
45  /* For a specific eflowTrackClusterLink indicate whether or not it has been fully/partially subtracted by setting the energy ratio
46  ** of subtracted cluster energy to original cluster enegry (first float). A value other than nan indicates it has been fully or partially subtracted.
47  ** The second float is the actual subtracted energy at the EM scale */
48  void setTrackClusterLinkSubtractionStatus(unsigned int index, std::pair<float,float> energyRatio_energyValPair) { m_trackClusterLinks[index].second = energyRatio_energyValPair; }
49 
50  /* Track accessor methods */
51  const eflowRecTrack* efRecTrack(int i) const { return m_eflowRecTracks[i]; }
53  unsigned nTracks() const{ return m_eflowRecTracks.size(); }
54  void clearTracks() { m_eflowRecTracks.clear(); }
55 
56  /* Cluster accessor methods */
57  const eflowRecCluster* efRecCluster(int i) const { return m_eflowRecClusters[i]; }
59  unsigned nClusters() const{ return m_eflowRecClusters.size(); }
60  void clearClusters() { m_eflowRecClusters.clear(); }
61 
62 
63  /* Link accessor methods */
64  const std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > >& efRecLink() const { return m_trackClusterLinks; }
65  void clearLinks() { m_trackClusterLinks.clear(); }
66 
67  /* Calculate total tracks energy, total tracks energy variance, total cluster energy for subtraction */
68  double getExpectedEnergy() const;
69  double getExpectedVariance() const;
70  double getClusterEnergy() const ;
71 
73  const PFEnergyPredictorTool* energyP, bool useLegacyEnergyBinIndexing);
74 
75 private:
76 
77  void addTrackClusterLink(eflowTrackClusterLink* trackClusterLink) { m_trackClusterLinks.push_back(std::pair(trackClusterLink,std::pair(NAN,NAN))); }
78 
79  private:
80  /* Vector of clusters */
81  std::vector<eflowRecCluster*> m_eflowRecClusters;
82 
83  /* Vector of track-cluster matches - the first float is to be used to indicate the ratio of subtracted cluster energy
84  ** to original unsubtracted cluster energy. It is initialiased to nan, and you hence one can use isNan to verify
85  ** whether the cluster was subtracted or not (we leave it as nan it not). The second float is the actual amount
86  ** of energy that was subtracted at the EM scale.
87  */
88  std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > > m_trackClusterLinks;
89 
90  /* Vector of tracks */
91  std::vector<eflowRecTrack*> m_eflowRecTracks;
92 
93 };
94 
96 #include "AthenaKernel/CLASS_DEF.h"
97 
98 class eflowCaloObjectContainer : public DataVector< eflowCaloObject >
99 
100 {
101 
102  public:
103 
104  void print() { };
105 
106 };
107 
109 
110 #endif
eflowRecCluster
This class extends the information about a xAOD::CaloCluster.
Definition: eflowRecCluster.h:40
eflowCaloObject::nClusters
unsigned nClusters() const
Definition: eflowCaloObject.h:59
eflowCaloObject::getExpectedEnergy
double getExpectedEnergy() const
Definition: eflowCaloObject.cxx:40
eflowEEtaBinnedParameters
Inherits from eflowEEtaBinBase.
Definition: eflowEEtaBinnedParameters.h:56
eflowLayerIntegrator
This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters.
Definition: eflowLayerIntegrator.h:35
eflowCaloObject::efRecLink
const std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > & efRecLink() const
Definition: eflowCaloObject.h:64
index
Definition: index.py:1
eflowCaloObject::clearClusters
void clearClusters()
Definition: eflowCaloObject.h:60
PFEnergyPredictorTool
Definition: PFEnergyPredictorTool.h:17
eflowCaloObject::clearLinks
void clearLinks()
Definition: eflowCaloObject.h:65
eflowCaloObject
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
Definition: eflowCaloObject.h:33
eflowCaloObject::getExpectedVariance
double getExpectedVariance() const
Definition: eflowCaloObject.cxx:48
eflowCaloObject::addTrack
void addTrack(eflowRecTrack *track)
Definition: eflowCaloObject.h:39
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition: eflowRecTrack.h:45
eflowCaloObject::setTrackClusterLinkSubtractionStatus
void setTrackClusterLinkSubtractionStatus(unsigned int index, std::pair< float, float > energyRatio_energyValPair)
Definition: eflowCaloObject.h:48
eflowCaloObject::addTrackClusterLink
void addTrackClusterLink(eflowTrackClusterLink *trackClusterLink)
Definition: eflowCaloObject.h:77
eflowCaloObject::addClusters
void addClusters(const std::vector< eflowRecCluster * > &clusters)
Definition: eflowCaloObject.cxx:36
eflowCaloObject::efRecTrack
const eflowRecTrack * efRecTrack(int i) const
Definition: eflowCaloObject.h:51
eflowCaloObject::efRecCluster
eflowRecCluster * efRecCluster(int i)
Definition: eflowCaloObject.h:58
eflowCaloObject::clearTracks
void clearTracks()
Definition: eflowCaloObject.h:54
lumiFormat.i
int i
Definition: lumiFormat.py:92
eflowCaloObject::nTracks
unsigned nTracks() const
Definition: eflowCaloObject.h:53
eflowCaloObject::eflowCaloObject
eflowCaloObject()=default
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
eflowCaloObject::m_eflowRecClusters
std::vector< eflowRecCluster * > m_eflowRecClusters
Definition: eflowCaloObject.h:81
eflowCaloObject::m_trackClusterLinks
std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > m_trackClusterLinks
Definition: eflowCaloObject.h:88
eflowCaloObject::efRecTrack
eflowRecTrack * efRecTrack(int i)
Definition: eflowCaloObject.h:52
eflowCaloObject::~eflowCaloObject
~eflowCaloObject()
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
DeMoScan.index
string index
Definition: DeMoScan.py:362
eflowCaloObject::simulateShower
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, bool useUpdated2015ChargedShowerSubtraction, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
Definition: eflowCaloObject.cxx:64
PFHLTConfig.useUpdated2015ChargedShowerSubtraction
useUpdated2015ChargedShowerSubtraction
Definition: PFHLTConfig.py:358
eflowCaloObject::efRecCluster
const eflowRecCluster * efRecCluster(int i) const
Definition: eflowCaloObject.h:57
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
eflowCaloObject::m_eflowRecTracks
std::vector< eflowRecTrack * > m_eflowRecTracks
Definition: eflowCaloObject.h:91
eflowCaloObject::getClusterEnergy
double getClusterEnergy() const
Definition: eflowCaloObject.cxx:56
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
eflowCaloObject::addTrackClusterLinks
void addTrackClusterLinks(const std::vector< eflowTrackClusterLink * > &trackClusterLink)
Definition: eflowCaloObject.cxx:26
eflowCaloObject::addCluster
void addCluster(eflowRecCluster *cluster)
Definition: eflowCaloObject.h:40
CLASS_DEF.h
macros to associate a CLID to a type
eflowCaloObjectContainer
Definition: eflowCaloObject.h:100
eflowCaloObjectContainer::print
void print()
Definition: eflowCaloObject.h:104
eflowCaloObject::addTracks
void addTracks(const std::vector< eflowRecTrack * > &tracks)
Definition: eflowCaloObject.cxx:32