5#ifndef ASSOCIATIONUTILS_OVERLAPREMOVALGENUSEALG_H
6#define ASSOCIATIONUTILS_OVERLAPREMOVALGENUSEALG_H
44 template<
class ContainerType>
48 template<
class ContainerType>
52 template<
class ObjType>
57 const std::string&
type);
60 ToolHandle<ORUtils::IOverlapRemovalTool>
m_orTool{
this,
"OverlapRemovalTool",
""};
65 const std::string& propName,
66 const std::string& defaultValue,
67 const std::string& descrip):
68 m_readKey{owner,propName, defaultValue, descrip},
69 m_readDecorKeys{owner, propName +
"ReadDecors", {},
"External input data dependencies for "+propName},
70 m_writeDecorKeys{owner,propName +
"WriteDecors", {},
"Dependencies written for "+
propName}{}
72 if (!
m_readKey.initialize(!allow_empty).isSuccess())
return StatusCode::FAILURE;
73 if (!
m_readDecorKeys.initialize().isSuccess())
return StatusCode::FAILURE;
75 return StatusCode::SUCCESS;
85 void lockDecor (
const std::string& decorKey,
const EventContext& ctx)
const {
90 (void)
h.getDecorationArray();
101 "StoreGate/TEvent key for jets"};
104 "StoreGate/TEvent key for electrons"};
107 "StoreGate/TEvent key for photons"};
110 "StoreGate/TEvent key for muons"};
113 "StoreGate/TEvent key for taus"};
116 "StoreGate/TEvent key for the vertex container"};
118 Gaudi::Property<std::string>
m_bJetLabel{
this,
"BJetLabel",
"",
"Input label for b-tagged jets"};
119 Gaudi::Property<std::string>
m_electronLabel{
this,
"ElectronLabel",
"DFCommonElectronsLHLoose",
120 "Input label for passing electrons"};
121 Gaudi::Property<std::string>
m_photonLabel{
this,
"PhotonLabel",
"DFCommonPhotonsIsEMLoose",
122 "Input label for passing photons"};
123 Gaudi::Property<std::string>
m_muonLabel{
this,
"MuonLabel",
"DFCommonMuonPassIDCuts",
124 "Input label for passing muons"};
125 Gaudi::Property<std::string>
m_tauLabel{
this,
"TauLabel",
"DFCommonTausLoose",
126 "Input label for passing taus" };
130 "Input label for the OverlapRemovalTool"};
133 "Output label for the OverlapRemovalTool"};
135 Gaudi::Property<bool>
m_defaultValue{
this,
"DefaultValue",
true,
"Default value for objects failing OR"};
136 Gaudi::Property<float>
m_ptCut{
this,
"PtCut", 20.,
"Minimum pt for consideration"};
137 Gaudi::Property<float>
m_etaCut{
this,
"EtaCut", 4.5,
"Maximum eta for consideration"};
static const Attributes_t empty
Header file for AthHistogramAlgorithm.
the (new) base class for EventLoop algorithms
const SG::ReadHandleKey< ContainerType > & hk() const
SG::ReadDecorHandleKeyArray< ContainerType > m_readDecorKeys
void declareDependency(const std::string &variable)
DataKeyHandler(EL::AnaAlgorithm *owner, const std::string &propName, const std::string &defaultValue, const std::string &descrip)
void lockDecor(const std::string &decorKey, const EventContext &ctx) const
SG::ReadHandleKey< ContainerType > m_readKey
StatusCode initialize(bool allow_empty=false)
void declareOutput(const std::string &variable)
SG::WriteDecorHandleKeyArray< ContainerType > m_writeDecorKeys
OverlapRemovalGenUseAlg(const std::string &name, ISvcLocator *svcLoc)
Standard algorithm constructor.
DataKeyHandler< xAOD::PhotonContainer > m_photonKey
Gaudi::Property< std::string > m_electronLabel
SG::ReadHandleKey< xAOD::VertexContainer > m_vtxKey
DataKeyHandler< xAOD::MuonContainer > m_muonKey
DataKeyHandler< xAOD::ElectronContainer > m_electronKey
void applySelection(const ContainerType &container)
Simple object selection.
DataKeyHandler< xAOD::TauJetContainer > m_tauKey
Gaudi::Property< float > m_etaCut
Gaudi::Property< std::string > m_muonLabel
Gaudi::Property< bool > m_defaultValue
void printObjects(const xAOD::IParticleContainer &container, const std::string &type)
Print object info.
Gaudi::Property< float > m_ptCut
Gaudi::Property< std::string > m_selectionLabel
Label configuration --> Internal usage no data dependency needed.
Gaudi::Property< std::string > m_photonLabel
Gaudi::Property< std::string > m_bJetLabel
Gaudi::Property< std::string > m_overlapLabel
void setDefaultDecorations(const ContainerType &container)
virtual StatusCode execute()
Execute the algorithm.
Gaudi::Property< std::string > m_tauLabel
virtual StatusCode initialize()
Initialize the algorithm.
DataKeyHandler< xAOD::JetContainer > m_jetKey
bool selectObject(const ObjType &obj)
Simple object selection.
ToolHandle< ORUtils::IOverlapRemovalTool > m_orTool
Handle to the tool.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
std::string decorKeyFromKey(const std::string &key, const std::string &deflt)
Extract the decoration part of key.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.