Commit 4fb11ac3 authored by Mark Hodgkinson's avatar Mark Hodgkinson
Browse files

Some clean up of neutral FlowElement creator algorithms.

Update eflowRec_entries to include the new shallow copy FlowElement creator algorithm.
parent 061232cd
...@@ -37,12 +37,6 @@ private: ...@@ -37,12 +37,6 @@ private:
/** Function to add caluster sampling energies onto FE */ /** 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; 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"};
/** Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input */
Gaudi::Property<bool> m_doClusterMoments{this,"DoClusterMoments",true,"Bool to toggle whether cluster moments are added to the PFOs"};
/** Toggle usage of calibration hit truth - false by default */ /** 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"}; Gaudi::Property<bool> m_useCalibHitTruth{this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"};
......
...@@ -34,6 +34,8 @@ StatusCode PFLCNeutralFlowElementCreatorAlgorithm::execute(const EventContext& c ...@@ -34,6 +34,8 @@ StatusCode PFLCNeutralFlowElementCreatorAlgorithm::execute(const EventContext& c
ElementLink<xAOD::CaloClusterContainer> clusElementLink = accShowerSubtractedClusterLink(*thisFE); ElementLink<xAOD::CaloClusterContainer> clusElementLink = accShowerSubtractedClusterLink(*thisFE);
xAOD::FlowElement* theCopiedFE = (*neutralFELCContainerWriteHandle)[counter]; xAOD::FlowElement* theCopiedFE = (*neutralFELCContainerWriteHandle)[counter];
//be careful here - cluster p4 methods do not store sign. Thus -ve energy clusters have +ve pt and hence +ve energy
//we use eta,phi at EM scale for both 4-vectors - standard FE are at EM scale
theCopiedFE->setP4((*clusElementLink)->pt(), (*clusElementLink)->rawEta(), (*clusElementLink)->rawPhi(), (*clusElementLink)->m()); theCopiedFE->setP4((*clusElementLink)->pt(), (*clusElementLink)->rawEta(), (*clusElementLink)->rawPhi(), (*clusElementLink)->m());
} }
......
...@@ -91,18 +91,11 @@ StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const ...@@ -91,18 +91,11 @@ StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const
ATH_MSG_VERBOSE(" Sucessfully set cluster link"); ATH_MSG_VERBOSE(" Sucessfully set cluster link");
const xAOD::CaloCluster* cluster = thisEfRecCluster->getCluster(); const xAOD::CaloCluster* cluster = thisEfRecCluster->getCluster();
ATH_MSG_VERBOSE("Got CaloCluster from EfRecCluster"); ATH_MSG_VERBOSE("Got CaloCluster from EfRecCluster");
//be careful here - cluster p4 methods do not store sign. Thus -ve energy clusters have +ve pt and hence +ve energy //be careful here - cluster p4 methods do not store sign. Thus -ve energy clusters have +ve pt and hence +ve energy
//we use eta,phi at EM scale for both 4-vectors - standard FE are at EM scale //we use eta,phi at EM scale for both 4-vectors - standard FE are at EM scale
thisFE->setP4(cluster->rawE()/cosh(cluster->rawEta()), cluster->rawEta(),cluster->rawPhi(),cluster->rawM()); thisFE->setP4(cluster->rawE()/cosh(cluster->rawEta()), cluster->rawEta(),cluster->rawPhi(),cluster->rawM());
//TODO
//Now we make a shallow copy of the object such that we can have an LC scale version
//const xAOD::FlowElement* test = const_cast<xAOD::FlowElement*>(thisFE);
//std::pair<xAOD::FlowElement*, xAOD::ShallowAuxInfo*> ret = xAOD::shallowCopyObject(*test);
//thisFE->setP4(cluster->pt(), cluster->rawEta(), cluster->rawPhi(), cluster->m());
//thisFE->setP4EM(cluster->rawE()/cosh(cluster->rawEta()), cluster->rawEta(),cluster->rawPhi(),cluster->rawM());
ATH_MSG_DEBUG("Created neutral FlowElement with E, pt, eta and phi of " << thisFE->e() << ", " << thisFE->pt() << ", " << thisFE->eta() << " and " << thisFE->phi()); ATH_MSG_DEBUG("Created neutral FlowElement with E, pt, eta and phi of " << thisFE->e() << ", " << thisFE->pt() << ", " << thisFE->eta() << " and " << thisFE->phi());
...@@ -172,7 +165,6 @@ StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const ...@@ -172,7 +165,6 @@ StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const
const SG::AuxElement::Accessor<float> accFloatTiming("eflowRec_TIMING"); const SG::AuxElement::Accessor<float> accFloatTiming("eflowRec_TIMING");
accFloatTiming(*thisFE) = cluster->time(); accFloatTiming(*thisFE) = cluster->time();
}//cluster loop }//cluster loop
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "eflowRec/PFAlgorithm.h" #include "eflowRec/PFAlgorithm.h"
#include "eflowRec/PFChargedFlowElementCreatorAlgorithm.h" #include "eflowRec/PFChargedFlowElementCreatorAlgorithm.h"
#include "eflowRec/PFNeutralFlowElementCreatorAlgorithm.h" #include "eflowRec/PFNeutralFlowElementCreatorAlgorithm.h"
#include "eflowRec/PFLCNeutralFlowElementCreatorAlgorithm.h"
#include "eflowRec/PFCellLevelSubtractionTool.h" #include "eflowRec/PFCellLevelSubtractionTool.h"
#include "eflowRec/PFRecoverSplitShowersTool.h" #include "eflowRec/PFRecoverSplitShowersTool.h"
#include "eflowRec/PFMomentCalculatorTool.h" #include "eflowRec/PFMomentCalculatorTool.h"
...@@ -28,6 +29,7 @@ DECLARE_COMPONENT( PFTrackSelector ) ...@@ -28,6 +29,7 @@ DECLARE_COMPONENT( PFTrackSelector )
DECLARE_COMPONENT( PFAlgorithm ) DECLARE_COMPONENT( PFAlgorithm )
DECLARE_COMPONENT( PFChargedFlowElementCreatorAlgorithm) DECLARE_COMPONENT( PFChargedFlowElementCreatorAlgorithm)
DECLARE_COMPONENT( PFNeutralFlowElementCreatorAlgorithm) DECLARE_COMPONENT( PFNeutralFlowElementCreatorAlgorithm)
DECLARE_COMPONENT( PFLCNeutralFlowElementCreatorAlgorithm)
DECLARE_COMPONENT( PFOChargedCreatorAlgorithm ) DECLARE_COMPONENT( PFOChargedCreatorAlgorithm )
DECLARE_COMPONENT( PFONeutralCreatorAlgorithm ) DECLARE_COMPONENT( PFONeutralCreatorAlgorithm )
DECLARE_COMPONENT( PFCellLevelSubtractionTool ) DECLARE_COMPONENT( PFCellLevelSubtractionTool )
......
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