Skip to content
Snippets Groups Projects
Commit 2a9a794b authored by Matthew Thomas Anthony's avatar Matthew Thomas Anthony :speech_balloon:
Browse files

Add Gaudi Argument for inclusion of Flow Element algorithm

parent 4c432286
No related branches found
No related tags found
7 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!39102Add extra eta FlowElement validation plot,!39082Dev/add calib hits flow elements
...@@ -14,4 +14,9 @@ from PFlowUtils.PFlowUtilsConf import PFlowCalibPFODecoratorAlgorithm ...@@ -14,4 +14,9 @@ from PFlowUtils.PFlowUtilsConf import PFlowCalibPFODecoratorAlgorithm
PFlowCalibPFODecoratorAlgorithm = PFlowCalibPFODecoratorAlgorithm() PFlowCalibPFODecoratorAlgorithm = PFlowCalibPFODecoratorAlgorithm()
PFlowCalibPFOTruthAttributerTool = CalibClusterTruthAttributerTool("PFlowCalibPFOTruthAttributerTool") PFlowCalibPFOTruthAttributerTool = CalibClusterTruthAttributerTool("PFlowCalibPFOTruthAttributerTool")
PFlowCalibPFODecoratorAlgorithm.TruthAttributerTool = PFlowCalibPFOTruthAttributerTool PFlowCalibPFODecoratorAlgorithm.TruthAttributerTool = PFlowCalibPFOTruthAttributerTool
#allow flow element decoration if the eflowRec JO permits it
from eflowRec.eflowRecFlags import jobproperties as jobprops
if(jobprops.eflowRecFlags.useFlowElements==True):
PFlowCalibPFODecoratorAlgorithm.useFlowElements=True
topSequence+=PFlowCalibPFODecoratorAlgorithm topSequence+=PFlowCalibPFODecoratorAlgorithm
...@@ -13,6 +13,7 @@ StatusCode PFlowCalibPFODecoratorAlgorithm::initialize(){ ...@@ -13,6 +13,7 @@ StatusCode PFlowCalibPFODecoratorAlgorithm::initialize(){
ATH_CHECK(m_mapTruthBarcodeToTruthParticleReadHandleKey.initialize()); ATH_CHECK(m_mapTruthBarcodeToTruthParticleReadHandleKey.initialize());
ATH_CHECK(m_pfoWriteDecorHandleKeyNLeadingTruthParticles.initialize()); ATH_CHECK(m_pfoWriteDecorHandleKeyNLeadingTruthParticles.initialize());
ATH_CHECK(m_feWriteDecorHandleKeyNLeadingTruthParticles.initialize());
ATH_CHECK(m_truthAttributerTool.retrieve()); ATH_CHECK(m_truthAttributerTool.retrieve());
...@@ -84,8 +85,8 @@ StatusCode PFlowCalibPFODecoratorAlgorithm::execute(const EventContext& ctx) con ...@@ -84,8 +85,8 @@ StatusCode PFlowCalibPFODecoratorAlgorithm::execute(const EventContext& ctx) con
pfoWriteDecorHandleNLeadingTruthParticles, pfoWriteDecorHandleNLeadingTruthParticles,
mapIdentifierToCalibHitsReadHandle, mapIdentifierToCalibHitsReadHandle,
mapTruthBarcodeToTruthParticleReadHandle)); // end of check block mapTruthBarcodeToTruthParticleReadHandle)); // end of check block
bool doFlowElements=true;
if(doFlowElements){ if(m_useFlowElements){
SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<std::pair<unsigned int, double> > > feWriteDecorHandleNLeadingTruthParticles(m_feWriteDecorHandleKeyNLeadingTruthParticles,ctx); SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<std::pair<unsigned int, double> > > feWriteDecorHandleNLeadingTruthParticles(m_feWriteDecorHandleKeyNLeadingTruthParticles,ctx);
ATH_CHECK(this->LinkCalibHitPFO( ATH_CHECK(this->LinkCalibHitPFO(
......
...@@ -64,6 +64,9 @@ private: ...@@ -64,6 +64,9 @@ private:
/** Allow user to set the number of truth particles per clusterCaloCluster or PFO, in descending pt order, for which to store calibration hit enery */ /** Allow user to set the number of truth particles per clusterCaloCluster or PFO, in descending pt order, for which to store calibration hit enery */
Gaudi::Property<unsigned int> m_numTruthParticles{this,"NumTruthParticles",3,"Set number of truth particles per CaloCluster/PFO for which we store calibration hit energy"}; Gaudi::Property<unsigned int> m_numTruthParticles{this,"NumTruthParticles",3,"Set number of truth particles per CaloCluster/PFO for which we store calibration hit energy"};
Gaudi::Property<bool> m_useFlowElements{this,"useFlowElements",false,"Set decoration of flow element container as well as PFO"};
// functions to do the links between either PFO or FlowElements // functions to do the links between either PFO or FlowElements
StatusCode LinkCalibHitPFO( StatusCode LinkCalibHitPFO(
SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector< std::pair<unsigned int, double> > >& pfoWriteDecorHandle, SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector< std::pair<unsigned int, double> > >& pfoWriteDecorHandle,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment