13 return StatusCode::SUCCESS;
25 auto neutralFEContainer = std::make_unique<xAOD::FlowElementContainer>();
26 auto neutralFEContainerAux = std::make_unique<xAOD::FlowElementAuxContainer>();
27 neutralFEContainer->setStore(neutralFEContainerAux.get());
31 for (
const auto *thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) {
33 ATH_MSG_WARNING(
"Problem encountered while creating neutral FlowElements");
34 return StatusCode::SUCCESS;
42 neutralFEContainer->end(),
44 return fe1->pt() > fe2->pt();
47 std::move(neutralFEContainer), std::move(neutralFEContainerAux)));
49 return StatusCode::SUCCESS;
58 for (
unsigned int iCluster = 0; iCluster < energyFlowCaloObject.
nClusters(); ++iCluster){
91 std::vector<ElementLink<xAOD::IParticleContainer>> theClusters;
93 theClusters.emplace_back(theSisterClusterLink);
96 theClusters.emplace_back(theOriginalClusterLink);
102 accShowerSubtractedClusterLink(
"FEShowerSubtractedClusterLink");
103 accShowerSubtractedClusterLink(*thisFE) =
118 ATH_MSG_DEBUG(
"Created neutral FlowElement with E, pt, eta and phi of "
119 << thisFE->
e() <<
", " << thisFE->
pt() <<
", "
120 << thisFE->
eta() <<
" and " << thisFE->
phi());
132 float layerEnergy_TileBar0 = cluster->
eSample(xAOD::CaloCluster::CaloSample::TileBar0);
133 float layerEnergy_TileExt0 = cluster->
eSample(xAOD::CaloCluster::CaloSample::TileExt0);
135 accFloatTIle0E(*thisFE) = layerEnergy_TileBar0 + layerEnergy_TileExt0;
138 accFloatTiming(*thisFE) = cluster->
time();
143 std::vector<double>
eta,
phi;
146 eta.push_back(cell->eta());
147 phi.push_back(cell->phi());
152 accFloatWidthEta(*thisFE) =
width.first;
154 accFloatWidthPhi(*thisFE) =
width.second;
158 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Data object for each calorimeter readout cell.
const_iterator to loop over cells belonging to a cluster
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const_iterator end() const
const end method
size_t size() const
size method
const_iterator begin() const
const begin method
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ElementLink implementation for ROOT usage.
bool isValid() const
Test to see if the link can be dereferenced.
void addStandardSamplingEnergies(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
void addStandardCalHitMoments(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
void addStandardMoments(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
std::pair< double, double > getPFClusterCoordinateWidth(const std::vector< double > &eta, const std::vector< double > &phi, const double &clusterEta, const double &clusterPhi, unsigned int nCells)
StatusCode createNeutralFlowElement(const eflowCaloObject &energyFlowCaloObject, xAOD::FlowElementContainer *neutralFEContainer) const
Create the chargedneutral FE.
Gaudi::Property< bool > m_addCPData
Toggle whether to decorate FlowElements with addutional data for Combined Performance studies.
SG::WriteHandleKey< xAOD::FlowElementContainer > m_neutralFEContainerWriteHandleKey
WriteHandleKey for neutral FE.
SG::ReadHandleKey< eflowCaloObjectContainer > m_eflowCaloObjectContainerReadHandleKey
ReadHandleKey for eflowCaloObjectContainer.
StatusCode execute(const EventContext &ctx) const
Gaudi::Property< bool > m_useCalibHitTruth
Toggle usage of calibration hit truth - false by default.
SG::Accessor< T, ALLOC > Accessor
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
unsigned nClusters() const
const eflowRecCluster * efRecCluster(int i) const
This class extends the information about a xAOD::CaloCluster.
ElementLink< xAOD::CaloClusterContainer > getOriginalClusElementLink() const
xAOD::CaloCluster * getCluster()
ElementLink< xAOD::CaloClusterContainer > getClusElementLink() const
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
flt_t rawM() const
Get mass in signal state UNCALIBRATED.
flt_t time() const
Access cluster time.
virtual double eta() const
The pseudorapidity ( ) of the particle.
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
flt_t rawEta() const
Get in signal state UNCALIBRATED.
virtual double e() const
The total energy of the particle.
float eSample(const CaloSample sampling) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const override
void setP4(float pt, float eta, float phi, float m)
virtual double phi() const override
The azimuthal angle ( ) of the particle.
virtual double eta() const override
The pseudorapidity ( ) of the particle.
void setSignalType(signal_t t)
void setOtherObjectLinks(const std::vector< ElementLink< IParticleContainer > > &elV)
virtual double e() const override
The total energy of the particle.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
FlowElementContainer_v1 FlowElementContainer
Definition of the current "pfo container version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".