Commit b3ef6cca authored by Mark Hodgkinson's avatar Mark Hodgkinson
Browse files

Add cluster moments, sampling energies and timing to neutral FE.

parent c1d7e289
......@@ -28,12 +28,15 @@ public:
private:
/** Create the chargedneutral PFO */
/** Create the chargedneutral FE */
StatusCode createNeutralFlowElement(const eflowCaloObject& energyFlowCaloObject, xAOD::FlowElementContainer* neutralFEContainer) const;
/** Function to add cluster moments onto PFO */
/** Function to add cluster moments onto FE */
void addMoment(const xAOD::CaloCluster::MomentType& momentType, const std::string& feAttribute, const xAOD::CaloCluster& theCluster, xAOD::FlowElement& theFE) const;
/** Function to add caluster sampling energies onto FE */
void addSamplingEnergy(const xAOD::CaloCluster::CaloSample& sampling, const std::string& feAttribute, const xAOD::CaloCluster& theCluster, xAOD::FlowElement& theFE) const;
/** Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed */
Gaudi::Property<bool> m_eOverPMode{this,"EOverPMode",false,"Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"};
......@@ -43,13 +46,13 @@ private:
/** Toggle usage of calibration hit truth - false by default */
Gaudi::Property<bool> m_useCalibHitTruth{this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"};
/** Toggle addition of charged shower subtracted CaloCluster links to neutral PFO - false by default */
/** Toggle addition of charged shower subtracted CaloCluster links to neutral FE - false by default */
Gaudi::Property<bool> m_addShowerSubtractedClusters{this,"AddShowerSubtractedClusters",false,"Toggle addition of charged shower subtracted CaloCluster links to neutral PFO - false by default"};
/** ReadHandleKey for eflowCaloObjectContainer */
SG::ReadHandleKey<eflowCaloObjectContainer> m_eflowCaloObjectContainerReadHandleKey{this,"eflowCaloObjectContainerName","eflowCaloObjects","ReadHandleKey for eflowCaloObjectContainer"};
/** WriteHandleKey for neutral PFO */
/** WriteHandleKey for neutral FE */
SG::WriteHandleKey<xAOD::FlowElementContainer> m_neutralFEContainerWriteHandleKey{this,"FEOutputName","JetETMissNeutralFlowElements","WriteHandleKey for neutral FlowElements"};
};
......
......@@ -127,6 +127,51 @@ StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const
this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_HAD,"eflowRec_ENG_CALIB_FRAC_HAD",*cluster,*thisFE);
this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_REST,"eflowRec_ENG_CALIB_FRAC_REST",*cluster,*thisFE);
}
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::PreSamplerB,"eflowRec_LAYERENERGY_PreSamplerB",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EMB1,"eflowRec_LAYERENERGY_EMB1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EMB2,"eflowRec_LAYERENERGY_EMB2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EMB3,"eflowRec_LAYERENERGY_EMB3",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::PreSamplerE,"eflowRec_LAYERENERGY_PreSamplerE",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EME1,"eflowRec_LAYERENERGY_EME1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EME2,"eflowRec_LAYERENERGY_EME2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::EME3,"eflowRec_LAYERENERGY_EME3",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::HEC0,"eflowRec_LAYERENERGY_HEC0",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::HEC1,"eflowRec_LAYERENERGY_HEC1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::HEC2,"eflowRec_LAYERENERGY_HEC2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::HEC3,"eflowRec_LAYERENERGY_HEC3",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileBar0,"eflowRec_LAYERENERGY_TileBar0",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileBar1,"eflowRec_LAYERENERGY_TileBar1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileBar2,"eflowRec_LAYERENERGY_TileBar2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileGap1,"eflowRec_LAYERENERGY_TileGap1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileGap2,"eflowRec_LAYERENERGY_TileGap2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileGap3,"eflowRec_LAYERENERGY_TileGap3",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileExt0,"eflowRec_LAYERENERGY_TileExt0",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileExt1,"eflowRec_LAYERENERGY_TileExt1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::TileExt2,"eflowRec_LAYERENERGY_TileExt2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::FCAL0,"eflowRec_LAYERENERGY_FCAL0",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::FCAL1,"eflowRec_LAYERENERGY_FCAL1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::FCAL2,"eflowRec_LAYERENERGY_FCAL2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::MINIFCAL0,"eflowRec_LAYERENERGY_MINIFCAL0",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::MINIFCAL1,"eflowRec_LAYERENERGY_MINIFCAL1",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::MINIFCAL2,"eflowRec_LAYERENERGY_MINIFCAL2",*cluster,*thisFE);
this->addSamplingEnergy(xAOD::CaloCluster::CaloSample::MINIFCAL3,"eflowRec_LAYERENERGY_MINIFCAL3",*cluster,*thisFE);
float layerEnergy_TileBar0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0);
float layerEnergy_TileExt0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0);
const SG::AuxElement::Accessor<float> accFloatTIle0E("eflowRec_LAYERENERGY_TILE0");
accFloatTIle0E(*thisFE) = layerEnergy_TileBar0 + layerEnergy_TileExt0;
const SG::AuxElement::Accessor<float> accFloatTiming("eflowRec_TIMING");
accFloatTiming(*thisFE) = cluster->time();
}//cluster loop
return StatusCode::SUCCESS;
......@@ -144,3 +189,8 @@ void PFNeutralFlowElementCreatorAlgorithm::addMoment(const xAOD::CaloCluster::Mo
else ATH_MSG_WARNING(" Could not retrieve moment from the CaloCluster");
}
void PFNeutralFlowElementCreatorAlgorithm::addSamplingEnergy(const xAOD::CaloCluster::CaloSample& sampling, const std::string& feAttribute, const xAOD::CaloCluster& theCluster, xAOD::FlowElement& theFE) const {
const SG::AuxElement::Accessor<float> accFloat(feAttribute);
accFloat(theFE) = theCluster.eSample(sampling);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment