ATLAS Offline Software
Loading...
Searching...
No Matches
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
9NAME: eflowCaloObject.h
10PACKAGE: offline/Reconstruction/eflowRec
11
12AUTHORS: D. Tovey
13CREATED: 18th November, 2001
14
15PURPOSE: Calorimeter Object data class
16
17********************************************************************/
18
19#include <vector>
20#include <memory>
21#include <cmath>
22#include "AthLinks/ElementLink.h"
23
24class eflowRecCluster;
25class eflowRecTrack;
30
35public:
36
37 eflowCaloObject()=default;
39
40 void addTrack(eflowRecTrack* track) { m_eflowRecTracks.push_back(track); }
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(); }
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
76private:
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
98
99class eflowCaloObjectContainer : public DataVector< eflowCaloObject >
100
101{
102
103 public:
104
105 void print() { };
106
107};
108
110
111#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
eflowRecCluster * efRecCluster(int i)
void addTracks(const std::vector< eflowRecTrack * > &tracks)
double getExpectedVariance() const
std::vector< eflowRecTrack * > m_eflowRecTracks
eflowRecTrack * efRecTrack(int i)
double getClusterEnergy() const
void addTrackClusterLinks(const std::vector< eflowTrackClusterLink * > &trackClusterLink)
void addClusters(const std::vector< eflowRecCluster * > &clusters)
void addTrackClusterLink(eflowTrackClusterLink *trackClusterLink)
eflowCaloObject()=default
unsigned nClusters() const
const eflowRecTrack * efRecTrack(int i) const
std::vector< eflowRecCluster * > m_eflowRecClusters
void setTrackClusterLinkSubtractionStatus(unsigned int index, std::pair< float, float > energyRatio_energyValPair)
void addCluster(eflowRecCluster *cluster)
const std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > & efRecLink() const
unsigned nTracks() const
double getExpectedEnergy() const
void addTrack(eflowRecTrack *track)
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > m_trackClusterLinks
const eflowRecCluster * efRecCluster(int i) const
Inherits from eflowEEtaBinBase.
This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters.
This class extends the information about a xAOD::CaloCluster.
This class extends the information about a xAOD::Track.
Definition index.py:1