Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 <cmath>
22 #include "AthLinks/ElementLink.h"
23 
24 class eflowRecCluster;
25 class eflowRecTrack;
30 
35 public:
36 
37  eflowCaloObject()=default;
39 
41  void addCluster(eflowRecCluster* cluster) { m_eflowRecClusters.push_back(cluster); }
42  void addTrackClusterLinks(const std::vector<eflowTrackClusterLink*> &trackClusterLink);
43  void addTracks(const std::vector<eflowRecTrack*> &tracks);
44  void addClusters(const std::vector<eflowRecCluster*> &clusters);
45 
46  /* For a specific eflowTrackClusterLink indicate whether or not it has been fully/partially subtracted by setting the energy ratio
47  ** of subtracted cluster energy to original cluster enegry (first float). A value other than nan indicates it has been fully or partially subtracted.
48  ** The second float is the actual subtracted energy at the EM scale */
49  void setTrackClusterLinkSubtractionStatus(unsigned int index, std::pair<float,float> energyRatio_energyValPair) { m_trackClusterLinks[index].second = energyRatio_energyValPair; }
50 
51  /* Track accessor methods */
52  const eflowRecTrack* efRecTrack(int i) const { return m_eflowRecTracks[i]; }
54  unsigned nTracks() const{ return m_eflowRecTracks.size(); }
55  void clearTracks() { m_eflowRecTracks.clear(); }
56 
57  /* Cluster accessor methods */
58  const eflowRecCluster* efRecCluster(int i) const { return m_eflowRecClusters[i]; }
60  unsigned nClusters() const{ return m_eflowRecClusters.size(); }
61  void clearClusters() { m_eflowRecClusters.clear(); }
62 
63 
64  /* Link accessor methods */
65  const std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > >& efRecLink() const { return m_trackClusterLinks; }
66  void clearLinks() { m_trackClusterLinks.clear(); }
67 
68  /* Calculate total tracks energy, total tracks energy variance, total cluster energy for subtraction */
69  double getExpectedEnergy() const;
70  double getExpectedVariance() const;
71  double getClusterEnergy() const ;
72 
73  void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters* binnedParameters,
74  const PFEnergyPredictorTool* energyP, bool useLegacyEnergyBinIndexing);
75 
76 private:
77 
78  void addTrackClusterLink(eflowTrackClusterLink* trackClusterLink) { m_trackClusterLinks.push_back(std::pair(trackClusterLink,std::pair(NAN,NAN))); }
79 
80  private:
81  /* Vector of clusters */
82  std::vector<eflowRecCluster*> m_eflowRecClusters;
83 
84  /* Vector of track-cluster matches - the first float is to be used to indicate the ratio of subtracted cluster energy
85  ** to original unsubtracted cluster energy. It is initialiased to nan, and you hence one can use isNan to verify
86  ** whether the cluster was subtracted or not (we leave it as nan it not). The second float is the actual amount
87  ** of energy that was subtracted at the EM scale.
88  */
89  std::vector<std::pair<eflowTrackClusterLink*,std::pair<float,float> > > m_trackClusterLinks;
90 
91  /* Vector of tracks */
92  std::vector<eflowRecTrack*> m_eflowRecTracks;
93 
94 };
95 
97 #include "AthenaKernel/CLASS_DEF.h"
98 
99 class eflowCaloObjectContainer : public DataVector< eflowCaloObject >
100 
101 {
102 
103  public:
104 
105  void print() { };
106 
107 };
108 
110 
111 #endif
eflowRecCluster
This class extends the information about a xAOD::CaloCluster.
Definition: eflowRecCluster.h:40
eflowCaloObject::nClusters
unsigned nClusters() const
Definition: eflowCaloObject.h:60
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:65
index
Definition: index.py:1
eflowCaloObject::clearClusters
void clearClusters()
Definition: eflowCaloObject.h:61
PFEnergyPredictorTool
Definition: PFEnergyPredictorTool.h:17
eflowCaloObject::clearLinks
void clearLinks()
Definition: eflowCaloObject.h:66
eflowCaloObject
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
Definition: eflowCaloObject.h:34
eflowCaloObject::getExpectedVariance
double getExpectedVariance() const
Definition: eflowCaloObject.cxx:48
eflowCaloObject::addTrack
void addTrack(eflowRecTrack *track)
Definition: eflowCaloObject.h:40
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition: eflowRecTrack.h:46
eflowCaloObject::setTrackClusterLinkSubtractionStatus
void setTrackClusterLinkSubtractionStatus(unsigned int index, std::pair< float, float > energyRatio_energyValPair)
Definition: eflowCaloObject.h:49
eflowCaloObject::addTrackClusterLink
void addTrackClusterLink(eflowTrackClusterLink *trackClusterLink)
Definition: eflowCaloObject.h:78
eflowCaloObject::addClusters
void addClusters(const std::vector< eflowRecCluster * > &clusters)
Definition: eflowCaloObject.cxx:36
eflowCaloObject::efRecTrack
const eflowRecTrack * efRecTrack(int i) const
Definition: eflowCaloObject.h:52
eflowCaloObject::efRecCluster
eflowRecCluster * efRecCluster(int i)
Definition: eflowCaloObject.h:59
eflowCaloObject::clearTracks
void clearTracks()
Definition: eflowCaloObject.h:55
lumiFormat.i
int i
Definition: lumiFormat.py:85
eflowCaloObject::nTracks
unsigned nTracks() const
Definition: eflowCaloObject.h:54
eflowCaloObject::eflowCaloObject
eflowCaloObject()=default
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
eflowCaloObject::m_eflowRecClusters
std::vector< eflowRecCluster * > m_eflowRecClusters
Definition: eflowCaloObject.h:82
eflowCaloObject::m_trackClusterLinks
std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > m_trackClusterLinks
Definition: eflowCaloObject.h:89
eflowCaloObject::efRecTrack
eflowRecTrack * efRecTrack(int i)
Definition: eflowCaloObject.h:53
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:364
eflowCaloObject::efRecCluster
const eflowRecCluster * efRecCluster(int i) const
Definition: eflowCaloObject.h:58
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:67
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
eflowCaloObject::m_eflowRecTracks
std::vector< eflowRecTrack * > m_eflowRecTracks
Definition: eflowCaloObject.h:92
eflowCaloObject::getClusterEnergy
double getClusterEnergy() const
Definition: eflowCaloObject.cxx:56
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
eflowCaloObject::addTrackClusterLinks
void addTrackClusterLinks(const std::vector< eflowTrackClusterLink * > &trackClusterLink)
Definition: eflowCaloObject.cxx:26
eflowCaloObject::addCluster
void addCluster(eflowRecCluster *cluster)
Definition: eflowCaloObject.h:41
CLASS_DEF.h
macros to associate a CLID to a type
eflowCaloObjectContainer
Definition: eflowCaloObject.h:101
eflowCaloObjectContainer::print
void print()
Definition: eflowCaloObject.h:105
eflowCaloObject::simulateShower
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
Definition: eflowCaloObject.cxx:64
eflowCaloObject::addTracks
void addTracks(const std::vector< eflowRecTrack * > &tracks)
Definition: eflowCaloObject.cxx:32