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

code cleanup

parent 44a32f83
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,!38094Fix muon link to charged flow element,!36273Connect Flow Elements to Muon container
......@@ -59,7 +59,7 @@ private:
/* Write key for adding Muon link decorations to neutral Flow Elements */
SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_NeutralFEmuonWriteDecorKey;
Gaudi::Property<bool> m_LinkNeutralFEClusters{this,"LinkNeutralFEClusters",false,"Toggle usage of linkage of Neutral FlowElements - false by default"};
Gaudi::Property<bool> m_LinkNeutralFEClusters{this,"m_LinkNeutralFEClusters",false,"Toggle usage of linkage of Neutral FlowElements - false by default"};
};
......
......@@ -251,7 +251,7 @@ if jobproperties.eflowRecFlags.usePFEGammaPFOAssoc:
topSequence += PFEGammaPFOAssoc
jobproperties.eflowRecFlags.useFlowElements.set_Value_and_Lock(True)
print("RUN_FE_NOW_PLS")
#Add new FlowElement creators
if jobproperties.eflowRecFlags.useFlowElements:
from eflowRec.eflowRecConf import PFChargedFlowElementCreatorAlgorithm
......@@ -268,4 +268,8 @@ if jobproperties.eflowRecFlags.useFlowElements:
from eflowRec.eflowRecConf import PFMuonFlowElementAssoc
PFMuonFlowElementAssoc=PFMuonFlowElementAssoc("PFMuonFlowElementAssocAlgorithm")
#Gaudi switch to add the experimental linker between muon clusters and neutral flow elements
print(PFMuonFlowElementAssoc.m_LinkNeutralFEClusters)
print("RUN_MUONFLOWELEMS_PLS")
topSequence += PFMuonFlowElementAssoc
......@@ -92,22 +92,16 @@ StatusCode PFMuonFlowElementAssoc::execute(const EventContext & ctx) const
//loop over muons in container
for(const xAOD::Muon* muon: *muonChargedFEWriteDecorHandle){
// retrieve a link to an ID track where possible
const ElementLink<xAOD::TrackParticleContainer> muonTrackContLink=muon->inDetTrackParticleLink();
const xAOD::TrackParticleContainer* TrkCont=muonTrackContLink.getDataPtr();
if(TrkCont->size()>0){
for(const xAOD::TrackParticle* MuonTrkParticle: *TrkCont){
size_t MuonTrkIndex=MuonTrkParticle->index();
if(MuonTrkIndex==FETrackIndex){
// Add Muon element link to a vector
// index() is the unique index of the muon in the muon container
FEMuonLinks.push_back( MuonLink_t(*muonReadHandle, muon->index()));
// Add flow element link to a vector
// index() is the unique index of the cFlowElement in the cFlowElementcontaine
muonChargedFEVec.at(muon->index()).push_back(FlowElementLink_t(*ChargedFEReadHandle,FE->index()));
} // matching block
} // TrkCont loop
} // Size check
const xAOD::TrackParticle* muon_trk=muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
size_t MuonTrkIndex=muon_trk->index();
if(MuonTrkIndex==FETrackIndex){
// Add Muon element link to a vector
// index() is the unique index of the muon in the muon container
FEMuonLinks.push_back( MuonLink_t(*muonReadHandle, muon->index()));
// Add flow element link to a vector
// index() is the unique index of the cFlowElement in the cFlowElementcontaine
muonChargedFEVec.at(muon->index()).push_back(FlowElementLink_t(*ChargedFEReadHandle,FE->index()));
} // matching block
}// end of muon loop
// Add vector of muon element links as decoration to FlowElement container
......
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